@notificationapi/react 0.0.36 → 1.0.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/assets/Badge.js +456 -0
- package/dist/assets/Box.js +57 -0
- package/dist/assets/ButtonBase.js +1224 -0
- package/dist/assets/DefaultPropsProvider.js +4368 -0
- package/dist/assets/Divider.js +343 -0
- package/dist/assets/IconButton.js +225 -0
- package/dist/assets/Inbox.js +3051 -0
- package/dist/assets/InboxHeader.js +2338 -0
- package/dist/assets/Notification.js +5349 -7150
- package/dist/assets/NotificationPreferencesPopup.js +1694 -0
- package/dist/assets/Paper.js +154 -0
- package/dist/assets/Popover.js +451 -0
- package/dist/assets/Portal.js +110 -0
- package/dist/assets/PreferenceInput.js +1545 -1366
- package/dist/assets/Typography.js +292 -0
- package/dist/assets/WebPushOptInMessage.js +794 -407
- package/dist/assets/channelUtils.js +33 -65
- package/dist/assets/createSimplePaletteValueFilter.js +17 -0
- package/dist/assets/createSvgIcon.js +248 -0
- package/dist/assets/integerPropType.js +31 -0
- package/dist/assets/main.css +1 -0
- package/dist/assets/resolveComponentProps.js +93 -0
- package/dist/assets/useSlotProps.js +24 -0
- package/dist/assets/useTheme.js +10 -0
- package/dist/assets/useTheme2.js +16 -0
- package/dist/assets/utils.js +743 -0
- package/dist/components/Notifications/DefaultEmpty.d.ts +3 -0
- package/dist/components/Notifications/DefaultEmpty.js +7 -0
- package/dist/components/Notifications/Inbox.d.ts +4 -4
- package/dist/components/Notifications/Inbox.js +9 -6450
- package/dist/components/Notifications/InboxHeader.d.ts +1 -1
- package/dist/components/Notifications/InboxHeader.js +7 -53
- package/dist/components/Notifications/Notification.d.ts +3 -4
- package/dist/components/Notifications/Notification.js +6 -5
- package/dist/components/Notifications/NotificationCounter.js +16 -6
- package/dist/components/Notifications/NotificationFeed.d.ts +1 -2
- package/dist/components/Notifications/NotificationFeed.js +41 -38
- package/dist/components/Notifications/NotificationLauncher.d.ts +1 -0
- package/dist/components/Notifications/NotificationLauncher.js +100 -114
- package/dist/components/Notifications/NotificationPopup.d.ts +3 -4
- package/dist/components/Notifications/NotificationPopup.js +86 -88
- package/dist/components/Notifications/UnreadBadge.d.ts +7 -4
- package/dist/components/Notifications/UnreadBadge.js +28 -20
- package/dist/components/Notifications/interface.d.ts +0 -4
- package/dist/components/Notifications/interface.js +4 -5
- package/dist/components/Preferences/NotificationPreferencesInline.js +14 -14
- package/dist/components/Preferences/NotificationPreferencesPopup.js +7 -2068
- package/dist/components/Preferences/PreferenceInput.js +4 -3
- package/dist/components/Preferences/Preferences.js +1042 -547
- package/dist/components/Preferences/channelUtils.js +3 -4
- package/dist/components/Preferences/index.js +1 -1
- package/dist/components/Provider/context.d.ts +27 -0
- package/dist/components/Provider/context.js +7 -0
- package/dist/components/Provider/index.d.ts +2 -25
- package/dist/components/Provider/index.js +90 -82
- package/dist/components/WebPush/WebPushOptInMessage.js +3 -4
- package/dist/main.d.ts +1 -0
- package/dist/main.js +5 -5
- package/package.json +25 -9
- package/dist/assets/AntdIcon.js +0 -200
- package/dist/assets/CloseOutlined.js +0 -13
- package/dist/assets/PurePanel.js +0 -59
- package/dist/assets/RightOutlined.js +0 -13
- package/dist/assets/button.js +0 -1660
- package/dist/assets/colors.js +0 -36
- package/dist/assets/compact-item.js +0 -860
- package/dist/assets/index.js +0 -271
- package/dist/assets/index2.js +0 -647
- package/dist/assets/index3.js +0 -7527
- package/dist/assets/pickAttrs.js +0 -42
- package/dist/assets/presets.js +0 -810
- package/dist/assets/reactNode.js +0 -20821
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as k from "react";
|
|
2
|
+
import { c as N } from "./DefaultPropsProvider.js";
|
|
3
|
+
function O(n, s) {
|
|
4
|
+
typeof n == "function" ? n(s) : n && (n.current = s);
|
|
5
|
+
}
|
|
6
|
+
function W(...n) {
|
|
7
|
+
return k.useMemo(() => n.every((s) => s == null) ? null : (s) => {
|
|
8
|
+
n.forEach((e) => {
|
|
9
|
+
O(e, s);
|
|
10
|
+
});
|
|
11
|
+
}, n);
|
|
12
|
+
}
|
|
13
|
+
function R(n) {
|
|
14
|
+
return typeof n == "string";
|
|
15
|
+
}
|
|
16
|
+
function Z(n, s, e) {
|
|
17
|
+
return n === void 0 || R(n) ? s : {
|
|
18
|
+
...s,
|
|
19
|
+
ownerState: {
|
|
20
|
+
...s.ownerState,
|
|
21
|
+
...e
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function C(n, s = []) {
|
|
26
|
+
if (n === void 0)
|
|
27
|
+
return {};
|
|
28
|
+
const e = {};
|
|
29
|
+
return Object.keys(n).filter((t) => t.match(/^on[A-Z]/) && typeof n[t] == "function" && !s.includes(t)).forEach((t) => {
|
|
30
|
+
e[t] = n[t];
|
|
31
|
+
}), e;
|
|
32
|
+
}
|
|
33
|
+
function g(n) {
|
|
34
|
+
if (n === void 0)
|
|
35
|
+
return {};
|
|
36
|
+
const s = {};
|
|
37
|
+
return Object.keys(n).filter((e) => !(e.match(/^on[A-Z]/) && typeof n[e] == "function")).forEach((e) => {
|
|
38
|
+
s[e] = n[e];
|
|
39
|
+
}), s;
|
|
40
|
+
}
|
|
41
|
+
function M(n) {
|
|
42
|
+
const {
|
|
43
|
+
getSlotProps: s,
|
|
44
|
+
additionalProps: e,
|
|
45
|
+
externalSlotProps: t,
|
|
46
|
+
externalForwardedProps: c,
|
|
47
|
+
className: m
|
|
48
|
+
} = n;
|
|
49
|
+
if (!s) {
|
|
50
|
+
const a = N(e == null ? void 0 : e.className, m, c == null ? void 0 : c.className, t == null ? void 0 : t.className), h = {
|
|
51
|
+
...e == null ? void 0 : e.style,
|
|
52
|
+
...c == null ? void 0 : c.style,
|
|
53
|
+
...t == null ? void 0 : t.style
|
|
54
|
+
}, i = {
|
|
55
|
+
...e,
|
|
56
|
+
...c,
|
|
57
|
+
...t
|
|
58
|
+
};
|
|
59
|
+
return a.length > 0 && (i.className = a), Object.keys(h).length > 0 && (i.style = h), {
|
|
60
|
+
props: i,
|
|
61
|
+
internalRef: void 0
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const E = C({
|
|
65
|
+
...c,
|
|
66
|
+
...t
|
|
67
|
+
}), v = g(t), H = g(c), f = s(E), y = N(f == null ? void 0 : f.className, e == null ? void 0 : e.className, m, c == null ? void 0 : c.className, t == null ? void 0 : t.className), l = {
|
|
68
|
+
...f == null ? void 0 : f.style,
|
|
69
|
+
...e == null ? void 0 : e.style,
|
|
70
|
+
...c == null ? void 0 : c.style,
|
|
71
|
+
...t == null ? void 0 : t.style
|
|
72
|
+
}, u = {
|
|
73
|
+
...f,
|
|
74
|
+
...e,
|
|
75
|
+
...H,
|
|
76
|
+
...v
|
|
77
|
+
};
|
|
78
|
+
return y.length > 0 && (u.className = y), Object.keys(l).length > 0 && (u.style = l), {
|
|
79
|
+
props: u,
|
|
80
|
+
internalRef: f.ref
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function j(n, s, e) {
|
|
84
|
+
return typeof n == "function" ? n(s, e) : n;
|
|
85
|
+
}
|
|
86
|
+
export {
|
|
87
|
+
Z as a,
|
|
88
|
+
C as e,
|
|
89
|
+
M as m,
|
|
90
|
+
j as r,
|
|
91
|
+
O as s,
|
|
92
|
+
W as u
|
|
93
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { r as P, m as S, u as c, a as u } from "./resolveComponentProps.js";
|
|
2
|
+
function g(e) {
|
|
3
|
+
var s;
|
|
4
|
+
const {
|
|
5
|
+
elementType: t,
|
|
6
|
+
externalSlotProps: n,
|
|
7
|
+
ownerState: r,
|
|
8
|
+
skipResolvingSlotProps: p = !1,
|
|
9
|
+
...a
|
|
10
|
+
} = e, o = p ? {} : P(n, r), {
|
|
11
|
+
props: l,
|
|
12
|
+
internalRef: f
|
|
13
|
+
} = S({
|
|
14
|
+
...a,
|
|
15
|
+
externalSlotProps: o
|
|
16
|
+
}), i = c(f, o == null ? void 0 : o.ref, (s = e.additionalProps) == null ? void 0 : s.ref);
|
|
17
|
+
return u(t, {
|
|
18
|
+
...l,
|
|
19
|
+
ref: i
|
|
20
|
+
}, r);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
g as u
|
|
24
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { T as r, d as s } from "./DefaultPropsProvider.js";
|
|
3
|
+
import { u as t } from "./useTheme2.js";
|
|
4
|
+
function a() {
|
|
5
|
+
const e = t(s);
|
|
6
|
+
return process.env.NODE_ENV !== "production" && o.useDebugValue(e), e[r] || e;
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
a as u
|
|
10
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { i as n, j as o } from "./DefaultPropsProvider.js";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
function m(e) {
|
|
4
|
+
return Object.keys(e).length === 0;
|
|
5
|
+
}
|
|
6
|
+
function r(e = null) {
|
|
7
|
+
const t = s.useContext(n);
|
|
8
|
+
return !t || m(t) ? e : t;
|
|
9
|
+
}
|
|
10
|
+
const u = o();
|
|
11
|
+
function a(e = u) {
|
|
12
|
+
return r(e);
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
a as u
|
|
16
|
+
};
|