@elliemae/ds-toast 3.0.0-next.68 → 3.0.0-next.69

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.
@@ -89,6 +89,7 @@ const props = {
89
89
  toastId: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.string, import_react_desc.PropTypes.number]).description("id for the toast")
90
90
  };
91
91
  DSToast.propTypes = props;
92
+ DSToast.displayName = "DSToast";
92
93
  const DSToastWithSchema = (0, import_react_desc.describe)(DSToast);
93
94
  DSToastWithSchema.propTypes = props;
94
95
  var DSToast_default = DSToast;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/DSToast.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { ToastContainer, Slide } from 'react-toastify';\nimport { CloseSmall } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { toastsPositions } from './ToastPosition';\n\nconst CloseButton = ({ closeToast }) => (\n <DSButton buttonType=\"text\" className=\"toast-close-button\" icon={<CloseSmall />} onClick={closeToast} size=\"m\" />\n);\n\nconst DSToast = ({\n containerProps = {},\n position = 'bottom-left',\n autoClose = 5000, // can be false or a number in milliseconds\n showProgressBar = false,\n closeOnClick = false,\n enableMultiContainer = false,\n containerId = undefined,\n toastId = undefined,\n}) => (\n <ToastContainer\n {...containerProps}\n autoClose={autoClose}\n className={(showProgressBar && 'with-progressbar') || ''}\n closeButton={<CloseButton />}\n closeOnClick={closeOnClick}\n containerId={containerId}\n enableMultiContainer={enableMultiContainer}\n hideProgressBar={!showProgressBar}\n newestOnTop\n position={position}\n toastId={toastId}\n transition={Slide}\n />\n);\n\nconst props = {\n /** inject props to wrapper */\n containerProps: PropTypes.object.description('inject props to wrapper'),\n /** Position on the screen to show the toast */\n position: PropTypes.oneOf(toastsPositions).description('Position on the screen to show the toast'),\n /** ms to autoclose the toast */\n autoClose: PropTypes.number.description('ms to autoclose the toast'),\n /** Whether to show a progress bar indicating when the toast is going to be closed */\n showProgressBar: PropTypes.bool.description(\n 'Whether to show a progress bar indicating when the toast is going to be closed',\n ),\n /** Close toast handler */\n closeOnClick: PropTypes.bool.description('Close toast handler'),\n /** Allows instantiating multiple Toast containers */\n enableMultiContainer: PropTypes.bool.description('Allows instantiating multiple Toast containers'),\n /** unique id for multi container */\n containerId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('unique id for multi container'),\n /** id for the toast */\n toastId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('id for the toast'),\n};\n\nDSToast.propTypes = props;\nconst DSToastWithSchema = describe(DSToast);\nDSToastWithSchema.propTypes = props;\n\nexport { DSToast, DSToastWithSchema };\nexport default DSToast;\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,4BAAsC;AACtC,sBAA2B;AAC3B,uBAAqB;AACrB,2BAAgC;AAEhC,MAAM,cAAc,CAAC,EAAE,iBACrB,mDAAC;AAAA,EAAS,YAAW;AAAA,EAAO,WAAU;AAAA,EAAqB,MAAM,mDAAC,gCAAW;AAAA,EAAI,SAAS;AAAA,EAAY,MAAK;AAAA,CAAI;AAGjH,MAAM,UAAU,CAAC;AAAA,EACf,iBAAiB,CAAC;AAAA,EAClB,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,cAAc;AAAA,EACd,UAAU;AAAA,MAEV,mDAAC,uEACK,iBADL;AAAA,EAEC;AAAA,EACA,WAAY,mBAAmB,sBAAuB;AAAA,EACtD,aAAa,mDAAC,iBAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB,CAAC;AAAA,EAClB,aAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACd;AAGF,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,4BAAU,OAAO,YAAY,yBAAyB;AAAA,EAEtE,UAAU,4BAAU,MAAM,oCAAe,EAAE,YAAY,0CAA0C;AAAA,EAEjG,WAAW,4BAAU,OAAO,YAAY,2BAA2B;AAAA,EAEnE,iBAAiB,4BAAU,KAAK,YAC9B,gFACF;AAAA,EAEA,cAAc,4BAAU,KAAK,YAAY,qBAAqB;AAAA,EAE9D,sBAAsB,4BAAU,KAAK,YAAY,gDAAgD;AAAA,EAEjG,aAAa,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,MAAM,CAAC,EAAE,YAAY,+BAA+B;AAAA,EAElH,SAAS,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,MAAM,CAAC,EAAE,YAAY,kBAAkB;AACnG;AAEA,QAAQ,YAAY;AACpB,MAAM,oBAAoB,gCAAS,OAAO;AAC1C,kBAAkB,YAAY;AAG9B,IAAO,kBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { ToastContainer, Slide } from 'react-toastify';\nimport { CloseSmall } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { toastsPositions } from './ToastPosition';\n\nconst CloseButton = ({ closeToast }) => (\n <DSButton buttonType=\"text\" className=\"toast-close-button\" icon={<CloseSmall />} onClick={closeToast} size=\"m\" />\n);\n\nconst DSToast = ({\n containerProps = {},\n position = 'bottom-left',\n autoClose = 5000, // can be false or a number in milliseconds\n showProgressBar = false,\n closeOnClick = false,\n enableMultiContainer = false,\n containerId = undefined,\n toastId = undefined,\n}) => (\n <ToastContainer\n {...containerProps}\n autoClose={autoClose}\n className={(showProgressBar && 'with-progressbar') || ''}\n closeButton={<CloseButton />}\n closeOnClick={closeOnClick}\n containerId={containerId}\n enableMultiContainer={enableMultiContainer}\n hideProgressBar={!showProgressBar}\n newestOnTop\n position={position}\n toastId={toastId}\n transition={Slide}\n />\n);\n\nconst props = {\n /** inject props to wrapper */\n containerProps: PropTypes.object.description('inject props to wrapper'),\n /** Position on the screen to show the toast */\n position: PropTypes.oneOf(toastsPositions).description('Position on the screen to show the toast'),\n /** ms to autoclose the toast */\n autoClose: PropTypes.number.description('ms to autoclose the toast'),\n /** Whether to show a progress bar indicating when the toast is going to be closed */\n showProgressBar: PropTypes.bool.description(\n 'Whether to show a progress bar indicating when the toast is going to be closed',\n ),\n /** Close toast handler */\n closeOnClick: PropTypes.bool.description('Close toast handler'),\n /** Allows instantiating multiple Toast containers */\n enableMultiContainer: PropTypes.bool.description('Allows instantiating multiple Toast containers'),\n /** unique id for multi container */\n containerId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('unique id for multi container'),\n /** id for the toast */\n toastId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('id for the toast'),\n};\n\nDSToast.propTypes = props;\nDSToast.displayName = 'DSToast';\nconst DSToastWithSchema = describe(DSToast);\nDSToastWithSchema.propTypes = props;\n\nexport { DSToast, DSToastWithSchema };\nexport default DSToast;\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,4BAAsC;AACtC,sBAA2B;AAC3B,uBAAqB;AACrB,2BAAgC;AAEhC,MAAM,cAAc,CAAC,EAAE,iBACrB,mDAAC;AAAA,EAAS,YAAW;AAAA,EAAO,WAAU;AAAA,EAAqB,MAAM,mDAAC,gCAAW;AAAA,EAAI,SAAS;AAAA,EAAY,MAAK;AAAA,CAAI;AAGjH,MAAM,UAAU,CAAC;AAAA,EACf,iBAAiB,CAAC;AAAA,EAClB,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,cAAc;AAAA,EACd,UAAU;AAAA,MAEV,mDAAC,uEACK,iBADL;AAAA,EAEC;AAAA,EACA,WAAY,mBAAmB,sBAAuB;AAAA,EACtD,aAAa,mDAAC,iBAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB,CAAC;AAAA,EAClB,aAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACd;AAGF,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,4BAAU,OAAO,YAAY,yBAAyB;AAAA,EAEtE,UAAU,4BAAU,MAAM,oCAAe,EAAE,YAAY,0CAA0C;AAAA,EAEjG,WAAW,4BAAU,OAAO,YAAY,2BAA2B;AAAA,EAEnE,iBAAiB,4BAAU,KAAK,YAC9B,gFACF;AAAA,EAEA,cAAc,4BAAU,KAAK,YAAY,qBAAqB;AAAA,EAE9D,sBAAsB,4BAAU,KAAK,YAAY,gDAAgD;AAAA,EAEjG,aAAa,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,MAAM,CAAC,EAAE,YAAY,+BAA+B;AAAA,EAElH,SAAS,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,MAAM,CAAC,EAAE,YAAY,kBAAkB;AACnG;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,oBAAoB,gCAAS,OAAO;AAC1C,kBAAkB,YAAY;AAG9B,IAAO,kBAAQ;",
6
6
  "names": []
7
7
  }
@@ -53,6 +53,8 @@ const linkprops = {
53
53
  };
54
54
  DSToastAction.propTypes = actionprops;
55
55
  DSToastActionLink.propTypes = linkprops;
56
+ DSToastAction.displayName = "DSToastAction";
57
+ DSToastActionLink.displayName = "DSToastActionLink";
56
58
  const DSToastActionWithSchema = (0, import_react_desc.describe)(DSToastAction);
57
59
  const DSToastActionLinkWithSchema = (0, import_react_desc.describe)(DSToastActionLink);
58
60
  DSToastActionLinkWithSchema.propTypes = linkprops;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/ToastAction.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 } from '@elliemae/ds-system';\n\nconst Link = styled.span`\n ${color('brand', '600')}\n`;\n\nconst DSToastAction = ({ children, onClick, onKeyDown }) => (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n onKeyDown={onKeyDown}\n onClick={onClick}\n role={onClick ? 'button' : 'textbox'}\n >\n {children}\n </div>\n);\n\n// eslint-disable-next-line jsx-a11y/anchor-is-valid\nconst DSToastActionLink = ({ children }) => <Link>{children}</Link>;\n\nconst actionprops = {\n /** DSToastActionLink component or text string */\n children: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n ]).description('DSToastActionLink component or text string'),\n /** click handler */\n onClick: PropTypes.func.description('click handler'),\n /** key down handler */\n onKeyDown: PropTypes.func.description('key down handler'),\n};\n\nconst linkprops = {\n /** link text */\n children: PropTypes.string.isRequired.description('link text'),\n};\n\nDSToastAction.propTypes = actionprops;\nDSToastActionLink.propTypes = linkprops;\nconst DSToastActionWithSchema = describe(DSToastAction);\nconst DSToastActionLinkWithSchema = describe(DSToastActionLink);\nDSToastActionLinkWithSchema.propTypes = linkprops;\nDSToastActionWithSchema.propTypes = actionprops;\n\nexport {\n DSToastAction,\n DSToastActionLink,\n DSToastActionWithSchema,\n DSToastActionLinkWithSchema,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,+BAAmB;AACnB,uBAAsB;AAEtB,MAAM,OAAO,iCAAO;AAAA,IAChB,4BAAM,SAAS,KAAK;AAAA;AAGxB,MAAM,gBAAgB,CAAC,EAAE,UAAU,SAAS,gBAE1C,mDAAC;AAAA,EACC;AAAA,EACA;AAAA,EACA,MAAM,UAAU,WAAW;AAAA,GAE1B,QACH;AAIF,MAAM,oBAAoB,CAAC,EAAE,eAAe,mDAAC,YAAM,QAAS;AAE5D,MAAM,cAAc;AAAA,EAElB,UAAU,4BAAU,UAAU;AAAA,IAC5B,4BAAU;AAAA,IACV,4BAAU;AAAA,EACZ,CAAC,EAAE,YAAY,4CAA4C;AAAA,EAE3D,SAAS,4BAAU,KAAK,YAAY,eAAe;AAAA,EAEnD,WAAW,4BAAU,KAAK,YAAY,kBAAkB;AAC1D;AAEA,MAAM,YAAY;AAAA,EAEhB,UAAU,4BAAU,OAAO,WAAW,YAAY,WAAW;AAC/D;AAEA,cAAc,YAAY;AAC1B,kBAAkB,YAAY;AAC9B,MAAM,0BAA0B,gCAAS,aAAa;AACtD,MAAM,8BAA8B,gCAAS,iBAAiB;AAC9D,4BAA4B,YAAY;AACxC,wBAAwB,YAAY;",
4
+ "sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport styled from 'styled-components';\nimport { color } from '@elliemae/ds-system';\n\nconst Link = styled.span`\n ${color('brand', '600')}\n`;\n\nconst DSToastAction = ({ children, onClick, onKeyDown }) => (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n onKeyDown={onKeyDown}\n onClick={onClick}\n role={onClick ? 'button' : 'textbox'}\n >\n {children}\n </div>\n);\n\n// eslint-disable-next-line jsx-a11y/anchor-is-valid\nconst DSToastActionLink = ({ children }) => <Link>{children}</Link>;\n\nconst actionprops = {\n /** DSToastActionLink component or text string */\n children: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n ]).description('DSToastActionLink component or text string'),\n /** click handler */\n onClick: PropTypes.func.description('click handler'),\n /** key down handler */\n onKeyDown: PropTypes.func.description('key down handler'),\n};\n\nconst linkprops = {\n /** link text */\n children: PropTypes.string.isRequired.description('link text'),\n};\n\nDSToastAction.propTypes = actionprops;\nDSToastActionLink.propTypes = linkprops;\nDSToastAction.displayName = 'DSToastAction';\nDSToastActionLink.displayName = 'DSToastActionLink';\nconst DSToastActionWithSchema = describe(DSToastAction);\nconst DSToastActionLinkWithSchema = describe(DSToastActionLink);\nDSToastActionLinkWithSchema.propTypes = linkprops;\nDSToastActionWithSchema.propTypes = actionprops;\n\nexport {\n DSToastAction,\n DSToastActionLink,\n DSToastActionWithSchema,\n DSToastActionLinkWithSchema,\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,+BAAmB;AACnB,uBAAsB;AAEtB,MAAM,OAAO,iCAAO;AAAA,IAChB,4BAAM,SAAS,KAAK;AAAA;AAGxB,MAAM,gBAAgB,CAAC,EAAE,UAAU,SAAS,gBAE1C,mDAAC;AAAA,EACC;AAAA,EACA;AAAA,EACA,MAAM,UAAU,WAAW;AAAA,GAE1B,QACH;AAIF,MAAM,oBAAoB,CAAC,EAAE,eAAe,mDAAC,YAAM,QAAS;AAE5D,MAAM,cAAc;AAAA,EAElB,UAAU,4BAAU,UAAU;AAAA,IAC5B,4BAAU;AAAA,IACV,4BAAU;AAAA,EACZ,CAAC,EAAE,YAAY,4CAA4C;AAAA,EAE3D,SAAS,4BAAU,KAAK,YAAY,eAAe;AAAA,EAEnD,WAAW,4BAAU,KAAK,YAAY,kBAAkB;AAC1D;AAEA,MAAM,YAAY;AAAA,EAEhB,UAAU,4BAAU,OAAO,WAAW,YAAY,WAAW;AAC/D;AAEA,cAAc,YAAY;AAC1B,kBAAkB,YAAY;AAC9B,cAAc,cAAc;AAC5B,kBAAkB,cAAc;AAChC,MAAM,0BAA0B,gCAAS,aAAa;AACtD,MAAM,8BAA8B,gCAAS,iBAAiB;AAC9D,4BAA4B,YAAY;AACxC,wBAAwB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -64,6 +64,7 @@ const props = {
64
64
  toastId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description("id for the toast")
65
65
  };
66
66
  DSToast.propTypes = props;
67
+ DSToast.displayName = "DSToast";
67
68
  const DSToastWithSchema = describe(DSToast);
68
69
  DSToastWithSchema.propTypes = props;
69
70
  var DSToast_default = DSToast;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSToast.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { ToastContainer, Slide } from 'react-toastify';\nimport { CloseSmall } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { toastsPositions } from './ToastPosition';\n\nconst CloseButton = ({ closeToast }) => (\n <DSButton buttonType=\"text\" className=\"toast-close-button\" icon={<CloseSmall />} onClick={closeToast} size=\"m\" />\n);\n\nconst DSToast = ({\n containerProps = {},\n position = 'bottom-left',\n autoClose = 5000, // can be false or a number in milliseconds\n showProgressBar = false,\n closeOnClick = false,\n enableMultiContainer = false,\n containerId = undefined,\n toastId = undefined,\n}) => (\n <ToastContainer\n {...containerProps}\n autoClose={autoClose}\n className={(showProgressBar && 'with-progressbar') || ''}\n closeButton={<CloseButton />}\n closeOnClick={closeOnClick}\n containerId={containerId}\n enableMultiContainer={enableMultiContainer}\n hideProgressBar={!showProgressBar}\n newestOnTop\n position={position}\n toastId={toastId}\n transition={Slide}\n />\n);\n\nconst props = {\n /** inject props to wrapper */\n containerProps: PropTypes.object.description('inject props to wrapper'),\n /** Position on the screen to show the toast */\n position: PropTypes.oneOf(toastsPositions).description('Position on the screen to show the toast'),\n /** ms to autoclose the toast */\n autoClose: PropTypes.number.description('ms to autoclose the toast'),\n /** Whether to show a progress bar indicating when the toast is going to be closed */\n showProgressBar: PropTypes.bool.description(\n 'Whether to show a progress bar indicating when the toast is going to be closed',\n ),\n /** Close toast handler */\n closeOnClick: PropTypes.bool.description('Close toast handler'),\n /** Allows instantiating multiple Toast containers */\n enableMultiContainer: PropTypes.bool.description('Allows instantiating multiple Toast containers'),\n /** unique id for multi container */\n containerId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('unique id for multi container'),\n /** id for the toast */\n toastId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('id for the toast'),\n};\n\nDSToast.propTypes = props;\nconst DSToastWithSchema = describe(DSToast);\nDSToastWithSchema.propTypes = props;\n\nexport { DSToast, DSToastWithSchema };\nexport default DSToast;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,cAAc,CAAC,EAAE,iBACrB,qCAAC;AAAA,EAAS,YAAW;AAAA,EAAO,WAAU;AAAA,EAAqB,MAAM,qCAAC,gBAAW;AAAA,EAAI,SAAS;AAAA,EAAY,MAAK;AAAA,CAAI;AAGjH,MAAM,UAAU,CAAC;AAAA,EACf,iBAAiB,CAAC;AAAA,EAClB,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,cAAc;AAAA,EACd,UAAU;AAAA,MAEV,qCAAC,iDACK,iBADL;AAAA,EAEC;AAAA,EACA,WAAY,mBAAmB,sBAAuB;AAAA,EACtD,aAAa,qCAAC,iBAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB,CAAC;AAAA,EAClB,aAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACd;AAGF,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,yBAAyB;AAAA,EAEtE,UAAU,UAAU,MAAM,eAAe,EAAE,YAAY,0CAA0C;AAAA,EAEjG,WAAW,UAAU,OAAO,YAAY,2BAA2B;AAAA,EAEnE,iBAAiB,UAAU,KAAK,YAC9B,gFACF;AAAA,EAEA,cAAc,UAAU,KAAK,YAAY,qBAAqB;AAAA,EAE9D,sBAAsB,UAAU,KAAK,YAAY,gDAAgD;AAAA,EAEjG,aAAa,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAAY,+BAA+B;AAAA,EAElH,SAAS,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAAY,kBAAkB;AACnG;AAEA,QAAQ,YAAY;AACpB,MAAM,oBAAoB,SAAS,OAAO;AAC1C,kBAAkB,YAAY;AAG9B,IAAO,kBAAQ;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { ToastContainer, Slide } from 'react-toastify';\nimport { CloseSmall } from '@elliemae/ds-icons';\nimport DSButton from '@elliemae/ds-button';\nimport { toastsPositions } from './ToastPosition';\n\nconst CloseButton = ({ closeToast }) => (\n <DSButton buttonType=\"text\" className=\"toast-close-button\" icon={<CloseSmall />} onClick={closeToast} size=\"m\" />\n);\n\nconst DSToast = ({\n containerProps = {},\n position = 'bottom-left',\n autoClose = 5000, // can be false or a number in milliseconds\n showProgressBar = false,\n closeOnClick = false,\n enableMultiContainer = false,\n containerId = undefined,\n toastId = undefined,\n}) => (\n <ToastContainer\n {...containerProps}\n autoClose={autoClose}\n className={(showProgressBar && 'with-progressbar') || ''}\n closeButton={<CloseButton />}\n closeOnClick={closeOnClick}\n containerId={containerId}\n enableMultiContainer={enableMultiContainer}\n hideProgressBar={!showProgressBar}\n newestOnTop\n position={position}\n toastId={toastId}\n transition={Slide}\n />\n);\n\nconst props = {\n /** inject props to wrapper */\n containerProps: PropTypes.object.description('inject props to wrapper'),\n /** Position on the screen to show the toast */\n position: PropTypes.oneOf(toastsPositions).description('Position on the screen to show the toast'),\n /** ms to autoclose the toast */\n autoClose: PropTypes.number.description('ms to autoclose the toast'),\n /** Whether to show a progress bar indicating when the toast is going to be closed */\n showProgressBar: PropTypes.bool.description(\n 'Whether to show a progress bar indicating when the toast is going to be closed',\n ),\n /** Close toast handler */\n closeOnClick: PropTypes.bool.description('Close toast handler'),\n /** Allows instantiating multiple Toast containers */\n enableMultiContainer: PropTypes.bool.description('Allows instantiating multiple Toast containers'),\n /** unique id for multi container */\n containerId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('unique id for multi container'),\n /** id for the toast */\n toastId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('id for the toast'),\n};\n\nDSToast.propTypes = props;\nDSToast.displayName = 'DSToast';\nconst DSToastWithSchema = describe(DSToast);\nDSToastWithSchema.propTypes = props;\n\nexport { DSToast, DSToastWithSchema };\nexport default DSToast;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,cAAc,CAAC,EAAE,iBACrB,qCAAC;AAAA,EAAS,YAAW;AAAA,EAAO,WAAU;AAAA,EAAqB,MAAM,qCAAC,gBAAW;AAAA,EAAI,SAAS;AAAA,EAAY,MAAK;AAAA,CAAI;AAGjH,MAAM,UAAU,CAAC;AAAA,EACf,iBAAiB,CAAC;AAAA,EAClB,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,cAAc;AAAA,EACd,UAAU;AAAA,MAEV,qCAAC,iDACK,iBADL;AAAA,EAEC;AAAA,EACA,WAAY,mBAAmB,sBAAuB;AAAA,EACtD,aAAa,qCAAC,iBAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB,CAAC;AAAA,EAClB,aAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACd;AAGF,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY,yBAAyB;AAAA,EAEtE,UAAU,UAAU,MAAM,eAAe,EAAE,YAAY,0CAA0C;AAAA,EAEjG,WAAW,UAAU,OAAO,YAAY,2BAA2B;AAAA,EAEnE,iBAAiB,UAAU,KAAK,YAC9B,gFACF;AAAA,EAEA,cAAc,UAAU,KAAK,YAAY,qBAAqB;AAAA,EAE9D,sBAAsB,UAAU,KAAK,YAAY,gDAAgD;AAAA,EAEjG,aAAa,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAAY,+BAA+B;AAAA,EAElH,SAAS,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YAAY,kBAAkB;AACnG;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,oBAAoB,SAAS,OAAO;AAC1C,kBAAkB,YAAY;AAG9B,IAAO,kBAAQ;",
6
6
  "names": []
7
7
  }
@@ -25,6 +25,8 @@ const linkprops = {
25
25
  };
26
26
  DSToastAction.propTypes = actionprops;
27
27
  DSToastActionLink.propTypes = linkprops;
28
+ DSToastAction.displayName = "DSToastAction";
29
+ DSToastActionLink.displayName = "DSToastActionLink";
28
30
  const DSToastActionWithSchema = describe(DSToastAction);
29
31
  const DSToastActionLinkWithSchema = describe(DSToastActionLink);
30
32
  DSToastActionLinkWithSchema.propTypes = linkprops;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/ToastAction.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 } from '@elliemae/ds-system';\n\nconst Link = styled.span`\n ${color('brand', '600')}\n`;\n\nconst DSToastAction = ({ children, onClick, onKeyDown }) => (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n onKeyDown={onKeyDown}\n onClick={onClick}\n role={onClick ? 'button' : 'textbox'}\n >\n {children}\n </div>\n);\n\n// eslint-disable-next-line jsx-a11y/anchor-is-valid\nconst DSToastActionLink = ({ children }) => <Link>{children}</Link>;\n\nconst actionprops = {\n /** DSToastActionLink component or text string */\n children: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n ]).description('DSToastActionLink component or text string'),\n /** click handler */\n onClick: PropTypes.func.description('click handler'),\n /** key down handler */\n onKeyDown: PropTypes.func.description('key down handler'),\n};\n\nconst linkprops = {\n /** link text */\n children: PropTypes.string.isRequired.description('link text'),\n};\n\nDSToastAction.propTypes = actionprops;\nDSToastActionLink.propTypes = linkprops;\nconst DSToastActionWithSchema = describe(DSToastAction);\nconst DSToastActionLinkWithSchema = describe(DSToastActionLink);\nDSToastActionLinkWithSchema.propTypes = linkprops;\nDSToastActionWithSchema.propTypes = actionprops;\n\nexport {\n DSToastAction,\n DSToastActionLink,\n DSToastActionWithSchema,\n DSToastActionLinkWithSchema,\n};\n"],
5
- "mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,OAAO,OAAO;AAAA,IAChB,MAAM,SAAS,KAAK;AAAA;AAGxB,MAAM,gBAAgB,CAAC,EAAE,UAAU,SAAS,gBAE1C,qCAAC;AAAA,EACC;AAAA,EACA;AAAA,EACA,MAAM,UAAU,WAAW;AAAA,GAE1B,QACH;AAIF,MAAM,oBAAoB,CAAC,EAAE,eAAe,qCAAC,YAAM,QAAS;AAE5D,MAAM,cAAc;AAAA,EAElB,UAAU,UAAU,UAAU;AAAA,IAC5B,UAAU;AAAA,IACV,UAAU;AAAA,EACZ,CAAC,EAAE,YAAY,4CAA4C;AAAA,EAE3D,SAAS,UAAU,KAAK,YAAY,eAAe;AAAA,EAEnD,WAAW,UAAU,KAAK,YAAY,kBAAkB;AAC1D;AAEA,MAAM,YAAY;AAAA,EAEhB,UAAU,UAAU,OAAO,WAAW,YAAY,WAAW;AAC/D;AAEA,cAAc,YAAY;AAC1B,kBAAkB,YAAY;AAC9B,MAAM,0BAA0B,SAAS,aAAa;AACtD,MAAM,8BAA8B,SAAS,iBAAiB;AAC9D,4BAA4B,YAAY;AACxC,wBAAwB,YAAY;",
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 } from '@elliemae/ds-system';\n\nconst Link = styled.span`\n ${color('brand', '600')}\n`;\n\nconst DSToastAction = ({ children, onClick, onKeyDown }) => (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div\n onKeyDown={onKeyDown}\n onClick={onClick}\n role={onClick ? 'button' : 'textbox'}\n >\n {children}\n </div>\n);\n\n// eslint-disable-next-line jsx-a11y/anchor-is-valid\nconst DSToastActionLink = ({ children }) => <Link>{children}</Link>;\n\nconst actionprops = {\n /** DSToastActionLink component or text string */\n children: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n ]).description('DSToastActionLink component or text string'),\n /** click handler */\n onClick: PropTypes.func.description('click handler'),\n /** key down handler */\n onKeyDown: PropTypes.func.description('key down handler'),\n};\n\nconst linkprops = {\n /** link text */\n children: PropTypes.string.isRequired.description('link text'),\n};\n\nDSToastAction.propTypes = actionprops;\nDSToastActionLink.propTypes = linkprops;\nDSToastAction.displayName = 'DSToastAction';\nDSToastActionLink.displayName = 'DSToastActionLink';\nconst DSToastActionWithSchema = describe(DSToastAction);\nconst DSToastActionLinkWithSchema = describe(DSToastActionLink);\nDSToastActionLinkWithSchema.propTypes = linkprops;\nDSToastActionWithSchema.propTypes = actionprops;\n\nexport {\n DSToastAction,\n DSToastActionLink,\n DSToastActionWithSchema,\n DSToastActionLinkWithSchema,\n};\n"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AAEA,MAAM,OAAO,OAAO;AAAA,IAChB,MAAM,SAAS,KAAK;AAAA;AAGxB,MAAM,gBAAgB,CAAC,EAAE,UAAU,SAAS,gBAE1C,qCAAC;AAAA,EACC;AAAA,EACA;AAAA,EACA,MAAM,UAAU,WAAW;AAAA,GAE1B,QACH;AAIF,MAAM,oBAAoB,CAAC,EAAE,eAAe,qCAAC,YAAM,QAAS;AAE5D,MAAM,cAAc;AAAA,EAElB,UAAU,UAAU,UAAU;AAAA,IAC5B,UAAU;AAAA,IACV,UAAU;AAAA,EACZ,CAAC,EAAE,YAAY,4CAA4C;AAAA,EAE3D,SAAS,UAAU,KAAK,YAAY,eAAe;AAAA,EAEnD,WAAW,UAAU,KAAK,YAAY,kBAAkB;AAC1D;AAEA,MAAM,YAAY;AAAA,EAEhB,UAAU,UAAU,OAAO,WAAW,YAAY,WAAW;AAC/D;AAEA,cAAc,YAAY;AAC1B,kBAAkB,YAAY;AAC9B,cAAc,cAAc;AAC5B,kBAAkB,cAAc;AAChC,MAAM,0BAA0B,SAAS,aAAa;AACtD,MAAM,8BAA8B,SAAS,iBAAiB;AAC9D,4BAA4B,YAAY;AACxC,wBAAwB,YAAY;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-toast",
3
- "version": "3.0.0-next.68",
3
+ "version": "3.0.0-next.69",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Toast",
6
6
  "files": [