@ttoss/react-notifications 2.7.25 → 2.7.26
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 +6 -8
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -3
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -29,13 +29,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
}) : target, mod));
|
|
30
30
|
|
|
31
31
|
//#endregion
|
|
32
|
-
let
|
|
32
|
+
let _ttoss_components = require("@ttoss/components");
|
|
33
33
|
let _ttoss_ui = require("@ttoss/ui");
|
|
34
|
-
let _ttoss_components_Toast = require("@ttoss/components/Toast");
|
|
35
34
|
let react = require("react");
|
|
36
35
|
react = __toESM(react);
|
|
37
36
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
38
|
-
let _ttoss_components_Modal = require("@ttoss/components/Modal");
|
|
39
37
|
|
|
40
38
|
//#region src/NotificationsHeader.tsx
|
|
41
39
|
var NotificationsHeader = () => {
|
|
@@ -62,7 +60,7 @@ var NotificationsModal = () => {
|
|
|
62
60
|
if (defaultViewType === "modal" && !notification.viewType) return true;
|
|
63
61
|
return notification.viewType === "modal";
|
|
64
62
|
});
|
|
65
|
-
return /* @__PURE__ */(0, react_jsx_runtime.jsxs)(
|
|
63
|
+
return /* @__PURE__ */(0, react_jsx_runtime.jsxs)(_ttoss_components.Modal, {
|
|
66
64
|
isOpen: !!modalNotifications && modalNotifications.length > 0,
|
|
67
65
|
style: {
|
|
68
66
|
content: {
|
|
@@ -125,7 +123,7 @@ var NotificationsProvider = props => {
|
|
|
125
123
|
if (!notification.viewType && props.defaultViewType === "toast") return true;
|
|
126
124
|
return false;
|
|
127
125
|
}).forEach(notification => {
|
|
128
|
-
(0,
|
|
126
|
+
(0, _ttoss_components.toast)(notification.message, {
|
|
129
127
|
...notification.toast,
|
|
130
128
|
type: notification.type,
|
|
131
129
|
onClose: () => {
|
|
@@ -164,7 +162,7 @@ var NotificationsProvider = props => {
|
|
|
164
162
|
clearNotifications,
|
|
165
163
|
defaultViewType: props.defaultViewType || "box"
|
|
166
164
|
},
|
|
167
|
-
children: [/* @__PURE__ */(0, react_jsx_runtime.jsx)(
|
|
165
|
+
children: [/* @__PURE__ */(0, react_jsx_runtime.jsx)(_ttoss_components.ToastContainer, {
|
|
168
166
|
...props.toast
|
|
169
167
|
}), /* @__PURE__ */(0, react_jsx_runtime.jsx)(NotificationsModal, {}), isLoading && /* @__PURE__ */(0, react_jsx_runtime.jsx)(_ttoss_ui.Flex, {
|
|
170
168
|
sx: {
|
|
@@ -201,7 +199,7 @@ var NotificationsBox = props => {
|
|
|
201
199
|
gap: "1"
|
|
202
200
|
},
|
|
203
201
|
children: boxNotifications.map(notification => {
|
|
204
|
-
return /* @__PURE__ */(0, react_jsx_runtime.jsx)(
|
|
202
|
+
return /* @__PURE__ */(0, react_jsx_runtime.jsx)(_ttoss_components.NotificationCard, {
|
|
205
203
|
type: notification.type,
|
|
206
204
|
title: notification.title,
|
|
207
205
|
message: notification.message,
|
|
@@ -216,5 +214,5 @@ var NotificationsBox = props => {
|
|
|
216
214
|
//#endregion
|
|
217
215
|
exports.NotificationsBox = NotificationsBox;
|
|
218
216
|
exports.NotificationsProvider = NotificationsProvider;
|
|
219
|
-
exports.toast =
|
|
217
|
+
exports.toast = _ttoss_components.toast;
|
|
220
218
|
exports.useNotifications = useNotifications;
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
|
-
import { NotificationCard } from "@ttoss/components
|
|
2
|
+
import { Modal, NotificationCard, ToastContainer, toast } from "@ttoss/components";
|
|
3
3
|
import { CloseButton, Flex, InfiniteLinearProgress, Stack } from "@ttoss/ui";
|
|
4
|
-
import { ToastContainer, toast } from "@ttoss/components/Toast";
|
|
5
4
|
import * as React from "react";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { Modal } from "@ttoss/components/Modal";
|
|
8
6
|
|
|
9
7
|
//#region src/NotificationsHeader.tsx
|
|
10
8
|
var NotificationsHeader = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/react-notifications",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.26",
|
|
4
4
|
"description": "ttoss notifications module for React apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"React",
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
"jest": "^30.4.2",
|
|
33
33
|
"react": "^19.2.6",
|
|
34
34
|
"tsdown": "^0.22.2",
|
|
35
|
-
"@ttoss/components": "^2.14.25",
|
|
36
|
-
"@ttoss/react-icons": "^0.7.18",
|
|
37
35
|
"@ttoss/config": "^1.37.16",
|
|
38
|
-
"@ttoss/test-utils": "^4.2.
|
|
39
|
-
"@ttoss/
|
|
36
|
+
"@ttoss/test-utils": "^4.2.17",
|
|
37
|
+
"@ttoss/react-icons": "^0.7.19",
|
|
38
|
+
"@ttoss/components": "^2.14.26",
|
|
39
|
+
"@ttoss/ui": "^6.9.25"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=16.8.0",
|
|
43
|
-
"@ttoss/components": "^2.14.
|
|
44
|
-
"@ttoss/
|
|
45
|
-
"@ttoss/
|
|
43
|
+
"@ttoss/components": "^2.14.26",
|
|
44
|
+
"@ttoss/react-icons": "^0.7.19",
|
|
45
|
+
"@ttoss/ui": "^6.9.25"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public",
|