@elliemae/ds-card 1.56.0 → 1.57.0-rc.10

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.
@@ -5,24 +5,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var React = require('react');
6
6
  var lodash = require('lodash');
7
7
  var reactDesc = require('react-desc');
8
- var ArrowheadRight = require('@elliemae/ds-icons/ArrowheadRight');
9
- var ArrowheadDown = require('@elliemae/ds-icons/ArrowheadDown');
8
+ var dsIcons = require('@elliemae/ds-icons');
10
9
  var dsSystem = require('@elliemae/ds-system');
11
10
  var Button = require('@elliemae/ds-button');
12
11
  var DSSeparator = require('@elliemae/ds-separator');
13
12
  var dsGrid = require('@elliemae/ds-grid');
14
- var DSCheckbox = require('@elliemae/ds-form/Checkbox');
13
+ var dsForm = require('@elliemae/ds-form');
15
14
  var detail_styled = require('./styled.js');
16
15
  require('styled-components');
17
16
 
18
17
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
19
18
 
20
19
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
21
- var ArrowheadRight__default = /*#__PURE__*/_interopDefaultLegacy(ArrowheadRight);
22
- var ArrowheadDown__default = /*#__PURE__*/_interopDefaultLegacy(ArrowheadDown);
23
20
  var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
24
21
  var DSSeparator__default = /*#__PURE__*/_interopDefaultLegacy(DSSeparator);
25
- var DSCheckbox__default = /*#__PURE__*/_interopDefaultLegacy(DSCheckbox);
26
22
 
27
23
  /* eslint-disable max-lines */
28
24
 
@@ -67,7 +63,7 @@ var DetailCard = function DetailCard(_ref) {
67
63
  alignItems: !description && 'center'
68
64
  }, selectable && /*#__PURE__*/React__default['default'].createElement(dsGrid.Grid, {
69
65
  pt: description && '9px'
70
- }, /*#__PURE__*/React__default['default'].createElement(DSCheckbox__default['default'], {
66
+ }, /*#__PURE__*/React__default['default'].createElement(dsForm.DSCheckbox, {
71
67
  checked: isSelected,
72
68
  onChange: onSelect,
73
69
  readOnly: readOnly,
@@ -84,10 +80,10 @@ var DetailCard = function DetailCard(_ref) {
84
80
  'data-testid': 'expand-button'
85
81
  },
86
82
  onClick: onExpand,
87
- icon: isExpanded ? /*#__PURE__*/React__default['default'].createElement(ArrowheadDown__default['default'], {
83
+ icon: isExpanded ? /*#__PURE__*/React__default['default'].createElement(dsIcons.ArrowheadDown, {
88
84
  color: ['neutral', 500],
89
85
  size: "s"
90
- }) : /*#__PURE__*/React__default['default'].createElement(ArrowheadRight__default['default'], {
86
+ }) : /*#__PURE__*/React__default['default'].createElement(dsIcons.ArrowheadRight, {
91
87
  color: ['neutral', 500],
92
88
  size: "s"
93
89
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"DetailCard.js","sources":["../../../src/detail/DetailCard.tsx"],"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 ArrowheadRight from '@elliemae/ds-icons/ArrowheadRight';\nimport ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';\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/Checkbox';\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"],"names":["DetailCard","title","description","descriptionColor","rightValue","rightDescription","rightAddon","selectable","isSelected","onSelect","noop","expandable","isExpanded","onExpand","expandContent","readOnly","disabled","theme","useTheme","hasRightLegend","hasRightPosition","topWrapperCols","push","unshift","space","s","React","Container","Grid","DSCheckbox","DSButton","ArrowheadDown","ArrowheadRight","Title","Description","compact","RightDescription","RightValue","RightAddon","DSSeparator","detailProps","PropTypes","string","isRequired","oneOf","element","bool","func","propTypes","DSCardDetailW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AqDlB;AACF;AACA;AACEa,EAAAA,QAAQ,EAAE0B,mBAAS,CAACK,IAAV,CAAe5C,WAAf,CAA2B,WAA3B,CAxDQ;;AAyDlB;AACF;AACA;AACEc,EAAAA,QAAQ,EAAEyB,mBAAS,CAACK,IAAV,CAAe5C,WAAf,CAA2B,UAA3B;AA5DQ,CAApB;AA+DAF,UAAU,CAACgD,SAAX,GAAuBR,WAAvB;IACMS,sBAAsB,GAAGC,kBAAQ,CAAClD,UAAD;AACvCiD,sBAAsB,CAACD,SAAvB,GAAmCR,WAAnC;;;;;;"}
1
+ {"version":3,"file":"DetailCard.js","sources":["../../../src/detail/DetailCard.tsx"],"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"],"names":["DetailCard","title","description","descriptionColor","rightValue","rightDescription","rightAddon","selectable","isSelected","onSelect","noop","expandable","isExpanded","onExpand","expandContent","readOnly","disabled","theme","useTheme","hasRightLegend","hasRightPosition","topWrapperCols","push","unshift","space","s","React","Container","Grid","DSCheckbox","DSButton","ArrowheadDown","ArrowheadRight","Title","Description","compact","RightDescription","RightValue","RightAddon","DSSeparator","detailProps","PropTypes","string","isRequired","oneOf","element","bool","func","propTypes","DSCardDetailWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;IAcMA,UAAU,GAAG,SAAbA,UAAa,OAmBb;AAAA,MAlBJC,KAkBI,QAlBJA,KAkBI;AAAA,MAjBJC,WAiBI,QAjBJA,WAiBI;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CAAe5C,WAAf,CAA2B,UAA3B;AA5DQ,CAApB;AA+DAF,UAAU,CAACgD,SAAX,GAAuBR,WAAvB;IACMS,sBAAsB,GAAGC,kBAAQ,CAAClD,UAAD;AACvCiD,sBAAsB,CAACD,SAAvB,GAAmCR,WAAnC;;;;;;"}
package/cjs/index.js CHANGED
@@ -20,13 +20,11 @@ require('./v2/components.js');
20
20
  require('styled-components');
21
21
  require('@elliemae/ds-grid');
22
22
  require('@elliemae/ds-system');
23
- require('@elliemae/ds-icons/ChevronSmallDown');
23
+ require('@elliemae/ds-icons');
24
24
  require('@elliemae/ds-button');
25
25
  require('lodash');
26
- require('@elliemae/ds-icons/ArrowheadRight');
27
- require('@elliemae/ds-icons/ArrowheadDown');
28
26
  require('@elliemae/ds-separator');
29
- require('@elliemae/ds-form/Checkbox');
27
+ require('@elliemae/ds-form');
30
28
  require('./detail/styled.js');
31
29
 
32
30
 
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,14 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var React = require('react');
6
6
  var reactDesc = require('react-desc');
7
7
  var styled = require('styled-components');
8
- var Chevron = require('@elliemae/ds-icons/ChevronSmallDown');
8
+ var dsIcons = require('@elliemae/ds-icons');
9
9
  var Button = require('@elliemae/ds-button');
10
10
 
11
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
12
 
13
13
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
14
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
15
- var Chevron__default = /*#__PURE__*/_interopDefaultLegacy(Chevron);
16
15
  var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
17
16
 
18
17
  var Addon = /*#__PURE__*/styled__default['default'](Button__default['default']).withConfig({
@@ -30,7 +29,7 @@ var ActionAddon = function ActionAddon(_ref) {
30
29
  return /*#__PURE__*/React__default['default'].createElement(Addon, {
31
30
  onClick: onClick,
32
31
  labelText: label,
33
- icon: icon || /*#__PURE__*/React__default['default'].createElement(Chevron__default['default'], {
32
+ icon: icon || /*#__PURE__*/React__default['default'].createElement(dsIcons.ChevronSmallDown, {
34
33
  color: ['brand-primary', 700]
35
34
  })
36
35
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ActionAddon.js","sources":["../../../src/v2/ActionAddon.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport Chevron from '@elliemae/ds-icons/ChevronSmallDown';\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\n onClick={onClick}\n labelText={label}\n icon={icon || <Chevron color={['brand-primary', 700]} />}\n />\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"],"names":["Addon","styled","Button","props","theme","fontWeights","semibold","colors","brand","ActionAddon","label","onClick","icon","React","Chevron","actionProps","PropTypes","string","description","func","element","propTypes","DSCardActionAddonWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;AAMA,IAAMA,KAAK,gBAAGC,0BAAM,CAACC,0BAAD,CAAT;AAAA;AAAA,2OAMM,UAACC,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,WAAZ,CAAwBC,QAAnC;AAAA,CANN,EAOA,UAACH,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYG,MAAZ,CAAmBC,KAAnB,CAAyB,KAAzB,CAAX;AAAA,CAPA,CAAX;;IAiBMC,WAAW,GAAG,SAAdA,WAAc;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,MAAUC,OAAV,QAAUA,OAAV;AAAA,MAAmBC,IAAnB,QAAmBA,IAAnB;AAAA,sBAClBC,wCAAC,KAAD;AACE,IAAA,OAAO,EAAEF,OADX;AAEE,IAAA,SAAS,EAAED,KAFb;AAGE,IAAA,IAAI,EAAEE,IAAI,iBAAIC,wCAACC,2BAAD;AAAS,MAAA,KAAK,EAAE,CAAC,eAAD,EAAkB,GAAlB;AAAhB;AAHhB,IADkB;AAAA;;AAQpB,IAAMC,WAAW,GAAG;AAClB;AACF;AACA;AACEL,EAAAA,KAAK,EAAEM,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,aAA7B,CAJW;;AAKlB;AACF;AACA;AACEP,EAAAA,OAAO,EAAEK,mBAAS,CAACG,IAAV,CAAeD,WAAf,CAA2B,mBAA3B,CARS;;AASlB;AACF;AACA;AACEN,EAAAA,IAAI,EAAEI,mBAAS,CAACI,OAAV,CAAkBF,WAAlB,CAA8B,iCAA9B;AAZY,CAApB;AAeAT,WAAW,CAACY,SAAZ,GAAwBN,WAAxB;IACMO,2BAA2B,GAAGC,kBAAQ,CAACd,WAAD;AAC5Ca,2BAA2B,CAACD,SAA5B,GAAwCN,WAAxC;;;;;;"}
1
+ {"version":3,"file":"ActionAddon.js","sources":["../../../src/v2/ActionAddon.tsx"],"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"],"names":["Addon","styled","Button","props","theme","fontWeights","semibold","colors","brand","ActionAddon","label","onClick","icon","React","ChevronSmallDown","actionProps","PropTypes","string","description","func","element","propTypes","DSCardActionAddonWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;AAMA,IAAMA,KAAK,gBAAGC,0BAAM,CAACC,0BAAD,CAAT;AAAA;AAAA,2OAMM,UAACC,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,WAAZ,CAAwBC,QAAnC;AAAA,CANN,EAOA,UAACH,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYG,MAAZ,CAAmBC,KAAnB,CAAyB,KAAzB,CAAX;AAAA,CAPA,CAAX;;IAiBMC,WAAW,GAAG,SAAdA,WAAc;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,MAAUC,OAAV,QAAUA,OAAV;AAAA,MAAmBC,IAAnB,QAAmBA,IAAnB;AAAA,sBAClBC,wCAAC,KAAD;AAAO,IAAA,OAAO,EAAEF,OAAhB;AAAyB,IAAA,SAAS,EAAED,KAApC;AAA2C,IAAA,IAAI,EAAEE,IAAI,iBAAIC,wCAACC,wBAAD;AAAkB,MAAA,KAAK,EAAE,CAAC,eAAD,EAAkB,GAAlB;AAAzB;AAAzD,IADkB;AAAA;;AAIpB,IAAMC,WAAW,GAAG;AAClB;AACF;AACA;AACEL,EAAAA,KAAK,EAAEM,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,aAA7B,CAJW;;AAKlB;AACF;AACA;AACEP,EAAAA,OAAO,EAAEK,mBAAS,CAACG,IAAV,CAAeD,WAAf,CAA2B,mBAA3B,CARS;;AASlB;AACF;AACA;AACEN,EAAAA,IAAI,EAAEI,mBAAS,CAACI,OAAV,CAAkBF,WAAlB,CAA8B,iCAA9B;AAZY,CAApB;AAeAT,WAAW,CAACY,SAAZ,GAAwBN,WAAxB;IACMO,2BAA2B,GAAGC,kBAAQ,CAACd,WAAD;AAC5Ca,2BAA2B,CAACD,SAA5B,GAAwCN,WAAxC;;;;;;"}
@@ -1,13 +1,12 @@
1
1
  import React from 'react';
2
2
  import { compact, noop } from 'lodash';
3
3
  import { PropTypes, describe } from 'react-desc';
4
- import ArrowheadRight from '@elliemae/ds-icons/ArrowheadRight';
5
- import ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';
4
+ import { ArrowheadDown, ArrowheadRight } from '@elliemae/ds-icons';
6
5
  import { useTheme } from '@elliemae/ds-system';
7
6
  import Button from '@elliemae/ds-button';
8
7
  import DSSeparator from '@elliemae/ds-separator';
9
8
  import { Grid } from '@elliemae/ds-grid';
10
- import DSCheckbox from '@elliemae/ds-form/Checkbox';
9
+ import { DSCheckbox } from '@elliemae/ds-form';
11
10
  import { Container, Title, Description, RightDescription, RightValue, RightAddon } from './styled.js';
12
11
  import 'styled-components';
13
12
 
@@ -1 +1 @@
1
- {"version":3,"file":"DetailCard.js","sources":["../../../src/detail/DetailCard.tsx"],"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 ArrowheadRight from '@elliemae/ds-icons/ArrowheadRight';\nimport ArrowheadDown from '@elliemae/ds-icons/ArrowheadDown';\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/Checkbox';\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"],"names":["DetailCard","title","description","descriptionColor","rightValue","rightDescription","rightAddon","selectable","isSelected","onSelect","noop","expandable","isExpanded","onExpand","expandContent","readOnly","disabled","theme","useTheme","hasRightLegend","hasRightPosition","topWrapperCols","push","unshift","space","s","DSButton","compact","detailProps","PropTypes","string","isRequired","oneOf","element","bool","func","propTypes","DSCardDetailWithSchema","describe"],"mappings":";;;;;;;;;;;;;AAAA;;IAeMA,UAAU,GAAG,SAAbA,UAAa,OAmBb;AAAA,MAlBJC,KAkBI,QAlBJA,KAkBI;AAAA,MAjBJC,WAiBI,QAjBJA,WAiBI;AAAA,mCAhBJC,gBAgBI;AAAA,MAhBJA,gBAgBI,sCAhBe,SAgBf;AAAA,MAfJC,UAeI,QAfJA,UAeI;AAAA,MAdJC,gBAcI,QAdJA,gBAcI;AAAA,MAbJC,UAaI,QAbJA,UAaI;AAAA,6BAXJC,UAWI;AAAA,MAXJA,UAWI,gCAXS,KAWT;AAAA,6BAVJC,UAUI;AAAA,MAVJA,UAUI,gCAVS,KAUT;AAAA,2BATJC,QASI;AAAA,MATJA,QASI,8BATOC,IASP;AAAA,6B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ACK,IAAV,CAAehC,WAAf,CAA2B,0CAA3B,CA5BM;;AA6BlB;AACF;AACA;AACEM,EAAAA,UAAU,EAAEqB,SAAS,CAACK,IAAV,CAAehC,WAAf,CAA2B,wCAA3B,CAhCM;;AAiClB;AACF;AACA;AACEO,EAAAA,QAAQ,EAAEoB,SAAS,CAACM,IAAV,CAAejC,WAAf,CAA2B,uBAA3B,CApCQ;;AAqClB;AACF;AACA;AACES,EAAAA,UAAU,EAAEkB,SAAS,CAACK,IAAV,CAAehC,WAAf,CAA2B,0CAA3B,CAxCM;;AAyClB;AACF;AACA;AACEU,EAAAA,UAAU,EAAEiB,SAAS,CAACK,IAAV,CAAehC,WAAf,CAA2B,wCAA3B,CA5CM;;AA6ClB;AACF;AACA;AACEW,EAAAA,QAAQ,EAAEgB,SAAS,CAACM,IAAV,CAAejC,WAAf,CAA2B,oBAA3B,CAhDQ;;AAiDlB;AACF;AACA;AACEY,EAAAA,aAAa,EAAEe,SAAS,CAACI,OAAV,CAAkB/B,WAAlB,CAA8B,SAA9B,CApDG;;AAqDlB;AACF;AACA;AACEa,EAAAA,QAAQ,EAAEc,SAAS,CAACK,IAAV,CAAehC,WAAf,CAA2B,WAA3B,CAxDQ;;AAyDlB;AACF;AACA;AACEc,EAAAA,QAAQ,EAAEa,SAAS,CAACK,IAAV,CAAehC,WAAf,CAA2B,UAA3B;AA5DQ,CAApB;AA+DAF,UAAU,CAACoC,SAAX,GAAuBR,WAAvB;IACMS,sBAAsB,GAAGC,QAAQ,CAACtC,UAAD;AACvCqC,sBAAsB,CAACD,SAAvB,GAAmCR,WAAnC;;;;"}
1
+ {"version":3,"file":"DetailCard.js","sources":["../../../src/detail/DetailCard.tsx"],"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"],"names":["DetailCard","title","description","descriptionColor","rightValue","rightDescription","rightAddon","selectable","isSelected","onSelect","noop","expandable","isExpanded","onExpand","expandContent","readOnly","disabled","theme","useTheme","hasRightLegend","hasRightPosition","topWrapperCols","push","unshift","space","s","DSButton","compact","detailProps","PropTypes","string","isRequired","oneOf","element","bool","func","propTypes","DSCardDetailWithSchema","describe"],"mappings":";;;;;;;;;;;;AAAA;;IAcMA,UAAU,GAAG,SAAbA,UAAa,OAmBb;AAAA,MAlBJC,KAkBI,QAlBJA,KAkBI;AAAA,MAjBJC,WAiBI,QAjBJA,WAiBI;AAAA,mCAhBJC,gBAgBI;AAAA,MAhBJA,gBAgBI,sCAhBe,SAgBf;AAAA,MAfJC,UAeI,QAfJA,UAeI;AAAA,MAdJC,gBAcI,QAdJA,gBAcI;AAAA,MAbJC,UAaI,QAbJA,UAaI;AAAA,6BAXJC,UAWI;AAAA,MAXJA,UAWI,gCAXS,KAWT;AAAA,6BAVJC,UAUI;AAAA,MAVJA,UAUI,gCAVS,KAUT;AAAA,2BATJC,QASI;AAAA,MATJA,QASI,8BATOC,IASP;AAAA,6BAPJC,UAOI;AAAA,MAPJA,UAOI,gCAPS,KAOT;AAAA,6BANJC,UAMI;AAAA,MANJA,UAMI,gCANS,KAMT;AAAA,2BALJC,QAKI;AAAA,MALJA,QAKI,8BALOH,IAKP;AAAA,MAJJI,aAII,QAJJA,aAII;AAAA,2BAFJC,QAEI;AAAA,MAFJA,QAEI,8BAFO,KAEP;AAAA,2BADJC,QACI;AAAA,MADJA,QACI,8BADO,KACP;AACJ,MAAMC,KAAK,GAAGC,QAAQ,EAAtB;AACA,MAAMC,cAAc,GAAGf,UAAU,IAAIC,gBA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ACF;AACA;AACEU,EAAAA,UAAU,EAAEiB,SAAS,CAACK,IAAV,CAAehC,WAAf,CAA2B,wCAA3B,CA5CM;;AA6ClB;AACF;AACA;AACEW,EAAAA,QAAQ,EAAEgB,SAAS,CAACM,IAAV,CAAejC,WAAf,CAA2B,oBAA3B,CAhDQ;;AAiDlB;AACF;AACA;AACEY,EAAAA,aAAa,EAAEe,SAAS,CAACI,OAAV,CAAkB/B,WAAlB,CAA8B,SAA9B,CApDG;;AAqDlB;AACF;AACA;AACEa,EAAAA,QAAQ,EAAEc,SAAS,CAACK,IAAV,CAAehC,WAAf,CAA2B,WAA3B,CAxDQ;;AAyDlB;AACF;AACA;AACEc,EAAAA,QAAQ,EAAEa,SAAS,CAACK,IAAV,CAAehC,WAAf,CAA2B,UAA3B;AA5DQ,CAApB;AA+DAF,UAAU,CAACoC,SAAX,GAAuBR,WAAvB;IACMS,sBAAsB,GAAGC,QAAQ,CAACtC,UAAD;AACvCqC,sBAAsB,CAACD,SAAvB,GAAmCR,WAAnC;;;;"}
package/esm/index.js CHANGED
@@ -16,12 +16,10 @@ import './v2/components.js';
16
16
  import 'styled-components';
17
17
  import '@elliemae/ds-grid';
18
18
  import '@elliemae/ds-system';
19
- import '@elliemae/ds-icons/ChevronSmallDown';
19
+ import '@elliemae/ds-icons';
20
20
  import '@elliemae/ds-button';
21
21
  import 'lodash';
22
- import '@elliemae/ds-icons/ArrowheadRight';
23
- import '@elliemae/ds-icons/ArrowheadDown';
24
22
  import '@elliemae/ds-separator';
25
- import '@elliemae/ds-form/Checkbox';
23
+ import '@elliemae/ds-form';
26
24
  import './detail/styled.js';
27
25
  //# sourceMappingURL=index.js.map
package/esm/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { PropTypes, describe } from 'react-desc';
3
3
  import styled from 'styled-components';
4
- import Chevron from '@elliemae/ds-icons/ChevronSmallDown';
4
+ import { ChevronSmallDown } from '@elliemae/ds-icons';
5
5
  import Button from '@elliemae/ds-button';
6
6
 
7
7
  var Addon = /*#__PURE__*/styled(Button).withConfig({
@@ -19,7 +19,7 @@ var ActionAddon = function ActionAddon(_ref) {
19
19
  return /*#__PURE__*/React.createElement(Addon, {
20
20
  onClick: onClick,
21
21
  labelText: label,
22
- icon: icon || /*#__PURE__*/React.createElement(Chevron, {
22
+ icon: icon || /*#__PURE__*/React.createElement(ChevronSmallDown, {
23
23
  color: ['brand-primary', 700]
24
24
  })
25
25
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ActionAddon.js","sources":["../../../src/v2/ActionAddon.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport Chevron from '@elliemae/ds-icons/ChevronSmallDown';\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\n onClick={onClick}\n labelText={label}\n icon={icon || <Chevron color={['brand-primary', 700]} />}\n />\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"],"names":["Addon","styled","Button","props","theme","fontWeights","semibold","colors","brand","ActionAddon","label","onClick","icon","actionProps","PropTypes","string","description","func","element","propTypes","DSCardActionAddonWithSchema","describe"],"mappings":";;;;;;AAMA,IAAMA,KAAK,gBAAGC,MAAM,CAACC,MAAD,CAAT;AAAA;AAAA,2OAMM,UAACC,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,WAAZ,CAAwBC,QAAnC;AAAA,CANN,EAOA,UAACH,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYG,MAAZ,CAAmBC,KAAnB,CAAyB,KAAzB,CAAX;AAAA,CAPA,CAAX;;IAiBMC,WAAW,GAAG,SAAdA,WAAc;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,MAAUC,OAAV,QAAUA,OAAV;AAAA,MAAmBC,IAAnB,QAAmBA,IAAnB;AAAA,sBAClB,oBAAC,KAAD;AACE,IAAA,OAAO,EAAED,OADX;AAEE,IAAA,SAAS,EAAED,KAFb;AAGE,IAAA,IAAI,EAAEE,IAAI,iBAAI,oBAAC,OAAD;AAAS,MAAA,KAAK,EAAE,CAAC,eAAD,EAAkB,GAAlB;AAAhB;AAHhB,IADkB;AAAA;;AAQpB,IAAMC,WAAW,GAAG;AAClB;AACF;AACA;AACEH,EAAAA,KAAK,EAAEI,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,aAA7B,CAJW;;AAKlB;AACF;AACA;AACEL,EAAAA,OAAO,EAAEG,SAAS,CAACG,IAAV,CAAeD,WAAf,CAA2B,mBAA3B,CARS;;AASlB;AACF;AACA;AACEJ,EAAAA,IAAI,EAAEE,SAAS,CAACI,OAAV,CAAkBF,WAAlB,CAA8B,iCAA9B;AAZY,CAApB;AAeAP,WAAW,CAACU,SAAZ,GAAwBN,WAAxB;IACMO,2BAA2B,GAAGC,QAAQ,CAACZ,WAAD;AAC5CW,2BAA2B,CAACD,SAA5B,GAAwCN,WAAxC;;;;"}
1
+ {"version":3,"file":"ActionAddon.js","sources":["../../../src/v2/ActionAddon.tsx"],"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"],"names":["Addon","styled","Button","props","theme","fontWeights","semibold","colors","brand","ActionAddon","label","onClick","icon","actionProps","PropTypes","string","description","func","element","propTypes","DSCardActionAddonWithSchema","describe"],"mappings":";;;;;;AAMA,IAAMA,KAAK,gBAAGC,MAAM,CAACC,MAAD,CAAT;AAAA;AAAA,2OAMM,UAACC,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,WAAZ,CAAwBC,QAAnC;AAAA,CANN,EAOA,UAACH,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYG,MAAZ,CAAmBC,KAAnB,CAAyB,KAAzB,CAAX;AAAA,CAPA,CAAX;;IAiBMC,WAAW,GAAG,SAAdA,WAAc;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,MAAUC,OAAV,QAAUA,OAAV;AAAA,MAAmBC,IAAnB,QAAmBA,IAAnB;AAAA,sBAClB,oBAAC,KAAD;AAAO,IAAA,OAAO,EAAED,OAAhB;AAAyB,IAAA,SAAS,EAAED,KAApC;AAA2C,IAAA,IAAI,EAAEE,IAAI,iBAAI,oBAAC,gBAAD;AAAkB,MAAA,KAAK,EAAE,CAAC,eAAD,EAAkB,GAAlB;AAAzB;AAAzD,IADkB;AAAA;;AAIpB,IAAMC,WAAW,GAAG;AAClB;AACF;AACA;AACEH,EAAAA,KAAK,EAAEI,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,aAA7B,CAJW;;AAKlB;AACF;AACA;AACEL,EAAAA,OAAO,EAAEG,SAAS,CAACG,IAAV,CAAeD,WAAf,CAA2B,mBAA3B,CARS;;AASlB;AACF;AACA;AACEJ,EAAAA,IAAI,EAAEE,SAAS,CAACI,OAAV,CAAkBF,WAAlB,CAA8B,iCAA9B;AAZY,CAApB;AAeAP,WAAW,CAACU,SAAZ,GAAwBN,WAAxB;IACMO,2BAA2B,GAAGC,QAAQ,CAACZ,WAAD;AAC5CW,2BAA2B,CAACD,SAA5B,GAAwCN,WAAxC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-card",
3
- "version": "1.56.0",
3
+ "version": "1.57.0-rc.10",
4
4
  "license": "MIT",
5
5
  "description": "Ellie Mae - Dim Sum - Card",
6
6
  "module": "esm/index.js",
@@ -16,15 +16,15 @@
16
16
  "build": "node ../../scripts/build/build.js"
17
17
  },
18
18
  "dependencies": {
19
- "@elliemae/ds-button": "1.56.0",
20
- "@elliemae/ds-classnames": "1.56.0",
21
- "@elliemae/ds-form": "1.56.0",
22
- "@elliemae/ds-grid": "1.56.0",
23
- "@elliemae/ds-header": "1.56.0",
24
- "@elliemae/ds-icons": "1.56.0",
25
- "@elliemae/ds-separator": "1.56.0",
26
- "@elliemae/ds-system": "1.56.0",
27
- "@elliemae/ds-truncated-tooltip-text": "1.56.0",
19
+ "@elliemae/ds-button": "1.57.0-rc.10",
20
+ "@elliemae/ds-classnames": "1.57.0-rc.10",
21
+ "@elliemae/ds-form": "1.57.0-rc.10",
22
+ "@elliemae/ds-grid": "1.57.0-rc.10",
23
+ "@elliemae/ds-header": "1.57.0-rc.10",
24
+ "@elliemae/ds-icons": "1.57.0-rc.10",
25
+ "@elliemae/ds-separator": "1.57.0-rc.10",
26
+ "@elliemae/ds-system": "1.57.0-rc.10",
27
+ "@elliemae/ds-truncated-tooltip-text": "1.57.0-rc.10",
28
28
  "react-desc": "^4.1.2"
29
29
  },
30
30
  "devDependencies": {