@notificationapi/react 0.0.9 → 0.0.11

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.
Files changed (33) hide show
  1. package/dist/assets/BellOutlined.js +18 -15
  2. package/dist/assets/Inbox.js +2376 -2270
  3. package/dist/assets/Notification.js +1967 -1342
  4. package/dist/assets/Preferences.js +828 -782
  5. package/dist/assets/PurePanel.js +24 -23
  6. package/dist/assets/button.js +275 -265
  7. package/dist/assets/colors.js +19298 -7652
  8. package/dist/assets/index.js +48 -47
  9. package/dist/assets/index2.js +94 -92
  10. package/dist/assets/index3.js +2990 -2647
  11. package/dist/components/Notifications/Inbox.d.ts +0 -1
  12. package/dist/components/Notifications/InboxHeader.d.ts +2 -3
  13. package/dist/components/Notifications/InboxHeader.js +14 -13
  14. package/dist/components/Notifications/Notification.d.ts +3 -3
  15. package/dist/components/Notifications/NotificationCounter.d.ts +1 -1
  16. package/dist/components/Notifications/NotificationFeed.d.ts +2 -2
  17. package/dist/components/Notifications/NotificationLauncher.d.ts +0 -1
  18. package/dist/components/Notifications/NotificationPopup.d.ts +2 -2
  19. package/dist/components/Notifications/UnreadBadge.d.ts +1 -1
  20. package/dist/components/Notifications/UnreadBadge.js +1 -1
  21. package/dist/components/Preferences/NotificationPreferencesInline.d.ts +2 -3
  22. package/dist/components/Preferences/NotificationPreferencesPopup.d.ts +3 -3
  23. package/dist/components/Preferences/NotificationPreferencesPopup.js +684 -647
  24. package/dist/components/Preferences/PreferenceInput.d.ts +10 -0
  25. package/dist/components/Preferences/{PreferenceGroup.js → PreferenceInput.js} +2 -3
  26. package/dist/components/Preferences/Preferences.d.ts +1 -2
  27. package/dist/components/Preferences/Preferences.js +4 -5
  28. package/dist/components/Provider/index.d.ts +4 -22
  29. package/dist/components/Provider/index.js +139 -117
  30. package/dist/interface.d.ts +19 -0
  31. package/dist/interface.js +1 -0
  32. package/package.json +1 -1
  33. package/dist/components/Preferences/PreferenceGroup.d.ts +0 -8
@@ -1,7 +1,7 @@
1
1
  import * as a from "react";
2
- import { g as z, m as D, r as M, P as R, a as $, c as P, b as V } from "./colors.js";
3
- import { i as A, g as H, a as K, b as L, P as F, u as G, c as U, d as X, K as Y } from "./index3.js";
4
- const C = (e) => e ? typeof e == "function" ? e() : e : null, Z = (e) => {
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({}, M(e)), {
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
- H(e, "var(--antd-arrow-background-color)"),
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
- }, q = (e) => {
87
+ }, J = (e) => {
88
88
  const {
89
89
  componentCls: n
90
90
  } = e;
91
91
  return {
92
- [n]: R.map((o) => {
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
- }, J = (e) => {
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)), L({
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
- }, S = z("Popover", (e) => {
135
+ }, $ = z("Popover", (e) => {
136
136
  const {
137
137
  colorBgElevated: n,
138
138
  colorText: o
139
- } = e, t = D(e, {
139
+ } = e, t = M(e, {
140
140
  popoverBg: n,
141
141
  popoverColor: o
142
142
  });
143
- return [Z(t), q(t), A(t, "zoom-big")];
144
- }, J, {
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 Q = function(e, n) {
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 ee = (e, n, o) => !n && !o ? null : /* @__PURE__ */ a.createElement(a.Fragment, null, n && /* @__PURE__ */ a.createElement("div", {
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
- }, C(n)), /* @__PURE__ */ a.createElement("div", {
159
+ }, b(n)), /* @__PURE__ */ a.createElement("div", {
160
160
  className: `${e}-inner-content`
161
- }, C(o))), te = (e) => {
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(F, Object.assign({}, e, {
177
+ }), /* @__PURE__ */ a.createElement(G, Object.assign({}, e, {
178
178
  className: n,
179
179
  prefixCls: o
180
- }), d || ee(o, i, c)));
181
- }, ne = (e) => {
180
+ }), d || te(o, i, c)));
181
+ }, oe = (e) => {
182
182
  const {
183
183
  prefixCls: n,
184
184
  className: o
185
- } = e, t = Q(e, ["prefixCls", "className"]), {
185
+ } = e, t = ee(e, ["prefixCls", "className"]), {
186
186
  getPrefixCls: r
187
- } = a.useContext($), l = r("popover", n), [i, c, d] = S(l);
188
- return i(/* @__PURE__ */ a.createElement(te, Object.assign({}, t, {
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 oe = function(e, n) {
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 re = (e) => {
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
- }, C(n)), /* @__PURE__ */ a.createElement("div", {
211
+ }, b(n)), /* @__PURE__ */ a.createElement("div", {
212
212
  className: `${t}-inner-content`
213
- }, C(o)));
214
- }, ae = /* @__PURE__ */ a.forwardRef((e, n) => {
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 = oe(e, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "children", "mouseEnterDelay", "mouseLeaveDelay", "onOpenChange", "overlayStyle"]), {
228
+ } = e, g = re(e, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "children", "mouseEnterDelay", "mouseLeaveDelay", "onOpenChange", "overlayStyle"]), {
229
229
  getPrefixCls: O
230
- } = a.useContext($), h = O("popover", r), [E, B, N] = S(h), j = O(), k = P(c, B, N), [_, I] = G(!1, {
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, b) => {
234
- I(s, !0), m == null || m(s, b);
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 E(/* @__PURE__ */ a.createElement(U, Object.assign({
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: h,
247
+ prefixCls: x,
248
248
  overlayClassName: k,
249
249
  ref: n,
250
- open: _,
251
- onOpenChange: W,
252
- overlay: l || i ? /* @__PURE__ */ a.createElement(re, {
253
- prefixCls: h,
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: X(j, "zoom-big", g.transitionName),
257
+ transitionName: Y(_, "zoom-big", g.transitionName),
258
258
  "data-popover-inject": !0
259
- }), V(p, {
259
+ }), A(p, {
260
260
  onKeyDown: (s) => {
261
- var b, x;
262
- /* @__PURE__ */ a.isValidElement(p) && ((x = p == null ? void 0 : (b = p.props).onKeyDown) === null || x === void 0 || x.call(b, s)), T(s);
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
- }), le = ae;
266
- le._InternalPanelDoNotUseOrYouWillBeFired = ne;
265
+ }), E = le;
266
+ E._InternalPanelDoNotUseOrYouWillBeFired = oe;
267
+ process.env.NODE_ENV !== "production" && (E.displayName = "Popover");
267
268
  export {
268
- le as P
269
+ E as P
269
270
  };