@elliemae/ds-card 3.16.0 → 3.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSCard.js +13 -2
- package/dist/cjs/DSCard.js.map +2 -2
- package/dist/cjs/DSCardBody.js +5 -0
- package/dist/cjs/DSCardBody.js.map +1 -1
- package/dist/cjs/DSCardHeader.js +6 -0
- package/dist/cjs/DSCardHeader.js.map +1 -1
- package/dist/cjs/detail/DetailCard.js +53 -1
- package/dist/cjs/detail/DetailCard.js.map +2 -2
- package/dist/cjs/detail/styled.js +4 -0
- package/dist/cjs/detail/styled.js.map +1 -1
- package/dist/cjs/index.js +12 -8
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/v2/ActionAddon.js +13 -0
- package/dist/cjs/v2/ActionAddon.js.map +1 -1
- package/dist/cjs/v2/Card.js +21 -1
- package/dist/cjs/v2/Card.js.map +2 -2
- package/dist/cjs/v2/Group.js +14 -1
- package/dist/cjs/v2/Group.js.map +2 -2
- package/dist/cjs/v2/components.js +4 -0
- package/dist/cjs/v2/components.js.map +1 -1
- package/dist/esm/DSCard.js +9 -2
- package/dist/esm/DSCard.js.map +2 -2
- package/dist/esm/DSCardBody.js +1 -0
- package/dist/esm/DSCardBody.js.map +1 -1
- package/dist/esm/DSCardHeader.js +2 -0
- package/dist/esm/DSCardHeader.js.map +1 -1
- package/dist/esm/detail/DetailCard.js +49 -1
- package/dist/esm/detail/DetailCard.js.map +2 -2
- package/dist/esm/detail/styled.js.map +1 -1
- package/dist/esm/index.js +8 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/package.json +7 -0
- package/dist/esm/v2/ActionAddon.js +9 -0
- package/dist/esm/v2/ActionAddon.js.map +1 -1
- package/dist/esm/v2/Card.js +17 -1
- package/dist/esm/v2/Card.js.map +2 -2
- package/dist/esm/v2/Group.js +10 -1
- package/dist/esm/v2/Group.js.map +2 -2
- package/dist/esm/v2/components.js.map +1 -1
- package/dist/types/DSCard.d.ts +4 -4
- package/dist/types/detail/DetailCard.d.ts +16 -16
- package/dist/types/index.d.ts +8 -8
- package/dist/types/v2/Card.d.ts +6 -6
- package/dist/types/v2/Group.d.ts +4 -4
- package/package.json +14 -14
package/dist/esm/DSCard.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSCard.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport DSCardBody from './DSCardBody';\nimport DSCardHeader from './DSCardHeader';\n\nconst DSCard = ({ innerRef = undefined, children = null, containerProps = {}, ...otherProps }) => {\n const { cssClassName } = convertPropToCssClassName('card');\n\n return (\n <div data-testid=\"card\" {...containerProps} ref={innerRef} className={cssClassName} {...otherProps}>\n {children}\n </div>\n );\n};\n\nconst cardProps = {\n /** inject props to component wrapper */\n containerProps: PropTypes.object.description('inject props to component wrapper'),\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"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACUnB;AATJ,SAAS,WAAW,gBAAgB;AACpC,SAAS,iCAAiC;AAC1C,OAAO,gBAAgB;AACvB,OAAO,kBAAkB;AAEzB,MAAM,SAAS,CAAC,EAAE,WAAW,QAAW,WAAW,MAAM,iBAAiB,CAAC,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport DSCardBody from './DSCardBody.js';\nimport DSCardHeader from './DSCardHeader.js';\n\nconst DSCard = ({ innerRef = undefined, children = null, containerProps = {}, ...otherProps }) => {\n const { cssClassName } = convertPropToCssClassName('card');\n\n return (\n <div data-testid=\"card\" {...containerProps} ref={innerRef} className={cssClassName} {...otherProps}>\n {children}\n </div>\n );\n};\n\nconst cardProps = {\n /** inject props to component wrapper */\n containerProps: PropTypes.object.description('inject props to component wrapper'),\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"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACUnB;AATJ,SAAS,WAAW,gBAAgB;AACpC,SAAS,iCAAiC;AAC1C,OAAO,gBAAgB;AACvB,OAAO,kBAAkB;AAEzB,MAAM,SAAS,CAAC,EAAE,WAAW,QAAW,WAAW,MAAM,iBAAiB,CAAC,GAAG,GAAG,WAAW,MAAM;AAChG,QAAM,EAAE,aAAa,IAAI,0BAA0B,MAAM;AAEzD,SACE,oBAAC,SAAI,eAAY,QAAQ,GAAG,gBAAgB,KAAK,UAAU,WAAW,cAAe,GAAG,YACrF,UACH;AAEJ;AAEA,MAAM,YAAY;AAAA;AAAA,EAEhB,gBAAgB,UAAU,OAAO,YAAY,mCAAmC;AAAA;AAAA;AAAA;AAAA,EAIhF,UAAU,UAAU,OAAO,YAAY,8BAA8B;AAAA;AAAA;AAAA;AAAA,EAIrE,UAAU,UAAU;AAAA,IAClB,UAAU,MAAM;AAAA,MACd,MAAM,UAAU,MAAM,CAAC,cAAc,UAAU,CAAC;AAAA,IAClD,CAAC;AAAA,EACH,EAAE,YAAY,6BAA6B;AAC7C;AAEA,OAAO,YAAY;AACnB,OAAO,cAAc;AACrB,MAAM,mBAAmB,SAAS,MAAM;AACxC,iBAAiB,YAAY;AAG7B,IAAO,iBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSCardBody.js
CHANGED
|
@@ -3,6 +3,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
4
4
|
const DSCardBody = ({ children }) => /* @__PURE__ */ jsx("div", { className: "em-ds-card-body", "data-testid": "card-body", children });
|
|
5
5
|
const bodyProps = {
|
|
6
|
+
/** children */
|
|
6
7
|
children: PropTypes.element.description("children")
|
|
7
8
|
};
|
|
8
9
|
DSCardBody.propTypes = bodyProps;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSCardBody.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\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"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACIrB;AAHF,SAAS,WAAW,gBAAgB;AAEpC,MAAM,aAAa,CAAC,EAAE,SAAS,MAC7B,oBAAC,SAAI,WAAU,mBAAkB,eAAY,aAC1C,UACH;AAGF,MAAM,YAAY;AAAA,EAEhB,UAAU,UAAU,QAAQ,YAAY,UAAU;AACpD;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU;AAChD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACIrB;AAHF,SAAS,WAAW,gBAAgB;AAEpC,MAAM,aAAa,CAAC,EAAE,SAAS,MAC7B,oBAAC,SAAI,WAAU,mBAAkB,eAAY,aAC1C,UACH;AAGF,MAAM,YAAY;AAAA;AAAA,EAEhB,UAAU,UAAU,QAAQ,YAAY,UAAU;AACpD;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU;AAChD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSCardHeader.js
CHANGED
|
@@ -10,7 +10,9 @@ const DSCardHeader = ({ title, action }) => {
|
|
|
10
10
|
] });
|
|
11
11
|
};
|
|
12
12
|
const cardHeader = {
|
|
13
|
+
/** card header title */
|
|
13
14
|
title: PropTypes.string.description("card header title"),
|
|
15
|
+
/** action */
|
|
14
16
|
action: PropTypes.node.description("action")
|
|
15
17
|
};
|
|
16
18
|
DSCardHeader.propTypes = cardHeader;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSCardHeader.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\n\nconst DSCardHeader = ({ title, action }) => {\n const { cssClassName, classNameElement } = convertPropToCssClassName('card-header');\n return (\n <div className={cssClassName} data-testid=\"card-header\">\n <span className={classNameElement('heading')}>{title}</span>\n <div className={classNameElement('pull-right')} data-testid=\"ds-card_header-action\">\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"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACOnB,SACE,KADF;AANJ,SAAS,WAAW,gBAAgB;AACpC,SAAS,iCAAiC;AAE1C,MAAM,eAAe,CAAC,EAAE,OAAO,OAAO,MAAM;AAC1C,QAAM,EAAE,cAAc,iBAAiB,IAAI,0BAA0B,aAAa;AAClF,SACE,qBAAC,SAAI,WAAW,cAAc,eAAY,eACxC;AAAA,wBAAC,UAAK,WAAW,iBAAiB,SAAS,GAAI,iBAAM;AAAA,IACrD,oBAAC,SAAI,WAAW,iBAAiB,YAAY,GAAG,eAAY,yBACzD,kBACH;AAAA,KACF;AAEJ;AAEA,MAAM,aAAa;AAAA,EAEjB,OAAO,UAAU,OAAO,YAAY,mBAAmB;AAAA,EAEvD,QAAQ,UAAU,KAAK,YAAY,QAAQ;AAC7C;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAGnC,IAAO,uBAAQ;",
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACOnB,SACE,KADF;AANJ,SAAS,WAAW,gBAAgB;AACpC,SAAS,iCAAiC;AAE1C,MAAM,eAAe,CAAC,EAAE,OAAO,OAAO,MAAM;AAC1C,QAAM,EAAE,cAAc,iBAAiB,IAAI,0BAA0B,aAAa;AAClF,SACE,qBAAC,SAAI,WAAW,cAAc,eAAY,eACxC;AAAA,wBAAC,UAAK,WAAW,iBAAiB,SAAS,GAAI,iBAAM;AAAA,IACrD,oBAAC,SAAI,WAAW,iBAAiB,YAAY,GAAG,eAAY,yBACzD,kBACH;AAAA,KACF;AAEJ;AAEA,MAAM,aAAa;AAAA;AAAA,EAEjB,OAAO,UAAU,OAAO,YAAY,mBAAmB;AAAA;AAAA,EAEvD,QAAQ,UAAU,KAAK,YAAY,QAAQ;AAC7C;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAGnC,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -8,7 +8,7 @@ import DSButton from "@elliemae/ds-button";
|
|
|
8
8
|
import DSSeparator from "@elliemae/ds-separator";
|
|
9
9
|
import { Grid } from "@elliemae/ds-grid";
|
|
10
10
|
import { DSCheckbox } from "@elliemae/ds-form";
|
|
11
|
-
import { Container, Title, Description, RightAddon, RightDescription, RightValue } from "./styled";
|
|
11
|
+
import { Container, Title, Description, RightAddon, RightDescription, RightValue } from "./styled.js";
|
|
12
12
|
const DetailCard = ({
|
|
13
13
|
title,
|
|
14
14
|
description,
|
|
@@ -16,13 +16,16 @@ const DetailCard = ({
|
|
|
16
16
|
rightValue,
|
|
17
17
|
rightDescription,
|
|
18
18
|
rightAddon,
|
|
19
|
+
// select props
|
|
19
20
|
selectable = false,
|
|
20
21
|
isSelected = false,
|
|
21
22
|
onSelect = noop,
|
|
23
|
+
// expand props
|
|
22
24
|
expandable = false,
|
|
23
25
|
isExpanded = false,
|
|
24
26
|
onExpand = noop,
|
|
25
27
|
expandContent,
|
|
28
|
+
// state props
|
|
26
29
|
readOnly = false,
|
|
27
30
|
disabled = false
|
|
28
31
|
}) => {
|
|
@@ -81,20 +84,65 @@ const DetailCard = ({
|
|
|
81
84
|
] }) });
|
|
82
85
|
};
|
|
83
86
|
const detailProps = {
|
|
87
|
+
/**
|
|
88
|
+
* Title of the card.
|
|
89
|
+
*/
|
|
84
90
|
title: PropTypes.string.isRequired.description("Title of the card."),
|
|
91
|
+
/**
|
|
92
|
+
* Description of the card.
|
|
93
|
+
*/
|
|
85
94
|
description: PropTypes.string.description("Description of the card."),
|
|
95
|
+
/**
|
|
96
|
+
* Description color.
|
|
97
|
+
*/
|
|
86
98
|
descriptionColor: PropTypes.oneOf(["primary", "neutral"]).description("Description color."),
|
|
99
|
+
/**
|
|
100
|
+
* Right value (should be used with `rightDescription`)
|
|
101
|
+
*/
|
|
87
102
|
rightValue: PropTypes.string.description("Right value (should be used with `rightDescription`)"),
|
|
103
|
+
/**
|
|
104
|
+
* Right description (should be used with `rightValue`)
|
|
105
|
+
*/
|
|
88
106
|
rightDescription: PropTypes.string.description("Right description (should be used with `rightValue`)"),
|
|
107
|
+
/**
|
|
108
|
+
* Right addon array, max elements: 2
|
|
109
|
+
*/
|
|
89
110
|
rightAddon: PropTypes.element.description("Right addon array, max elements: 2"),
|
|
111
|
+
/**
|
|
112
|
+
* Whether if the card is selectable or not
|
|
113
|
+
*/
|
|
90
114
|
selectable: PropTypes.bool.description("Whether if the card is selectable or not"),
|
|
115
|
+
/**
|
|
116
|
+
* Whether if the card is selected or not
|
|
117
|
+
*/
|
|
91
118
|
isSelected: PropTypes.bool.description("Whether if the card is selected or not"),
|
|
119
|
+
/**
|
|
120
|
+
* Callback on selection
|
|
121
|
+
*/
|
|
92
122
|
onSelect: PropTypes.func.description("Callback on selection"),
|
|
123
|
+
/**
|
|
124
|
+
* Whether if the card is expandable or not
|
|
125
|
+
*/
|
|
93
126
|
expandable: PropTypes.bool.description("Whether if the card is expandable or not"),
|
|
127
|
+
/**
|
|
128
|
+
* Whether if the card is expanded or not
|
|
129
|
+
*/
|
|
94
130
|
isExpanded: PropTypes.bool.description("Whether if the card is expanded or not"),
|
|
131
|
+
/**
|
|
132
|
+
* Callback on expand
|
|
133
|
+
*/
|
|
95
134
|
onExpand: PropTypes.func.description("Callback on expand"),
|
|
135
|
+
/**
|
|
136
|
+
* Content
|
|
137
|
+
*/
|
|
96
138
|
expandContent: PropTypes.element.description("Content"),
|
|
139
|
+
/**
|
|
140
|
+
* Read only
|
|
141
|
+
*/
|
|
97
142
|
readOnly: PropTypes.bool.description("Read only"),
|
|
143
|
+
/**
|
|
144
|
+
* Disabled
|
|
145
|
+
*/
|
|
98
146
|
disabled: PropTypes.bool.description("Disabled")
|
|
99
147
|
};
|
|
100
148
|
DetailCard.propTypes = detailProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/detail/DetailCard.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* 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-props-helpers';\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"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC0CnB,mBAKU,KA6BJ,YAlCN;AAtCJ,SAAS,SAAS,YAAY;AAC9B,SAAS,WAAW,gBAAgB;AACpC,SAAS,eAAe,sBAAsB;AAC9C,SAAS,gBAAgB;AACzB,OAAO,cAAc;AACrB,OAAO,iBAAiB;AACxB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3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,KAAK,YAAY,0CAA0C;AAAA,EAIjF,YAAY,UAAU,KAAK,YAAY,wCAAwC;AAAA,EAI/E,UAAU,UAAU,KAAK,YAAY,oBAAoB;AAAA,EAIzD,eAAe,UAAU,QAAQ,YAAY,SAAS;AAAA,EAItD,UAAU,UAAU,KAAK,YAAY,WAAW;AAAA,EAIhD,UAAU,UAAU,KAAK,YAAY,UAAU;AACjD;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,yBAAyB,SAAS,UAAU;AAClD,uBAAuB,YAAY;AAGnC,IAAO,qBAAQ;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* 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-props-helpers';\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.js';\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"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC0CnB,mBAKU,KA6BJ,YAlCN;AAtCJ,SAAS,SAAS,YAAY;AAC9B,SAAS,WAAW,gBAAgB;AACpC,SAAS,eAAe,sBAAsB;AAC9C,SAAS,gBAAgB;AACzB,OAAO,cAAc;AACrB,OAAO,iBAAiB;AACxB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,WAAW,OAAO,aAAa,YAAY,kBAAkB,kBAAkB;AAExF,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA,a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AAAA;AAAA,EAI5D,YAAY,UAAU,KAAK,YAAY,0CAA0C;AAAA;AAAA;AAAA;AAAA,EAIjF,YAAY,UAAU,KAAK,YAAY,wCAAwC;AAAA;AAAA;AAAA;AAAA,EAI/E,UAAU,UAAU,KAAK,YAAY,oBAAoB;AAAA;AAAA;AAAA;AAAA,EAIzD,eAAe,UAAU,QAAQ,YAAY,SAAS;AAAA;AAAA;AAAA;AAAA,EAItD,UAAU,UAAU,KAAK,YAAY,WAAW;AAAA;AAAA;AAAA;AAAA,EAIhD,UAAU,UAAU,KAAK,YAAY,UAAU;AACjD;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,yBAAyB,SAAS,UAAU;AAClD,uBAAuB,YAAY;AAGnC,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/detail/styled.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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' ? props.theme.colors.neutral['600'] : 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 }) => (active ? theme.colors.brand['600'] : theme.colors.neutral['200']);\nconst background = ({ active, theme }) => (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"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AAEd,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA,4BAGJ,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AAEd,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA,4BAGJ,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAIhE,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA,iBAIX,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAG/C,MAAM,cAAc,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMvB,CAAC,UACR,MAAM,qBAAqB,YAAY,MAAM,MAAM,OAAO,QAAQ,KAAK,IAAI,MAAM,MAAM,OAAO,MAAM,KAAK;AAAA;AAGtG,MAAM,aAAa,OAAO,IAAI;AAAA;AAAA;AAAA;AAK9B,MAAM,mBAAmB,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA,WAIhC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAE/C,MAAM,aAAa,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA,WAI1B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAG/C,MAAM,gBAAgB,OAAO;AAAA;AAAA;AAIpC,MAAM,SAAS,CAAC,EAAE,QAAQ,MAAM,MAAO,SAAS,MAAM,OAAO,MAAM,KAAK,IAAI,MAAM,OAAO,QAAQ,KAAK;AACtG,MAAM,aAAa,CAAC,EAAE,QAAQ,MAAM,MAAO,SAAS,MAAM,OAAO,MAAM,KAAK,IAAI,MAAM,OAAO,QAAQ,KAAK;AAEnG,MAAM,YAAY,OAAO,IAAI;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,KAAK;AAAA;AAAA,MAGvC;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export * from "./DSCard";
|
|
3
|
-
export * from "./DSCardHeader";
|
|
4
|
-
export * from "./DSCardBody";
|
|
5
|
-
export * from "./v2/Card";
|
|
6
|
-
export * from "./v2/Group";
|
|
7
|
-
export * from "./v2/ActionAddon";
|
|
8
|
-
export * from "./detail/DetailCard";
|
|
9
|
-
import { default as default2 } from "./DSCard";
|
|
2
|
+
export * from "./DSCard.js";
|
|
3
|
+
export * from "./DSCardHeader.js";
|
|
4
|
+
export * from "./DSCardBody.js";
|
|
5
|
+
export * from "./v2/Card.js";
|
|
6
|
+
export * from "./v2/Group.js";
|
|
7
|
+
export * from "./v2/ActionAddon.js";
|
|
8
|
+
export * from "./detail/DetailCard.js";
|
|
9
|
+
import { default as default2 } from "./DSCard.js";
|
|
10
10
|
export {
|
|
11
11
|
default2 as default
|
|
12
12
|
};
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSCard.js';\nexport * from './DSCardHeader.js';\nexport * from './DSCardBody.js';\nexport * from './v2/Card.js';\nexport * from './v2/Group.js';\nexport * from './v2/ActionAddon.js';\nexport * from './detail/DetailCard.js';\n\nexport { default } from './DSCard.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,SAAS,WAAAA,gBAAe;",
|
|
6
6
|
"names": ["default"]
|
|
7
7
|
}
|
|
@@ -19,8 +19,17 @@ const ActionAddon = ({ innerRef, label, onClick, icon }) => /* @__PURE__ */ jsxs
|
|
|
19
19
|
icon || /* @__PURE__ */ jsx(ChevronSmallDown, { color: ["brand-primary", 700] })
|
|
20
20
|
] });
|
|
21
21
|
const actionProps = {
|
|
22
|
+
/**
|
|
23
|
+
* Addon label
|
|
24
|
+
*/
|
|
22
25
|
label: PropTypes.string.description("Addon label"),
|
|
26
|
+
/**
|
|
27
|
+
* On click callback
|
|
28
|
+
*/
|
|
23
29
|
onClick: PropTypes.func.description("On click callback"),
|
|
30
|
+
/**
|
|
31
|
+
* Icon to display after the label
|
|
32
|
+
*/
|
|
24
33
|
icon: PropTypes.element.description("Icon to display after the label"),
|
|
25
34
|
innerRef: PropTypes.func.description("Ref to the action button")
|
|
26
35
|
};
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/ActionAddon.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\nimport { ChevronSmallDown } from '@elliemae/ds-icons';\nimport { DSButtonV2 } from '@elliemae/ds-button';\n\nconst Addon = styled(DSButtonV2)`\n background-color: transparent;\n padding: 4px;\n height: 100%;\n border: none;\n font-size: 13px;\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n color: ${(props) => props.theme.colors.brand['700']};\n cursor: pointer;\n`;\n\nconst ActionAddon = ({ innerRef, label, onClick, icon }) => (\n <Addon innerRef={innerRef} onClick={onClick} buttonType=\"icon\">\n {label}\n {icon || <ChevronSmallDown color={['brand-primary', 700]} />}\n </Addon>\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 innerRef: PropTypes.func.description('Ref to the action button'),\n};\n\nActionAddon.propTypes = actionProps;\nActionAddon.displayName = 'ActionAddon';\nconst DSCardActionAddonWithSchema = describe(ActionAddon);\nDSCardActionAddonWithSchema.propTypes = actionProps;\n\nexport { ActionAddon, DSCardActionAddonWithSchema };\nexport default ActionAddon;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACkBrB,SAEW,KAFX;AAjBF,SAA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
13
|
MainSection,
|
|
14
14
|
Description
|
|
15
|
-
} from "./components";
|
|
15
|
+
} from "./components.js";
|
|
16
16
|
const getCol = (rightAddon) => {
|
|
17
17
|
if (!rightAddon)
|
|
18
18
|
return [1];
|
|
@@ -23,6 +23,7 @@ const CustomCard = ({
|
|
|
23
23
|
description,
|
|
24
24
|
leftAddon,
|
|
25
25
|
rightAddon,
|
|
26
|
+
// array. max 2 elements
|
|
26
27
|
hasBorder = false
|
|
27
28
|
}) => /* @__PURE__ */ jsx(TooltipTextProvider, { children: /* @__PURE__ */ jsxs(CardContainer, { hasBorder, cols: getCol(rightAddon), "data-testid": "em-ds-card", children: [
|
|
28
29
|
/* @__PURE__ */ jsxs(LeftSection, { children: [
|
|
@@ -58,10 +59,25 @@ const CustomCard = ({
|
|
|
58
59
|
] })
|
|
59
60
|
] }) });
|
|
60
61
|
const cardProps = {
|
|
62
|
+
/**
|
|
63
|
+
* Title of the card. requiered
|
|
64
|
+
*/
|
|
61
65
|
title: PropTypes.string.isRequired.description("Title of the card. requiered"),
|
|
66
|
+
/**
|
|
67
|
+
* Description of the card. not requiered
|
|
68
|
+
*/
|
|
62
69
|
description: PropTypes.string.description("Description of the card. not requiered"),
|
|
70
|
+
/**
|
|
71
|
+
* Left Addon
|
|
72
|
+
*/
|
|
63
73
|
leftAddon: PropTypes.element.description("Left Addon"),
|
|
74
|
+
/**
|
|
75
|
+
* Right addon array, max elements: 2
|
|
76
|
+
*/
|
|
64
77
|
rightAddon: PropTypes.array.description("Right addon array, max elements: 2"),
|
|
78
|
+
/**
|
|
79
|
+
* Wheter if the card has border or not
|
|
80
|
+
*/
|
|
65
81
|
hasBorder: PropTypes.bool.description("Wheter if the card has border or not")
|
|
66
82
|
};
|
|
67
83
|
CustomCard.propTypes = cardProps;
|
package/dist/esm/v2/Card.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/Card.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSHeader } from '@elliemae/ds-header';\nimport DSTruncatedTooltipText, { TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n CardContainer,\n LeftSection,\n LeftAddon,\n RightAddonSection,\n RightAddon,\n Separator,\n MainSection,\n Description,\n} from './components';\n\nconst getCol = (rightAddon) => {\n if (!rightAddon) return [1];\n return [1, 'auto'];\n};\n\nconst CustomCard = ({\n title,\n description,\n leftAddon,\n rightAddon, // array. max 2 elements\n hasBorder = false,\n}) => (\n <TooltipTextProvider>\n <CardContainer hasBorder={hasBorder} cols={getCol(rightAddon)} data-testid=\"em-ds-card\">\n <LeftSection>\n {leftAddon && <LeftAddon>{leftAddon}</LeftAddon>}\n <MainSection\n style={{\n maxWidth: leftAddon ? 'calc(100% - 40px)' : '100%',\n }}\n >\n <DSHeader\n fontSize=\"16px\"\n data-testid=\"em-ds-card-header\"\n fontWeight=\"regular\"\n color=\"neutral.800\"\n text={<DSTruncatedTooltipText value={title} />}\n />\n {description && (\n <Description>\n <DSTruncatedTooltipText value={description} />\n </Description>\n )}\n </MainSection>\n </LeftSection>\n {rightAddon && (\n <RightAddonSection>\n {rightAddon[0] && <RightAddon>{rightAddon[0]}</RightAddon>}\n {rightAddon[1] && (\n <>\n {rightAddon.length > 1 && <Separator />}\n <RightAddon>{rightAddon[1]}</RightAddon>\n </>\n )}\n </RightAddonSection>\n )}\n </CardContainer>\n </TooltipTextProvider>\n);\n\nconst cardProps = {\n /**\n * Title of the card. requiered\n */\n title: PropTypes.string.isRequired.description('Title of the card. requiered'),\n /**\n * Description of the card. not requiered\n */\n description: PropTypes.string.description('Description of the card. not requiered'),\n /**\n * Left Addon\n */\n leftAddon: PropTypes.element.description('Left Addon'),\n /**\n * Right addon array, max elements: 2\n */\n rightAddon: PropTypes.array.description('Right addon array, max elements: 2'),\n /**\n * Wheter if the card has border or not\n */\n hasBorder: PropTypes.bool.description('Wheter if the card has border or not'),\n};\n\nCustomCard.propTypes = cardProps;\nCustomCard.displayName = 'CustomCard';\nconst DSCardCustomWithSchema = describe(CustomCard);\nDSCardCustomWithSchema.propTypes = cardProps;\n\nexport { CustomCard, DSCardCustomWithSchema };\nexport default CustomCard;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC8BD,SAwBV,UAxBU,KACd,YADc;AA7BtB,SAAS,WAAW,gBAAgB;AACpC,SAAS,gBAAgB;AACzB,OAAO,0BAA0B,2BAA2B;AAC5D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,SAAS,CAAC,eAAe;AAC7B,MAAI,CAAC;AAAY,WAAO,CAAC,CAAC;AAC1B,SAAO,CAAC,GAAG,MAAM;AACnB;AAEA,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AACd,MACE,oBAAC,uBACC,+BAAC,iBAAc,WAAsB,MAAM,OAAO,UAAU,GAAG,eAAY,cACzE;AAAA,uBAAC,eACE;AAAA,iBAAa,oBAAC,aAAW,qBAAU;AAAA,IACpC;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,UACL,UAAU,YAAY,sBAAsB;AAAA,QAC9C;AAAA,QAEA;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,UAAS;AAAA,cACT,eAAY;AAAA,cACZ,YAAW;AAAA,cACX,OAAM;AAAA,cACN,MAAM,oBAAC,0BAAuB,OAAO,OAAO;AAAA;AAAA,UAC9C;AAAA,UACC,eACC,oBAAC,eACC,8BAAC,0BAAuB,OAAO,aAAa,GAC9C;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF;AAAA,EACC,cACC,qBAAC,qBACE;AAAA,eAAW,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { DSHeader } from '@elliemae/ds-header';\nimport DSTruncatedTooltipText, { TooltipTextProvider } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n CardContainer,\n LeftSection,\n LeftAddon,\n RightAddonSection,\n RightAddon,\n Separator,\n MainSection,\n Description,\n} from './components.js';\n\nconst getCol = (rightAddon) => {\n if (!rightAddon) return [1];\n return [1, 'auto'];\n};\n\nconst CustomCard = ({\n title,\n description,\n leftAddon,\n rightAddon, // array. max 2 elements\n hasBorder = false,\n}) => (\n <TooltipTextProvider>\n <CardContainer hasBorder={hasBorder} cols={getCol(rightAddon)} data-testid=\"em-ds-card\">\n <LeftSection>\n {leftAddon && <LeftAddon>{leftAddon}</LeftAddon>}\n <MainSection\n style={{\n maxWidth: leftAddon ? 'calc(100% - 40px)' : '100%',\n }}\n >\n <DSHeader\n fontSize=\"16px\"\n data-testid=\"em-ds-card-header\"\n fontWeight=\"regular\"\n color=\"neutral.800\"\n text={<DSTruncatedTooltipText value={title} />}\n />\n {description && (\n <Description>\n <DSTruncatedTooltipText value={description} />\n </Description>\n )}\n </MainSection>\n </LeftSection>\n {rightAddon && (\n <RightAddonSection>\n {rightAddon[0] && <RightAddon>{rightAddon[0]}</RightAddon>}\n {rightAddon[1] && (\n <>\n {rightAddon.length > 1 && <Separator />}\n <RightAddon>{rightAddon[1]}</RightAddon>\n </>\n )}\n </RightAddonSection>\n )}\n </CardContainer>\n </TooltipTextProvider>\n);\n\nconst cardProps = {\n /**\n * Title of the card. requiered\n */\n title: PropTypes.string.isRequired.description('Title of the card. requiered'),\n /**\n * Description of the card. not requiered\n */\n description: PropTypes.string.description('Description of the card. not requiered'),\n /**\n * Left Addon\n */\n leftAddon: PropTypes.element.description('Left Addon'),\n /**\n * Right addon array, max elements: 2\n */\n rightAddon: PropTypes.array.description('Right addon array, max elements: 2'),\n /**\n * Wheter if the card has border or not\n */\n hasBorder: PropTypes.bool.description('Wheter if the card has border or not'),\n};\n\nCustomCard.propTypes = cardProps;\nCustomCard.displayName = 'CustomCard';\nconst DSCardCustomWithSchema = describe(CustomCard);\nDSCardCustomWithSchema.propTypes = cardProps;\n\nexport { CustomCard, DSCardCustomWithSchema };\nexport default CustomCard;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC8BD,SAwBV,UAxBU,KACd,YADc;AA7BtB,SAAS,WAAW,gBAAgB;AACpC,SAAS,gBAAgB;AACzB,OAAO,0BAA0B,2BAA2B;AAC5D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,SAAS,CAAC,eAAe;AAC7B,MAAI,CAAC;AAAY,WAAO,CAAC,CAAC;AAC1B,SAAO,CAAC,GAAG,MAAM;AACnB;AAEA,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA,YAAY;AACd,MACE,oBAAC,uBACC,+BAAC,iBAAc,WAAsB,MAAM,OAAO,UAAU,GAAG,eAAY,cACzE;AAAA,uBAAC,eACE;AAAA,iBAAa,oBAAC,aAAW,qBAAU;AAAA,IACpC;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,UACL,UAAU,YAAY,sBAAsB;AAAA,QAC9C;AAAA,QAEA;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,UAAS;AAAA,cACT,eAAY;AAAA,cACZ,YAAW;AAAA,cACX,OAAM;AAAA,cACN,MAAM,oBAAC,0BAAuB,OAAO,OAAO;AAAA;AAAA,UAC9C;AAAA,UACC,eACC,oBAAC,eACC,8BAAC,0BAAuB,OAAO,aAAa,GAC9C;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF;AAAA,EACC,cACC,qBAAC,qBACE;AAAA,eAAW,CAAC,KAAK,oBAAC,cAAY,qBAAW,CAAC,GAAE;AAAA,IAC5C,WAAW,CAAC,KACX,iCACG;AAAA,iBAAW,SAAS,KAAK,oBAAC,aAAU;AAAA,MACrC,oBAAC,cAAY,qBAAW,CAAC,GAAE;AAAA,OAC7B;AAAA,KAEJ;AAAA,GAEJ,GACF;AAGF,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA,EAIhB,OAAO,UAAU,OAAO,WAAW,YAAY,8BAA8B;AAAA;AAAA;AAAA;AAAA,EAI7E,aAAa,UAAU,OAAO,YAAY,wCAAwC;AAAA;AAAA;AAAA;AAAA,EAIlF,WAAW,UAAU,QAAQ,YAAY,YAAY;AAAA;AAAA;AAAA;AAAA,EAIrD,YAAY,UAAU,MAAM,YAAY,oCAAoC;AAAA;AAAA;AAAA;AAAA,EAI5E,WAAW,UAAU,KAAK,YAAY,sCAAsC;AAC9E;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,yBAAyB,SAAS,UAAU;AAClD,uBAAuB,YAAY;AAGnC,IAAO,eAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/v2/Group.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
4
4
|
import { color, border, truncate, styled } from "@elliemae/ds-system";
|
|
5
|
-
import Card from "./Card";
|
|
5
|
+
import Card from "./Card.js";
|
|
6
6
|
const Group = styled.div`
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
@@ -39,8 +39,17 @@ const CardGroup = ({ children, title, action }) => /* @__PURE__ */ jsxs(Group, {
|
|
|
39
39
|
/* @__PURE__ */ jsx(Items, { children })
|
|
40
40
|
] });
|
|
41
41
|
const cardgroupProps = {
|
|
42
|
+
/**
|
|
43
|
+
* Card items
|
|
44
|
+
*/
|
|
42
45
|
children: PropTypes.element.isRequired.description("Card items"),
|
|
46
|
+
/**
|
|
47
|
+
* Title of the group
|
|
48
|
+
*/
|
|
43
49
|
title: PropTypes.string.isRequired.description("Title of the group"),
|
|
50
|
+
/**
|
|
51
|
+
* Right addon action
|
|
52
|
+
*/
|
|
44
53
|
action: PropTypes.element.description("Right addon action")
|
|
45
54
|
};
|
|
46
55
|
CardGroup.propTypes = cardgroupProps;
|
package/dist/esm/v2/Group.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/Group.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { color, border, truncate, styled } from '@elliemae/ds-system';\nimport Card from './Card';\n\nconst Group = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n max-width: 100%;\n ${Card} {\n border-top: none;\n }\n ${({ theme, withTopBorder }) => (withTopBorder ? `border-top: ${theme.colors.neutral['100']}` : '')}\n`;\n\nconst GroupTitle = styled.span`\n ${truncate()}\n`;\n\nconst TitleWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n padding: 0 ${(props) => props.theme.space.xs};\n font-size: 12px;\n ${color('neutral', '700')};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n background-color: ${(props) => props.theme.colors.neutral['080']};\n border-top: ${(props) => border(props.theme.colors.neutral['080'])};\n line-height: 24px;\n`;\n\nconst Items = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nconst CardGroup = ({ children, title, action }) => (\n <Group withTopBorder={!title}>\n {!!title && (\n <TitleWrapper>\n <GroupTitle>{title}</GroupTitle>\n {action}\n </TitleWrapper>\n )}\n <Items>{children}</Items>\n </Group>\n);\n\nconst cardgroupProps = {\n /**\n * Card items\n */\n children: PropTypes.element.isRequired.description('Card items'),\n /**\n * Title of the group\n */\n title: PropTypes.string.isRequired.description('Title of the group'),\n /**\n * Right addon action\n */\n action: PropTypes.element.description('Right addon action'),\n};\n\nCardGroup.propTypes = cardgroupProps;\nCardGroup.displayName = 'CardGroup';\nconst DSCardGroupWithSchema = describe(CardGroup);\nDSCardGroupWithSchema.propTypes = cardgroupProps;\n\nexport { CardGroup, DSCardGroupWithSchema };\nexport default CardGroup;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACwCjB,SACE,KADF;AAvCN,SAAS,WAAW,gBAAgB;AACpC,SAAS,OAAO,QAAQ,UAAU,cAAc;AAChD,OAAO,UAAU;AAEjB,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjB;AAAA;AAAA;AAAA,IAGA,CAAC,EAAE,OAAO,cAAc,MAAO,gBAAgB,eAAe,MAAM,OAAO,QAAQ,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { color, border, truncate, styled } from '@elliemae/ds-system';\nimport Card from './Card.js';\n\nconst Group = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n max-width: 100%;\n ${Card} {\n border-top: none;\n }\n ${({ theme, withTopBorder }) => (withTopBorder ? `border-top: ${theme.colors.neutral['100']}` : '')}\n`;\n\nconst GroupTitle = styled.span`\n ${truncate()}\n`;\n\nconst TitleWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n padding: 0 ${(props) => props.theme.space.xs};\n font-size: 12px;\n ${color('neutral', '700')};\n font-weight: ${(props) => props.theme.fontWeights.semibold};\n background-color: ${(props) => props.theme.colors.neutral['080']};\n border-top: ${(props) => border(props.theme.colors.neutral['080'])};\n line-height: 24px;\n`;\n\nconst Items = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nconst CardGroup = ({ children, title, action }) => (\n <Group withTopBorder={!title}>\n {!!title && (\n <TitleWrapper>\n <GroupTitle>{title}</GroupTitle>\n {action}\n </TitleWrapper>\n )}\n <Items>{children}</Items>\n </Group>\n);\n\nconst cardgroupProps = {\n /**\n * Card items\n */\n children: PropTypes.element.isRequired.description('Card items'),\n /**\n * Title of the group\n */\n title: PropTypes.string.isRequired.description('Title of the group'),\n /**\n * Right addon action\n */\n action: PropTypes.element.description('Right addon action'),\n};\n\nCardGroup.propTypes = cardgroupProps;\nCardGroup.displayName = 'CardGroup';\nconst DSCardGroupWithSchema = describe(CardGroup);\nDSCardGroupWithSchema.propTypes = cardgroupProps;\n\nexport { CardGroup, DSCardGroupWithSchema };\nexport default CardGroup;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACwCjB,SACE,KADF;AAvCN,SAAS,WAAW,gBAAgB;AACpC,SAAS,OAAO,QAAQ,UAAU,cAAc;AAChD,OAAO,UAAU;AAEjB,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjB;AAAA;AAAA;AAAA,IAGA,CAAC,EAAE,OAAO,cAAc,MAAO,gBAAgB,eAAe,MAAM,OAAO,QAAQ,KAAK,MAAM;AAAA;AAGlG,MAAM,aAAa,OAAO;AAAA,IACtB,SAAS;AAAA;AAGb,MAAM,eAAe,OAAO;AAAA;AAAA;AAAA,eAGb,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,IAExC,MAAM,WAAW,KAAK;AAAA,iBACT,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,sBAC9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA,gBACjD,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA;AAAA;AAInE,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAKrB,MAAM,YAAY,CAAC,EAAE,UAAU,OAAO,OAAO,MAC3C,qBAAC,SAAM,eAAe,CAAC,OACpB;AAAA,GAAC,CAAC,SACD,qBAAC,gBACC;AAAA,wBAAC,cAAY,iBAAM;AAAA,IAClB;AAAA,KACH;AAAA,EAEF,oBAAC,SAAO,UAAS;AAAA,GACnB;AAGF,MAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA,EAIrB,UAAU,UAAU,QAAQ,WAAW,YAAY,YAAY;AAAA;AAAA;AAAA;AAAA,EAI/D,OAAO,UAAU,OAAO,WAAW,YAAY,oBAAoB;AAAA;AAAA;AAAA;AAAA,EAInE,QAAQ,UAAU,QAAQ,YAAY,oBAAoB;AAC5D;AAEA,UAAU,YAAY;AACtB,UAAU,cAAc;AACxB,MAAM,wBAAwB,SAAS,SAAS;AAChD,sBAAsB,YAAY;AAGlC,IAAO,gBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/components.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\n\nconst CardContainer = styled(Grid)`\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 56px;\n padding: 8px 16px;\n position: relative;\n border: ${({ theme, hasBorder }) => (hasBorder ? `1px solid ${theme.colors.neutral['100']}` : '')};\n &:before {\n content: '';\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['100']};\n position: absolute;\n margin: 0 auto;\n width: 90%;\n bottom: 0;\n }\n &:last-child::before {\n content: none;\n }\n`;\n\nconst LeftSection = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst LeftAddon = styled.div`\n height: fit-content;\n width: fit-content;\n margin-right: 16px;\n cursor: pointer;\n`;\n\nconst RightAddonSection = styled.div`\n display: flex;\n align-items: center;\n width: fit-content;\n`;\n\nconst RightAddon = styled.div`\n height: fit-content;\n width: fit-content;\n cursor: pointer;\n`;\n\nconst Separator = styled.div`\n width: 0px;\n height: 24px;\n border-right: 1px solid ${(props) => props.theme.colors.neutral['300']};\n margin: 0 8px;\n`;\n\nconst MainSection = styled.div`\n display: flex;\n flex-direction: column;\n`;\n\nconst Title = styled.h3`\n margin: 0;\n font-size: 16px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['800']};\n`;\n\nconst Description = styled.p`\n margin: 0;\n color: ${(props) => props.theme.colors.neutral['600']};\n`;\n\nexport {\n CardContainer,\n LeftSection,\n LeftAddon,\n RightAddonSection,\n RightAddon,\n Separator,\n MainSection,\n Title,\n Description,\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,MAAM,gBAAgB,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOrB,CAAC,EAAE,OAAO,UAAU,MAAO,YAAY,aAAa,MAAM,OAAO,QAAQ,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AACvB,SAAS,YAAY;AAErB,MAAM,gBAAgB,OAAO,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAOrB,CAAC,EAAE,OAAO,UAAU,MAAO,YAAY,aAAa,MAAM,OAAO,QAAQ,KAAK,MAAM;AAAA;AAAA;AAAA,+BAGjE,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW1E,MAAM,cAAc,OAAO;AAAA;AAAA;AAAA;AAK3B,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOzB,MAAM,oBAAoB,OAAO;AAAA;AAAA;AAAA;AAAA;AAMjC,MAAM,aAAa,OAAO;AAAA;AAAA;AAAA;AAAA;AAM1B,MAAM,YAAY,OAAO;AAAA;AAAA;AAAA,4BAGG,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAIvE,MAAM,cAAc,OAAO;AAAA;AAAA;AAAA;AAK3B,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA,iBAGJ,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,WACzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAGtD,MAAM,cAAc,OAAO;AAAA;AAAA,WAEhB,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/types/DSCard.d.ts
CHANGED
|
@@ -7,19 +7,19 @@ declare const DSCard: {
|
|
|
7
7
|
}): JSX.Element;
|
|
8
8
|
propTypes: {
|
|
9
9
|
/** inject props to component wrapper */
|
|
10
|
-
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
10
|
+
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
11
11
|
/**
|
|
12
12
|
* Get reference for the button
|
|
13
13
|
*/
|
|
14
|
-
innerRef: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
14
|
+
innerRef: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
15
15
|
/**
|
|
16
16
|
* DSCardBody and DSCardHeader
|
|
17
17
|
*/
|
|
18
|
-
children: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
18
|
+
children: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
19
19
|
};
|
|
20
20
|
displayName: string;
|
|
21
21
|
};
|
|
22
|
-
declare const DSCardWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<{
|
|
22
|
+
declare const DSCardWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
|
|
23
23
|
[x: string]: any;
|
|
24
24
|
innerRef?: undefined;
|
|
25
25
|
children?: null | undefined;
|
|
@@ -20,67 +20,67 @@ declare const DetailCard: {
|
|
|
20
20
|
/**
|
|
21
21
|
* Title of the card.
|
|
22
22
|
*/
|
|
23
|
-
title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
23
|
+
title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
24
24
|
/**
|
|
25
25
|
* Description of the card.
|
|
26
26
|
*/
|
|
27
|
-
description: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
27
|
+
description: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
28
28
|
/**
|
|
29
29
|
* Description color.
|
|
30
30
|
*/
|
|
31
|
-
descriptionColor: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
31
|
+
descriptionColor: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
32
32
|
/**
|
|
33
33
|
* Right value (should be used with `rightDescription`)
|
|
34
34
|
*/
|
|
35
|
-
rightValue: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
35
|
+
rightValue: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
36
36
|
/**
|
|
37
37
|
* Right description (should be used with `rightValue`)
|
|
38
38
|
*/
|
|
39
|
-
rightDescription: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
39
|
+
rightDescription: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
40
40
|
/**
|
|
41
41
|
* Right addon array, max elements: 2
|
|
42
42
|
*/
|
|
43
|
-
rightAddon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
43
|
+
rightAddon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
44
44
|
/**
|
|
45
45
|
* Whether if the card is selectable or not
|
|
46
46
|
*/
|
|
47
|
-
selectable: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
47
|
+
selectable: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
48
48
|
/**
|
|
49
49
|
* Whether if the card is selected or not
|
|
50
50
|
*/
|
|
51
|
-
isSelected: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
51
|
+
isSelected: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
52
52
|
/**
|
|
53
53
|
* Callback on selection
|
|
54
54
|
*/
|
|
55
|
-
onSelect: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
55
|
+
onSelect: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
56
56
|
/**
|
|
57
57
|
* Whether if the card is expandable or not
|
|
58
58
|
*/
|
|
59
|
-
expandable: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
59
|
+
expandable: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
60
60
|
/**
|
|
61
61
|
* Whether if the card is expanded or not
|
|
62
62
|
*/
|
|
63
|
-
isExpanded: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
63
|
+
isExpanded: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
64
64
|
/**
|
|
65
65
|
* Callback on expand
|
|
66
66
|
*/
|
|
67
|
-
onExpand: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
67
|
+
onExpand: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
68
68
|
/**
|
|
69
69
|
* Content
|
|
70
70
|
*/
|
|
71
|
-
expandContent: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
71
|
+
expandContent: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
72
72
|
/**
|
|
73
73
|
* Read only
|
|
74
74
|
*/
|
|
75
|
-
readOnly: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
75
|
+
readOnly: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
76
76
|
/**
|
|
77
77
|
* Disabled
|
|
78
78
|
*/
|
|
79
|
-
disabled: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
79
|
+
disabled: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
80
80
|
};
|
|
81
81
|
displayName: string;
|
|
82
82
|
};
|
|
83
|
-
declare const DSCardDetailWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<{
|
|
83
|
+
declare const DSCardDetailWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
|
|
84
84
|
title: any;
|
|
85
85
|
description: any;
|
|
86
86
|
descriptionColor?: string | undefined;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './DSCard';
|
|
2
|
-
export * from './DSCardHeader';
|
|
3
|
-
export * from './DSCardBody';
|
|
4
|
-
export * from './v2/Card';
|
|
5
|
-
export * from './v2/Group';
|
|
6
|
-
export * from './v2/ActionAddon';
|
|
7
|
-
export * from './detail/DetailCard';
|
|
8
|
-
export { default } from './DSCard';
|
|
1
|
+
export * from './DSCard.js';
|
|
2
|
+
export * from './DSCardHeader.js';
|
|
3
|
+
export * from './DSCardBody.js';
|
|
4
|
+
export * from './v2/Card.js';
|
|
5
|
+
export * from './v2/Group.js';
|
|
6
|
+
export * from './v2/ActionAddon.js';
|
|
7
|
+
export * from './detail/DetailCard.js';
|
|
8
|
+
export { default } from './DSCard.js';
|
package/dist/types/v2/Card.d.ts
CHANGED
|
@@ -10,27 +10,27 @@ declare const CustomCard: {
|
|
|
10
10
|
/**
|
|
11
11
|
* Title of the card. requiered
|
|
12
12
|
*/
|
|
13
|
-
title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
13
|
+
title: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
14
14
|
/**
|
|
15
15
|
* Description of the card. not requiered
|
|
16
16
|
*/
|
|
17
|
-
description: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
17
|
+
description: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
18
18
|
/**
|
|
19
19
|
* Left Addon
|
|
20
20
|
*/
|
|
21
|
-
leftAddon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
21
|
+
leftAddon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
22
22
|
/**
|
|
23
23
|
* Right addon array, max elements: 2
|
|
24
24
|
*/
|
|
25
|
-
rightAddon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
25
|
+
rightAddon: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
26
26
|
/**
|
|
27
27
|
* Wheter if the card has border or not
|
|
28
28
|
*/
|
|
29
|
-
hasBorder: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
29
|
+
hasBorder: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").ReactDescT;
|
|
30
30
|
};
|
|
31
31
|
displayName: string;
|
|
32
32
|
};
|
|
33
|
-
declare const DSCardCustomWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<{
|
|
33
|
+
declare const DSCardCustomWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<{
|
|
34
34
|
title: any;
|
|
35
35
|
description: any;
|
|
36
36
|
leftAddon: any;
|