@ttoss/react-notifications 2.7.30 → 2.8.0

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/index.cjs CHANGED
@@ -203,6 +203,7 @@ var NotificationsBox = props => {
203
203
  type: notification.type,
204
204
  title: notification.title,
205
205
  message: notification.message,
206
+ actions: notification.actions,
206
207
  onClose: () => {
207
208
  if (notification.id) removeNotification(notification.id);
208
209
  }
@@ -212,6 +213,12 @@ var NotificationsBox = props => {
212
213
  };
213
214
 
214
215
  //#endregion
216
+ Object.defineProperty(exports, 'NotificationButton', {
217
+ enumerable: true,
218
+ get: function () {
219
+ return _ttoss_components.NotificationButton;
220
+ }
221
+ });
215
222
  exports.NotificationsBox = NotificationsBox;
216
223
  exports.NotificationsProvider = NotificationsProvider;
217
224
  exports.toast = _ttoss_components.toast;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import { ToastContainerProps, ToastOptions, toast } from "@ttoss/components";
2
+ import { NotificationAction, NotificationButton, NotificationButtonProps, ToastContainerProps, ToastOptions, toast } from "@ttoss/components";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/Provider.d.ts
@@ -13,6 +13,7 @@ type Notification = {
13
13
  toast?: ToastOptions;
14
14
  boxId?: string | number;
15
15
  persist?: boolean;
16
+ actions?: NotificationAction[];
16
17
  };
17
18
  type NotificationsProviderProps = {
18
19
  children: React.ReactNode;
@@ -36,4 +37,4 @@ declare const NotificationsBox: (props: {
36
37
  notifications?: Notification[] | undefined;
37
38
  }) => import("react/jsx-runtime").JSX.Element | null;
38
39
  //#endregion
39
- export { type Notification, NotificationsBox, NotificationsProvider, type NotificationsProviderProps, toast, useNotifications };
40
+ export { type Notification, NotificationButton, type NotificationButtonProps, NotificationsBox, NotificationsProvider, type NotificationsProviderProps, toast, useNotifications };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- import { ToastContainerProps, ToastOptions, toast } from "@ttoss/components";
2
+ import { NotificationAction, NotificationButton, NotificationButtonProps, ToastContainerProps, ToastOptions, toast } from "@ttoss/components";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/Provider.d.ts
@@ -13,6 +13,7 @@ type Notification = {
13
13
  toast?: ToastOptions;
14
14
  boxId?: string | number;
15
15
  persist?: boolean;
16
+ actions?: NotificationAction[];
16
17
  };
17
18
  type NotificationsProviderProps = {
18
19
  children: React.ReactNode;
@@ -36,4 +37,4 @@ declare const NotificationsBox: (props: {
36
37
  notifications?: Notification[] | undefined;
37
38
  }) => import("react/jsx-runtime").JSX.Element | null;
38
39
  //#endregion
39
- export { type Notification, NotificationsBox, NotificationsProvider, type NotificationsProviderProps, toast, useNotifications };
40
+ export { type Notification, NotificationButton, type NotificationButtonProps, NotificationsBox, NotificationsProvider, type NotificationsProviderProps, toast, useNotifications };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
2
- import { Modal, NotificationCard, ToastContainer, toast } from "@ttoss/components";
2
+ import { Modal, NotificationButton, NotificationCard, ToastContainer, toast } from "@ttoss/components";
3
3
  import { CloseButton, Flex, InfiniteLinearProgress, Stack } from "@ttoss/ui";
4
4
  import * as React from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -172,6 +172,7 @@ var NotificationsBox = props => {
172
172
  type: notification.type,
173
173
  title: notification.title,
174
174
  message: notification.message,
175
+ actions: notification.actions,
175
176
  onClose: () => {
176
177
  if (notification.id) removeNotification(notification.id);
177
178
  }
@@ -181,4 +182,4 @@ var NotificationsBox = props => {
181
182
  };
182
183
 
183
184
  //#endregion
184
- export { NotificationsBox, NotificationsProvider, toast, useNotifications };
185
+ export { NotificationButton, NotificationsBox, NotificationsProvider, toast, useNotifications };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/react-notifications",
3
- "version": "2.7.30",
3
+ "version": "2.8.0",
4
4
  "description": "ttoss notifications module for React apps.",
5
5
  "keywords": [
6
6
  "React",
@@ -35,17 +35,17 @@
35
35
  "jest": "^30.4.2",
36
36
  "react": "^19.2.6",
37
37
  "tsdown": "^0.22.2",
38
- "@ttoss/react-icons": "^0.7.21",
39
38
  "@ttoss/config": "^1.37.17",
40
- "@ttoss/components": "^2.14.30",
41
- "@ttoss/test-utils": "^4.2.18",
42
- "@ttoss/ui": "^6.9.27"
39
+ "@ttoss/react-icons": "^0.7.21",
40
+ "@ttoss/ui": "^6.9.28",
41
+ "@ttoss/components": "^2.15.0",
42
+ "@ttoss/test-utils": "^4.2.18"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8.0",
46
- "@ttoss/components": "^2.14.30",
46
+ "@ttoss/components": "^2.15.0",
47
47
  "@ttoss/react-icons": "^0.7.21",
48
- "@ttoss/ui": "^6.9.27"
48
+ "@ttoss/ui": "^6.9.28"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public",