@ttoss/react-notifications 2.7.23 → 2.7.25
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 -6
- package/dist/index.mjs +6 -6
- package/package.json +11 -11
package/dist/index.cjs
CHANGED
|
@@ -38,7 +38,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
38
38
|
let _ttoss_components_Modal = require("@ttoss/components/Modal");
|
|
39
39
|
|
|
40
40
|
//#region src/NotificationsHeader.tsx
|
|
41
|
-
|
|
41
|
+
var NotificationsHeader = () => {
|
|
42
42
|
const {
|
|
43
43
|
notifications
|
|
44
44
|
} = useNotifications();
|
|
@@ -52,7 +52,7 @@ const NotificationsHeader = () => {
|
|
|
52
52
|
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region src/NotificationsModal.tsx
|
|
55
|
-
|
|
55
|
+
var NotificationsModal = () => {
|
|
56
56
|
const {
|
|
57
57
|
notifications,
|
|
58
58
|
clearNotifications,
|
|
@@ -89,7 +89,7 @@ const NotificationsModal = () => {
|
|
|
89
89
|
|
|
90
90
|
//#endregion
|
|
91
91
|
//#region src/Provider.tsx
|
|
92
|
-
|
|
92
|
+
var NotificationsContext = react.createContext({
|
|
93
93
|
isLoading: false,
|
|
94
94
|
setLoading: () => {},
|
|
95
95
|
defaultViewType: "box",
|
|
@@ -97,7 +97,7 @@ const NotificationsContext = react.createContext({
|
|
|
97
97
|
removeNotification: () => {},
|
|
98
98
|
clearNotifications: () => {}
|
|
99
99
|
});
|
|
100
|
-
|
|
100
|
+
var NotificationsProvider = props => {
|
|
101
101
|
const [isLoading, setLoading] = react.useState(false);
|
|
102
102
|
const [notifications, setNotifications] = react.useState();
|
|
103
103
|
const prefix = react.useId();
|
|
@@ -176,13 +176,13 @@ const NotificationsProvider = props => {
|
|
|
176
176
|
}), /* @__PURE__ */(0, react_jsx_runtime.jsx)(NotificationsHeader, {}), props.children]
|
|
177
177
|
});
|
|
178
178
|
};
|
|
179
|
-
|
|
179
|
+
var useNotifications = () => {
|
|
180
180
|
return react.useContext(NotificationsContext);
|
|
181
181
|
};
|
|
182
182
|
|
|
183
183
|
//#endregion
|
|
184
184
|
//#region src/NotificationsBox.tsx
|
|
185
|
-
|
|
185
|
+
var NotificationsBox = props => {
|
|
186
186
|
const {
|
|
187
187
|
notifications,
|
|
188
188
|
removeNotification,
|
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
import { Modal } from "@ttoss/components/Modal";
|
|
8
8
|
|
|
9
9
|
//#region src/NotificationsHeader.tsx
|
|
10
|
-
|
|
10
|
+
var NotificationsHeader = () => {
|
|
11
11
|
const {
|
|
12
12
|
notifications
|
|
13
13
|
} = useNotifications();
|
|
@@ -21,7 +21,7 @@ const NotificationsHeader = () => {
|
|
|
21
21
|
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/NotificationsModal.tsx
|
|
24
|
-
|
|
24
|
+
var NotificationsModal = () => {
|
|
25
25
|
const {
|
|
26
26
|
notifications,
|
|
27
27
|
clearNotifications,
|
|
@@ -58,7 +58,7 @@ const NotificationsModal = () => {
|
|
|
58
58
|
|
|
59
59
|
//#endregion
|
|
60
60
|
//#region src/Provider.tsx
|
|
61
|
-
|
|
61
|
+
var NotificationsContext = React.createContext({
|
|
62
62
|
isLoading: false,
|
|
63
63
|
setLoading: () => {},
|
|
64
64
|
defaultViewType: "box",
|
|
@@ -66,7 +66,7 @@ const NotificationsContext = React.createContext({
|
|
|
66
66
|
removeNotification: () => {},
|
|
67
67
|
clearNotifications: () => {}
|
|
68
68
|
});
|
|
69
|
-
|
|
69
|
+
var NotificationsProvider = props => {
|
|
70
70
|
const [isLoading, setLoading] = React.useState(false);
|
|
71
71
|
const [notifications, setNotifications] = React.useState();
|
|
72
72
|
const prefix = React.useId();
|
|
@@ -145,13 +145,13 @@ const NotificationsProvider = props => {
|
|
|
145
145
|
}), /* @__PURE__ */jsx(NotificationsHeader, {}), props.children]
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
|
-
|
|
148
|
+
var useNotifications = () => {
|
|
149
149
|
return React.useContext(NotificationsContext);
|
|
150
150
|
};
|
|
151
151
|
|
|
152
152
|
//#endregion
|
|
153
153
|
//#region src/NotificationsBox.tsx
|
|
154
|
-
|
|
154
|
+
var NotificationsBox = props => {
|
|
155
155
|
const {
|
|
156
156
|
notifications,
|
|
157
157
|
removeNotification,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/react-notifications",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.25",
|
|
4
4
|
"description": "ttoss notifications module for React apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"React",
|
|
@@ -29,20 +29,20 @@
|
|
|
29
29
|
],
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/react": "^19.2.14",
|
|
32
|
-
"jest": "^30.
|
|
32
|
+
"jest": "^30.4.2",
|
|
33
33
|
"react": "^19.2.6",
|
|
34
|
-
"tsdown": "^0.22.
|
|
35
|
-
"@ttoss/components": "^2.14.
|
|
36
|
-
"@ttoss/
|
|
37
|
-
"@ttoss/
|
|
38
|
-
"@ttoss/
|
|
39
|
-
"@ttoss/
|
|
34
|
+
"tsdown": "^0.22.2",
|
|
35
|
+
"@ttoss/components": "^2.14.25",
|
|
36
|
+
"@ttoss/react-icons": "^0.7.18",
|
|
37
|
+
"@ttoss/config": "^1.37.16",
|
|
38
|
+
"@ttoss/test-utils": "^4.2.16",
|
|
39
|
+
"@ttoss/ui": "^6.9.24"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": ">=16.8.0",
|
|
43
|
-
"@ttoss/
|
|
44
|
-
"@ttoss/ui": "^6.9.
|
|
45
|
-
"@ttoss/
|
|
43
|
+
"@ttoss/components": "^2.14.25",
|
|
44
|
+
"@ttoss/ui": "^6.9.24",
|
|
45
|
+
"@ttoss/react-icons": "^0.7.18"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public",
|