@notificationapi/react 0.0.5 → 0.0.7
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/api.js +20 -0
- package/dist/assets/BellOutlined.js +57 -0
- package/dist/assets/Inbox.js +6197 -0
- package/dist/assets/Notification.js +3971 -0
- package/dist/assets/Preferences.js +2035 -0
- package/dist/assets/PurePanel.js +66 -0
- package/dist/assets/button.js +832 -0
- package/dist/assets/colors.js +9478 -0
- package/dist/assets/index.js +269 -0
- package/dist/assets/index2.js +652 -0
- package/dist/assets/index3.js +8257 -0
- package/dist/components/Notifications/Inbox.js +10 -0
- package/dist/components/Notifications/InboxHeader.js +51 -0
- package/dist/components/Notifications/Notification.js +9 -0
- package/dist/components/Notifications/NotificationCounter.js +9 -0
- package/dist/components/Notifications/NotificationFeed.js +46 -0
- package/dist/components/Notifications/NotificationLauncher.js +111 -0
- package/dist/components/Notifications/NotificationPopup.js +12 -0
- package/dist/components/Notifications/UnreadBadge.js +29 -0
- package/dist/components/Notifications/index.js +10 -0
- package/dist/components/Preferences/NotificationPreferencesInline.js +7 -0
- package/dist/components/Preferences/NotificationPreferencesPopup.js +1465 -0
- package/dist/components/Preferences/PreferenceGroup.js +8 -0
- package/dist/components/Preferences/Preferences.js +12 -0
- package/dist/components/Preferences/index.js +6 -0
- package/dist/components/Provider/index.js +168 -0
- package/dist/main.js +14 -33390
- package/package.json +3 -2
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { _ as R, C as w, a as I } from "./colors.js";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
import { I as j, u as y } from "./index3.js";
|
|
4
|
+
var z = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, name: "close", theme: "outlined" }, E = function(s, c) {
|
|
5
|
+
return /* @__PURE__ */ e.createElement(j, R({}, s, {
|
|
6
|
+
ref: c,
|
|
7
|
+
icon: z
|
|
8
|
+
}));
|
|
9
|
+
}, _ = /* @__PURE__ */ e.forwardRef(E);
|
|
10
|
+
function S(n) {
|
|
11
|
+
return (s) => /* @__PURE__ */ e.createElement(w, {
|
|
12
|
+
theme: {
|
|
13
|
+
token: {
|
|
14
|
+
motion: !1,
|
|
15
|
+
zIndexPopupBase: 0
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}, /* @__PURE__ */ e.createElement(n, Object.assign({}, s)));
|
|
19
|
+
}
|
|
20
|
+
const M = (n, s, c, L) => S((o) => {
|
|
21
|
+
const {
|
|
22
|
+
prefixCls: f,
|
|
23
|
+
style: p
|
|
24
|
+
} = o, a = e.useRef(null), [g, m] = e.useState(0), [v, P] = e.useState(0), [l, C] = y(!1, {
|
|
25
|
+
value: o.open
|
|
26
|
+
}), {
|
|
27
|
+
getPrefixCls: h
|
|
28
|
+
} = e.useContext(I), O = h("select", f);
|
|
29
|
+
e.useEffect(() => {
|
|
30
|
+
if (C(!0), typeof ResizeObserver < "u") {
|
|
31
|
+
const i = new ResizeObserver((t) => {
|
|
32
|
+
const r = t[0].target;
|
|
33
|
+
m(r.offsetHeight + 8), P(r.offsetWidth);
|
|
34
|
+
}), u = setInterval(() => {
|
|
35
|
+
var t;
|
|
36
|
+
const r = `.${O}-dropdown`, d = (t = a.current) === null || t === void 0 ? void 0 : t.querySelector(r);
|
|
37
|
+
d && (clearInterval(u), i.observe(d));
|
|
38
|
+
}, 10);
|
|
39
|
+
return () => {
|
|
40
|
+
clearInterval(u), i.disconnect();
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}, []);
|
|
44
|
+
let b = Object.assign(Object.assign({}, o), {
|
|
45
|
+
style: Object.assign(Object.assign({}, p), {
|
|
46
|
+
margin: 0
|
|
47
|
+
}),
|
|
48
|
+
open: l,
|
|
49
|
+
visible: l,
|
|
50
|
+
getPopupContainer: () => a.current
|
|
51
|
+
});
|
|
52
|
+
const x = {
|
|
53
|
+
paddingBottom: g,
|
|
54
|
+
position: "relative",
|
|
55
|
+
minWidth: v
|
|
56
|
+
};
|
|
57
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
58
|
+
ref: a,
|
|
59
|
+
style: x
|
|
60
|
+
}, /* @__PURE__ */ e.createElement(n, Object.assign({}, b)));
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
_ as R,
|
|
64
|
+
M as g,
|
|
65
|
+
S as w
|
|
66
|
+
};
|