@elliemae/ds-card 3.0.0-next.68 → 3.0.0-next.70
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 +1 -0
- package/dist/cjs/DSCard.js.map +2 -2
- package/dist/cjs/DSCardBody.js +1 -0
- package/dist/cjs/DSCardBody.js.map +2 -2
- package/dist/cjs/DSCardHeader.js +1 -0
- package/dist/cjs/DSCardHeader.js.map +2 -2
- package/dist/cjs/detail/DetailCard.js +1 -0
- package/dist/cjs/detail/DetailCard.js.map +2 -2
- package/dist/cjs/v2/ActionAddon.js +1 -0
- package/dist/cjs/v2/ActionAddon.js.map +2 -2
- package/dist/cjs/v2/Card.js +1 -0
- package/dist/cjs/v2/Card.js.map +2 -2
- package/dist/cjs/v2/Group.js +1 -0
- package/dist/cjs/v2/Group.js.map +2 -2
- package/dist/esm/DSCard.js +1 -0
- package/dist/esm/DSCard.js.map +2 -2
- package/dist/esm/DSCardBody.js +1 -0
- package/dist/esm/DSCardBody.js.map +2 -2
- package/dist/esm/DSCardHeader.js +1 -0
- package/dist/esm/DSCardHeader.js.map +2 -2
- package/dist/esm/detail/DetailCard.js +1 -0
- package/dist/esm/detail/DetailCard.js.map +2 -2
- package/dist/esm/v2/ActionAddon.js +1 -0
- package/dist/esm/v2/ActionAddon.js.map +2 -2
- package/dist/esm/v2/Card.js +1 -0
- package/dist/esm/v2/Card.js.map +2 -2
- package/dist/esm/v2/Group.js +1 -0
- package/dist/esm/v2/Group.js.map +2 -2
- package/package.json +1 -1
package/dist/cjs/DSCard.js
CHANGED
|
@@ -86,6 +86,7 @@ const cardProps = {
|
|
|
86
86
|
})).description("DSCardBody and DSCardHeader")
|
|
87
87
|
};
|
|
88
88
|
DSCard.propTypes = cardProps;
|
|
89
|
+
DSCard.displayName = "DSCard";
|
|
89
90
|
const DSCardWithSchema = (0, import_react_desc.describe)(DSCard);
|
|
90
91
|
DSCardWithSchema.propTypes = cardProps;
|
|
91
92
|
var DSCard_default = DSCard;
|
package/dist/cjs/DSCard.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCard.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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;\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,2BAA0C;AAC1C,wBAAuB;AACvB,0BAAyB;AAEzB,MAAM,SAAS,CAAC,OAKV;AALU,eACd;AAAA,eAAW;AAAA,IACX,WAAW;AAAA,IACX,iBAAiB,CAAC;AAAA,MAHJ,IAIX,uBAJW,IAIX;AAAA,IAHH;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,EAAE,iBAAiB,oDAA0B,MAAM;AAEzD,SACE,mDAAC;AAAA,IACC,eAAY;AAAA,KACR,iBAFL;AAAA,IAGC,KAAK;AAAA,IACL,WAAW;AAAA,MACP,aAEH,QACH;AAEJ;AAEA,MAAM,YAAY;AAAA,EAEhB,gBAAgB,4BAAU,OAAO,YAC/B,mCACF;AAAA,EAIA,UAAU,4BAAU,OAAO,YAAY,8BAA8B;AAAA,EAIrE,UAAU,4BAAU,QAClB,4BAAU,MAAM;AAAA,IACd,MAAM,4BAAU,MAAM,CAAC,6BAAc,yBAAU,CAAC;AAAA,EAClD,CAAC,CACH,EAAE,YAAY,6BAA6B;AAC7C;AAEA,OAAO,YAAY;AACnB,MAAM,mBAAmB,gCAAS,MAAM;AACxC,iBAAiB,YAAY;AAG7B,IAAO,iBAAQ;",
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,2BAA0C;AAC1C,wBAAuB;AACvB,0BAAyB;AAEzB,MAAM,SAAS,CAAC,OAKV;AALU,eACd;AAAA,eAAW;AAAA,IACX,WAAW;AAAA,IACX,iBAAiB,CAAC;AAAA,MAHJ,IAIX,uBAJW,IAIX;AAAA,IAHH;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,EAAE,iBAAiB,oDAA0B,MAAM;AAEzD,SACE,mDAAC;AAAA,IACC,eAAY;AAAA,KACR,iBAFL;AAAA,IAGC,KAAK;AAAA,IACL,WAAW;AAAA,MACP,aAEH,QACH;AAEJ;AAEA,MAAM,YAAY;AAAA,EAEhB,gBAAgB,4BAAU,OAAO,YAC/B,mCACF;AAAA,EAIA,UAAU,4BAAU,OAAO,YAAY,8BAA8B;AAAA,EAIrE,UAAU,4BAAU,QAClB,4BAAU,MAAM;AAAA,IACd,MAAM,4BAAU,MAAM,CAAC,6BAAc,yBAAU,CAAC;AAAA,EAClD,CAAC,CACH,EAAE,YAAY,6BAA6B;AAC7C;AAEA,OAAO,YAAY;AACnB,OAAO,cAAc;AACrB,MAAM,mBAAmB,gCAAS,MAAM;AACxC,iBAAiB,YAAY;AAG7B,IAAO,iBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/DSCardBody.js
CHANGED
|
@@ -36,6 +36,7 @@ const bodyProps = {
|
|
|
36
36
|
children: import_react_desc.PropTypes.element.description("children")
|
|
37
37
|
};
|
|
38
38
|
DSCardBody.propTypes = bodyProps;
|
|
39
|
+
DSCardBody.displayName = "DSCardBody";
|
|
39
40
|
const DSCardBodyWithSchema = (0, import_react_desc.describe)(DSCardBody);
|
|
40
41
|
DSCardBodyWithSchema.propTypes = bodyProps;
|
|
41
42
|
var DSCardBody_default = DSCardBody;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCardBody.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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;\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": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AAEpC,MAAM,aAAa,CAAC,EAAE,eACpB,mDAAC;AAAA,EAAI,WAAU;AAAA,EAAkB,eAAY;AAAA,GAC1C,QACH;AAGF,MAAM,YAAY;AAAA,EAEhB,UAAU,4BAAU,QAAQ,YAAY,UAAU;AACpD;AAEA,WAAW,YAAY;AACvB,MAAM,uBAAuB,gCAAS,UAAU;AAChD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AAEpC,MAAM,aAAa,CAAC,EAAE,eACpB,mDAAC;AAAA,EAAI,WAAU;AAAA,EAAkB,eAAY;AAAA,GAC1C,QACH;AAGF,MAAM,YAAY;AAAA,EAEhB,UAAU,4BAAU,QAAQ,YAAY,UAAU;AACpD;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,uBAAuB,gCAAS,UAAU;AAChD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/DSCardHeader.js
CHANGED
|
@@ -46,6 +46,7 @@ const cardHeader = {
|
|
|
46
46
|
action: import_react_desc.PropTypes.node.description("action")
|
|
47
47
|
};
|
|
48
48
|
DSCardHeader.propTypes = cardHeader;
|
|
49
|
+
DSCardHeader.displayName = "DSCardHeader";
|
|
49
50
|
const DSCardHeaderWithSchema = (0, import_react_desc.describe)(DSCardHeader);
|
|
50
51
|
DSCardHeaderWithSchema.propTypes = cardHeader;
|
|
51
52
|
var DSCardHeader_default = DSCardHeader;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSCardHeader.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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;\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": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,2BAA0C;AAE1C,MAAM,eAAe,CAAC,EAAE,OAAO,aAAa;AAC1C,QAAM,EAAE,cAAc,qBAAqB,oDACzC,aACF;AACA,SACE,mDAAC;AAAA,IAAI,WAAW;AAAA,IAAc,eAAY;AAAA,KACxC,mDAAC;AAAA,IAAK,WAAW,iBAAiB,SAAS;AAAA,KAAI,KAAM,GACrD,mDAAC;AAAA,IACC,WAAW,iBAAiB,YAAY;AAAA,IACxC,eAAY;AAAA,KAEX,MACH,CACF;AAEJ;AAEA,MAAM,aAAa;AAAA,EAEjB,OAAO,4BAAU,OAAO,YAAY,mBAAmB;AAAA,EAEvD,QAAQ,4BAAU,KAAK,YAAY,QAAQ;AAC7C;AAEA,aAAa,YAAY;AACzB,MAAM,yBAAyB,gCAAS,YAAY;AACpD,uBAAuB,YAAY;AAGnC,IAAO,uBAAQ;",
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,2BAA0C;AAE1C,MAAM,eAAe,CAAC,EAAE,OAAO,aAAa;AAC1C,QAAM,EAAE,cAAc,qBAAqB,oDACzC,aACF;AACA,SACE,mDAAC;AAAA,IAAI,WAAW;AAAA,IAAc,eAAY;AAAA,KACxC,mDAAC;AAAA,IAAK,WAAW,iBAAiB,SAAS;AAAA,KAAI,KAAM,GACrD,mDAAC;AAAA,IACC,WAAW,iBAAiB,YAAY;AAAA,IACxC,eAAY;AAAA,KAEX,MACH,CACF;AAEJ;AAEA,MAAM,aAAa;AAAA,EAEjB,OAAO,4BAAU,OAAO,YAAY,mBAAmB;AAAA,EAEvD,QAAQ,4BAAU,KAAK,YAAY,QAAQ;AAC7C;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,gCAAS,YAAY;AACpD,uBAAuB,YAAY;AAGnC,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -143,6 +143,7 @@ const detailProps = {
|
|
|
143
143
|
disabled: import_react_desc.PropTypes.bool.description("Disabled")
|
|
144
144
|
};
|
|
145
145
|
DetailCard.propTypes = detailProps;
|
|
146
|
+
DetailCard.displayName = "DetailCard";
|
|
146
147
|
const DSCardDetailWithSchema = (0, import_react_desc.describe)(DetailCard);
|
|
147
148
|
DSCardDetailWithSchema.propTypes = detailProps;
|
|
148
149
|
var DetailCard_default = DetailCard;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/detail/DetailCard.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
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 'react-desc';\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'}>\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;\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": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAkB;AAClB,oBAA8B;AAC9B,wBAAoC;AACpC,sBAA8C;AAC9C,uBAAyB;AACzB,uBAAqB;AACrB,0BAAwB;AACxB,qBAAqB;AACrB,qBAA2B;AAC3B,oBAAwF;AAExF,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EAEA,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EAEX,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EACX;AAAA,EAEA,WAAW;AAAA,EACX,WAAW;AAAA,MAC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W;AAAA,EAIhD,UAAU,4BAAU,KAAK,YAAY,UAAU;AACjD;AAEA,WAAW,YAAY;AACvB,MAAM,yBAAyB,gCAAS,UAAU;AAClD,uBAAuB,YAAY;AAGnC,IAAO,qBAAQ;",
|
|
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 'react-desc';\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'}>\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": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,mBAAkB;AAClB,oBAA8B;AAC9B,wBAAoC;AACpC,sBAA8C;AAC9C,uBAAyB;AACzB,uBAAqB;AACrB,0BAAwB;AACxB,qBAAqB;AACrB,qBAA2B;AAC3B,oBAAwF;AAExF,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EAEA,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EAEX,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EACX;AAAA,EAEA,WAAW;AAAA,EACX,WAAW;AAAA,MACP;AACJ,QAAM,QAAQ,+BAAS;AACvB,QAAM,iBAAiB,cAAc;AACrC,QAAM,mBAAmB,kBAAkB;AAC3C,QAAM,iBAAiB,CAAC,KAAK;AAC7B,MAAI;AAAkB,mBAAe,KA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C,IAAO,qBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -60,6 +60,7 @@ const actionProps = {
|
|
|
60
60
|
icon: import_react_desc.PropTypes.element.description("Icon to display after the label")
|
|
61
61
|
};
|
|
62
62
|
ActionAddon.propTypes = actionProps;
|
|
63
|
+
ActionAddon.displayName = "ActionAddon";
|
|
63
64
|
const DSCardActionAddonWithSchema = (0, import_react_desc.describe)(ActionAddon);
|
|
64
65
|
DSCardActionAddonWithSchema.propTypes = actionProps;
|
|
65
66
|
var ActionAddon_default = ActionAddon;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v2/ActionAddon.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\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;\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": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,+BAAmB;AACnB,sBAAiC;AACjC,uBAAmB;AAEnB,MAAM,QAAQ,sCAAO,wBAAM;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,WACrC,mDAAC;AAAA,EAAM;AAAA,EAAkB,WAAW;AAAA,EAAO,MAAM,QAAQ,mDAAC;AAAA,IAAiB,OAAO,CAAC,iBAAiB,GAAG;AAAA,GAAG;AAAA,CAAI;AAGhH,MAAM,cAAc;AAAA,EAIlB,OAAO,4BAAU,OAAO,YAAY,aAAa;AAAA,EAIjD,SAAS,4BAAU,KAAK,YAAY,mBAAmB;AAAA,EAIvD,MAAM,4BAAU,QAAQ,YAAY,iCAAiC;AACvE;AAEA,YAAY,YAAY;AACxB,MAAM,8BAA8B,gCAAS,WAAW;AACxD,4BAA4B,YAAY;AAGxC,IAAO,sBAAQ;",
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\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": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,+BAAmB;AACnB,sBAAiC;AACjC,uBAAmB;AAEnB,MAAM,QAAQ,sCAAO,wBAAM;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,WACrC,mDAAC;AAAA,EAAM;AAAA,EAAkB,WAAW;AAAA,EAAO,MAAM,QAAQ,mDAAC;AAAA,IAAiB,OAAO,CAAC,iBAAiB,GAAG;AAAA,GAAG;AAAA,CAAI;AAGhH,MAAM,cAAc;AAAA,EAIlB,OAAO,4BAAU,OAAO,YAAY,aAAa;AAAA,EAIjD,SAAS,4BAAU,KAAK,YAAY,mBAAmB;AAAA,EAIvD,MAAM,4BAAU,QAAQ,YAAY,iCAAiC;AACvE;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,8BAA8B,gCAAS,WAAW;AACxD,4BAA4B,YAAY;AAGxC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/v2/Card.js
CHANGED
|
@@ -69,6 +69,7 @@ const cardProps = {
|
|
|
69
69
|
hasBorder: import_react_desc.PropTypes.bool.description("Wheter if the card has border or not")
|
|
70
70
|
};
|
|
71
71
|
CustomCard.propTypes = cardProps;
|
|
72
|
+
CustomCard.displayName = "CustomCard";
|
|
72
73
|
const DSCardCustomWithSchema = (0, import_react_desc.describe)(CustomCard);
|
|
73
74
|
DSCardCustomWithSchema.propTypes = cardProps;
|
|
74
75
|
var Card_default = CustomCard;
|
package/dist/cjs/v2/Card.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v2/Card.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { DSHeader } from '@elliemae/ds-header';\nimport DSTruncatedTooltipText, {\n TooltipTextProvider,\n} 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\n hasBorder={hasBorder}\n cols={getCol(rightAddon)}\n data-testid=\"em-ds-card\"\n >\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(\n 'Title of the card. requiered',\n ),\n /**\n * Description of the card. not requiered\n */\n description: PropTypes.string.description(\n 'Description of the card. not requiered',\n ),\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;\nconst DSCardCustomWithSchema = describe(CustomCard);\nDSCardCustomWithSchema.propTypes = cardProps;\n\nexport { CustomCard, DSCardCustomWithSchema };\nexport default CustomCard;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,uBAAyB;AACzB,uCAEO;AACP,wBASO;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;AAAA,MAEZ,mDAAC,4DACC,mDAAC;AAAA,EACC;AAAA,EACA,MAAM,OAAO,UAAU;AAAA,EACvB,eAAY;AAAA,GAEZ,mDAAC,qCACE,aAAa,mDAAC,mCAAW,SAAU,GACpC,mDAAC;AAAA,EACC,OAAO;AAAA,IACL,UAAU,YAAY,sBAAsB;AAAA,EAC9C;AAAA,GAEA,mDAAC;AAAA,EACC,UAAS;AAAA,EACT,eAAY;AAAA,EACZ,YAAW;AAAA,EACX,OAAM;AAAA,EACN,MAAM,mDAAC;AAAA,IAAuB,OAAO;AAAA,GAAO;AAAA,CAC9C,GACC,eACC,mDAAC,qCACC,mDAAC;AAAA,EAAuB,OAAO;AAAA,CAAa,CAC9C,CAEJ,CACF,GACC,cACC,mDAAC,2CACE,WAAW,MAAM,mDAAC,oCAAY,WAAW,EAAG,GAC5C,WAAW,MACV,wFACG,WAAW,SAAS,KAAK,mDAAC,iCAAU,GACrC,mDAAC,oCAAY,WAAW,EAAG,CAC7B,CAEJ,CAEJ,CACF;AAGF,MAAM,YAAY;AAAA,EAIhB,OAAO,4BAAU,OAAO,WAAW,YACjC,8BACF;AAAA,EAIA,aAAa,4BAAU,OAAO,YAC5B,wCACF;AAAA,EAIA,WAAW,4BAAU,QAAQ,YAAY,YAAY;AAAA,EAIrD,YAAY,4BAAU,MAAM,YAAY,oCAAoC;AAAA,EAI5E,WAAW,4BAAU,KAAK,YAAY,sCAAsC;AAC9E;AAEA,WAAW,YAAY;AACvB,MAAM,yBAAyB,gCAAS,UAAU;AAClD,uBAAuB,YAAY;AAGnC,IAAO,eAAQ;",
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { DSHeader } from '@elliemae/ds-header';\nimport DSTruncatedTooltipText, {\n TooltipTextProvider,\n} 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\n hasBorder={hasBorder}\n cols={getCol(rightAddon)}\n data-testid=\"em-ds-card\"\n >\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(\n 'Title of the card. requiered',\n ),\n /**\n * Description of the card. not requiered\n */\n description: PropTypes.string.description(\n 'Description of the card. not requiered',\n ),\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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADA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AuB,YAAY;AAGnC,IAAO,eAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/v2/Group.js
CHANGED
|
@@ -68,6 +68,7 @@ const cardgroupProps = {
|
|
|
68
68
|
action: import_react_desc.PropTypes.element.description("Right addon action")
|
|
69
69
|
};
|
|
70
70
|
CardGroup.propTypes = cardgroupProps;
|
|
71
|
+
CardGroup.displayName = "CardGroup";
|
|
71
72
|
const DSCardGroupWithSchema = (0, import_react_desc.describe)(CardGroup);
|
|
72
73
|
DSCardGroupWithSchema.propTypes = cardgroupProps;
|
|
73
74
|
var Group_default = CardGroup;
|
package/dist/cjs/v2/Group.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/v2/Group.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport { color, border, truncate } 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 }) =>\n 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;\nconst DSCardGroupWithSchema = describe(CardGroup);\nDSCardGroupWithSchema.propTypes = cardgroupProps;\n\nexport { CardGroup, DSCardGroupWithSchema };\nexport default CardGroup;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,+BAAmB;AACnB,uBAAwC;AACxC,kBAAiB;AAEjB,MAAM,QAAQ,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjB;AAAA;AAAA;AAAA,IAGA,CAAC,EAAE,OAAO,oBACV,gBAAgB,eAAe,MAAM,OAAO,QAAQ,WAAW;AAAA;AAGnE,MAAM,aAAa,iCAAO;AAAA,IACtB,+BAAS;AAAA;AAGb,MAAM,eAAe,iCAAO;AAAA;AAAA;AAAA,eAGb,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,IAExC,4BAAM,WAAW,KAAK;AAAA,iBACT,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,sBAC9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBAC5C,CAAC,UAAU,6BAAO,MAAM,MAAM,OAAO,QAAQ,MAAM;AAAA;AAAA;AAInE,MAAM,QAAQ,iCAAO;AAAA;AAAA;AAAA;AAKrB,MAAM,YAAY,CAAC,EAAE,UAAU,OAAO,aACpC,mDAAC;AAAA,EAAM,eAAe,CAAC;AAAA,GACpB,CAAC,CAAC,SACD,mDAAC,oBACC,mDAAC,kBAAY,KAAM,GAClB,MACH,GAEF,mDAAC,aAAO,QAAS,CACnB;AAGF,MAAM,iBAAiB;AAAA,EAIrB,UAAU,4BAAU,QAAQ,WAAW,YAAY,YAAY;AAAA,EAI/D,OAAO,4BAAU,OAAO,WAAW,YAAY,oBAAoB;AAAA,EAInE,QAAQ,4BAAU,QAAQ,YAAY,oBAAoB;AAC5D;AAEA,UAAU,YAAY;AACtB,MAAM,wBAAwB,gCAAS,SAAS;AAChD,sBAAsB,YAAY;AAGlC,IAAO,gBAAQ;",
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport { color, border, truncate } 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 }) =>\n 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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,+BAAmB;AACnB,uBAAwC;AACxC,kBAAiB;AAEjB,MAAM,QAAQ,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjB;AAAA;AAAA;AAAA,IAGA,CAAC,EAAE,OAAO,oBACV,gBAAgB,eAAe,MAAM,OAAO,QAAQ,WAAW;AAAA;AAGnE,MAAM,aAAa,iCAAO;AAAA,IACtB,+BAAS;AAAA;AAGb,MAAM,eAAe,iCAAO;AAAA;AAAA;AAAA,eAGb,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA,IAExC,4BAAM,WAAW,KAAK;AAAA,iBACT,CAAC,UAAU,MAAM,MAAM,YAAY;AAAA,sBAC9B,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,gBAC5C,CAAC,UAAU,6BAAO,MAAM,MAAM,OAAO,QAAQ,MAAM;AAAA;AAAA;AAInE,MAAM,QAAQ,iCAAO;AAAA;AAAA;AAAA;AAKrB,MAAM,YAAY,CAAC,EAAE,UAAU,OAAO,aACpC,mDAAC;AAAA,EAAM,eAAe,CAAC;AAAA,GACpB,CAAC,CAAC,SACD,mDAAC,oBACC,mDAAC,kBAAY,KAAM,GAClB,MACH,GAEF,mDAAC,aAAO,QAAS,CACnB;AAGF,MAAM,iBAAiB;AAAA,EAIrB,UAAU,4BAAU,QAAQ,WAAW,YAAY,YAAY;AAAA,EAI/D,OAAO,4BAAU,OAAO,WAAW,YAAY,oBAAoB;AAAA,EAInE,QAAQ,4BAAU,QAAQ,YAAY,oBAAoB;AAC5D;AAEA,UAAU,YAAY;AACtB,UAAU,cAAc;AACxB,MAAM,wBAAwB,gCAAS,SAAS;AAChD,sBAAsB,YAAY;AAGlC,IAAO,gBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSCard.js
CHANGED
|
@@ -61,6 +61,7 @@ const cardProps = {
|
|
|
61
61
|
})).description("DSCardBody and DSCardHeader")
|
|
62
62
|
};
|
|
63
63
|
DSCard.propTypes = cardProps;
|
|
64
|
+
DSCard.displayName = "DSCard";
|
|
64
65
|
const DSCardWithSchema = describe(DSCard);
|
|
65
66
|
DSCardWithSchema.propTypes = cardProps;
|
|
66
67
|
var DSCard_default = DSCard;
|
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 'react-desc';\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;\nconst DSCardWithSchema = describe(DSCard);\nDSCardWithSchema.propTypes = cardProps;\n\nexport { DSCard, DSCardWithSchema };\nexport default DSCard;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,SAAS,CAAC,OAKV;AALU,eACd;AAAA,eAAW;AAAA,IACX,WAAW;AAAA,IACX,iBAAiB,CAAC;AAAA,MAHJ,IAIX,uBAJW,IAIX;AAAA,IAHH;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,EAAE,iBAAiB,0BAA0B,MAAM;AAEzD,SACE,qCAAC;AAAA,IACC,eAAY;AAAA,KACR,iBAFL;AAAA,IAGC,KAAK;AAAA,IACL,WAAW;AAAA,MACP,aAEH,QACH;AAEJ;AAEA,MAAM,YAAY;AAAA,EAEhB,gBAAgB,UAAU,OAAO,YAC/B,mCACF;AAAA,EAIA,UAAU,UAAU,OAAO,YAAY,8BAA8B;AAAA,EAIrE,UAAU,UAAU,QAClB,UAAU,MAAM;AAAA,IACd,MAAM,UAAU,MAAM,CAAC,cAAc,UAAU,CAAC;AAAA,EAClD,CAAC,CACH,EAAE,YAAY,6BAA6B;AAC7C;AAEA,OAAO,YAAY;AACnB,MAAM,mBAAmB,SAAS,MAAM;AACxC,iBAAiB,YAAY;AAG7B,IAAO,iBAAQ;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,SAAS,CAAC,OAKV;AALU,eACd;AAAA,eAAW;AAAA,IACX,WAAW;AAAA,IACX,iBAAiB,CAAC;AAAA,MAHJ,IAIX,uBAJW,IAIX;AAAA,IAHH;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,EAAE,iBAAiB,0BAA0B,MAAM;AAEzD,SACE,qCAAC;AAAA,IACC,eAAY;AAAA,KACR,iBAFL;AAAA,IAGC,KAAK;AAAA,IACL,WAAW;AAAA,MACP,aAEH,QACH;AAEJ;AAEA,MAAM,YAAY;AAAA,EAEhB,gBAAgB,UAAU,OAAO,YAC/B,mCACF;AAAA,EAIA,UAAU,UAAU,OAAO,YAAY,8BAA8B;AAAA,EAIrE,UAAU,UAAU,QAClB,UAAU,MAAM;AAAA,IACd,MAAM,UAAU,MAAM,CAAC,cAAc,UAAU,CAAC;AAAA,EAClD,CAAC,CACH,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
|
@@ -9,6 +9,7 @@ const bodyProps = {
|
|
|
9
9
|
children: PropTypes.element.description("children")
|
|
10
10
|
};
|
|
11
11
|
DSCardBody.propTypes = bodyProps;
|
|
12
|
+
DSCardBody.displayName = "DSCardBody";
|
|
12
13
|
const DSCardBodyWithSchema = describe(DSCardBody);
|
|
13
14
|
DSCardBodyWithSchema.propTypes = bodyProps;
|
|
14
15
|
var DSCardBody_default = DSCardBody;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSCardBody.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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;\nconst DSCardBodyWithSchema = describe(DSCardBody);\nDSCardBodyWithSchema.propTypes = bodyProps;\n\nexport { DSCardBody, DSCardBodyWithSchema };\nexport default DSCardBody;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AAEA,MAAM,aAAa,CAAC,EAAE,eACpB,qCAAC;AAAA,EAAI,WAAU;AAAA,EAAkB,eAAY;AAAA,GAC1C,QACH;AAGF,MAAM,YAAY;AAAA,EAEhB,UAAU,UAAU,QAAQ,YAAY,UAAU;AACpD;AAEA,WAAW,YAAY;AACvB,MAAM,uBAAuB,SAAS,UAAU;AAChD,qBAAqB,YAAY;AAGjC,IAAO,qBAAQ;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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;ACAA;AACA;AAEA,MAAM,aAAa,CAAC,EAAE,eACpB,qCAAC;AAAA,EAAI,WAAU;AAAA,EAAkB,eAAY;AAAA,GAC1C,QACH;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;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSCardHeader.js
CHANGED
|
@@ -19,6 +19,7 @@ const cardHeader = {
|
|
|
19
19
|
action: PropTypes.node.description("action")
|
|
20
20
|
};
|
|
21
21
|
DSCardHeader.propTypes = cardHeader;
|
|
22
|
+
DSCardHeader.displayName = "DSCardHeader";
|
|
22
23
|
const DSCardHeaderWithSchema = describe(DSCardHeader);
|
|
23
24
|
DSCardHeaderWithSchema.propTypes = cardHeader;
|
|
24
25
|
var DSCardHeader_default = DSCardHeader;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSCardHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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;\nconst DSCardHeaderWithSchema = describe(DSCardHeader);\nDSCardHeaderWithSchema.propTypes = cardHeader;\n\nexport { DSCardHeader, DSCardHeaderWithSchema };\nexport default DSCardHeader;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AAEA,MAAM,eAAe,CAAC,EAAE,OAAO,aAAa;AAC1C,QAAM,EAAE,cAAc,qBAAqB,0BACzC,aACF;AACA,SACE,qCAAC;AAAA,IAAI,WAAW;AAAA,IAAc,eAAY;AAAA,KACxC,qCAAC;AAAA,IAAK,WAAW,iBAAiB,SAAS;AAAA,KAAI,KAAM,GACrD,qCAAC;AAAA,IACC,WAAW,iBAAiB,YAAY;AAAA,IACxC,eAAY;AAAA,KAEX,MACH,CACF;AAEJ;AAEA,MAAM,aAAa;AAAA,EAEjB,OAAO,UAAU,OAAO,YAAY,mBAAmB;AAAA,EAEvD,QAAQ,UAAU,KAAK,YAAY,QAAQ;AAC7C;AAEA,aAAa,YAAY;AACzB,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;AAGnC,IAAO,uBAAQ;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AAEA,MAAM,eAAe,CAAC,EAAE,OAAO,aAAa;AAC1C,QAAM,EAAE,cAAc,qBAAqB,0BACzC,aACF;AACA,SACE,qCAAC;AAAA,IAAI,WAAW;AAAA,IAAc,eAAY;AAAA,KACxC,qCAAC;AAAA,IAAK,WAAW,iBAAiB,SAAS;AAAA,KAAI,KAAM,GACrD,qCAAC;AAAA,IACC,WAAW,iBAAiB,YAAY;AAAA,IACxC,eAAY;AAAA,KAEX,MACH,CACF;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;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -116,6 +116,7 @@ const detailProps = {
|
|
|
116
116
|
disabled: PropTypes.bool.description("Disabled")
|
|
117
117
|
};
|
|
118
118
|
DetailCard.propTypes = detailProps;
|
|
119
|
+
DetailCard.displayName = "DetailCard";
|
|
119
120
|
const DSCardDetailWithSchema = describe(DetailCard);
|
|
120
121
|
DSCardDetailWithSchema.propTypes = detailProps;
|
|
121
122
|
var DetailCard_default = DetailCard;
|
|
@@ -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 'react-desc';\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'}>\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;\nconst DSCardDetailWithSchema = describe(DetailCard);\nDSCardDetailWithSchema.propTypes = detailProps;\n\nexport { DetailCard, DSCardDetailWithSchema };\nexport default DetailCard;\n"],
|
|
5
|
-
"mappings": "AAAA;ACGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EAEA,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EAEX,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EACX;AAAA,EAEA,WAAW;AAAA,EACX,WAAW;AAAA,MACP;AACJ,QAAM,QAAQ,SAAS;AACvB,QAAM,iBAAiB,cAAc;AACrC,QAAM,mBAAmB,kBAAkB;AAC3C,QAAM,iBAAiB,CAAC,KAAK;AAC7B,MAAI;AAAkB,mBAAe,KAAK,MAAM;AAChD,MAAI;AAAY,mBAAe,QAAQ,MAAM;AAC7C,MAAI;AAAY,mBAAe,QAAQ,MAAM,MAAM,CAAC;AACpD,SACE,4DACE,qCAAC;AAAA,IAAU,UAAU,YAAY;AAAA,IAAU,QAAQ,cAAc;AAAA,IAAY,eAAY;AAAA,KACvF,qCAAC;AAAA,IAAK,MAAM;AAAA,IAAgB,YAAY,CAAC,eAAe;AAAA,KACrD,cACC,qCAAC;AAAA,IAAK,IAAI,eAAe;AAAA,KACvB,qCAAC;AAAA,IACC,SAAS;AAAA,IACT,UAAU;AAAA,IACV;AAAA,I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AAM,cAAc;AAAA,EAIlB,OAAO,UAAU,OAAO,WAAW,YAAY,oBAAoB;AAAA,EAInE,aAAa,UAAU,OAAO,YAAY,0BAA0B;AAAA,EAIpE,kBAAkB,UAAU,MAAM,CAAC,WAAW,SAAS,CAAC,EAAE,YAAY,oBAAoB;AAAA,EAI1F,YAAY,UAAU,OAAO,YAAY,sDAAsD;AAAA,EAI/F,kBAAkB,UAAU,OAAO,YAAY,sDAAsD;AAAA,EAIrG,YAAY,UAAU,QAAQ,YAAY,oCAAoC;AAAA,EAI9E,YAAY,UAAU,KAAK,YAAY,0CAA0C;AAAA,EAIjF,YAAY,UAAU,KAAK,YAAY,wCAAwC;AAAA,EAI/E,UAAU,UAAU,KAAK,YAAY,uBAAuB;AAAA,EAI5D,YAAY,UAAU,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,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 'react-desc';\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'}>\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, DSCardD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UAAU,KAAK,YAAY,0CAA0C;AAAA,EAIjF,YAAY,UAAU,KAAK,YAAY,wCAAwC;AAAA,EAI/E,UAAU,UAAU,KAAK,YAAY,uBAAuB;AAAA,EAI5D,YAAY,UAAU,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;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -33,6 +33,7 @@ const actionProps = {
|
|
|
33
33
|
icon: PropTypes.element.description("Icon to display after the label")
|
|
34
34
|
};
|
|
35
35
|
ActionAddon.propTypes = actionProps;
|
|
36
|
+
ActionAddon.displayName = "ActionAddon";
|
|
36
37
|
const DSCardActionAddonWithSchema = describe(ActionAddon);
|
|
37
38
|
DSCardActionAddonWithSchema.propTypes = actionProps;
|
|
38
39
|
var ActionAddon_default = ActionAddon;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/v2/ActionAddon.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\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;\nconst DSCardActionAddonWithSchema = describe(ActionAddon);\nDSCardActionAddonWithSchema.propTypes = actionProps;\n\nexport { ActionAddon, DSCardActionAddonWithSchema };\nexport default ActionAddon;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,QAAQ,OAAO,MAAM;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,WACrC,qCAAC;AAAA,EAAM;AAAA,EAAkB,WAAW;AAAA,EAAO,MAAM,QAAQ,qCAAC;AAAA,IAAiB,OAAO,CAAC,iBAAiB,GAAG;AAAA,GAAG;AAAA,CAAI;AAGhH,MAAM,cAAc;AAAA,EAIlB,OAAO,UAAU,OAAO,YAAY,aAAa;AAAA,EAIjD,SAAS,UAAU,KAAK,YAAY,mBAAmB;AAAA,EAIvD,MAAM,UAAU,QAAQ,YAAY,iCAAiC;AACvE;AAEA,YAAY,YAAY;AACxB,MAAM,8BAA8B,SAAS,WAAW;AACxD,4BAA4B,YAAY;AAGxC,IAAO,sBAAQ;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\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"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,QAAQ,OAAO,MAAM;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,WACrC,qCAAC;AAAA,EAAM;AAAA,EAAkB,WAAW;AAAA,EAAO,MAAM,QAAQ,qCAAC;AAAA,IAAiB,OAAO,CAAC,iBAAiB,GAAG;AAAA,GAAG;AAAA,CAAI;AAGhH,MAAM,cAAc;AAAA,EAIlB,OAAO,UAAU,OAAO,YAAY,aAAa;AAAA,EAIjD,SAAS,UAAU,KAAK,YAAY,mBAAmB;AAAA,EAIvD,MAAM,UAAU,QAAQ,YAAY,iCAAiC;AACvE;AAEA,YAAY,YAAY;AACxB,YAAY,cAAc;AAC1B,MAAM,8BAA8B,SAAS,WAAW;AACxD,4BAA4B,YAAY;AAGxC,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/v2/Card.js
CHANGED
|
@@ -53,6 +53,7 @@ const cardProps = {
|
|
|
53
53
|
hasBorder: PropTypes.bool.description("Wheter if the card has border or not")
|
|
54
54
|
};
|
|
55
55
|
CustomCard.propTypes = cardProps;
|
|
56
|
+
CustomCard.displayName = "CustomCard";
|
|
56
57
|
const DSCardCustomWithSchema = describe(CustomCard);
|
|
57
58
|
DSCardCustomWithSchema.propTypes = cardProps;
|
|
58
59
|
var Card_default = CustomCard;
|
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 'react-desc';\nimport { DSHeader } from '@elliemae/ds-header';\nimport DSTruncatedTooltipText, {\n TooltipTextProvider,\n} 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\n hasBorder={hasBorder}\n cols={getCol(rightAddon)}\n data-testid=\"em-ds-card\"\n >\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(\n 'Title of the card. requiered',\n ),\n /**\n * Description of the card. not requiered\n */\n description: PropTypes.string.description(\n 'Description of the card. not requiered',\n ),\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;\nconst DSCardCustomWithSchema = describe(CustomCard);\nDSCardCustomWithSchema.propTypes = cardProps;\n\nexport { CustomCard, DSCardCustomWithSchema };\nexport default CustomCard;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,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;AAAA,MAEZ,qCAAC,2BACC,qCAAC;AAAA,EACC;AAAA,EACA,MAAM,OAAO,UAAU;AAAA,EACvB,eAAY;AAAA,GAEZ,qCAAC,mBACE,aAAa,qCAAC,iBAAW,SAAU,GACpC,qCAAC;AAAA,EACC,OAAO;AAAA,IACL,UAAU,YAAY,sBAAsB;AAAA,EAC9C;AAAA,GAEA,qCAAC;AAAA,EACC,UAAS;AAAA,EACT,eAAY;AAAA,EACZ,YAAW;AAAA,EACX,OAAM;AAAA,EACN,MAAM,qCAAC;AAAA,IAAuB,OAAO;AAAA,GAAO;AAAA,CAC9C,GACC,eACC,qCAAC,mBACC,qCAAC;AAAA,EAAuB,OAAO;AAAA,CAAa,CAC9C,CAEJ,CACF,GACC,cACC,qCAAC,yBACE,WAAW,MAAM,qCAAC,kBAAY,WAAW,EAAG,GAC5C,WAAW,MACV,4DACG,WAAW,SAAS,KAAK,qCAAC,eAAU,GACrC,qCAAC,kBAAY,WAAW,EAAG,CAC7B,CAEJ,CAEJ,CACF;AAGF,MAAM,YAAY;AAAA,EAIhB,OAAO,UAAU,OAAO,WAAW,YACjC,8BACF;AAAA,EAIA,aAAa,UAAU,OAAO,YAC5B,wCACF;AAAA,EAIA,WAAW,UAAU,QAAQ,YAAY,YAAY;AAAA,EAIrD,YAAY,UAAU,MAAM,YAAY,oCAAoC;AAAA,EAI5E,WAAW,UAAU,KAAK,YAAY,sCAAsC;AAC9E;AAEA,WAAW,YAAY;AACvB,MAAM,yBAAyB,SAAS,UAAU;AAClD,uBAAuB,YAAY;AAGnC,IAAO,eAAQ;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { DSHeader } from '@elliemae/ds-header';\nimport DSTruncatedTooltipText, {\n TooltipTextProvider,\n} 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\n hasBorder={hasBorder}\n cols={getCol(rightAddon)}\n data-testid=\"em-ds-card\"\n >\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(\n 'Title of the card. requiered',\n ),\n /**\n * Description of the card. not requiered\n */\n description: PropTypes.string.description(\n 'Description of the card. not requiered',\n ),\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 };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AY;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
|
@@ -41,6 +41,7 @@ const cardgroupProps = {
|
|
|
41
41
|
action: PropTypes.element.description("Right addon action")
|
|
42
42
|
};
|
|
43
43
|
CardGroup.propTypes = cardgroupProps;
|
|
44
|
+
CardGroup.displayName = "CardGroup";
|
|
44
45
|
const DSCardGroupWithSchema = describe(CardGroup);
|
|
45
46
|
DSCardGroupWithSchema.propTypes = cardgroupProps;
|
|
46
47
|
var Group_default = CardGroup;
|
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 'react-desc';\nimport styled from 'styled-components';\nimport { color, border, truncate } 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 }) =>\n 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;\nconst DSCardGroupWithSchema = describe(CardGroup);\nDSCardGroupWithSchema.propTypes = cardgroupProps;\n\nexport { CardGroup, DSCardGroupWithSchema };\nexport default CardGroup;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjB;AAAA;AAAA;AAAA,IAGA,CAAC,EAAE,OAAO,oBACV,gBAAgB,eAAe,MAAM,OAAO,QAAQ,WAAW;AAAA;AAGnE,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;AAAA,gBAC5C,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,MAAM;AAAA;AAAA;AAInE,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAKrB,MAAM,YAAY,CAAC,EAAE,UAAU,OAAO,aACpC,qCAAC;AAAA,EAAM,eAAe,CAAC;AAAA,GACpB,CAAC,CAAC,SACD,qCAAC,oBACC,qCAAC,kBAAY,KAAM,GAClB,MACH,GAEF,qCAAC,aAAO,QAAS,CACnB;AAGF,MAAM,iBAAiB;AAAA,EAIrB,UAAU,UAAU,QAAQ,WAAW,YAAY,YAAY;AAAA,EAI/D,OAAO,UAAU,OAAO,WAAW,YAAY,oBAAoB;AAAA,EAInE,QAAQ,UAAU,QAAQ,YAAY,oBAAoB;AAC5D;AAEA,UAAU,YAAY;AACtB,MAAM,wBAAwB,SAAS,SAAS;AAChD,sBAAsB,YAAY;AAGlC,IAAO,gBAAQ;",
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport { color, border, truncate } 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 }) =>\n 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;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjB;AAAA;AAAA;AAAA,IAGA,CAAC,EAAE,OAAO,oBACV,gBAAgB,eAAe,MAAM,OAAO,QAAQ,WAAW;AAAA;AAGnE,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;AAAA,gBAC5C,CAAC,UAAU,OAAO,MAAM,MAAM,OAAO,QAAQ,MAAM;AAAA;AAAA;AAInE,MAAM,QAAQ,OAAO;AAAA;AAAA;AAAA;AAKrB,MAAM,YAAY,CAAC,EAAE,UAAU,OAAO,aACpC,qCAAC;AAAA,EAAM,eAAe,CAAC;AAAA,GACpB,CAAC,CAAC,SACD,qCAAC,oBACC,qCAAC,kBAAY,KAAM,GAClB,MACH,GAEF,qCAAC,aAAO,QAAS,CACnB;AAGF,MAAM,iBAAiB;AAAA,EAIrB,UAAU,UAAU,QAAQ,WAAW,YAAY,YAAY;AAAA,EAI/D,OAAO,UAAU,OAAO,WAAW,YAAY,oBAAoB;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
|
}
|