@elliemae/ds-toast 3.0.0-next.9 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,33 +21,27 @@ var __spreadValues = (a, b) => {
21
21
  return a;
22
22
  };
23
23
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
25
24
  var __export = (target, all) => {
26
25
  for (var name in all)
27
26
  __defProp(target, name, { get: all[name], enumerable: true });
28
27
  };
29
- var __reExport = (target, module2, copyDefault, desc) => {
30
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
31
- for (let key of __getOwnPropNames(module2))
32
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
33
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
28
+ var __copyProps = (to, from, except, desc) => {
29
+ if (from && typeof from === "object" || typeof from === "function") {
30
+ for (let key of __getOwnPropNames(from))
31
+ if (!__hasOwnProp.call(to, key) && key !== except)
32
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
34
33
  }
35
- return target;
34
+ return to;
36
35
  };
37
- var __toESM = (module2, isNodeMode) => {
38
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
39
- };
40
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
41
- return (module2, temp) => {
42
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
43
- };
44
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
36
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
37
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
45
38
  var DSToast_exports = {};
46
39
  __export(DSToast_exports, {
47
40
  DSToast: () => DSToast,
48
41
  DSToastWithSchema: () => DSToastWithSchema,
49
42
  default: () => DSToast_default
50
43
  });
44
+ module.exports = __toCommonJS(DSToast_exports);
51
45
  var React = __toESM(require("react"));
52
46
  var import_react = __toESM(require("react"));
53
47
  var import_react_desc = require("react-desc");
@@ -95,8 +89,8 @@ const props = {
95
89
  toastId: import_react_desc.PropTypes.oneOfType([import_react_desc.PropTypes.string, import_react_desc.PropTypes.number]).description("id for the toast")
96
90
  };
97
91
  DSToast.propTypes = props;
92
+ DSToast.displayName = "DSToast";
98
93
  const DSToastWithSchema = (0, import_react_desc.describe)(DSToast);
99
94
  DSToastWithSchema.propTypes = props;
100
95
  var DSToast_default = DSToast;
101
- module.exports = __toCommonJS(DSToast_exports);
102
96
  //# sourceMappingURL=DSToast.js.map
@@ -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;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,4BAAsC;AACtC,sBAA2B;AAC3B,uBAAqB;AACrB,2BAAgC;AAEhC,MAAM,cAAc,CAAC,EAAE,iBACrB,mDAAC,0BAAD;AAAA,EAAU,YAAW;AAAA,EAAO,WAAU;AAAA,EAAqB,MAAM,mDAAC,4BAAD;AAAA,EAAgB,SAAS;AAAA,EAAY,MAAK;AAAA;AAG7G,MAAM,UAAU,CAAC;AAAA,EACf,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,cAAc;AAAA,EACd,UAAU;AAAA,MAEV,mDAAC,sCAAD,iCACM,iBADN;AAAA,EAEE;AAAA,EACA,WAAY,mBAAmB,sBAAuB;AAAA,EACtD,aAAa,mDAAC,aAAD;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB,CAAC;AAAA,EAClB,aAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,YAAY;AAAA;AAIhB,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,4BAAU,OAAO,YAAY;AAAA,EAE7C,UAAU,4BAAU,MAAM,sCAAiB,YAAY;AAAA,EAEvD,WAAW,4BAAU,OAAO,YAAY;AAAA,EAExC,iBAAiB,4BAAU,KAAK,YAC9B;AAAA,EAGF,cAAc,4BAAU,KAAK,YAAY;AAAA,EAEzC,sBAAsB,4BAAU,KAAK,YAAY;AAAA,EAEjD,aAAa,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA,EAEnF,SAAS,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,SAAS,YAAY;AAAA;AAGjF,QAAQ,YAAY;AACpB,MAAM,oBAAoB,gCAAS;AACnC,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
  }
@@ -4,27 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var ToastAction_exports = {};
29
22
  __export(ToastAction_exports, {
30
23
  DSToastAction: () => DSToastAction,
@@ -32,6 +25,7 @@ __export(ToastAction_exports, {
32
25
  DSToastActionLinkWithSchema: () => DSToastActionLinkWithSchema,
33
26
  DSToastActionWithSchema: () => DSToastActionWithSchema
34
27
  });
28
+ module.exports = __toCommonJS(ToastAction_exports);
35
29
  var React = __toESM(require("react"));
36
30
  var import_react = __toESM(require("react"));
37
31
  var import_react_desc = require("react-desc");
@@ -59,9 +53,10 @@ const linkprops = {
59
53
  };
60
54
  DSToastAction.propTypes = actionprops;
61
55
  DSToastActionLink.propTypes = linkprops;
56
+ DSToastAction.displayName = "DSToastAction";
57
+ DSToastActionLink.displayName = "DSToastActionLink";
62
58
  const DSToastActionWithSchema = (0, import_react_desc.describe)(DSToastAction);
63
59
  const DSToastActionLinkWithSchema = (0, import_react_desc.describe)(DSToastActionLink);
64
60
  DSToastActionLinkWithSchema.propTypes = linkprops;
65
61
  DSToastActionWithSchema.propTypes = actionprops;
66
- module.exports = __toCommonJS(ToastAction_exports);
67
62
  //# sourceMappingURL=ToastAction.js.map
@@ -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;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAoC;AACpC,+BAAmB;AACnB,uBAAsB;AAEtB,MAAM,OAAO,iCAAO;AAAA,IAChB,4BAAM,SAAS;AAAA;AAGnB,MAAM,gBAAgB,CAAC,EAAE,UAAU,SAAS,gBAE1C,mDAAC,OAAD;AAAA,EACE;AAAA,EACA;AAAA,EACA,MAAM,UAAU,WAAW;AAAA,GAE1B;AAKL,MAAM,oBAAoB,CAAC,EAAE,eAAe,mDAAC,MAAD,MAAO;AAEnD,MAAM,cAAc;AAAA,EAElB,UAAU,4BAAU,UAAU;AAAA,IAC5B,4BAAU;AAAA,IACV,4BAAU;AAAA,KACT,YAAY;AAAA,EAEf,SAAS,4BAAU,KAAK,YAAY;AAAA,EAEpC,WAAW,4BAAU,KAAK,YAAY;AAAA;AAGxC,MAAM,YAAY;AAAA,EAEhB,UAAU,4BAAU,OAAO,WAAW,YAAY;AAAA;AAGpD,cAAc,YAAY;AAC1B,kBAAkB,YAAY;AAC9B,MAAM,0BAA0B,gCAAS;AACzC,MAAM,8BAA8B,gCAAS;AAC7C,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
  }
@@ -4,32 +4,26 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var ToastPosition_exports = {};
29
22
  __export(ToastPosition_exports, {
30
23
  ToastPosition: () => ToastPosition,
31
24
  toastsPositions: () => toastsPositions
32
25
  });
26
+ module.exports = __toCommonJS(ToastPosition_exports);
33
27
  var React = __toESM(require("react"));
34
28
  const ToastPosition = {
35
29
  TOP_RIGHT: "top-right",
@@ -40,5 +34,4 @@ const ToastPosition = {
40
34
  BOTTOM_LEFT: "bottom-left"
41
35
  };
42
36
  const toastsPositions = Object.values(ToastPosition);
43
- module.exports = __toCommonJS(ToastPosition_exports);
44
37
  //# sourceMappingURL=ToastPosition.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/ToastPosition.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export const ToastPosition = {\n TOP_RIGHT: 'top-right',\n TOP_CENTER: 'top-center',\n TOP_LEFT: 'top-left',\n BOTTOM_RIGHT: 'bottom-right',\n BOTTOM_CENTER: 'bottom-center',\n BOTTOM_LEFT: 'bottom-left',\n};\n\nexport const toastsPositions = Object.values(ToastPosition);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,gBAAgB;AAAA,EAC3B,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,aAAa;AAAA;AAGR,MAAM,kBAAkB,OAAO,OAAO;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,gBAAgB;AAAA,EAC3B,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,aAAa;AACf;AAEO,MAAM,kBAAkB,OAAO,OAAO,aAAa;",
6
6
  "names": []
7
7
  }
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var ToastRender_exports = {};
29
22
  __export(ToastRender_exports, {
30
23
  default: () => ToastRender_default
31
24
  });
25
+ module.exports = __toCommonJS(ToastRender_exports);
32
26
  var React = __toESM(require("react"));
33
27
  var import_react = __toESM(require("react"));
34
28
  var import_prop_types = __toESM(require("prop-types"));
@@ -62,5 +56,4 @@ ToastRender.propTypes = {
62
56
  type: import_prop_types.default.oneOf(import_ToastType.toastTypes).isRequired
63
57
  };
64
58
  var ToastRender_default = ToastRender;
65
- module.exports = __toCommonJS(ToastRender_exports);
66
59
  //# sourceMappingURL=ToastRender.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/ToastRender.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAsB;AACtB,2BAAkC;AAClC,sBAAuE;AACvE,uBAAsC;AAEtC,MAAM,YAAY;AAClB,MAAM,YAAY,4CAAkB,OAAO;AAC3C,MAAM,gBAAgB,4CAAkB,OAAO,WAAW;AAC1D,MAAM,iBAAiB,4CAAkB,OAAO,WAAW;AAC3D,MAAM,gBAAgB,4CAAkB,OAAO,WAAW;AAC1D,MAAM,cAAc,4CAAkB,QAAQ,WAAW;AAEzD,MAAM,qBAAqB,CAAC,SACzB;AAAA,GACE,2BAAU,UAAU;AAAA,GACpB,2BAAU,UAAU;AAAA,GACpB,2BAAU,OAAO;AAAA,GACjB,2BAAU,QAAQ;AAAA,GAClB,2BAAU,UAAU;AAAA,GACrB;AAEJ,MAAM,cAAc,CAAC,EAAE,OAAO,2BAAU,SAAS,eAAe,IAAI,cAAc,SAAS;AACzF,QAAM,cAAc,4CAAkB,mBAAmB,OAAO,WAAW;AAC3E,SACE,mDAAC,WAAD;AAAA,IAAW,eAAY;AAAA,KACrB,mDAAC,eAAD,MACE,mDAAC,aAAD;AAAA,IAAa,MAAK;AAAA,OAEpB,mDAAC,gBAAD,MACE,mDAAC,eAAD,MAAgB,eAChB,mDAAC,aAAD,MAAc;AAAA;AAMtB,YAAY,YAAY;AAAA,EAItB,cAAc,0BAAU,OAAO;AAAA,EAI/B,aAAa,0BAAU,UAAU,CAAC,0BAAU,QAAQ,0BAAU;AAAA,EAI9D,MAAM,0BAAU,MAAM,6BAAY;AAAA;AAGpC,IAAO,sBAAQ;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,wBAAsB;AACtB,2BAAkC;AAClC,sBAAuE;AACvE,uBAAsC;AAEtC,MAAM,YAAY;AAClB,MAAM,YAAY,4CAAkB,KAAK,EAAE,SAAS;AACpD,MAAM,gBAAgB,4CAAkB,KAAK,EAAE,WAAW,gBAAgB;AAC1E,MAAM,iBAAiB,4CAAkB,KAAK,EAAE,WAAW,iBAAiB;AAC5E,MAAM,gBAAgB,4CAAkB,KAAK,EAAE,WAAW,gBAAgB;AAC1E,MAAM,cAAc,4CAAkB,MAAM,EAAE,WAAW,cAAc;AAEvE,MAAM,qBAAqB,CAAC,SACzB;AAAA,GACE,2BAAU,UAAU;AAAA,GACpB,2BAAU,UAAU;AAAA,GACpB,2BAAU,OAAO;AAAA,GACjB,2BAAU,QAAQ;AAAA,GAClB,2BAAU,UAAU;AACvB,GAAE;AAEJ,MAAM,cAAc,CAAC,EAAE,OAAO,2BAAU,SAAS,eAAe,IAAI,cAAc,SAAS;AACzF,QAAM,cAAc,4CAAkB,mBAAmB,IAAI,CAAC,EAAE,WAAW,cAAc;AACzF,SACE,mDAAC;AAAA,IAAU,eAAY;AAAA,KACrB,mDAAC,qBACC,mDAAC;AAAA,IAAY,MAAK;AAAA,GAAI,CACxB,GACA,mDAAC,sBACC,mDAAC,qBAAe,YAAa,GAC7B,mDAAC,mBAAa,WAAY,CAC5B,CACF;AAEJ;AAEA,YAAY,YAAY;AAAA,EAItB,cAAc,0BAAU,OAAO;AAAA,EAI/B,aAAa,0BAAU,UAAU,CAAC,0BAAU,QAAQ,0BAAU,OAAO,CAAC;AAAA,EAItE,MAAM,0BAAU,MAAM,2BAAU,EAAE;AACpC;AAEA,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -4,32 +4,26 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
21
  var ToastType_exports = {};
29
22
  __export(ToastType_exports, {
30
23
  ToastType: () => ToastType,
31
24
  toastTypes: () => toastTypes
32
25
  });
26
+ module.exports = __toCommonJS(ToastType_exports);
33
27
  var React = __toESM(require("react"));
34
28
  const ToastType = {
35
29
  INFO: "info",
@@ -39,5 +33,4 @@ const ToastType = {
39
33
  DEFAULT: "default"
40
34
  };
41
35
  const toastTypes = Object.values(ToastType);
42
- module.exports = __toCommonJS(ToastType_exports);
43
36
  //# sourceMappingURL=ToastType.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/ToastType.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export const ToastType = {\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error',\n // TODO remove from types, it's not in spec\n DEFAULT: 'default',\n};\n\nexport const toastTypes = Object.values(ToastType);\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EAEP,SAAS;AAAA;AAGJ,MAAM,aAAa,OAAO,OAAO;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EAEP,SAAS;AACX;AAEO,MAAM,aAAa,OAAO,OAAO,SAAS;",
6
6
  "names": []
7
7
  }
package/dist/cjs/index.js CHANGED
@@ -4,37 +4,31 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
10
9
  __defProp(target, name, { get: all[name], enumerable: true });
11
10
  };
12
- var __reExport = (target, module2, copyDefault, desc) => {
13
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
- for (let key of __getOwnPropNames(module2))
15
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
16
  }
18
- return target;
17
+ return to;
19
18
  };
20
- var __toESM = (module2, isNodeMode) => {
21
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
- };
23
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
- return (module2, temp) => {
25
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
- };
27
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
19
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
22
  var src_exports = {};
29
23
  __export(src_exports, {
30
24
  default: () => import_DSToast.default
31
25
  });
26
+ module.exports = __toCommonJS(src_exports);
32
27
  var React = __toESM(require("react"));
33
- __reExport(src_exports, require("./DSToast"));
34
- __reExport(src_exports, require("./toast"));
35
- __reExport(src_exports, require("./ToastType"));
36
- __reExport(src_exports, require("./ToastPosition"));
37
- __reExport(src_exports, require("./ToastAction"));
28
+ __reExport(src_exports, require("./DSToast"), module.exports);
29
+ __reExport(src_exports, require("./toast"), module.exports);
30
+ __reExport(src_exports, require("./ToastType"), module.exports);
31
+ __reExport(src_exports, require("./ToastPosition"), module.exports);
32
+ __reExport(src_exports, require("./ToastAction"), module.exports);
38
33
  var import_DSToast = __toESM(require("./DSToast"));
39
- module.exports = __toCommonJS(src_exports);
40
34
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export * from './DSToast';\nexport * from './toast';\nexport * from './ToastType';\nexport * from './ToastPosition';\nexport * from './ToastAction';\n\nexport { default } from './DSToast';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc;AACd,wBAAc;AACd,wBAAc;AACd,wBAAc;AACd,wBAAc;AAEd,qBAAwB;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,sBAAd;AACA,wBAAc,oBADd;AAEA,wBAAc,wBAFd;AAGA,wBAAc,4BAHd;AAIA,wBAAc,0BAJd;AAMA,qBAAwB;",
6
6
  "names": []
7
7
  }
package/dist/cjs/toast.js CHANGED
@@ -21,7 +21,6 @@ var __spreadValues = (a, b) => {
21
21
  return a;
22
22
  };
23
23
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
25
24
  var __objRest = (source, exclude) => {
26
25
  var target = {};
27
26
  for (var prop in source)
@@ -38,26 +37,21 @@ var __export = (target, all) => {
38
37
  for (var name in all)
39
38
  __defProp(target, name, { get: all[name], enumerable: true });
40
39
  };
41
- var __reExport = (target, module2, copyDefault, desc) => {
42
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
43
- for (let key of __getOwnPropNames(module2))
44
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
45
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
40
+ var __copyProps = (to, from, except, desc) => {
41
+ if (from && typeof from === "object" || typeof from === "function") {
42
+ for (let key of __getOwnPropNames(from))
43
+ if (!__hasOwnProp.call(to, key) && key !== except)
44
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
45
  }
47
- return target;
48
- };
49
- var __toESM = (module2, isNodeMode) => {
50
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
46
+ return to;
51
47
  };
52
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
53
- return (module2, temp) => {
54
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
55
- };
56
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
48
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
49
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
57
50
  var toast_exports = {};
58
51
  __export(toast_exports, {
59
52
  toast: () => toast
60
53
  });
54
+ module.exports = __toCommonJS(toast_exports);
61
55
  var React = __toESM(require("react"));
62
56
  var import_react = __toESM(require("react"));
63
57
  var import_react_toastify = require("react-toastify");
@@ -72,5 +66,4 @@ const toast = Object.assign((_a, options) => {
72
66
  type
73
67
  }));
74
68
  }, __spreadProps(__spreadValues({}, import_react_toastify.toast), { isActive: (id) => import_react_toastify.toast.isActive(id) }));
75
- module.exports = __toCommonJS(toast_exports);
76
69
  //# sourceMappingURL=toast.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/toast.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,4BAAuC;AACvC,yBAAwB;AAExB,MAAM,QAAQ,OAAO,OACnB,CAAC,IAA8C,YAAS;AAAvD,eAAE,QAAM,cAAc,gBAAtB,IAAsC,iBAAtC,IAAsC,CAApC,QAAM,gBAAc;AACrB,0CACE,mDAAC,4BAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,MAEF,gDACK,OACA,UAFL;AAAA,IAGE;AAAA;AAAA,GAGN,iCAAK,8BAAL,EAAoB,UAAU,CAAC,OAAO,4BAAc,SAAS;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAkB;AAClB,4BAAuC;AACvC,yBAAwB;AAExB,MAAM,QAAQ,OAAO,OACnB,CAAC,IAA8C,YAAS;AAAvD,eAAE,QAAM,cAAc,gBAAtB,IAAsC,iBAAtC,IAAsC,CAApC,QAAM,gBAAc;AACrB,0CACE,mDAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,GACF,GACA,gDACK,OACA,UAFL;AAAA,IAGE;AAAA,EACF,EACF;AAAA,GACF,iCAAK,8BAAL,EAAoB,UAAU,CAAC,OAAO,4BAAc,SAAS,EAAE,EAAE,EACnE;",
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,UAAD;AAAA,EAAU,YAAW;AAAA,EAAO,WAAU;AAAA,EAAqB,MAAM,qCAAC,YAAD;AAAA,EAAgB,SAAS;AAAA,EAAY,MAAK;AAAA;AAG7G,MAAM,UAAU,CAAC;AAAA,EACf,iBAAiB;AAAA,EACjB,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,cAAc;AAAA,EACd,UAAU;AAAA,MAEV,qCAAC,gBAAD,iCACM,iBADN;AAAA,EAEE;AAAA,EACA,WAAY,mBAAmB,sBAAuB;AAAA,EACtD,aAAa,qCAAC,aAAD;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB,CAAC;AAAA,EAClB,aAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,YAAY;AAAA;AAIhB,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,UAAU,OAAO,YAAY;AAAA,EAE7C,UAAU,UAAU,MAAM,iBAAiB,YAAY;AAAA,EAEvD,WAAW,UAAU,OAAO,YAAY;AAAA,EAExC,iBAAiB,UAAU,KAAK,YAC9B;AAAA,EAGF,cAAc,UAAU,KAAK,YAAY;AAAA,EAEzC,sBAAsB,UAAU,KAAK,YAAY;AAAA,EAEjD,aAAa,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,SAAS,YAAY;AAAA,EAEnF,SAAS,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,SAAS,YAAY;AAAA;AAGjF,QAAQ,YAAY;AACpB,MAAM,oBAAoB,SAAS;AACnC,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;AAAA;AAGnB,MAAM,gBAAgB,CAAC,EAAE,UAAU,SAAS,gBAE1C,qCAAC,OAAD;AAAA,EACE;AAAA,EACA;AAAA,EACA,MAAM,UAAU,WAAW;AAAA,GAE1B;AAKL,MAAM,oBAAoB,CAAC,EAAE,eAAe,qCAAC,MAAD,MAAO;AAEnD,MAAM,cAAc;AAAA,EAElB,UAAU,UAAU,UAAU;AAAA,IAC5B,UAAU;AAAA,IACV,UAAU;AAAA,KACT,YAAY;AAAA,EAEf,SAAS,UAAU,KAAK,YAAY;AAAA,EAEpC,WAAW,UAAU,KAAK,YAAY;AAAA;AAGxC,MAAM,YAAY;AAAA,EAEhB,UAAU,UAAU,OAAO,WAAW,YAAY;AAAA;AAGpD,cAAc,YAAY;AAC1B,kBAAkB,YAAY;AAC9B,MAAM,0BAA0B,SAAS;AACzC,MAAM,8BAA8B,SAAS;AAC7C,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
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/ToastPosition.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const ToastPosition = {\n TOP_RIGHT: 'top-right',\n TOP_CENTER: 'top-center',\n TOP_LEFT: 'top-left',\n BOTTOM_RIGHT: 'bottom-right',\n BOTTOM_CENTER: 'bottom-center',\n BOTTOM_LEFT: 'bottom-left',\n};\n\nexport const toastsPositions = Object.values(ToastPosition);\n"],
5
- "mappings": "AAAA;ACAO,MAAM,gBAAgB;AAAA,EAC3B,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,aAAa;AAAA;AAGR,MAAM,kBAAkB,OAAO,OAAO;",
5
+ "mappings": "AAAA;ACAO,MAAM,gBAAgB;AAAA,EAC3B,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,aAAa;AACf;AAEO,MAAM,kBAAkB,OAAO,OAAO,aAAa;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/ToastRender.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
- "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY;AAClB,MAAM,YAAY,kBAAkB,OAAO;AAC3C,MAAM,gBAAgB,kBAAkB,OAAO,WAAW;AAC1D,MAAM,iBAAiB,kBAAkB,OAAO,WAAW;AAC3D,MAAM,gBAAgB,kBAAkB,OAAO,WAAW;AAC1D,MAAM,cAAc,kBAAkB,QAAQ,WAAW;AAEzD,MAAM,qBAAqB,CAAC,SACzB;AAAA,GACE,UAAU,UAAU;AAAA,GACpB,UAAU,UAAU;AAAA,GACpB,UAAU,OAAO;AAAA,GACjB,UAAU,QAAQ;AAAA,GAClB,UAAU,UAAU;AAAA,GACrB;AAEJ,MAAM,cAAc,CAAC,EAAE,OAAO,UAAU,SAAS,eAAe,IAAI,cAAc,SAAS;AACzF,QAAM,cAAc,kBAAkB,mBAAmB,OAAO,WAAW;AAC3E,SACE,qCAAC,WAAD;AAAA,IAAW,eAAY;AAAA,KACrB,qCAAC,eAAD,MACE,qCAAC,aAAD;AAAA,IAAa,MAAK;AAAA,OAEpB,qCAAC,gBAAD,MACE,qCAAC,eAAD,MAAgB,eAChB,qCAAC,aAAD,MAAc;AAAA;AAMtB,YAAY,YAAY;AAAA,EAItB,cAAc,UAAU,OAAO;AAAA,EAI/B,aAAa,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU;AAAA,EAI9D,MAAM,UAAU,MAAM,YAAY;AAAA;AAGpC,IAAO,sBAAQ;",
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAEA,MAAM,YAAY;AAClB,MAAM,YAAY,kBAAkB,KAAK,EAAE,SAAS;AACpD,MAAM,gBAAgB,kBAAkB,KAAK,EAAE,WAAW,gBAAgB;AAC1E,MAAM,iBAAiB,kBAAkB,KAAK,EAAE,WAAW,iBAAiB;AAC5E,MAAM,gBAAgB,kBAAkB,KAAK,EAAE,WAAW,gBAAgB;AAC1E,MAAM,cAAc,kBAAkB,MAAM,EAAE,WAAW,cAAc;AAEvE,MAAM,qBAAqB,CAAC,SACzB;AAAA,GACE,UAAU,UAAU;AAAA,GACpB,UAAU,UAAU;AAAA,GACpB,UAAU,OAAO;AAAA,GACjB,UAAU,QAAQ;AAAA,GAClB,UAAU,UAAU;AACvB,GAAE;AAEJ,MAAM,cAAc,CAAC,EAAE,OAAO,UAAU,SAAS,eAAe,IAAI,cAAc,SAAS;AACzF,QAAM,cAAc,kBAAkB,mBAAmB,IAAI,CAAC,EAAE,WAAW,cAAc;AACzF,SACE,qCAAC;AAAA,IAAU,eAAY;AAAA,KACrB,qCAAC,qBACC,qCAAC;AAAA,IAAY,MAAK;AAAA,GAAI,CACxB,GACA,qCAAC,sBACC,qCAAC,qBAAe,YAAa,GAC7B,qCAAC,mBAAa,WAAY,CAC5B,CACF;AAEJ;AAEA,YAAY,YAAY;AAAA,EAItB,cAAc,UAAU,OAAO;AAAA,EAI/B,aAAa,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,CAAC;AAAA,EAItE,MAAM,UAAU,MAAM,UAAU,EAAE;AACpC;AAEA,IAAO,sBAAQ;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/ToastType.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const ToastType = {\n INFO: 'info',\n SUCCESS: 'success',\n WARNING: 'warning',\n ERROR: 'error',\n // TODO remove from types, it's not in spec\n DEFAULT: 'default',\n};\n\nexport const toastTypes = Object.values(ToastType);\n"],
5
- "mappings": "AAAA;ACAO,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EAEP,SAAS;AAAA;AAGJ,MAAM,aAAa,OAAO,OAAO;",
5
+ "mappings": "AAAA;ACAO,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EAEP,SAAS;AACX;AAEO,MAAM,aAAa,OAAO,OAAO,SAAS;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/toast.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AAEA,MAAM,QAAQ,OAAO,OACnB,CAAC,IAA8C,YAAS;AAAvD,eAAE,QAAM,cAAc,gBAAtB,IAAsC,iBAAtC,IAAsC,CAApC,QAAM,gBAAc;AACrB,uBACE,qCAAC,aAAD;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,MAEF,gDACK,OACA,UAFL;AAAA,IAGE;AAAA;AAAA,GAGN,iCAAK,gBAAL,EAAoB,UAAU,CAAC,OAAO,cAAc,SAAS;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AAEA,MAAM,QAAQ,OAAO,OACnB,CAAC,IAA8C,YAAS;AAAvD,eAAE,QAAM,cAAc,gBAAtB,IAAsC,iBAAtC,IAAsC,CAApC,QAAM,gBAAc;AACrB,uBACE,qCAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,GACF,GACA,gDACK,OACA,UAFL;AAAA,IAGE;AAAA,EACF,EACF;AAAA,GACF,iCAAK,gBAAL,EAAoB,UAAU,CAAC,OAAO,cAAc,SAAS,EAAE,EAAE,EACnE;",
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.9",
3
+ "version": "3.0.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Toast",
6
6
  "files": [
@@ -58,11 +58,18 @@
58
58
  "reportFile": "tests.xml",
59
59
  "indent": 4
60
60
  },
61
+ "scripts": {
62
+ "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
63
+ "test": "node ../../scripts/testing/test.mjs",
64
+ "lint": "node ../../scripts/lint.mjs",
65
+ "dts": "node ../../scripts/dts.mjs",
66
+ "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
67
+ },
61
68
  "dependencies": {
62
- "@elliemae/ds-button": "3.0.0-next.9",
63
- "@elliemae/ds-classnames": "3.0.0-next.9",
64
- "@elliemae/ds-icons": "3.0.0-next.9",
65
- "@elliemae/ds-system": "3.0.0-next.9",
69
+ "@elliemae/ds-button": "workspace:*",
70
+ "@elliemae/ds-classnames": "workspace:*",
71
+ "@elliemae/ds-icons": "workspace:*",
72
+ "@elliemae/ds-system": "workspace:*",
66
73
  "prop-types": "~15.8.1",
67
74
  "react-desc": "~4.1.3",
68
75
  "react-toastify": "~6.2.0"
@@ -79,12 +86,5 @@
79
86
  "publishConfig": {
80
87
  "access": "public",
81
88
  "typeSafety": false
82
- },
83
- "scripts": {
84
- "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
85
- "test": "node ../../scripts/testing/test.mjs",
86
- "lint": "node ../../scripts/lint.mjs",
87
- "dts": "node ../../scripts/dts.mjs",
88
- "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
89
89
  }
90
- }
90
+ }