@synerise/ds-toast 1.2.0 → 1.2.2

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.2.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-toast@1.2.1...@synerise/ds-toast@1.2.2) (2025-09-16)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-toast
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.2.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-toast@1.2.0...@synerise/ds-toast@1.2.1) (2025-08-28)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-toast
17
+
18
+
19
+
20
+
21
+
6
22
  # [1.2.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-toast@1.1.11...@synerise/ds-toast@1.2.0) (2025-08-20)
7
23
 
8
24
 
package/dist/Toast.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type ShowToastProps, type ToastCustomisationOptions, type ToastProps } from './Toast.types';
2
+ import { type ShowToastProps, type ToastCustomisationOptions, type ToastProps, type ToastType } from './Toast.types';
3
3
  export declare const Toast: {
4
4
  ({ type, message, description, expander, expandedContent, withClose, customIcon, expanded, onExpand, onCloseClick, button, ...htmlAttributes }: ToastProps): React.JSX.Element;
5
5
  success(props: ShowToastProps, options?: ToastCustomisationOptions): string;
@@ -7,3 +7,4 @@ export declare const Toast: {
7
7
  info(props: ShowToastProps, options?: ToastCustomisationOptions): string;
8
8
  warning(props: ShowToastProps, options?: ToastCustomisationOptions): string;
9
9
  };
10
+ export declare const showToast: (type: ToastType, props: ShowToastProps, options?: ToastCustomisationOptions) => string;
package/dist/Toast.js CHANGED
@@ -2,10 +2,10 @@ var _excluded = ["type", "message", "description", "expander", "expandedContent"
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import React, { useCallback, useMemo } from 'react';
5
+ import toast from 'react-hot-toast';
5
6
  import Icon, { AngleDownS, CloseM } from '@synerise/ds-icon';
6
7
  import * as S from './Toast.styles';
7
8
  import { ICONS } from './constants';
8
- import { showToast } from './utils/showToast';
9
9
  export var Toast = function Toast(_ref) {
10
10
  var type = _ref.type,
11
11
  message = _ref.message,
@@ -56,6 +56,11 @@ export var Toast = function Toast(_ref) {
56
56
  component: /*#__PURE__*/React.createElement(CloseM, null)
57
57
  }))), toastContent));
58
58
  };
59
+ export var showToast = function showToast(type, props, options) {
60
+ return toast.custom(/*#__PURE__*/React.createElement(Toast, _extends({}, props, {
61
+ type: type
62
+ })), options);
63
+ };
59
64
  Toast.success = function (props, options) {
60
65
  return showToast('success', props, options);
61
66
  };
@@ -1,3 +1,2 @@
1
1
  export * from './dismissToast';
2
2
  export * from './removeToast';
3
- export * from './showToast';
@@ -1,3 +1,2 @@
1
1
  export * from './dismissToast';
2
- export * from './removeToast';
3
- export * from './showToast';
2
+ export * from './removeToast';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-toast",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Toast UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -26,6 +26,7 @@
26
26
  "test": "jest",
27
27
  "test:watch": "npm run test -- --watchAll",
28
28
  "types": "tsc --noEmit",
29
+ "check:circular-dependencies": "madge --circular --extensions ts,tsx,js,jsx --ts-config tsconfig.json src/ --exclude '/dist/'",
29
30
  "upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
30
31
  },
31
32
  "sideEffects": [
@@ -34,9 +35,9 @@
34
35
  ],
35
36
  "types": "dist/index.d.ts",
36
37
  "dependencies": {
37
- "@synerise/ds-icon": "^1.7.0",
38
- "@synerise/ds-unordered-list": "^1.1.13",
39
- "@synerise/ds-utils": "^1.4.0",
38
+ "@synerise/ds-icon": "^1.7.2",
39
+ "@synerise/ds-unordered-list": "^1.1.15",
40
+ "@synerise/ds-utils": "^1.4.2",
40
41
  "react-hot-toast": "^2.5.2"
41
42
  },
42
43
  "peerDependencies": {
@@ -46,5 +47,5 @@
46
47
  "devDependencies": {
47
48
  "@synerise/ds-toaster": "^1.1.2"
48
49
  },
49
- "gitHead": "2393f96e57ee588efc9b56457389865b272b79fa"
50
+ "gitHead": "5beb6ab5f2d77b9e98e04caab7dff20b8436078b"
50
51
  }
@@ -1,2 +0,0 @@
1
- import { type ShowToastProps, type ToastCustomisationOptions, type ToastType } from '../Toast.types';
2
- export declare const showToast: (type: ToastType, props: ShowToastProps, options?: ToastCustomisationOptions) => string;
@@ -1,9 +0,0 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React from 'react';
3
- import toast from 'react-hot-toast';
4
- import { Toast } from '../Toast';
5
- export var showToast = function showToast(type, props, options) {
6
- return toast.custom(/*#__PURE__*/React.createElement(Toast, _extends({}, props, {
7
- type: type
8
- })), options);
9
- };