@elliemae/ds-toast 1.57.0-rc.2 → 1.57.0-rc.6
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/cjs/DSToast.js +2 -3
- package/cjs/DSToast.js.map +1 -1
- package/cjs/ToastRender.js +2 -7
- package/cjs/ToastRender.js.map +1 -1
- package/cjs/index.js +1 -4
- package/cjs/index.js.map +1 -1
- package/cjs/toast.js +1 -3
- package/cjs/toast.js.map +1 -1
- package/esm/DSToast.js +1 -1
- package/esm/DSToast.js.map +1 -1
- package/esm/ToastRender.js +1 -3
- package/esm/ToastRender.js.map +1 -1
- package/esm/index.js +1 -4
- package/esm/index.js.map +1 -1
- package/esm/toast.js +1 -3
- package/esm/toast.js.map +1 -1
- package/package.json +5 -5
package/cjs/DSToast.js
CHANGED
|
@@ -6,7 +6,7 @@ var _extends = require('@babel/runtime/helpers/extends');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var reactDesc = require('react-desc');
|
|
8
8
|
var reactToastify = require('react-toastify');
|
|
9
|
-
var
|
|
9
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
10
10
|
var DSButton = require('@elliemae/ds-button');
|
|
11
11
|
var ToastPosition = require('./ToastPosition.js');
|
|
12
12
|
|
|
@@ -14,7 +14,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
|
|
15
15
|
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
16
16
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
-
var CloseSmall__default = /*#__PURE__*/_interopDefaultLegacy(CloseSmall);
|
|
18
17
|
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
19
18
|
|
|
20
19
|
var CloseButton = function CloseButton(_ref) {
|
|
@@ -22,7 +21,7 @@ var CloseButton = function CloseButton(_ref) {
|
|
|
22
21
|
return /*#__PURE__*/React__default['default'].createElement(DSButton__default['default'], {
|
|
23
22
|
buttonType: "text",
|
|
24
23
|
className: "toast-close-button",
|
|
25
|
-
icon: /*#__PURE__*/React__default['default'].createElement(
|
|
24
|
+
icon: /*#__PURE__*/React__default['default'].createElement(dsIcons.CloseSmall, null),
|
|
26
25
|
onClick: closeToast,
|
|
27
26
|
size: "m"
|
|
28
27
|
});
|
package/cjs/DSToast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSToast.js","sources":["../../src/DSToast.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { ToastContainer, Slide } from 'react-toastify';\nimport CloseSmall from '@elliemae/ds-icons
|
|
1
|
+
{"version":3,"file":"DSToast.js","sources":["../../src/DSToast.tsx"],"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"],"names":["CloseButton","closeToast","React","DSButton","CloseSmall","DSToast","containerProps","position","autoClose","showProgressBar","closeOnClick","enableMultiContainer","containerId","undefined","toastId","ToastContainer","Slide","props","PropTypes","object","description","oneOf","toastsPositions","number","bool","oneOfType","string","propTypes","DSToastWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;AAOA,IAAMA,WAAW,GAAG,SAAdA,WAAc;AAAA,MAAGC,UAAH,QAAGA,UAAH;AAAA,sBAClBC,wCAACC,4BAAD;AAAU,IAAA,UAAU,EAAC,MAArB;AAA4B,IAAA,SAAS,EAAC,oBAAtC;AAA2D,IAAA,IAAI,eAAED,wCAACE,kBAAD,OAAjE;AAAiF,IAAA,OAAO,EAAEH,UAA1F;AAAsG,IAAA,IAAI,EAAC;AAA3G,IADkB;AAAA,CAApB;;IAIMI,OAAO,GAAG,SAAVA,OAAU;AAAA,mCACdC,cADc;AAAA,MACdA,cADc,qCACG,EADH;AAAA,6BAEdC,QAFc;AAAA,MAEdA,QAFc,+BAEH,aAFG;AAAA,8BAGdC,SAHc;AAAA,MAGdA,SAHc,gCAGF,IAHE;AAAA,oCAIdC,eAJc;AAAA,MAIdA,eAJc,sCAII,KAJJ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;AAeZ;AACAR,EAAAA,WAAW,EAAEM,mBAAS,CAACO,SAAV,CAAoB,CAACP,mBAAS,CAACQ,MAAX,EAAmBR,mBAAS,CAACK,MAA7B,CAApB,EAA0DH,WAA1D,CAAsE,+BAAtE,CAhBD;;AAiBZ;AACAN,EAAAA,OAAO,EAAEI,mBAAS,CAACO,SAAV,CAAoB,CAACP,mBAAS,CAACQ,MAAX,EAAmBR,mBAAS,CAACK,MAA7B,CAApB,EAA0DH,WAA1D,CAAsE,kBAAtE;AAlBG,CAAd;AAqBAf,OAAO,CAACsB,SAAR,GAAoBV,KAApB;IACMW,iBAAiB,GAAGC,kBAAQ,CAACxB,OAAD;AAClCuB,iBAAiB,CAACD,SAAlB,GAA8BV,KAA9B;;;;;;"}
|
package/cjs/ToastRender.js
CHANGED
|
@@ -4,9 +4,7 @@ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var PropTypes = require('prop-types');
|
|
6
6
|
var dsClassnames = require('@elliemae/ds-classnames');
|
|
7
|
-
var
|
|
8
|
-
var WarningCircleFill = require('@elliemae/ds-icons/WarningCircleFill');
|
|
9
|
-
var InfoCircleFill = require('@elliemae/ds-icons/InfoCircleFill');
|
|
7
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
10
8
|
var ToastType = require('./ToastType.js');
|
|
11
9
|
|
|
12
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -14,9 +12,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
12
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
15
13
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
14
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
17
|
-
var CheckmarkCircleFill__default = /*#__PURE__*/_interopDefaultLegacy(CheckmarkCircleFill);
|
|
18
|
-
var WarningCircleFill__default = /*#__PURE__*/_interopDefaultLegacy(WarningCircleFill);
|
|
19
|
-
var InfoCircleFill__default = /*#__PURE__*/_interopDefaultLegacy(InfoCircleFill);
|
|
20
15
|
|
|
21
16
|
var blockName = 'toast-content';
|
|
22
17
|
var Container = dsClassnames.aggregatedClasses('div')(blockName);
|
|
@@ -28,7 +23,7 @@ var MessageText = dsClassnames.aggregatedClasses('span')(blockName, 'message-tex
|
|
|
28
23
|
var getIconByToastType = function getIconByToastType(type) {
|
|
29
24
|
var _ToastType$SUCCESS$To;
|
|
30
25
|
|
|
31
|
-
return (_ToastType$SUCCESS$To = {}, _defineProperty__default['default'](_ToastType$SUCCESS$To, ToastType.ToastType.SUCCESS,
|
|
26
|
+
return (_ToastType$SUCCESS$To = {}, _defineProperty__default['default'](_ToastType$SUCCESS$To, ToastType.ToastType.SUCCESS, dsIcons.CheckmarkCircleFill), _defineProperty__default['default'](_ToastType$SUCCESS$To, ToastType.ToastType.WARNING, dsIcons.WarningCircleFill), _defineProperty__default['default'](_ToastType$SUCCESS$To, ToastType.ToastType.INFO, dsIcons.InfoCircleFill), _defineProperty__default['default'](_ToastType$SUCCESS$To, ToastType.ToastType.ERROR, dsIcons.WarningCircleFill), _defineProperty__default['default'](_ToastType$SUCCESS$To, ToastType.ToastType.DEFAULT, 'div'), _ToastType$SUCCESS$To)[type];
|
|
32
27
|
};
|
|
33
28
|
|
|
34
29
|
var ToastRender = function ToastRender(_ref) {
|
package/cjs/ToastRender.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastRender.js","sources":["../../src/ToastRender.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport
|
|
1
|
+
{"version":3,"file":"ToastRender.js","sources":["../../src/ToastRender.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { CheckmarkCircleFill, WarningCircleFill, InfoCircleFill } from '@elliemae/ds-icons';\nimport { ToastType, toastTypes } from './ToastType';\n\nconst blockName = 'toast-content';\nconst Container = aggregatedClasses('div')(blockName);\nconst IconContainer = aggregatedClasses('div')(blockName, 'icon-container');\nconst MessageContent = aggregatedClasses('div')(blockName, 'message-content');\nconst MessageHeader = aggregatedClasses('div')(blockName, 'message-header');\nconst MessageText = aggregatedClasses('span')(blockName, 'message-text');\n\nconst getIconByToastType = (type) =>\n ({\n [ToastType.SUCCESS]: CheckmarkCircleFill,\n [ToastType.WARNING]: WarningCircleFill,\n [ToastType.INFO]: InfoCircleFill,\n [ToastType.ERROR]: WarningCircleFill,\n [ToastType.DEFAULT]: 'div',\n }[type]);\n\nconst ToastRender = ({ type = ToastType.DEFAULT, messageTitle = '', messageText = '' }) => {\n const IconMessage = aggregatedClasses(getIconByToastType(type))(blockName, 'icon-message');\n return (\n <Container data-testid=\"ds-toast-render\">\n <IconContainer>\n <IconMessage size=\"m\" />\n </IconContainer>\n <MessageContent>\n <MessageHeader>{messageTitle}</MessageHeader>\n <MessageText>{messageText}</MessageText>\n </MessageContent>\n </Container>\n );\n};\n\nToastRender.propTypes = {\n /**\n * Toast title\n */\n messageTitle: PropTypes.string.isRequired,\n /**\n * Toast body, either a string or Action with ActionLink component\n */\n messageText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n /**\n * Toast type\n */\n type: PropTypes.oneOf(toastTypes).isRequired,\n};\n\nexport default ToastRender;\n"],"names":["blockName","Container","aggregatedClasses","IconContainer","MessageContent","MessageHeader","MessageText","getIconByToastType","type","ToastType","SUCCESS","CheckmarkCircleFill","WARNING","WarningCircleFill","INFO","InfoCircleFill","ERROR","DEFAULT","ToastRender","messageTitle","messageText","IconMessage","React","propTypes","PropTypes","string","isRequired","oneOfType","element","oneOf","toastTypes"],"mappings":";;;;;;;;;;;;;;;AAMA,IAAMA,SAAS,GAAG,eAAlB;AACA,IAAMC,SAAS,GAAG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AAD,qBACEA,wCAAC,aAAD,QAAgBH,YAAhB,CADF,eAEEG,wCAAC,WAAD,QAAcF,WAAd,CAFF,CAJF,CADF;AAWD;;AAEDF,WAAW,CAACK,SAAZ,GAAwB;AACtB;AACF;AACA;AACEJ,EAAAA,YAAY,EAAEK,6BAAS,CAACC,MAAV,CAAiBC,UAJT;;AAKtB;AACF;AACA;AACEN,EAAAA,WAAW,EAAEI,6BAAS,CAACG,SAAV,CAAoB,CAACH,6BAAS,CAACC,MAAX,EAAmBD,6BAAS,CAACI,OAA7B,CAApB,CARS;;AAStB;AACF;AACA;AACEpB,EAAAA,IAAI,EAAEgB,6BAAS,CAACK,KAAV,CAAgBC,oBAAhB,EAA4BJ;AAZZ,CAAxB;;;;"}
|
package/cjs/index.js
CHANGED
|
@@ -11,16 +11,13 @@ require('@babel/runtime/helpers/extends');
|
|
|
11
11
|
require('react');
|
|
12
12
|
require('react-desc');
|
|
13
13
|
require('react-toastify');
|
|
14
|
-
require('@elliemae/ds-icons
|
|
14
|
+
require('@elliemae/ds-icons');
|
|
15
15
|
require('@elliemae/ds-button');
|
|
16
16
|
require('@babel/runtime/helpers/defineProperty');
|
|
17
17
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
18
18
|
require('./ToastRender.js');
|
|
19
19
|
require('prop-types');
|
|
20
20
|
require('@elliemae/ds-classnames');
|
|
21
|
-
require('@elliemae/ds-icons/CheckmarkCircleFill');
|
|
22
|
-
require('@elliemae/ds-icons/WarningCircleFill');
|
|
23
|
-
require('@elliemae/ds-icons/InfoCircleFill');
|
|
24
21
|
require('styled-components');
|
|
25
22
|
require('@elliemae/ds-system');
|
|
26
23
|
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/cjs/toast.js
CHANGED
|
@@ -9,9 +9,7 @@ var reactToastify = require('react-toastify');
|
|
|
9
9
|
var ToastRender = require('./ToastRender.js');
|
|
10
10
|
require('prop-types');
|
|
11
11
|
require('@elliemae/ds-classnames');
|
|
12
|
-
require('@elliemae/ds-icons
|
|
13
|
-
require('@elliemae/ds-icons/WarningCircleFill');
|
|
14
|
-
require('@elliemae/ds-icons/InfoCircleFill');
|
|
12
|
+
require('@elliemae/ds-icons');
|
|
15
13
|
require('./ToastType.js');
|
|
16
14
|
|
|
17
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
package/cjs/toast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.js","sources":["../../src/toast.tsx"],"sourcesContent":["import React from 'react';\nimport { toast as toastifyToast } from 'react-toastify';\nimport ToastRender from './ToastRender';\n\nconst toast = Object.assign(\n ({ type, messageTitle, messageText, ...rest }, options) =>\n toastifyToast(\n <ToastRender\n messageText={messageText}\n messageTitle={messageTitle}\n type={type}\n />,\n {\n ...rest,\n ...options,\n type,\n },\n ),\n { ...toastifyToast, isActive: (id) => toastifyToast.isActive(id) },\n);\nexport { toast };\n"],"names":["toast","Object","assign","options","type","messageTitle","messageText","rest","toastifyToast","React","isActive","id"],"mappings":"
|
|
1
|
+
{"version":3,"file":"toast.js","sources":["../../src/toast.tsx"],"sourcesContent":["import React from 'react';\nimport { toast as toastifyToast } from 'react-toastify';\nimport ToastRender from './ToastRender';\n\nconst toast = Object.assign(\n ({ type, messageTitle, messageText, ...rest }, options) =>\n toastifyToast(\n <ToastRender\n messageText={messageText}\n messageTitle={messageTitle}\n type={type}\n />,\n {\n ...rest,\n ...options,\n type,\n },\n ),\n { ...toastifyToast, isActive: (id) => toastifyToast.isActive(id) },\n);\nexport { toast };\n"],"names":["toast","Object","assign","options","type","messageTitle","messageText","rest","toastifyToast","React","isActive","id"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAIMA,KAAK,GAAGC,MAAM,CAACC,MAAP,CACZ,gBAA+CC,OAA/C;AAAA,MAAGC,IAAH,QAAGA,IAAH;AAAA,MAASC,YAAT,QAASA,YAAT;AAAA,MAAuBC,WAAvB,QAAuBA,WAAvB;AAAA,MAAuCC,IAAvC;;AAAA,SACEC,mBAAa,eACXC,wCAAC,WAAD;AACE,IAAA,WAAW,EAAEH,WADf;AAEE,IAAA,YAAY,EAAED,YAFhB;AAGE,IAAA,IAAI,EAAED;AAHR,IADW,gDAONG,IAPM,GAQNJ,OARM;AASTC,IAAAA,IAAI,EAAJA;AATS,KADf;AAAA,CADY,kCAcPI,mBAdO;AAcQE,EAAAA,QAAQ,EAAE,kBAACC,EAAD;AAAA,WAAQH,mBAAa,CAACE,QAAd,CAAuBC,EAAvB,CAAR;AAAA;AAdlB;;;;"}
|
package/esm/DSToast.js
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from '@babel/runtime/helpers/esm/extends';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PropTypes, describe } from 'react-desc';
|
|
4
4
|
import { ToastContainer, Slide } from 'react-toastify';
|
|
5
|
-
import CloseSmall from '@elliemae/ds-icons
|
|
5
|
+
import { CloseSmall } from '@elliemae/ds-icons';
|
|
6
6
|
import DSButton from '@elliemae/ds-button';
|
|
7
7
|
import { toastsPositions } from './ToastPosition.js';
|
|
8
8
|
|
package/esm/DSToast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DSToast.js","sources":["../../src/DSToast.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes, describe } from 'react-desc';\nimport { ToastContainer, Slide } from 'react-toastify';\nimport CloseSmall from '@elliemae/ds-icons
|
|
1
|
+
{"version":3,"file":"DSToast.js","sources":["../../src/DSToast.tsx"],"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"],"names":["CloseButton","closeToast","DSToast","containerProps","position","autoClose","showProgressBar","closeOnClick","enableMultiContainer","containerId","undefined","toastId","Slide","props","PropTypes","object","description","oneOf","toastsPositions","number","bool","oneOfType","string","propTypes","DSToastWithSchema","describe"],"mappings":";;;;;;;;AAOA,IAAMA,WAAW,GAAG,SAAdA,WAAc;AAAA,MAAGC,UAAH,QAAGA,UAAH;AAAA,sBAClB,oBAAC,QAAD;AAAU,IAAA,UAAU,EAAC,MAArB;AAA4B,IAAA,SAAS,EAAC,oBAAtC;AAA2D,IAAA,IAAI,eAAE,oBAAC,UAAD,OAAjE;AAAiF,IAAA,OAAO,EAAEA,UAA1F;AAAsG,IAAA,IAAI,EAAC;AAA3G,IADkB;AAAA,CAApB;;IAIMC,OAAO,GAAG,SAAVA,OAAU;AAAA,mCACdC,cADc;AAAA,MACdA,cADc,qCACG,EADH;AAAA,6BAEdC,QAFc;AAAA,MAEdA,QAFc,+BAEH,aAFG;AAAA,8BAGdC,SAHc;AAAA,MAGdA,SAHc,gCAGF,IAHE;AAAA,oCAIdC,eAJc;AAAA,MAIdA,eAJc,sCAII,KAJJ;AAAA,iCAKdC,YALc;AAAA,MAKdA,YALc,mCAKC,KALD;AAAA,oCAMdC,oBANc;AAAA,MAMdA,oBANc,sCAMS,KANT;AAAA,gCAOdC,WAPc;AAAA,MAOdA,WAPc,kCAOAC,SAPA;AAAA,4BAQdC,OARc;AAAA,MAQdA,OARc,8BAQJD,SARI;AAAA,sBAUd,oBAAC,cAAD,eACMP,cADN;AAEE,IAAA,SAAS,EAAEE,SAFb;AAGE,IAAA,SAAS,EAAGC,eAAe,IAAI,kBAApB,IAA2C,EAHxD;AAIE,IAAA,WAAW,eAAE,oBAAC,WAAD,OAJf;AAKE,IAAA,YAAY,EAAEC,YALhB;AAME,IAAA,WAAW,EAAEE,WANf;AAOE,IAAA,oBAAoB,EAAED,oBAPxB;AAQE,IAAA,eAAe,EAAE,CAACF,eARpB;AASE,IAAA,WAAW,MATb;AAUE,IAAA,QAAQ,EAAEF,QAVZ;AAWE,IAAA,OAAO,EAAEO,OAXX;AAYE,IAAA,UAAU,EAAEC;AAZd,KAVc;AAAA;;AA0BhB,IAAMC,KAAK,GAAG;AACZ;AACAV,EAAAA,cAAc,EAAEW,SAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,yBAA7B,CAFJ;;AAGZ;AACAZ,EAAAA,QAAQ,EAAEU,SAAS,CAACG,KAAV,CAAgBC,eAAhB,EAAiCF,WAAjC,CAA6C,0CAA7C,CAJE;;AAKZ;AACAX,EAAAA,SAAS,EAAES,SAAS,CAACK,MAAV,CAAiBH,WAAjB,CAA6B,2BAA7B,CANC;;AAOZ;AACAV,EAAAA,eAAe,EAAEQ,SAAS,CAACM,IAAV,CAAeJ,WAAf,CACf,gFADe,CARL;;AAWZ;AACAT,EAAAA,YAAY,EAAEO,SAAS,CAACM,IAAV,CAAeJ,WAAf,CAA2B,qBAA3B,CAZF;;AAaZ;AACAR,EAAAA,oBAAoB,EAAEM,SAAS,CAACM,IAAV,CAAeJ,WAAf,CAA2B,gDAA3B,CAdV;;AAeZ;AACAP,EAAAA,WAAW,EAAEK,SAAS,CAACO,SAAV,CAAoB,CAACP,SAAS,CAACQ,MAAX,EAAmBR,SAAS,CAACK,MAA7B,CAApB,EAA0DH,WAA1D,CAAsE,+BAAtE,CAhBD;;AAiBZ;AACAL,EAAAA,OAAO,EAAEG,SAAS,CAACO,SAAV,CAAoB,CAACP,SAAS,CAACQ,MAAX,EAAmBR,SAAS,CAACK,MAA7B,CAApB,EAA0DH,WAA1D,CAAsE,kBAAtE;AAlBG,CAAd;AAqBAd,OAAO,CAACqB,SAAR,GAAoBV,KAApB;IACMW,iBAAiB,GAAGC,QAAQ,CAACvB,OAAD;AAClCsB,iBAAiB,CAACD,SAAlB,GAA8BV,KAA9B;;;;"}
|
package/esm/ToastRender.js
CHANGED
|
@@ -2,9 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { aggregatedClasses } from '@elliemae/ds-classnames';
|
|
5
|
-
import CheckmarkCircleFill from '@elliemae/ds-icons
|
|
6
|
-
import WarningCircleFill from '@elliemae/ds-icons/WarningCircleFill';
|
|
7
|
-
import InfoCircleFill from '@elliemae/ds-icons/InfoCircleFill';
|
|
5
|
+
import { CheckmarkCircleFill, WarningCircleFill, InfoCircleFill } from '@elliemae/ds-icons';
|
|
8
6
|
import { toastTypes, ToastType } from './ToastType.js';
|
|
9
7
|
|
|
10
8
|
var blockName = 'toast-content';
|
package/esm/ToastRender.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastRender.js","sources":["../../src/ToastRender.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport
|
|
1
|
+
{"version":3,"file":"ToastRender.js","sources":["../../src/ToastRender.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { aggregatedClasses } from '@elliemae/ds-classnames';\nimport { CheckmarkCircleFill, WarningCircleFill, InfoCircleFill } from '@elliemae/ds-icons';\nimport { ToastType, toastTypes } from './ToastType';\n\nconst blockName = 'toast-content';\nconst Container = aggregatedClasses('div')(blockName);\nconst IconContainer = aggregatedClasses('div')(blockName, 'icon-container');\nconst MessageContent = aggregatedClasses('div')(blockName, 'message-content');\nconst MessageHeader = aggregatedClasses('div')(blockName, 'message-header');\nconst MessageText = aggregatedClasses('span')(blockName, 'message-text');\n\nconst getIconByToastType = (type) =>\n ({\n [ToastType.SUCCESS]: CheckmarkCircleFill,\n [ToastType.WARNING]: WarningCircleFill,\n [ToastType.INFO]: InfoCircleFill,\n [ToastType.ERROR]: WarningCircleFill,\n [ToastType.DEFAULT]: 'div',\n }[type]);\n\nconst ToastRender = ({ type = ToastType.DEFAULT, messageTitle = '', messageText = '' }) => {\n const IconMessage = aggregatedClasses(getIconByToastType(type))(blockName, 'icon-message');\n return (\n <Container data-testid=\"ds-toast-render\">\n <IconContainer>\n <IconMessage size=\"m\" />\n </IconContainer>\n <MessageContent>\n <MessageHeader>{messageTitle}</MessageHeader>\n <MessageText>{messageText}</MessageText>\n </MessageContent>\n </Container>\n );\n};\n\nToastRender.propTypes = {\n /**\n * Toast title\n */\n messageTitle: PropTypes.string.isRequired,\n /**\n * Toast body, either a string or Action with ActionLink component\n */\n messageText: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n /**\n * Toast type\n */\n type: PropTypes.oneOf(toastTypes).isRequired,\n};\n\nexport default ToastRender;\n"],"names":["blockName","Container","aggregatedClasses","IconContainer","MessageContent","MessageHeader","MessageText","getIconByToastType","type","ToastType","SUCCESS","CheckmarkCircleFill","WARNING","WarningCircleFill","INFO","InfoCircleFill","ERROR","DEFAULT","ToastRender","messageTitle","messageText","IconMessage","propTypes","PropTypes","string","isRequired","oneOfType","element","oneOf","toastTypes"],"mappings":";;;;;;;AAMA,IAAMA,SAAS,GAAG,eAAlB;AACA,IAAMC,SAAS,GAAGC,iBAAiB,CAAC,KAAD,CAAjB,CAAyBF,SAAzB,CAAlB;AACA,IAAMG,aAAa,GAAGD,iBAAiB,CAAC,KAAD,CAAjB,CAAyBF,SAAzB,EAAoC,gBAApC,CAAtB;AACA,IAAMI,cAAc,GAAGF,iBAAiB,CAAC,KAAD,CAAjB,CAAyBF,SAAzB,EAAoC,iBAApC,CAAvB;AACA,IAAMK,aAAa,GAAGH,iBAAiB,CAAC,KAAD,CAAjB,CAAyBF,SAAzB,EAAoC,gBAApC,CAAtB;AACA,IAAMM,WAAW,GAAGJ,iBAAiB,CAAC,MAAD,CAAjB,CAA0BF,SAA1B,EAAqC,cAArC,CAApB;;AAEA,IAAMO,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,IAAD;AAAA;;AAAA,SACxB,oEACEC,SAAS,CAACC,OADZ,EACsBC,mBADtB,0CAEEF,SAAS,CAACG,OAFZ,EAEsBC,iBAFtB,0CAGEJ,SAAS,CAACK,IAHZ,EAGmBC,cAHnB,0CAIEN,SAAS,CAACO,KAJZ,EAIoBH,iBAJpB,0CAKEJ,SAAS,CAACQ,OALZ,EAKsB,KALtB,0BAMCT,IAND,CADwB;AAAA,CAA3B;;IASMU,WAAW,GAAG,SAAdA,WAAc,OAAuE;AAAA,uBAApEV,IAAoE;AAAA,MAApEA,IAAoE,0BAA7DC,SAAS,CAACQ,OAAmD;AAAA,+BAA1CE,YAA0C;AAAA,MAA1CA,YAA0C,kCAA3B,EAA2B;AAAA,8BAAvBC,WAAuB;AAAA,MAAvBA,WAAuB,iCAAT,EAAS;AACzF,MAAMC,WAAW,GAAGnB,iBAAiB,CAACK,kBAAkB,CAACC,IAAD,CAAnB,CAAjB,CAA4CR,SAA5C,EAAuD,cAAvD,CAApB;AACA,sBACE,oBAAC,SAAD;AAAW,mBAAY;AAAvB,kBACE,oBAAC,aAAD,qBACE,oBAAC,WAAD;AAAa,IAAA,IAAI,EAAC;AAAlB,IADF,CADF,eAIE,oBAAC,cAAD,qBACE,oBAAC,aAAD,QAAgBmB,YAAhB,CADF,eAEE,oBAAC,WAAD,QAAcC,WAAd,CAFF,CAJF,CADF;AAWD;;AAEDF,WAAW,CAACI,SAAZ,GAAwB;AACtB;AACF;AACA;AACEH,EAAAA,YAAY,EAAEI,SAAS,CAACC,MAAV,CAAiBC,UAJT;;AAKtB;AACF;AACA;AACEL,EAAAA,WAAW,EAAEG,SAAS,CAACG,SAAV,CAAoB,CAACH,SAAS,CAACC,MAAX,EAAmBD,SAAS,CAACI,OAA7B,CAApB,CARS;;AAStB;AACF;AACA;AACEnB,EAAAA,IAAI,EAAEe,SAAS,CAACK,KAAV,CAAgBC,UAAhB,EAA4BJ;AAZZ,CAAxB;;;;"}
|
package/esm/index.js
CHANGED
|
@@ -7,16 +7,13 @@ import '@babel/runtime/helpers/esm/extends';
|
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'react-desc';
|
|
9
9
|
import 'react-toastify';
|
|
10
|
-
import '@elliemae/ds-icons
|
|
10
|
+
import '@elliemae/ds-icons';
|
|
11
11
|
import '@elliemae/ds-button';
|
|
12
12
|
import '@babel/runtime/helpers/esm/defineProperty';
|
|
13
13
|
import '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
14
14
|
import './ToastRender.js';
|
|
15
15
|
import 'prop-types';
|
|
16
16
|
import '@elliemae/ds-classnames';
|
|
17
|
-
import '@elliemae/ds-icons/CheckmarkCircleFill';
|
|
18
|
-
import '@elliemae/ds-icons/WarningCircleFill';
|
|
19
|
-
import '@elliemae/ds-icons/InfoCircleFill';
|
|
20
17
|
import 'styled-components';
|
|
21
18
|
import '@elliemae/ds-system';
|
|
22
19
|
//# 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":";;;;;;;;;;;;;;;;;"}
|
package/esm/toast.js
CHANGED
|
@@ -5,9 +5,7 @@ import { toast as toast$1 } from 'react-toastify';
|
|
|
5
5
|
import ToastRender from './ToastRender.js';
|
|
6
6
|
import 'prop-types';
|
|
7
7
|
import '@elliemae/ds-classnames';
|
|
8
|
-
import '@elliemae/ds-icons
|
|
9
|
-
import '@elliemae/ds-icons/WarningCircleFill';
|
|
10
|
-
import '@elliemae/ds-icons/InfoCircleFill';
|
|
8
|
+
import '@elliemae/ds-icons';
|
|
11
9
|
import './ToastType.js';
|
|
12
10
|
|
|
13
11
|
var _excluded = ["type", "messageTitle", "messageText"];
|
package/esm/toast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.js","sources":["../../src/toast.tsx"],"sourcesContent":["import React from 'react';\nimport { toast as toastifyToast } from 'react-toastify';\nimport ToastRender from './ToastRender';\n\nconst toast = Object.assign(\n ({ type, messageTitle, messageText, ...rest }, options) =>\n toastifyToast(\n <ToastRender\n messageText={messageText}\n messageTitle={messageTitle}\n type={type}\n />,\n {\n ...rest,\n ...options,\n type,\n },\n ),\n { ...toastifyToast, isActive: (id) => toastifyToast.isActive(id) },\n);\nexport { toast };\n"],"names":["toast","Object","assign","options","type","messageTitle","messageText","rest","toastifyToast","isActive","id"],"mappings":"
|
|
1
|
+
{"version":3,"file":"toast.js","sources":["../../src/toast.tsx"],"sourcesContent":["import React from 'react';\nimport { toast as toastifyToast } from 'react-toastify';\nimport ToastRender from './ToastRender';\n\nconst toast = Object.assign(\n ({ type, messageTitle, messageText, ...rest }, options) =>\n toastifyToast(\n <ToastRender\n messageText={messageText}\n messageTitle={messageTitle}\n type={type}\n />,\n {\n ...rest,\n ...options,\n type,\n },\n ),\n { ...toastifyToast, isActive: (id) => toastifyToast.isActive(id) },\n);\nexport { toast };\n"],"names":["toast","Object","assign","options","type","messageTitle","messageText","rest","toastifyToast","isActive","id"],"mappings":";;;;;;;;;;;;;;;IAIMA,KAAK,GAAGC,MAAM,CAACC,MAAP,CACZ,gBAA+CC,OAA/C;AAAA,MAAGC,IAAH,QAAGA,IAAH;AAAA,MAASC,YAAT,QAASA,YAAT;AAAA,MAAuBC,WAAvB,QAAuBA,WAAvB;AAAA,MAAuCC,IAAvC;;AAAA,SACEC,OAAa,eACX,oBAAC,WAAD;AACE,IAAA,WAAW,EAAEF,WADf;AAEE,IAAA,YAAY,EAAED,YAFhB;AAGE,IAAA,IAAI,EAAED;AAHR,IADW,gDAONG,IAPM,GAQNJ,OARM;AASTC,IAAAA,IAAI,EAAJA;AATS,KADf;AAAA,CADY,kCAcPI,OAdO;AAcQC,EAAAA,QAAQ,EAAE,kBAACC,EAAD;AAAA,WAAQF,OAAa,CAACC,QAAd,CAAuBC,EAAvB,CAAR;AAAA;AAdlB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-toast",
|
|
3
|
-
"version": "1.57.0-rc.
|
|
3
|
+
"version": "1.57.0-rc.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Ellie Mae - Dim Sum - Toast",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"build": "node ../../scripts/build/build.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@elliemae/ds-button": "1.57.0-rc.
|
|
20
|
-
"@elliemae/ds-classnames": "1.57.0-rc.
|
|
21
|
-
"@elliemae/ds-icons": "1.57.0-rc.
|
|
22
|
-
"@elliemae/ds-system": "1.57.0-rc.
|
|
19
|
+
"@elliemae/ds-button": "1.57.0-rc.6",
|
|
20
|
+
"@elliemae/ds-classnames": "1.57.0-rc.6",
|
|
21
|
+
"@elliemae/ds-icons": "1.57.0-rc.6",
|
|
22
|
+
"@elliemae/ds-system": "1.57.0-rc.6",
|
|
23
23
|
"prop-types": "~15.7.2",
|
|
24
24
|
"react-desc": "^4.1.2",
|
|
25
25
|
"react-toastify": "~6.2.0"
|