@notificationapi/react 0.0.37 → 1.0.1
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/resolveComponentProps.js +93 -0
- package/dist/assets/style.css +1 -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 +22 -24
- package/dist/components/WebPush/WebPushOptInMessage.js +3 -4
- package/dist/main.d.ts +1 -0
- package/dist/main.js +4 -4
- package/package.json +14 -12
- 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
package/dist/assets/index.js
DELETED
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import * as a from "react";
|
|
2
|
-
import { c as P } from "./presets.js";
|
|
3
|
-
import { u as V } from "./compact-item.js";
|
|
4
|
-
import { i as A, g as H, a as L, b as K, P as F, c as G, d as U, K as X } from "./index3.js";
|
|
5
|
-
import { g as Y, m as Z, r as q, a as N, c as J } from "./reactNode.js";
|
|
6
|
-
import { P as Q } from "./colors.js";
|
|
7
|
-
const x = (e) => e ? typeof e == "function" ? e() : e : null, ee = (e) => {
|
|
8
|
-
const {
|
|
9
|
-
componentCls: o,
|
|
10
|
-
popoverColor: n,
|
|
11
|
-
titleMinWidth: t,
|
|
12
|
-
fontWeightStrong: r,
|
|
13
|
-
innerPadding: l,
|
|
14
|
-
boxShadowSecondary: c,
|
|
15
|
-
colorTextHeading: d,
|
|
16
|
-
borderRadiusLG: p,
|
|
17
|
-
zIndexPopup: m,
|
|
18
|
-
titleMarginBottom: i,
|
|
19
|
-
colorBgElevated: g,
|
|
20
|
-
popoverBg: v,
|
|
21
|
-
titleBorderBottom: u,
|
|
22
|
-
innerContentPadding: y,
|
|
23
|
-
titlePadding: f
|
|
24
|
-
} = e;
|
|
25
|
-
return [
|
|
26
|
-
{
|
|
27
|
-
[o]: Object.assign(Object.assign({}, q(e)), {
|
|
28
|
-
position: "absolute",
|
|
29
|
-
top: 0,
|
|
30
|
-
// use `left` to fix https://github.com/ant-design/ant-design/issues/39195
|
|
31
|
-
left: {
|
|
32
|
-
_skip_check_: !0,
|
|
33
|
-
value: 0
|
|
34
|
-
},
|
|
35
|
-
zIndex: m,
|
|
36
|
-
fontWeight: "normal",
|
|
37
|
-
whiteSpace: "normal",
|
|
38
|
-
textAlign: "start",
|
|
39
|
-
cursor: "auto",
|
|
40
|
-
userSelect: "text",
|
|
41
|
-
// When use `autoArrow`, origin will follow the arrow position
|
|
42
|
-
"--valid-offset-x": "var(--arrow-offset-horizontal, var(--arrow-x))",
|
|
43
|
-
transformOrigin: ["var(--valid-offset-x, 50%)", "var(--arrow-y, 50%)"].join(" "),
|
|
44
|
-
"--antd-arrow-background-color": g,
|
|
45
|
-
width: "max-content",
|
|
46
|
-
maxWidth: "100vw",
|
|
47
|
-
"&-rtl": {
|
|
48
|
-
direction: "rtl"
|
|
49
|
-
},
|
|
50
|
-
"&-hidden": {
|
|
51
|
-
display: "none"
|
|
52
|
-
},
|
|
53
|
-
[`${o}-content`]: {
|
|
54
|
-
position: "relative"
|
|
55
|
-
},
|
|
56
|
-
[`${o}-inner`]: {
|
|
57
|
-
backgroundColor: v,
|
|
58
|
-
backgroundClip: "padding-box",
|
|
59
|
-
borderRadius: p,
|
|
60
|
-
boxShadow: c,
|
|
61
|
-
padding: l
|
|
62
|
-
},
|
|
63
|
-
[`${o}-title`]: {
|
|
64
|
-
minWidth: t,
|
|
65
|
-
marginBottom: i,
|
|
66
|
-
color: d,
|
|
67
|
-
fontWeight: r,
|
|
68
|
-
borderBottom: u,
|
|
69
|
-
padding: f
|
|
70
|
-
},
|
|
71
|
-
[`${o}-inner-content`]: {
|
|
72
|
-
color: n,
|
|
73
|
-
padding: y
|
|
74
|
-
}
|
|
75
|
-
})
|
|
76
|
-
},
|
|
77
|
-
// Arrow Style
|
|
78
|
-
H(e, "var(--antd-arrow-background-color)"),
|
|
79
|
-
// Pure Render
|
|
80
|
-
{
|
|
81
|
-
[`${o}-pure`]: {
|
|
82
|
-
position: "relative",
|
|
83
|
-
maxWidth: "none",
|
|
84
|
-
margin: e.sizePopupArrow,
|
|
85
|
-
display: "inline-block",
|
|
86
|
-
[`${o}-content`]: {
|
|
87
|
-
display: "inline-block"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
];
|
|
92
|
-
}, te = (e) => {
|
|
93
|
-
const {
|
|
94
|
-
componentCls: o
|
|
95
|
-
} = e;
|
|
96
|
-
return {
|
|
97
|
-
[o]: Q.map((n) => {
|
|
98
|
-
const t = e[`${n}6`];
|
|
99
|
-
return {
|
|
100
|
-
[`&${o}-${n}`]: {
|
|
101
|
-
"--antd-arrow-background-color": t,
|
|
102
|
-
[`${o}-inner`]: {
|
|
103
|
-
backgroundColor: t
|
|
104
|
-
},
|
|
105
|
-
[`${o}-arrow`]: {
|
|
106
|
-
background: "transparent"
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
})
|
|
111
|
-
};
|
|
112
|
-
}, oe = (e) => {
|
|
113
|
-
const {
|
|
114
|
-
lineWidth: o,
|
|
115
|
-
controlHeight: n,
|
|
116
|
-
fontHeight: t,
|
|
117
|
-
padding: r,
|
|
118
|
-
wireframe: l,
|
|
119
|
-
zIndexPopupBase: c,
|
|
120
|
-
borderRadiusLG: d,
|
|
121
|
-
marginXS: p,
|
|
122
|
-
lineType: m,
|
|
123
|
-
colorSplit: i,
|
|
124
|
-
paddingSM: g
|
|
125
|
-
} = e, v = n - t, u = v / 2, y = v / 2 - o, f = r;
|
|
126
|
-
return Object.assign(Object.assign(Object.assign({
|
|
127
|
-
titleMinWidth: 177,
|
|
128
|
-
zIndexPopup: c + 30
|
|
129
|
-
}, L(e)), K({
|
|
130
|
-
contentRadius: d,
|
|
131
|
-
limitVerticalRadius: !0
|
|
132
|
-
})), {
|
|
133
|
-
// internal
|
|
134
|
-
innerPadding: l ? 0 : 12,
|
|
135
|
-
titleMarginBottom: l ? 0 : p,
|
|
136
|
-
titlePadding: l ? `${u}px ${f}px ${y}px` : 0,
|
|
137
|
-
titleBorderBottom: l ? `${o}px ${m} ${i}` : "none",
|
|
138
|
-
innerContentPadding: l ? `${g}px ${f}px` : 0
|
|
139
|
-
});
|
|
140
|
-
}, E = Y("Popover", (e) => {
|
|
141
|
-
const {
|
|
142
|
-
colorBgElevated: o,
|
|
143
|
-
colorText: n
|
|
144
|
-
} = e, t = Z(e, {
|
|
145
|
-
popoverBg: o,
|
|
146
|
-
popoverColor: n
|
|
147
|
-
});
|
|
148
|
-
return [ee(t), te(t), A(t, "zoom-big")];
|
|
149
|
-
}, oe, {
|
|
150
|
-
resetStyle: !1,
|
|
151
|
-
deprecatedTokens: [["width", "titleMinWidth"], ["minWidth", "titleMinWidth"]]
|
|
152
|
-
});
|
|
153
|
-
var ne = function(e, o) {
|
|
154
|
-
var n = {};
|
|
155
|
-
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
|
|
156
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
157
|
-
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
158
|
-
return n;
|
|
159
|
-
};
|
|
160
|
-
const B = (e) => {
|
|
161
|
-
let {
|
|
162
|
-
title: o,
|
|
163
|
-
content: n,
|
|
164
|
-
prefixCls: t
|
|
165
|
-
} = e;
|
|
166
|
-
return !o && !n ? null : /* @__PURE__ */ a.createElement(a.Fragment, null, o && /* @__PURE__ */ a.createElement("div", {
|
|
167
|
-
className: `${t}-title`
|
|
168
|
-
}, o), n && /* @__PURE__ */ a.createElement("div", {
|
|
169
|
-
className: `${t}-inner-content`
|
|
170
|
-
}, n));
|
|
171
|
-
}, re = (e) => {
|
|
172
|
-
const {
|
|
173
|
-
hashId: o,
|
|
174
|
-
prefixCls: n,
|
|
175
|
-
className: t,
|
|
176
|
-
style: r,
|
|
177
|
-
placement: l = "top",
|
|
178
|
-
title: c,
|
|
179
|
-
content: d,
|
|
180
|
-
children: p
|
|
181
|
-
} = e, m = x(c), i = x(d), g = P(o, n, `${n}-pure`, `${n}-placement-${l}`, t);
|
|
182
|
-
return /* @__PURE__ */ a.createElement("div", {
|
|
183
|
-
className: g,
|
|
184
|
-
style: r
|
|
185
|
-
}, /* @__PURE__ */ a.createElement("div", {
|
|
186
|
-
className: `${n}-arrow`
|
|
187
|
-
}), /* @__PURE__ */ a.createElement(F, Object.assign({}, e, {
|
|
188
|
-
className: o,
|
|
189
|
-
prefixCls: n
|
|
190
|
-
}), p || /* @__PURE__ */ a.createElement(B, {
|
|
191
|
-
prefixCls: n,
|
|
192
|
-
title: m,
|
|
193
|
-
content: i
|
|
194
|
-
})));
|
|
195
|
-
}, ae = (e) => {
|
|
196
|
-
const {
|
|
197
|
-
prefixCls: o,
|
|
198
|
-
className: n
|
|
199
|
-
} = e, t = ne(e, ["prefixCls", "className"]), {
|
|
200
|
-
getPrefixCls: r
|
|
201
|
-
} = a.useContext(N), l = r("popover", o), [c, d, p] = E(l);
|
|
202
|
-
return c(/* @__PURE__ */ a.createElement(re, Object.assign({}, t, {
|
|
203
|
-
prefixCls: l,
|
|
204
|
-
hashId: d,
|
|
205
|
-
className: P(n, p)
|
|
206
|
-
})));
|
|
207
|
-
};
|
|
208
|
-
var le = function(e, o) {
|
|
209
|
-
var n = {};
|
|
210
|
-
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && o.indexOf(t) < 0 && (n[t] = e[t]);
|
|
211
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, t = Object.getOwnPropertySymbols(e); r < t.length; r++)
|
|
212
|
-
o.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (n[t[r]] = e[t[r]]);
|
|
213
|
-
return n;
|
|
214
|
-
};
|
|
215
|
-
const ie = /* @__PURE__ */ a.forwardRef((e, o) => {
|
|
216
|
-
var n, t;
|
|
217
|
-
const {
|
|
218
|
-
prefixCls: r,
|
|
219
|
-
title: l,
|
|
220
|
-
content: c,
|
|
221
|
-
overlayClassName: d,
|
|
222
|
-
placement: p = "top",
|
|
223
|
-
trigger: m = "hover",
|
|
224
|
-
children: i,
|
|
225
|
-
mouseEnterDelay: g = 0.1,
|
|
226
|
-
mouseLeaveDelay: v = 0.1,
|
|
227
|
-
onOpenChange: u,
|
|
228
|
-
overlayStyle: y = {}
|
|
229
|
-
} = e, f = le(e, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "children", "mouseEnterDelay", "mouseLeaveDelay", "onOpenChange", "overlayStyle"]), {
|
|
230
|
-
getPrefixCls: O
|
|
231
|
-
} = a.useContext(N), b = O("popover", r), [_, k, I] = E(b), T = O(), W = P(d, k, I), [D, z] = V(!1, {
|
|
232
|
-
value: (n = e.open) !== null && n !== void 0 ? n : e.visible,
|
|
233
|
-
defaultValue: (t = e.defaultOpen) !== null && t !== void 0 ? t : e.defaultVisible
|
|
234
|
-
}), w = (s, C) => {
|
|
235
|
-
z(s, !0), u == null || u(s, C);
|
|
236
|
-
}, M = (s) => {
|
|
237
|
-
s.keyCode === X.ESC && w(!1, s);
|
|
238
|
-
}, R = (s) => {
|
|
239
|
-
w(s);
|
|
240
|
-
}, S = x(l), $ = x(c);
|
|
241
|
-
return _(/* @__PURE__ */ a.createElement(G, Object.assign({
|
|
242
|
-
placement: p,
|
|
243
|
-
trigger: m,
|
|
244
|
-
mouseEnterDelay: g,
|
|
245
|
-
mouseLeaveDelay: v,
|
|
246
|
-
overlayStyle: y
|
|
247
|
-
}, f, {
|
|
248
|
-
prefixCls: b,
|
|
249
|
-
overlayClassName: W,
|
|
250
|
-
ref: o,
|
|
251
|
-
open: D,
|
|
252
|
-
onOpenChange: R,
|
|
253
|
-
overlay: S || $ ? /* @__PURE__ */ a.createElement(B, {
|
|
254
|
-
prefixCls: b,
|
|
255
|
-
title: S,
|
|
256
|
-
content: $
|
|
257
|
-
}) : null,
|
|
258
|
-
transitionName: U(T, "zoom-big", f.transitionName),
|
|
259
|
-
"data-popover-inject": !0
|
|
260
|
-
}), J(i, {
|
|
261
|
-
onKeyDown: (s) => {
|
|
262
|
-
var C, h;
|
|
263
|
-
/* @__PURE__ */ a.isValidElement(i) && ((h = i == null ? void 0 : (C = i.props).onKeyDown) === null || h === void 0 || h.call(C, s)), M(s);
|
|
264
|
-
}
|
|
265
|
-
})));
|
|
266
|
-
}), j = ie;
|
|
267
|
-
j._InternalPanelDoNotUseOrYouWillBeFired = ae;
|
|
268
|
-
process.env.NODE_ENV !== "production" && (j.displayName = "Popover");
|
|
269
|
-
export {
|
|
270
|
-
j as P
|
|
271
|
-
};
|