@notificationapi/react 0.0.33 → 0.0.35

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 (30) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/AntdIcon.js +1 -1
  3. package/dist/assets/CloseOutlined.js +13 -0
  4. package/dist/assets/Notification.js +17 -16
  5. package/dist/assets/PreferenceInput.js +1470 -0
  6. package/dist/assets/PurePanel.js +32 -42
  7. package/dist/assets/WebPushOptInMessage.js +478 -0
  8. package/dist/assets/button.js +50 -50
  9. package/dist/assets/colors.js +25 -20840
  10. package/dist/assets/compact-item.js +860 -0
  11. package/dist/assets/index.js +11 -9
  12. package/dist/assets/index2.js +10 -9
  13. package/dist/assets/index3.js +2303 -3150
  14. package/dist/assets/presets.js +22 -22
  15. package/dist/assets/reactNode.js +20821 -0
  16. package/dist/components/Notifications/Inbox.js +81 -78
  17. package/dist/components/Notifications/NotificationFeed.js +59 -31
  18. package/dist/components/Notifications/NotificationLauncher.js +61 -41
  19. package/dist/components/Notifications/NotificationPopup.js +72 -65
  20. package/dist/components/Preferences/NotificationPreferencesInline.d.ts +1 -1
  21. package/dist/components/Preferences/NotificationPreferencesInline.js +39 -5
  22. package/dist/components/Preferences/NotificationPreferencesPopup.d.ts +1 -1
  23. package/dist/components/Preferences/NotificationPreferencesPopup.js +463 -464
  24. package/dist/components/Preferences/PreferenceInput.js +5 -1466
  25. package/dist/components/Preferences/Preferences.js +24 -23
  26. package/dist/components/Provider/index.d.ts +9 -1
  27. package/dist/components/Provider/index.js +214 -156
  28. package/dist/components/WebPush/WebPushOptInMessage.d.ts +14 -0
  29. package/dist/components/WebPush/WebPushOptInMessage.js +8 -0
  30. package/package.json +2 -2
@@ -1,7 +1,9 @@
1
1
  import * as a from "react";
2
2
  import { c as P } from "./presets.js";
3
- import { i as V, g as A, a as H, b as L, P as K, u as F, c as G, d as U, K as X } from "./index3.js";
4
- import { g as Y, m as Z, r as q, P as J, a as N, c as Q } from "./colors.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";
5
7
  const x = (e) => e ? typeof e == "function" ? e() : e : null, ee = (e) => {
6
8
  const {
7
9
  componentCls: o,
@@ -73,7 +75,7 @@ const x = (e) => e ? typeof e == "function" ? e() : e : null, ee = (e) => {
73
75
  })
74
76
  },
75
77
  // Arrow Style
76
- A(e, "var(--antd-arrow-background-color)"),
78
+ H(e, "var(--antd-arrow-background-color)"),
77
79
  // Pure Render
78
80
  {
79
81
  [`${o}-pure`]: {
@@ -92,7 +94,7 @@ const x = (e) => e ? typeof e == "function" ? e() : e : null, ee = (e) => {
92
94
  componentCls: o
93
95
  } = e;
94
96
  return {
95
- [o]: J.map((n) => {
97
+ [o]: Q.map((n) => {
96
98
  const t = e[`${n}6`];
97
99
  return {
98
100
  [`&${o}-${n}`]: {
@@ -124,7 +126,7 @@ const x = (e) => e ? typeof e == "function" ? e() : e : null, ee = (e) => {
124
126
  return Object.assign(Object.assign(Object.assign({
125
127
  titleMinWidth: 177,
126
128
  zIndexPopup: c + 30
127
- }, H(e)), L({
129
+ }, L(e)), K({
128
130
  contentRadius: d,
129
131
  limitVerticalRadius: !0
130
132
  })), {
@@ -143,7 +145,7 @@ const x = (e) => e ? typeof e == "function" ? e() : e : null, ee = (e) => {
143
145
  popoverBg: o,
144
146
  popoverColor: n
145
147
  });
146
- return [ee(t), te(t), V(t, "zoom-big")];
148
+ return [ee(t), te(t), A(t, "zoom-big")];
147
149
  }, oe, {
148
150
  resetStyle: !1,
149
151
  deprecatedTokens: [["width", "titleMinWidth"], ["minWidth", "titleMinWidth"]]
@@ -182,7 +184,7 @@ const B = (e) => {
182
184
  style: r
183
185
  }, /* @__PURE__ */ a.createElement("div", {
184
186
  className: `${n}-arrow`
185
- }), /* @__PURE__ */ a.createElement(K, Object.assign({}, e, {
187
+ }), /* @__PURE__ */ a.createElement(F, Object.assign({}, e, {
186
188
  className: o,
187
189
  prefixCls: n
188
190
  }), p || /* @__PURE__ */ a.createElement(B, {
@@ -226,7 +228,7 @@ const ie = /* @__PURE__ */ a.forwardRef((e, o) => {
226
228
  overlayStyle: y = {}
227
229
  } = e, f = le(e, ["prefixCls", "title", "content", "overlayClassName", "placement", "trigger", "children", "mouseEnterDelay", "mouseLeaveDelay", "onOpenChange", "overlayStyle"]), {
228
230
  getPrefixCls: O
229
- } = a.useContext(N), b = O("popover", r), [_, k, I] = E(b), T = O(), W = P(d, k, I), [D, z] = F(!1, {
231
+ } = a.useContext(N), b = O("popover", r), [_, k, I] = E(b), T = O(), W = P(d, k, I), [D, z] = V(!1, {
230
232
  value: (n = e.open) !== null && n !== void 0 ? n : e.visible,
231
233
  defaultValue: (t = e.defaultOpen) !== null && t !== void 0 ? t : e.defaultVisible
232
234
  }), w = (s, C) => {
@@ -255,7 +257,7 @@ const ie = /* @__PURE__ */ a.forwardRef((e, o) => {
255
257
  }) : null,
256
258
  transitionName: U(T, "zoom-big", f.transitionName),
257
259
  "data-popover-inject": !0
258
- }), Q(i, {
260
+ }), J(i, {
259
261
  onKeyDown: (s) => {
260
262
  var C, h;
261
263
  /* @__PURE__ */ a.isValidElement(i) && ((h = i == null ? void 0 : (C = i.props).onKeyDown) === null || h === void 0 || h.call(C, s)), M(s);
@@ -1,7 +1,8 @@
1
1
  import * as l from "react";
2
2
  import { useMemo as et, useRef as X } from "react";
3
3
  import { c as x } from "./presets.js";
4
- import { g as nt, K as z, b as rt, r as it, u as E, m as Ot, a as K, i as st, c as at, d as xt } from "./colors.js";
4
+ import { g as nt, r as rt, u as E, m as Ot, a as K, c as it, e as xt } from "./reactNode.js";
5
+ import { K as z, g as st, i as at } from "./colors.js";
5
6
  const wt = new z("antStatusProcessing", {
6
7
  "0%": {
7
8
  transform: "scale(0.8)",
@@ -66,7 +67,7 @@ const wt = new z("antStatusProcessing", {
66
67
  indicatorHeightSM: a,
67
68
  marginXS: m,
68
69
  calc: b
69
- } = t, u = `${n}-scroll-number`, S = rt(t, ($, g) => {
70
+ } = t, u = `${n}-scroll-number`, S = st(t, ($, g) => {
70
71
  let {
71
72
  darkColor: f
72
73
  } = g;
@@ -83,7 +84,7 @@ const wt = new z("antStatusProcessing", {
83
84
  };
84
85
  });
85
86
  return {
86
- [e]: Object.assign(Object.assign(Object.assign(Object.assign({}, it(t)), {
87
+ [e]: Object.assign(Object.assign(Object.assign(Object.assign({}, rt(t)), {
87
88
  position: "relative",
88
89
  display: "inline-block",
89
90
  width: "fit-content",
@@ -316,7 +317,7 @@ const wt = new z("antStatusProcessing", {
316
317
  marginXS: n,
317
318
  badgeRibbonOffset: o,
318
319
  calc: d
319
- } = t, s = `${e}-ribbon`, y = `${e}-ribbon-wrapper`, v = rt(t, (C, c) => {
320
+ } = t, s = `${e}-ribbon`, y = `${e}-ribbon-wrapper`, v = st(t, (C, c) => {
320
321
  let {
321
322
  darkColor: a
322
323
  } = c;
@@ -331,7 +332,7 @@ const wt = new z("antStatusProcessing", {
331
332
  [y]: {
332
333
  position: "relative"
333
334
  },
334
- [s]: Object.assign(Object.assign(Object.assign(Object.assign({}, it(t)), {
335
+ [s]: Object.assign(Object.assign(Object.assign(Object.assign({}, rt(t)), {
335
336
  position: "absolute",
336
337
  top: n,
337
338
  padding: `0 ${E(t.paddingXS)}`,
@@ -395,7 +396,7 @@ const wt = new z("antStatusProcessing", {
395
396
  } = t, {
396
397
  getPrefixCls: C,
397
398
  direction: c
398
- } = l.useContext(K), a = C("ribbon", i), m = `${a}-wrapper`, [b, u, S] = Dt(a, m), $ = st(o, !1), g = x(a, `${a}-placement-${y}`, {
399
+ } = l.useContext(K), a = C("ribbon", i), m = `${a}-wrapper`, [b, u, S] = Dt(a, m), $ = at(o, !1), g = x(a, `${a}-placement-${y}`, {
399
400
  [`${a}-rtl`]: c === "rtl",
400
401
  [`${a}-color-${o}`]: $
401
402
  }, e), f = {}, w = {};
@@ -522,7 +523,7 @@ const _t = /* @__PURE__ */ l.forwardRef((t, e) => {
522
523
  }
523
524
  return s != null && s.borderColor && (u.style = Object.assign(Object.assign({}, s), {
524
525
  boxShadow: `0 0 0 1px ${s.borderColor} inset`
525
- })), c ? at(c, ($) => ({
526
+ })), c ? it(c, ($) => ({
526
527
  className: x(`${b}-custom-component`, $ == null ? void 0 : $.className, d)
527
528
  })) : /* @__PURE__ */ l.createElement(C, Object.assign({}, u, {
528
529
  ref: e
@@ -575,9 +576,9 @@ const Zt = /* @__PURE__ */ l.forwardRef((t, e) => {
575
576
  return H === "rtl" ? N.left = parseInt(f[0], 10) : N.right = -parseInt(f[0], 10), Object.assign(Object.assign(Object.assign({}, N), r == null ? void 0 : r.style), w);
576
577
  }, [H, f, w, r == null ? void 0 : r.style]), vt = g ?? (typeof I == "string" || typeof I == "number" ? I : void 0), Ct = P || !a ? null : /* @__PURE__ */ l.createElement("span", {
577
578
  className: `${p}-status-text`
578
- }, a), $t = !I || typeof I != "object" ? void 0 : at(I, (N) => ({
579
+ }, a), $t = !I || typeof I != "object" ? void 0 : it(I, (N) => ({
579
580
  style: Object.assign(Object.assign({}, R), N.style)
580
- })), D = st(m, !1), yt = x(O == null ? void 0 : O.indicator, (i = r == null ? void 0 : r.classNames) === null || i === void 0 ? void 0 : i.indicator, {
581
+ })), D = at(m, !1), yt = x(O == null ? void 0 : O.indicator, (i = r == null ? void 0 : r.classNames) === null || i === void 0 ? void 0 : i.indicator, {
581
582
  [`${p}-status-dot`]: M,
582
583
  [`${p}-status-${c}`]: !!c,
583
584
  [`${p}-color-${m}`]: D