@elliemae/ds-toast 3.16.0-next.2 → 3.16.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DSToast.js +10 -10
- package/dist/cjs/DSToast.js.map +2 -2
- package/dist/cjs/ToastAction.js +7 -7
- package/dist/cjs/ToastAction.js.map +2 -2
- package/dist/esm/DSToast.js +1 -1
- package/dist/esm/DSToast.js.map +1 -1
- package/dist/esm/ToastAction.js +1 -1
- package/dist/esm/ToastAction.js.map +1 -1
- package/dist/types/DSToast.d.ts +9 -9
- package/dist/types/ToastAction.d.ts +2 -2
- package/package.json +8 -7
package/dist/cjs/DSToast.js
CHANGED
|
@@ -31,7 +31,7 @@ __export(DSToast_exports, {
|
|
|
31
31
|
module.exports = __toCommonJS(DSToast_exports);
|
|
32
32
|
var React = __toESM(require("react"));
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
var
|
|
34
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
35
35
|
var import_react_toastify = require("react-toastify");
|
|
36
36
|
var import_ds_icons = require("@elliemae/ds-icons");
|
|
37
37
|
var import_ds_button = __toESM(require("@elliemae/ds-button"));
|
|
@@ -64,20 +64,20 @@ const DSToast = ({
|
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
66
|
const props = {
|
|
67
|
-
containerProps:
|
|
68
|
-
position:
|
|
69
|
-
autoClose:
|
|
70
|
-
showProgressBar:
|
|
67
|
+
containerProps: import_ds_props_helpers.PropTypes.object.description("inject props to wrapper"),
|
|
68
|
+
position: import_ds_props_helpers.PropTypes.oneOf(import_ToastPosition.toastsPositions).description("Position on the screen to show the toast"),
|
|
69
|
+
autoClose: import_ds_props_helpers.PropTypes.number.description("ms to autoclose the toast"),
|
|
70
|
+
showProgressBar: import_ds_props_helpers.PropTypes.bool.description(
|
|
71
71
|
"Whether to show a progress bar indicating when the toast is going to be closed"
|
|
72
72
|
),
|
|
73
|
-
closeOnClick:
|
|
74
|
-
enableMultiContainer:
|
|
75
|
-
containerId:
|
|
76
|
-
toastId:
|
|
73
|
+
closeOnClick: import_ds_props_helpers.PropTypes.bool.description("Close toast handler"),
|
|
74
|
+
enableMultiContainer: import_ds_props_helpers.PropTypes.bool.description("Allows instantiating multiple Toast containers"),
|
|
75
|
+
containerId: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number]).description("unique id for multi container"),
|
|
76
|
+
toastId: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.number]).description("id for the toast")
|
|
77
77
|
};
|
|
78
78
|
DSToast.propTypes = props;
|
|
79
79
|
DSToast.displayName = "DSToast";
|
|
80
|
-
const DSToastWithSchema = (0,
|
|
80
|
+
const DSToastWithSchema = (0, import_ds_props_helpers.describe)(DSToast);
|
|
81
81
|
DSToastWithSchema.propTypes = props;
|
|
82
82
|
var DSToast_default = DSToast;
|
|
83
83
|
//# sourceMappingURL=DSToast.js.map
|
package/dist/cjs/DSToast.js.map
CHANGED
|
@@ -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 '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADQ4C;AAPnE,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\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;ADQ4C;AAPnE,8BAAoC;AACpC,4BAAsC;AACtC,sBAA2B;AAC3B,uBAAqB;AACrB,2BAAgC;AAEhC,MAAM,cAAc,CAAC,EAAE,WAAW,MAChC,4CAAC,iBAAAA,SAAA,EAAS,YAAW,QAAO,WAAU,sBAAqB,MAAM,4CAAC,8BAAW,GAAI,SAAS,YAAY,MAAK,KAAI;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;AACZ,MACE;AAAA,EAAC;AAAA;AAAA,IACE,GAAG;AAAA,IACJ;AAAA,IACA,WAAY,mBAAmB,sBAAuB;AAAA,IACtD,aAAa,4CAAC,eAAY;AAAA,IAC1B;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB,CAAC;AAAA,IAClB,aAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA,YAAY;AAAA;AACd;AAGF,MAAM,QAAQ;AAAA,EAEZ,gBAAgB,kCAAU,OAAO,YAAY,yBAAyB;AAAA,EAEtE,UAAU,kCAAU,MAAM,oCAAe,EAAE,YAAY,0CAA0C;AAAA,EAEjG,WAAW,kCAAU,OAAO,YAAY,2BAA2B;AAAA,EAEnE,iBAAiB,kCAAU,KAAK;AAAA,IAC9B;AAAA,EACF;AAAA,EAEA,cAAc,kCAAU,KAAK,YAAY,qBAAqB;AAAA,EAE9D,sBAAsB,kCAAU,KAAK,YAAY,gDAAgD;AAAA,EAEjG,aAAa,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE,YAAY,+BAA+B;AAAA,EAElH,SAAS,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,MAAM,CAAC,EAAE,YAAY,kBAAkB;AACnG;AAEA,QAAQ,YAAY;AACpB,QAAQ,cAAc;AACtB,MAAM,wBAAoB,kCAAS,OAAO;AAC1C,kBAAkB,YAAY;AAG9B,IAAO,kBAAQ;",
|
|
6
6
|
"names": ["DSButton"]
|
|
7
7
|
}
|
package/dist/cjs/ToastAction.js
CHANGED
|
@@ -32,7 +32,7 @@ __export(ToastAction_exports, {
|
|
|
32
32
|
module.exports = __toCommonJS(ToastAction_exports);
|
|
33
33
|
var React = __toESM(require("react"));
|
|
34
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
-
var
|
|
35
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
36
36
|
var import_ds_system = require("@elliemae/ds-system");
|
|
37
37
|
const Link = import_ds_system.styled.span`
|
|
38
38
|
color: brand-600;
|
|
@@ -40,21 +40,21 @@ const Link = import_ds_system.styled.span`
|
|
|
40
40
|
const DSToastAction = ({ children, onClick, onKeyDown }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { onKeyDown, onClick, role: onClick ? "button" : "textbox", children });
|
|
41
41
|
const DSToastActionLink = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, { children });
|
|
42
42
|
const actionprops = {
|
|
43
|
-
children:
|
|
43
|
+
children: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.element]).description(
|
|
44
44
|
"DSToastActionLink component or text string"
|
|
45
45
|
),
|
|
46
|
-
onClick:
|
|
47
|
-
onKeyDown:
|
|
46
|
+
onClick: import_ds_props_helpers.PropTypes.func.description("click handler"),
|
|
47
|
+
onKeyDown: import_ds_props_helpers.PropTypes.func.description("key down handler")
|
|
48
48
|
};
|
|
49
49
|
const linkprops = {
|
|
50
|
-
children:
|
|
50
|
+
children: import_ds_props_helpers.PropTypes.string.isRequired.description("link text")
|
|
51
51
|
};
|
|
52
52
|
DSToastAction.propTypes = actionprops;
|
|
53
53
|
DSToastActionLink.propTypes = linkprops;
|
|
54
54
|
DSToastAction.displayName = "DSToastAction";
|
|
55
55
|
DSToastActionLink.displayName = "DSToastActionLink";
|
|
56
|
-
const DSToastActionWithSchema = (0,
|
|
57
|
-
const DSToastActionLinkWithSchema = (0,
|
|
56
|
+
const DSToastActionWithSchema = (0, import_ds_props_helpers.describe)(DSToastAction);
|
|
57
|
+
const DSToastActionLinkWithSchema = (0, import_ds_props_helpers.describe)(DSToastActionLink);
|
|
58
58
|
DSToastActionLinkWithSchema.propTypes = linkprops;
|
|
59
59
|
DSToastActionWithSchema.propTypes = actionprops;
|
|
60
60
|
//# 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 '@elliemae/ds-
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBrB;AAfF,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\n\nconst Link = styled.span`\n color: brand-600;\n`;\n\ninterface DSToastActionProps {\n children: React.ReactNode;\n onClick?: React.MouseEventHandler;\n onKeyDown?: React.KeyboardEventHandler;\n}\n\nconst DSToastAction: React.ComponentType<DSToastActionProps> = ({ children, onClick, onKeyDown }) => (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div onKeyDown={onKeyDown} onClick={onClick} role={onClick ? 'button' : 'textbox'}>\n {children}\n </div>\n);\n\nconst DSToastActionLink: React.ComponentType<React.PropsWithChildren<Record<string, unknown>>> = ({ children }) => (\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\n <Link>{children}</Link>\n);\n\nconst actionprops = {\n /** DSToastActionLink component or text string */\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'DSToastActionLink component or text string',\n ),\n /** click handler */\n onClick: PropTypes.func.description('click handler'),\n /** key down handler */\n onKeyDown: PropTypes.func.description('key down handler'),\n} as React.WeakValidationMap<unknown>;\n\nconst linkprops = {\n /** link text */\n children: PropTypes.string.isRequired.description('link text'),\n} as React.WeakValidationMap<unknown>;\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 { DSToastAction, DSToastActionLink, DSToastActionWithSchema, DSToastActionLinkWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgBrB;AAfF,8BAAoC;AACpC,uBAAuB;AAEvB,MAAM,OAAO,wBAAO;AAAA;AAAA;AAUpB,MAAM,gBAAyD,CAAC,EAAE,UAAU,SAAS,UAAU,MAE7F,4CAAC,SAAI,WAAsB,SAAkB,MAAM,UAAU,WAAW,WACrE,UACH;AAGF,MAAM,oBAA2F,CAAC,EAAE,SAAS,MAE3G,4CAAC,QAAM,UAAS;AAGlB,MAAM,cAAc;AAAA,EAElB,UAAU,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,OAAO,CAAC,EAAE;AAAA,IACnE;AAAA,EACF;AAAA,EAEA,SAAS,kCAAU,KAAK,YAAY,eAAe;AAAA,EAEnD,WAAW,kCAAU,KAAK,YAAY,kBAAkB;AAC1D;AAEA,MAAM,YAAY;AAAA,EAEhB,UAAU,kCAAU,OAAO,WAAW,YAAY,WAAW;AAC/D;AAEA,cAAc,YAAY;AAC1B,kBAAkB,YAAY;AAC9B,cAAc,cAAc;AAC5B,kBAAkB,cAAc;AAChC,MAAM,8BAA0B,kCAAS,aAAa;AACtD,MAAM,kCAA8B,kCAAS,iBAAiB;AAC9D,4BAA4B,YAAY;AACxC,wBAAwB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/DSToast.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { PropTypes, describe } from "@elliemae/ds-
|
|
3
|
+
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
4
4
|
import { ToastContainer, Slide } from "react-toastify";
|
|
5
5
|
import { CloseSmall } from "@elliemae/ds-icons";
|
|
6
6
|
import DSButton from "@elliemae/ds-button";
|
package/dist/esm/DSToast.js.map
CHANGED
|
@@ -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 '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\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
5
|
"mappings": "AAAA,YAAY,WAAW;ACQ4C;AAPnE,SAAS,WAAW,gBAAgB;AACpC,SAAS,gBAAgB,aAAa;AACtC,SAAS,kBAAkB;AAC3B,OAAO,cAAc;AACrB,SAAS,uBAAuB;AAEhC,MAAM,cAAc,CAAC,EAAE,WAAW,MAChC,oBAAC,YAAS,YAAW,QAAO,WAAU,sBAAqB,MAAM,oBAAC,cAAW,GAAI,SAAS,YAAY,MAAK,KAAI;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;AACZ,MACE;AAAA,EAAC;AAAA;AAAA,IACE,GAAG;AAAA,IACJ;AAAA,IACA,WAAY,mBAAmB,sBAAuB;AAAA,IACtD,aAAa,oBAAC,eAAY;AAAA,IAC1B;AAAA,IACA;AAAA,IACA;AAAA,IACA,iBAAiB,CAAC;AAAA,IAClB,aAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA,YAAY;AAAA;AACd;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;AAAA,IAC9B;AAAA,EACF;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
|
}
|
package/dist/esm/ToastAction.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { PropTypes, describe } from "@elliemae/ds-
|
|
3
|
+
import { PropTypes, describe } from "@elliemae/ds-props-helpers";
|
|
4
4
|
import { styled } from "@elliemae/ds-system";
|
|
5
5
|
const Link = styled.span`
|
|
6
6
|
color: brand-600;
|
|
@@ -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 '@elliemae/ds-
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes, describe } from '@elliemae/ds-props-helpers';\nimport { styled } from '@elliemae/ds-system';\n\nconst Link = styled.span`\n color: brand-600;\n`;\n\ninterface DSToastActionProps {\n children: React.ReactNode;\n onClick?: React.MouseEventHandler;\n onKeyDown?: React.KeyboardEventHandler;\n}\n\nconst DSToastAction: React.ComponentType<DSToastActionProps> = ({ children, onClick, onKeyDown }) => (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <div onKeyDown={onKeyDown} onClick={onClick} role={onClick ? 'button' : 'textbox'}>\n {children}\n </div>\n);\n\nconst DSToastActionLink: React.ComponentType<React.PropsWithChildren<Record<string, unknown>>> = ({ children }) => (\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\n <Link>{children}</Link>\n);\n\nconst actionprops = {\n /** DSToastActionLink component or text string */\n children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description(\n 'DSToastActionLink component or text string',\n ),\n /** click handler */\n onClick: PropTypes.func.description('click handler'),\n /** key down handler */\n onKeyDown: PropTypes.func.description('key down handler'),\n} as React.WeakValidationMap<unknown>;\n\nconst linkprops = {\n /** link text */\n children: PropTypes.string.isRequired.description('link text'),\n} as React.WeakValidationMap<unknown>;\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 { DSToastAction, DSToastActionLink, DSToastActionWithSchema, DSToastActionLinkWithSchema };\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACgBrB;AAfF,SAAS,WAAW,gBAAgB;AACpC,SAAS,cAAc;AAEvB,MAAM,OAAO,OAAO;AAAA;AAAA;AAUpB,MAAM,gBAAyD,CAAC,EAAE,UAAU,SAAS,UAAU,MAE7F,oBAAC,SAAI,WAAsB,SAAkB,MAAM,UAAU,WAAW,WACrE,UACH;AAGF,MAAM,oBAA2F,CAAC,EAAE,SAAS,MAE3G,oBAAC,QAAM,UAAS;AAGlB,MAAM,cAAc;AAAA,EAElB,UAAU,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,OAAO,CAAC,EAAE;AAAA,IACnE;AAAA,EACF;AAAA,EAEA,SAAS,UAAU,KAAK,YAAY,eAAe;AAAA,EAEnD,WAAW,UAAU,KAAK,YAAY,kBAAkB;AAC1D;AAEA,MAAM,YAAY;AAAA,EAEhB,UAAU,UAAU,OAAO,WAAW,YAAY,WAAW;AAC/D;AAEA,cAAc,YAAY;AAC1B,kBAAkB,YAAY;AAC9B,cAAc,cAAc;AAC5B,kBAAkB,cAAc;AAChC,MAAM,0BAA0B,SAAS,aAAa;AACtD,MAAM,8BAA8B,SAAS,iBAAiB;AAC9D,4BAA4B,YAAY;AACxC,wBAAwB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/types/DSToast.d.ts
CHANGED
|
@@ -11,25 +11,25 @@ declare const DSToast: {
|
|
|
11
11
|
}): JSX.Element;
|
|
12
12
|
propTypes: {
|
|
13
13
|
/** inject props to wrapper */
|
|
14
|
-
containerProps: import("@elliemae/ds-
|
|
14
|
+
containerProps: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
15
15
|
/** Position on the screen to show the toast */
|
|
16
|
-
position: import("@elliemae/ds-
|
|
16
|
+
position: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
17
17
|
/** ms to autoclose the toast */
|
|
18
|
-
autoClose: import("@elliemae/ds-
|
|
18
|
+
autoClose: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
19
19
|
/** Whether to show a progress bar indicating when the toast is going to be closed */
|
|
20
|
-
showProgressBar: import("@elliemae/ds-
|
|
20
|
+
showProgressBar: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
21
21
|
/** Close toast handler */
|
|
22
|
-
closeOnClick: import("@elliemae/ds-
|
|
22
|
+
closeOnClick: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
23
23
|
/** Allows instantiating multiple Toast containers */
|
|
24
|
-
enableMultiContainer: import("@elliemae/ds-
|
|
24
|
+
enableMultiContainer: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
25
25
|
/** unique id for multi container */
|
|
26
|
-
containerId: import("@elliemae/ds-
|
|
26
|
+
containerId: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
27
27
|
/** id for the toast */
|
|
28
|
-
toastId: import("@elliemae/ds-
|
|
28
|
+
toastId: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").ReactDescT;
|
|
29
29
|
};
|
|
30
30
|
displayName: string;
|
|
31
31
|
};
|
|
32
|
-
declare const DSToastWithSchema: import("@elliemae/ds-
|
|
32
|
+
declare const DSToastWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<{
|
|
33
33
|
containerProps?: {} | undefined;
|
|
34
34
|
position?: string | undefined;
|
|
35
35
|
autoClose?: number | undefined;
|
|
@@ -6,6 +6,6 @@ interface DSToastActionProps {
|
|
|
6
6
|
}
|
|
7
7
|
declare const DSToastAction: React.ComponentType<DSToastActionProps>;
|
|
8
8
|
declare const DSToastActionLink: React.ComponentType<React.PropsWithChildren<Record<string, unknown>>>;
|
|
9
|
-
declare const DSToastActionWithSchema: import("@elliemae/ds-
|
|
10
|
-
declare const DSToastActionLinkWithSchema: import("@elliemae/ds-
|
|
9
|
+
declare const DSToastActionWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<DSToastActionProps>;
|
|
10
|
+
declare const DSToastActionLinkWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<React.PropsWithChildren<Record<string, unknown>>>;
|
|
11
11
|
export { DSToastAction, DSToastActionLink, DSToastActionWithSchema, DSToastActionLinkWithSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-toast",
|
|
3
|
-
"version": "3.16.0-next.
|
|
3
|
+
"version": "3.16.0-next.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Toast",
|
|
6
6
|
"files": [
|
|
@@ -61,11 +61,12 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"prop-types": "~15.8.1",
|
|
63
63
|
"react-toastify": "~6.2.0",
|
|
64
|
-
"@elliemae/ds-button": "3.16.0-next.
|
|
65
|
-
"@elliemae/ds-classnames": "3.16.0-next.
|
|
66
|
-
"@elliemae/ds-icons": "3.16.0-next.
|
|
67
|
-
"@elliemae/ds-
|
|
68
|
-
"@elliemae/ds-
|
|
64
|
+
"@elliemae/ds-button": "3.16.0-next.3",
|
|
65
|
+
"@elliemae/ds-classnames": "3.16.0-next.3",
|
|
66
|
+
"@elliemae/ds-icons": "3.16.0-next.3",
|
|
67
|
+
"@elliemae/ds-props-helpers": "3.16.0-next.3",
|
|
68
|
+
"@elliemae/ds-system": "3.16.0-next.3",
|
|
69
|
+
"@elliemae/ds-utilities": "3.16.0-next.3"
|
|
69
70
|
},
|
|
70
71
|
"devDependencies": {
|
|
71
72
|
"styled-components": "~5.3.6"
|
|
@@ -87,7 +88,7 @@
|
|
|
87
88
|
"eslint:fix": "eslint --ext='.js,.jsx,.test.js,.ts,.tsx' --fix --config='../../.eslintrc.js' src/",
|
|
88
89
|
"dts": "node ../../scripts/dts.mjs",
|
|
89
90
|
"build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs",
|
|
90
|
-
"dev:build": "pnpm --filter {.}... build
|
|
91
|
+
"dev:build": "pnpm --filter {.}... build",
|
|
91
92
|
"dev:install": "pnpm --filter {.}... i --no-lockfile && pnpm run dev:build",
|
|
92
93
|
"checkDeps": "npx -yes ../ds-codemods check-missing-packages --projectFolderPath=\"./\" --ignorePackagesGlobPattern=\"\" --ignoreFilesGlobPattern=\"**/test-ables/*,**/tests/*\""
|
|
93
94
|
}
|