@elliemae/ds-toast 2.3.1 → 3.0.0-alpha.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.
Files changed (50) hide show
  1. package/dist/cjs/DSToast.js +102 -0
  2. package/dist/cjs/DSToast.js.map +7 -0
  3. package/dist/cjs/ToastAction.js +67 -0
  4. package/dist/cjs/ToastAction.js.map +7 -0
  5. package/dist/cjs/ToastPosition.js +44 -0
  6. package/dist/cjs/ToastPosition.js.map +7 -0
  7. package/dist/cjs/ToastRender.js +66 -0
  8. package/dist/cjs/ToastRender.js.map +7 -0
  9. package/dist/cjs/ToastType.js +43 -0
  10. package/dist/cjs/ToastType.js.map +7 -0
  11. package/dist/cjs/index.js +40 -0
  12. package/dist/cjs/index.js.map +7 -0
  13. package/dist/cjs/toast.js +76 -0
  14. package/dist/cjs/toast.js.map +7 -0
  15. package/dist/esm/DSToast.js +75 -0
  16. package/dist/esm/DSToast.js.map +7 -0
  17. package/dist/esm/ToastAction.js +38 -0
  18. package/dist/esm/ToastAction.js.map +7 -0
  19. package/dist/esm/ToastPosition.js +15 -0
  20. package/dist/esm/ToastPosition.js.map +7 -0
  21. package/dist/esm/ToastRender.js +37 -0
  22. package/dist/esm/ToastRender.js.map +7 -0
  23. package/dist/esm/ToastType.js +14 -0
  24. package/dist/esm/ToastType.js.map +7 -0
  25. package/dist/esm/index.js +11 -0
  26. package/dist/esm/index.js.map +7 -0
  27. package/dist/esm/toast.js +49 -0
  28. package/dist/esm/toast.js.map +7 -0
  29. package/package.json +40 -31
  30. package/cjs/DSToast.js +0 -102
  31. package/cjs/ToastAction.js +0 -67
  32. package/cjs/ToastPosition.js +0 -16
  33. package/cjs/ToastRender.js +0 -42
  34. package/cjs/ToastType.js +0 -16
  35. package/cjs/index.js +0 -24
  36. package/cjs/toast.js +0 -47
  37. package/esm/DSToast.js +0 -90
  38. package/esm/ToastAction.js +0 -55
  39. package/esm/ToastPosition.js +0 -11
  40. package/esm/ToastRender.js +0 -36
  41. package/esm/ToastType.js +0 -11
  42. package/esm/index.js +0 -5
  43. package/esm/toast.js +0 -37
  44. package/types/DSToast.d.ts +0 -79
  45. package/types/ToastAction.d.ts +0 -52
  46. package/types/ToastPosition.d.ts +0 -9
  47. package/types/ToastRender.d.ts +0 -24
  48. package/types/ToastType.d.ts +0 -8
  49. package/types/index.d.ts +0 -6
  50. package/types/toast.d.ts +0 -38
package/cjs/toast.js DELETED
@@ -1,47 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('core-js/modules/esnext.async-iterator.filter.js');
6
- require('core-js/modules/esnext.iterator.constructor.js');
7
- require('core-js/modules/esnext.iterator.filter.js');
8
- require('core-js/modules/esnext.async-iterator.for-each.js');
9
- require('core-js/modules/esnext.iterator.for-each.js');
10
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
11
- var _jsx = require('@babel/runtime/helpers/jsx');
12
- var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
13
- require('react');
14
- var reactToastify = require('react-toastify');
15
- var ToastRender = require('./ToastRender.js');
16
-
17
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
-
19
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
20
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
21
- var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
22
-
23
- const _excluded = ["type", "messageTitle", "messageText"];
24
-
25
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
26
-
27
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
28
- const toast = Object.assign((_ref, options) => {
29
- let {
30
- type,
31
- messageTitle,
32
- messageText
33
- } = _ref,
34
- rest = _objectWithoutProperties__default["default"](_ref, _excluded);
35
-
36
- return reactToastify.toast( /*#__PURE__*/_jsx__default["default"](ToastRender, {
37
- messageText: messageText,
38
- messageTitle: messageTitle,
39
- type: type
40
- }), _objectSpread(_objectSpread(_objectSpread({}, rest), options), {}, {
41
- type
42
- }));
43
- }, _objectSpread(_objectSpread({}, reactToastify.toast), {}, {
44
- isActive: id => reactToastify.toast.isActive(id)
45
- }));
46
-
47
- exports.toast = toast;
package/esm/DSToast.js DELETED
@@ -1,90 +0,0 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/esnext.async-iterator.for-each.js';
5
- import 'core-js/modules/esnext.iterator.for-each.js';
6
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
- import _jsx from '@babel/runtime/helpers/esm/jsx';
8
- import 'react';
9
- import { PropTypes, describe } from 'react-desc';
10
- import { ToastContainer, Slide } from 'react-toastify';
11
- import { CloseSmall } from '@elliemae/ds-icons';
12
- import DSButton from '@elliemae/ds-button';
13
- import { toastsPositions } from './ToastPosition.js';
14
- import { jsx } from 'react/jsx-runtime';
15
-
16
- var _CloseSmall, _CloseButton;
17
-
18
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
-
20
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
21
-
22
- const CloseButton = _ref => {
23
- let {
24
- closeToast
25
- } = _ref;
26
- return /*#__PURE__*/_jsx(DSButton, {
27
- buttonType: "text",
28
- className: "toast-close-button",
29
- icon: _CloseSmall || (_CloseSmall = /*#__PURE__*/_jsx(CloseSmall, {})),
30
- onClick: closeToast,
31
- size: "m"
32
- });
33
- };
34
-
35
- const DSToast = _ref2 => {
36
- let {
37
- containerProps = {},
38
- position = 'bottom-left',
39
- autoClose = 5000,
40
- // can be false or a number in milliseconds
41
- showProgressBar = false,
42
- closeOnClick = false,
43
- enableMultiContainer = false,
44
- containerId = undefined,
45
- toastId = undefined
46
- } = _ref2;
47
- return /*#__PURE__*/jsx(ToastContainer, _objectSpread(_objectSpread({}, containerProps), {}, {
48
- autoClose: autoClose,
49
- className: showProgressBar && 'with-progressbar' || '',
50
- closeButton: _CloseButton || (_CloseButton = /*#__PURE__*/_jsx(CloseButton, {})),
51
- closeOnClick: closeOnClick,
52
- containerId: containerId,
53
- enableMultiContainer: enableMultiContainer,
54
- hideProgressBar: !showProgressBar,
55
- newestOnTop: true,
56
- position: position,
57
- toastId: toastId,
58
- transition: Slide
59
- }));
60
- };
61
-
62
- const props = {
63
- /** inject props to wrapper */
64
- containerProps: PropTypes.object.description('inject props to wrapper'),
65
-
66
- /** Position on the screen to show the toast */
67
- position: PropTypes.oneOf(toastsPositions).description('Position on the screen to show the toast'),
68
-
69
- /** ms to autoclose the toast */
70
- autoClose: PropTypes.number.description('ms to autoclose the toast'),
71
-
72
- /** Whether to show a progress bar indicating when the toast is going to be closed */
73
- showProgressBar: PropTypes.bool.description('Whether to show a progress bar indicating when the toast is going to be closed'),
74
-
75
- /** Close toast handler */
76
- closeOnClick: PropTypes.bool.description('Close toast handler'),
77
-
78
- /** Allows instantiating multiple Toast containers */
79
- enableMultiContainer: PropTypes.bool.description('Allows instantiating multiple Toast containers'),
80
-
81
- /** unique id for multi container */
82
- containerId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('unique id for multi container'),
83
-
84
- /** id for the toast */
85
- toastId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description('id for the toast')
86
- };
87
- const DSToastWithSchema = describe(DSToast);
88
- DSToastWithSchema.propTypes = props;
89
-
90
- export { DSToast, DSToastWithSchema, DSToast as default };
@@ -1,55 +0,0 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import 'react';
3
- import { PropTypes, describe } from 'react-desc';
4
- import styled from 'styled-components';
5
- import { color } from '@elliemae/ds-system';
6
-
7
- const Link = /*#__PURE__*/styled.span.withConfig({
8
- componentId: "sc-1bs5g4c-0"
9
- })(["", ""], color('brand', '600'));
10
-
11
- const DSToastAction = _ref => {
12
- let {
13
- children,
14
- onClick,
15
- onKeyDown
16
- } = _ref;
17
- return (
18
- /*#__PURE__*/
19
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
20
- _jsx("div", {
21
- onKeyDown: onKeyDown,
22
- onClick: onClick,
23
- role: onClick ? 'button' : 'textbox'
24
- }, void 0, children)
25
- );
26
- }; // eslint-disable-next-line jsx-a11y/anchor-is-valid
27
-
28
-
29
- const DSToastActionLink = _ref2 => {
30
- let {
31
- children
32
- } = _ref2;
33
- return /*#__PURE__*/_jsx(Link, {}, void 0, children);
34
- };
35
-
36
- const actionprops = {
37
- /** DSToastActionLink component or text string */
38
- children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).description('DSToastActionLink component or text string'),
39
-
40
- /** click handler */
41
- onClick: PropTypes.func.description('click handler'),
42
-
43
- /** key down handler */
44
- onKeyDown: PropTypes.func.description('key down handler')
45
- };
46
- const linkprops = {
47
- /** link text */
48
- children: PropTypes.string.isRequired.description('link text')
49
- };
50
- const DSToastActionWithSchema = describe(DSToastAction);
51
- const DSToastActionLinkWithSchema = describe(DSToastActionLink);
52
- DSToastActionLinkWithSchema.propTypes = linkprops;
53
- DSToastActionWithSchema.propTypes = actionprops;
54
-
55
- export { DSToastAction, DSToastActionLink, DSToastActionLinkWithSchema, DSToastActionWithSchema };
@@ -1,11 +0,0 @@
1
- const ToastPosition = {
2
- TOP_RIGHT: 'top-right',
3
- TOP_CENTER: 'top-center',
4
- TOP_LEFT: 'top-left',
5
- BOTTOM_RIGHT: 'bottom-right',
6
- BOTTOM_CENTER: 'bottom-center',
7
- BOTTOM_LEFT: 'bottom-left'
8
- };
9
- const toastsPositions = Object.values(ToastPosition);
10
-
11
- export { ToastPosition, toastsPositions };
@@ -1,36 +0,0 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import 'react';
3
- import { aggregatedClasses } from '@elliemae/ds-classnames';
4
- import { CheckmarkCircleFill, WarningCircleFill, InfoCircleFill } from '@elliemae/ds-icons';
5
- import { ToastType } from './ToastType.js';
6
-
7
- const blockName = 'toast-content';
8
- const Container = aggregatedClasses('div')(blockName);
9
- const IconContainer = aggregatedClasses('div')(blockName, 'icon-container');
10
- const MessageContent = aggregatedClasses('div')(blockName, 'message-content');
11
- const MessageHeader = aggregatedClasses('div')(blockName, 'message-header');
12
- const MessageText = aggregatedClasses('span')(blockName, 'message-text');
13
-
14
- const getIconByToastType = type => ({
15
- [ToastType.SUCCESS]: CheckmarkCircleFill,
16
- [ToastType.WARNING]: WarningCircleFill,
17
- [ToastType.INFO]: InfoCircleFill,
18
- [ToastType.ERROR]: WarningCircleFill,
19
- [ToastType.DEFAULT]: 'div'
20
- })[type];
21
-
22
- const ToastRender = _ref => {
23
- let {
24
- type = ToastType.DEFAULT,
25
- messageTitle = '',
26
- messageText = ''
27
- } = _ref;
28
- const IconMessage = aggregatedClasses(getIconByToastType(type))(blockName, 'icon-message');
29
- return /*#__PURE__*/_jsx(Container, {
30
- "data-testid": "ds-toast-render"
31
- }, void 0, /*#__PURE__*/_jsx(IconContainer, {}, void 0, /*#__PURE__*/_jsx(IconMessage, {
32
- size: "m"
33
- })), /*#__PURE__*/_jsx(MessageContent, {}, void 0, /*#__PURE__*/_jsx(MessageHeader, {}, void 0, messageTitle), /*#__PURE__*/_jsx(MessageText, {}, void 0, messageText)));
34
- };
35
-
36
- export { ToastRender as default };
package/esm/ToastType.js DELETED
@@ -1,11 +0,0 @@
1
- const ToastType = {
2
- INFO: 'info',
3
- SUCCESS: 'success',
4
- WARNING: 'warning',
5
- ERROR: 'error',
6
- // TODO remove from types, it's not in spec
7
- DEFAULT: 'default'
8
- };
9
- const toastTypes = Object.values(ToastType);
10
-
11
- export { ToastType, toastTypes };
package/esm/index.js DELETED
@@ -1,5 +0,0 @@
1
- export { DSToast, DSToastWithSchema, DSToast as default } from './DSToast.js';
2
- export { toast } from './toast.js';
3
- export { ToastType, toastTypes } from './ToastType.js';
4
- export { ToastPosition, toastsPositions } from './ToastPosition.js';
5
- export { DSToastAction, DSToastActionLink, DSToastActionLinkWithSchema, DSToastActionWithSchema } from './ToastAction.js';
package/esm/toast.js DELETED
@@ -1,37 +0,0 @@
1
- import 'core-js/modules/esnext.async-iterator.filter.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.filter.js';
4
- import 'core-js/modules/esnext.async-iterator.for-each.js';
5
- import 'core-js/modules/esnext.iterator.for-each.js';
6
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
- import _jsx from '@babel/runtime/helpers/esm/jsx';
8
- import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
9
- import 'react';
10
- import { toast as toast$1 } from 'react-toastify';
11
- import ToastRender from './ToastRender.js';
12
-
13
- const _excluded = ["type", "messageTitle", "messageText"];
14
-
15
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
16
-
17
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
18
- const toast = Object.assign((_ref, options) => {
19
- let {
20
- type,
21
- messageTitle,
22
- messageText
23
- } = _ref,
24
- rest = _objectWithoutProperties(_ref, _excluded);
25
-
26
- return toast$1( /*#__PURE__*/_jsx(ToastRender, {
27
- messageText: messageText,
28
- messageTitle: messageTitle,
29
- type: type
30
- }), _objectSpread(_objectSpread(_objectSpread({}, rest), options), {}, {
31
- type
32
- }));
33
- }, _objectSpread(_objectSpread({}, toast$1), {}, {
34
- isActive: id => toast$1.isActive(id)
35
- }));
36
-
37
- export { toast };
@@ -1,79 +0,0 @@
1
- /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- declare const DSToast: {
4
- ({ containerProps, position, autoClose, showProgressBar, closeOnClick, enableMultiContainer, containerId, toastId, }: {
5
- containerProps?: {} | undefined;
6
- position?: string | undefined;
7
- autoClose?: number | undefined;
8
- showProgressBar?: boolean | undefined;
9
- closeOnClick?: boolean | undefined;
10
- enableMultiContainer?: boolean | undefined;
11
- containerId?: undefined;
12
- toastId?: undefined;
13
- }): JSX.Element;
14
- propTypes: {
15
- /** inject props to wrapper */
16
- containerProps: {
17
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
18
- deprecated: import("react-desc").PropTypesDescValidator;
19
- };
20
- isRequired: import("react-desc").PropTypesDescValue;
21
- };
22
- /** Position on the screen to show the toast */
23
- position: {
24
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
25
- deprecated: import("react-desc").PropTypesDescValidator;
26
- };
27
- isRequired: import("react-desc").PropTypesDescValue;
28
- };
29
- /** ms to autoclose the toast */
30
- autoClose: {
31
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
32
- deprecated: import("react-desc").PropTypesDescValidator;
33
- };
34
- isRequired: import("react-desc").PropTypesDescValue;
35
- };
36
- /** Whether to show a progress bar indicating when the toast is going to be closed */
37
- showProgressBar: {
38
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
39
- deprecated: import("react-desc").PropTypesDescValidator;
40
- };
41
- isRequired: import("react-desc").PropTypesDescValue;
42
- };
43
- /** Close toast handler */
44
- closeOnClick: {
45
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
46
- deprecated: import("react-desc").PropTypesDescValidator;
47
- };
48
- isRequired: import("react-desc").PropTypesDescValue;
49
- };
50
- /** Allows instantiating multiple Toast containers */
51
- enableMultiContainer: {
52
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
53
- deprecated: import("react-desc").PropTypesDescValidator;
54
- };
55
- isRequired: import("react-desc").PropTypesDescValue;
56
- };
57
- /** unique id for multi container */
58
- containerId: {
59
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
60
- deprecated: import("react-desc").PropTypesDescValidator;
61
- };
62
- isRequired: import("react-desc").PropTypesDescValue;
63
- };
64
- /** id for the toast */
65
- toastId: {
66
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
67
- deprecated: import("react-desc").PropTypesDescValidator;
68
- };
69
- isRequired: import("react-desc").PropTypesDescValue;
70
- };
71
- };
72
- };
73
- declare const DSToastWithSchema: {
74
- (props?: unknown): JSX.Element;
75
- propTypes: unknown;
76
- toTypescript: () => import("react-desc").TypescriptSchema;
77
- };
78
- export { DSToast, DSToastWithSchema };
79
- export default DSToast;
@@ -1,52 +0,0 @@
1
- /// <reference path="../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- declare const DSToastAction: {
4
- ({ children, onClick, onKeyDown }: {
5
- children: any;
6
- onClick: any;
7
- onKeyDown: any;
8
- }): JSX.Element;
9
- propTypes: {
10
- /** DSToastActionLink component or text string */
11
- children: {
12
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
13
- deprecated: import("react-desc").PropTypesDescValidator;
14
- };
15
- isRequired: import("react-desc").PropTypesDescValue;
16
- };
17
- /** click handler */
18
- onClick: {
19
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
20
- deprecated: import("react-desc").PropTypesDescValidator;
21
- };
22
- isRequired: import("react-desc").PropTypesDescValue;
23
- };
24
- /** key down handler */
25
- onKeyDown: {
26
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
27
- deprecated: import("react-desc").PropTypesDescValidator;
28
- };
29
- isRequired: import("react-desc").PropTypesDescValue;
30
- };
31
- };
32
- };
33
- declare const DSToastActionLink: {
34
- ({ children }: {
35
- children: any;
36
- }): JSX.Element;
37
- propTypes: {
38
- /** link text */
39
- children: any;
40
- };
41
- };
42
- declare const DSToastActionWithSchema: {
43
- (props?: unknown): JSX.Element;
44
- propTypes: unknown;
45
- toTypescript: () => import("react-desc").TypescriptSchema;
46
- };
47
- declare const DSToastActionLinkWithSchema: {
48
- (props?: unknown): JSX.Element;
49
- propTypes: unknown;
50
- toTypescript: () => import("react-desc").TypescriptSchema;
51
- };
52
- export { DSToastAction, DSToastActionLink, DSToastActionWithSchema, DSToastActionLinkWithSchema, };
@@ -1,9 +0,0 @@
1
- export declare const ToastPosition: {
2
- TOP_RIGHT: string;
3
- TOP_CENTER: string;
4
- TOP_LEFT: string;
5
- BOTTOM_RIGHT: string;
6
- BOTTOM_CENTER: string;
7
- BOTTOM_LEFT: string;
8
- };
9
- export declare const toastsPositions: string[];
@@ -1,24 +0,0 @@
1
- /// <reference types="react" />
2
- import PropTypes from 'prop-types';
3
- declare const ToastRender: {
4
- ({ type, messageTitle, messageText }: {
5
- type?: string | undefined;
6
- messageTitle?: string | undefined;
7
- messageText?: string | undefined;
8
- }): JSX.Element;
9
- propTypes: {
10
- /**
11
- * Toast title
12
- */
13
- messageTitle: PropTypes.Validator<string>;
14
- /**
15
- * Toast body, either a string or Action with ActionLink component
16
- */
17
- messageText: PropTypes.Requireable<string | PropTypes.ReactElementLike>;
18
- /**
19
- * Toast type
20
- */
21
- type: PropTypes.Validator<string>;
22
- };
23
- };
24
- export default ToastRender;
@@ -1,8 +0,0 @@
1
- export declare const ToastType: {
2
- INFO: string;
3
- SUCCESS: string;
4
- WARNING: string;
5
- ERROR: string;
6
- DEFAULT: string;
7
- };
8
- export declare const toastTypes: string[];
package/types/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export * from './DSToast';
2
- export * from './toast';
3
- export * from './ToastType';
4
- export * from './ToastPosition';
5
- export * from './ToastAction';
6
- export { default } from './DSToast';
package/types/toast.d.ts DELETED
@@ -1,38 +0,0 @@
1
- import React from 'react';
2
- declare const toast: (({ type, messageTitle, messageText, ...rest }: {
3
- [x: string]: any;
4
- type: any;
5
- messageTitle: any;
6
- messageText: any;
7
- }, options: any) => React.ReactText) & {
8
- isActive: (id: any) => boolean;
9
- success(content: import("react-toastify").ToastContent, options?: import("react-toastify").ToastOptions | undefined): React.ReactText;
10
- info(content: import("react-toastify").ToastContent, options?: import("react-toastify").ToastOptions | undefined): React.ReactText;
11
- error(content: import("react-toastify").ToastContent, options?: import("react-toastify").ToastOptions | undefined): React.ReactText;
12
- warning(content: import("react-toastify").ToastContent, options?: import("react-toastify").ToastOptions | undefined): React.ReactText;
13
- dark(content: import("react-toastify").ToastContent, options?: import("react-toastify").ToastOptions | undefined): React.ReactText;
14
- warn: (content: import("react-toastify").ToastContent, options?: import("react-toastify").ToastOptions | undefined) => React.ReactText;
15
- dismiss(id?: string | number | undefined): false | void;
16
- clearWaitingQueue(params?: import("react-toastify").ClearWaitingQueueParams | undefined): false | void;
17
- update(toastId: import("react-toastify").Id, options?: import("react-toastify").UpdateOptions | undefined): void;
18
- done(id: import("react-toastify").Id): void;
19
- onChange(callback: import("react-toastify/dist/core").OnChangeCallback): () => void;
20
- configure(config?: import("react-toastify").ToastContainerProps | undefined): void;
21
- POSITION: {
22
- TOP_LEFT: import("react-toastify").ToastPosition;
23
- TOP_RIGHT: import("react-toastify").ToastPosition;
24
- TOP_CENTER: import("react-toastify").ToastPosition;
25
- BOTTOM_LEFT: import("react-toastify").ToastPosition;
26
- BOTTOM_RIGHT: import("react-toastify").ToastPosition;
27
- BOTTOM_CENTER: import("react-toastify").ToastPosition;
28
- };
29
- TYPE: {
30
- INFO: import("react-toastify").TypeOptions;
31
- SUCCESS: import("react-toastify").TypeOptions;
32
- WARNING: import("react-toastify").TypeOptions;
33
- ERROR: import("react-toastify").TypeOptions;
34
- DEFAULT: import("react-toastify").TypeOptions;
35
- DARK: import("react-toastify").TypeOptions;
36
- };
37
- };
38
- export { toast };