@notificationapi/react 0.0.9 → 0.0.10
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/BellOutlined.js +18 -15
- package/dist/assets/Inbox.js +2376 -2270
- package/dist/assets/Notification.js +1960 -1340
- package/dist/assets/Preferences.js +564 -533
- package/dist/assets/PurePanel.js +24 -23
- package/dist/assets/button.js +275 -265
- package/dist/assets/colors.js +19298 -7652
- package/dist/assets/index.js +48 -47
- package/dist/assets/index2.js +94 -92
- package/dist/assets/index3.js +2990 -2647
- package/dist/components/Notifications/Inbox.d.ts +0 -1
- package/dist/components/Notifications/InboxHeader.d.ts +2 -3
- package/dist/components/Notifications/InboxHeader.js +14 -13
- package/dist/components/Notifications/Notification.d.ts +2 -3
- package/dist/components/Notifications/NotificationCounter.d.ts +1 -1
- package/dist/components/Notifications/NotificationFeed.d.ts +0 -1
- package/dist/components/Notifications/NotificationLauncher.d.ts +0 -1
- package/dist/components/Notifications/NotificationPopup.d.ts +0 -1
- package/dist/components/Notifications/UnreadBadge.d.ts +1 -1
- package/dist/components/Preferences/NotificationPreferencesInline.d.ts +2 -3
- package/dist/components/Preferences/NotificationPreferencesPopup.d.ts +2 -3
- package/dist/components/Preferences/NotificationPreferencesPopup.js +682 -646
- package/dist/components/Preferences/PreferenceGroup.d.ts +1 -2
- package/dist/components/Preferences/Preferences.d.ts +1 -2
- package/dist/components/Provider/index.d.ts +2 -2
- package/dist/components/Provider/index.js +80 -80
- package/package.json +1 -1
package/dist/assets/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as a from "react";
|
|
2
|
-
import { g as z, m as
|
|
3
|
-
import { i as
|
|
4
|
-
const
|
|
2
|
+
import { g as z, m as M, r as R, P as V, a as S, c as P, b as A } from "./colors.js";
|
|
3
|
+
import { i as H, g as L, a as K, b as F, P as G, u as U, c as X, d as Y, K as Z } from "./index3.js";
|
|
4
|
+
const b = (e) => e ? typeof e == "function" ? e() : e : null, q = (e) => {
|
|
5
5
|
const {
|
|
6
6
|
componentCls: n,
|
|
7
7
|
popoverColor: o,
|
|
@@ -21,7 +21,7 @@ const C = (e) => e ? typeof e == "function" ? e() : e : null, Z = (e) => {
|
|
|
21
21
|
} = e;
|
|
22
22
|
return [
|
|
23
23
|
{
|
|
24
|
-
[n]: Object.assign(Object.assign({},
|
|
24
|
+
[n]: Object.assign(Object.assign({}, R(e)), {
|
|
25
25
|
position: "absolute",
|
|
26
26
|
top: 0,
|
|
27
27
|
// use `left` to fix https://github.com/ant-design/ant-design/issues/39195
|
|
@@ -70,7 +70,7 @@ const C = (e) => e ? typeof e == "function" ? e() : e : null, Z = (e) => {
|
|
|
70
70
|
})
|
|
71
71
|
},
|
|
72
72
|
// Arrow Style
|
|
73
|
-
|
|
73
|
+
L(e, "var(--antd-arrow-background-color)"),
|
|
74
74
|
// Pure Render
|
|
75
75
|
{
|
|
76
76
|
[`${n}-pure`]: {
|
|
@@ -84,12 +84,12 @@ const C = (e) => e ? typeof e == "function" ? e() : e : null, Z = (e) => {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
];
|
|
87
|
-
},
|
|
87
|
+
}, J = (e) => {
|
|
88
88
|
const {
|
|
89
89
|
componentCls: n
|
|
90
90
|
} = e;
|
|
91
91
|
return {
|
|
92
|
-
[n]:
|
|
92
|
+
[n]: V.map((o) => {
|
|
93
93
|
const t = e[`${o}6`];
|
|
94
94
|
return {
|
|
95
95
|
[`&${n}-${o}`]: {
|
|
@@ -104,7 +104,7 @@ const C = (e) => e ? typeof e == "function" ? e() : e : null, Z = (e) => {
|
|
|
104
104
|
};
|
|
105
105
|
})
|
|
106
106
|
};
|
|
107
|
-
},
|
|
107
|
+
}, Q = (e) => {
|
|
108
108
|
const {
|
|
109
109
|
lineWidth: n,
|
|
110
110
|
controlHeight: o,
|
|
@@ -121,7 +121,7 @@ const C = (e) => e ? typeof e == "function" ? e() : e : null, Z = (e) => {
|
|
|
121
121
|
return Object.assign(Object.assign(Object.assign({
|
|
122
122
|
titleMinWidth: 177,
|
|
123
123
|
zIndexPopup: i + 30
|
|
124
|
-
}, K(e)),
|
|
124
|
+
}, K(e)), F({
|
|
125
125
|
contentRadius: c,
|
|
126
126
|
limitVerticalRadius: !0
|
|
127
127
|
})), {
|
|
@@ -132,20 +132,20 @@ const C = (e) => e ? typeof e == "function" ? e() : e : null, Z = (e) => {
|
|
|
132
132
|
titleBorderBottom: l ? `${n}px ${f} ${p}` : "none",
|
|
133
133
|
innerContentPadding: l ? `${v}px ${g}px` : 0
|
|
134
134
|
});
|
|
135
|
-
},
|
|
135
|
+
}, $ = z("Popover", (e) => {
|
|
136
136
|
const {
|
|
137
137
|
colorBgElevated: n,
|
|
138
138
|
colorText: o
|
|
139
|
-
} = e, t =
|
|
139
|
+
} = e, t = M(e, {
|
|
140
140
|
popoverBg: n,
|
|
141
141
|
popoverColor: o
|
|
142
142
|
});
|
|
143
|
-
return [
|
|
144
|
-
},
|
|
143
|
+
return [q(t), J(t), H(t, "zoom-big")];
|
|
144
|
+
}, Q, {
|
|
145
145
|
resetStyle: !1,
|
|
146
146
|
deprecatedTokens: [["width", "titleMinWidth"], ["minWidth", "titleMinWidth"]]
|
|
147
147
|
});
|
|
148
|
-
var
|
|
148
|
+
var ee = function(e, n) {
|
|
149
149
|
var o = {};
|
|
150
150
|
for (var t in e)
|
|
151
151
|
Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
|
|
@@ -154,11 +154,11 @@ var Q = function(e, n) {
|
|
|
154
154
|
n.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (o[t[r]] = e[t[r]]);
|
|
155
155
|
return o;
|
|
156
156
|
};
|
|
157
|
-
const
|
|
157
|
+
const te = (e, n, o) => !n && !o ? null : /* @__PURE__ */ a.createElement(a.Fragment, null, n && /* @__PURE__ */ a.createElement("div", {
|
|
158
158
|
className: `${e}-title`
|
|
159
|
-
},
|
|
159
|
+
}, b(n)), /* @__PURE__ */ a.createElement("div", {
|
|
160
160
|
className: `${e}-inner-content`
|
|
161
|
-
},
|
|
161
|
+
}, b(o))), ne = (e) => {
|
|
162
162
|
const {
|
|
163
163
|
hashId: n,
|
|
164
164
|
prefixCls: o,
|
|
@@ -174,24 +174,24 @@ const ee = (e, n, o) => !n && !o ? null : /* @__PURE__ */ a.createElement(a.Frag
|
|
|
174
174
|
style: r
|
|
175
175
|
}, /* @__PURE__ */ a.createElement("div", {
|
|
176
176
|
className: `${o}-arrow`
|
|
177
|
-
}), /* @__PURE__ */ a.createElement(
|
|
177
|
+
}), /* @__PURE__ */ a.createElement(G, Object.assign({}, e, {
|
|
178
178
|
className: n,
|
|
179
179
|
prefixCls: o
|
|
180
|
-
}), d ||
|
|
181
|
-
},
|
|
180
|
+
}), d || te(o, i, c)));
|
|
181
|
+
}, oe = (e) => {
|
|
182
182
|
const {
|
|
183
183
|
prefixCls: n,
|
|
184
184
|
className: o
|
|
185
|
-
} = e, t =
|
|
185
|
+
} = e, t = ee(e, ["prefixCls", "className"]), {
|
|
186
186
|
getPrefixCls: r
|
|
187
|
-
} = a.useContext(
|
|
188
|
-
return i(/* @__PURE__ */ a.createElement(
|
|
187
|
+
} = a.useContext(S), l = r("popover", n), [i, c, d] = $(l);
|
|
188
|
+
return i(/* @__PURE__ */ a.createElement(ne, Object.assign({}, t, {
|
|
189
189
|
prefixCls: l,
|
|
190
190
|
hashId: c,
|
|
191
191
|
className: P(o, d)
|
|
192
192
|
})));
|
|
193
193
|
};
|
|
194
|
-
var
|
|
194
|
+
var re = function(e, n) {
|
|
195
195
|
var o = {};
|
|
196
196
|
for (var t in e)
|
|
197
197
|
Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]);
|
|
@@ -200,7 +200,7 @@ var oe = function(e, n) {
|
|
|
200
200
|
n.indexOf(t[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[r]) && (o[t[r]] = e[t[r]]);
|
|
201
201
|
return o;
|
|
202
202
|
};
|
|
203
|
-
const
|
|
203
|
+
const ae = (e) => {
|
|
204
204
|
let {
|
|
205
205
|
title: n,
|
|
206
206
|
content: o,
|
|
@@ -208,10 +208,10 @@ const re = (e) => {
|
|
|
208
208
|
} = e;
|
|
209
209
|
return /* @__PURE__ */ a.createElement(a.Fragment, null, n && /* @__PURE__ */ a.createElement("div", {
|
|
210
210
|
className: `${t}-title`
|
|
211
|
-
},
|
|
211
|
+
}, b(n)), /* @__PURE__ */ a.createElement("div", {
|
|
212
212
|
className: `${t}-inner-content`
|
|
213
|
-
},
|
|
214
|
-
},
|
|
213
|
+
}, b(o)));
|
|
214
|
+
}, le = /* @__PURE__ */ a.forwardRef((e, n) => {
|
|
215
215
|
var o, t;
|
|
216
216
|
const {
|
|
217
217
|
prefixCls: r,
|
|
@@ -225,45 +225,46 @@ const re = (e) => {
|
|
|
225
225
|
mouseLeaveDelay: u = 0.1,
|
|
226
226
|
onOpenChange: m,
|
|
227
227
|
overlayStyle: y = {}
|
|
228
|
-
} = e, g =
|
|
228
|
+
} = e, g = re(e, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "children", "mouseEnterDelay", "mouseLeaveDelay", "onOpenChange", "overlayStyle"]), {
|
|
229
229
|
getPrefixCls: O
|
|
230
|
-
} = a.useContext(
|
|
230
|
+
} = a.useContext(S), x = O("popover", r), [N, B, j] = $(x), _ = O(), k = P(c, B, j), [I, T] = U(!1, {
|
|
231
231
|
value: (o = e.open) !== null && o !== void 0 ? o : e.visible,
|
|
232
232
|
defaultValue: (t = e.defaultOpen) !== null && t !== void 0 ? t : e.defaultVisible
|
|
233
|
-
}), w = (s,
|
|
234
|
-
|
|
235
|
-
}, T = (s) => {
|
|
236
|
-
s.keyCode === Y.ESC && w(!1, s);
|
|
233
|
+
}), w = (s, C) => {
|
|
234
|
+
T(s, !0), m == null || m(s, C);
|
|
237
235
|
}, W = (s) => {
|
|
236
|
+
s.keyCode === Z.ESC && w(!1, s);
|
|
237
|
+
}, D = (s) => {
|
|
238
238
|
w(s);
|
|
239
239
|
};
|
|
240
|
-
return
|
|
240
|
+
return N(/* @__PURE__ */ a.createElement(X, Object.assign({
|
|
241
241
|
placement: d,
|
|
242
242
|
trigger: f,
|
|
243
243
|
mouseEnterDelay: v,
|
|
244
244
|
mouseLeaveDelay: u,
|
|
245
245
|
overlayStyle: y
|
|
246
246
|
}, g, {
|
|
247
|
-
prefixCls:
|
|
247
|
+
prefixCls: x,
|
|
248
248
|
overlayClassName: k,
|
|
249
249
|
ref: n,
|
|
250
|
-
open:
|
|
251
|
-
onOpenChange:
|
|
252
|
-
overlay: l || i ? /* @__PURE__ */ a.createElement(
|
|
253
|
-
prefixCls:
|
|
250
|
+
open: I,
|
|
251
|
+
onOpenChange: D,
|
|
252
|
+
overlay: l || i ? /* @__PURE__ */ a.createElement(ae, {
|
|
253
|
+
prefixCls: x,
|
|
254
254
|
title: l,
|
|
255
255
|
content: i
|
|
256
256
|
}) : null,
|
|
257
|
-
transitionName:
|
|
257
|
+
transitionName: Y(_, "zoom-big", g.transitionName),
|
|
258
258
|
"data-popover-inject": !0
|
|
259
|
-
}),
|
|
259
|
+
}), A(p, {
|
|
260
260
|
onKeyDown: (s) => {
|
|
261
|
-
var
|
|
262
|
-
/* @__PURE__ */ a.isValidElement(p) && ((
|
|
261
|
+
var C, h;
|
|
262
|
+
/* @__PURE__ */ a.isValidElement(p) && ((h = p == null ? void 0 : (C = p.props).onKeyDown) === null || h === void 0 || h.call(C, s)), W(s);
|
|
263
263
|
}
|
|
264
264
|
})));
|
|
265
|
-
}),
|
|
266
|
-
|
|
265
|
+
}), E = le;
|
|
266
|
+
E._InternalPanelDoNotUseOrYouWillBeFired = oe;
|
|
267
|
+
process.env.NODE_ENV !== "production" && (E.displayName = "Popover");
|
|
267
268
|
export {
|
|
268
|
-
|
|
269
|
+
E as P
|
|
269
270
|
};
|