@notificationapi/react 0.0.17 → 0.0.18
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/Inbox.js +1292 -1273
- package/dist/assets/Notification.js +1 -1
- package/dist/assets/NotificationPreferencesPopup.js +1562 -0
- package/dist/assets/Preferences.js +739 -684
- package/dist/assets/button.js +1 -1
- package/dist/assets/colors.js +25 -25
- package/dist/assets/index.js +1 -1
- package/dist/assets/index2.js +32 -32
- package/dist/assets/index3.js +268 -268
- package/dist/components/Notifications/Inbox.d.ts +2 -3
- package/dist/components/Notifications/InboxHeader.d.ts +2 -1
- package/dist/components/Notifications/InboxHeader.js +17 -18
- package/dist/components/Notifications/NotificationFeed.d.ts +2 -3
- package/dist/components/Notifications/NotificationFeed.js +46 -29
- package/dist/components/Notifications/NotificationLauncher.js +96 -79
- package/dist/components/Notifications/NotificationPopup.d.ts +2 -3
- package/dist/components/Notifications/NotificationPopup.js +6 -4
- package/dist/components/Preferences/NotificationPreferencesPopup.js +4 -1500
- package/dist/components/Preferences/PreferenceInput.js +1 -1
- package/dist/components/Preferences/Preferences.js +4 -5
- package/dist/components/Preferences/index.js +1 -1
- package/dist/main.js +5 -5
- package/package.json +1 -1
- package/dist/assets/BellOutlined.js +0 -60
- package/dist/assets/PurePanel.js +0 -67
package/dist/assets/button.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as j from "react";
|
|
2
2
|
import a, { forwardRef as Co, useContext as _, useMemo as Fo, useState as mo, Children as Vo, useEffect as po, createRef as qo } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { C as yo, e as Xo, f as vo, c as O, a as Uo, h as Jo, d as Ko, m as L, j as M, g as Qo, u as I, k as Yo, l as Zo, D as ko, n as oe } from "./colors.js";
|
|
4
4
|
import { e as ee, f as te, h as ne, j as re, o as ie, W as le } from "./index3.js";
|
|
5
5
|
var ae = function(o, e) {
|
|
6
6
|
var t = {};
|
package/dist/assets/colors.js
CHANGED
|
@@ -21013,12 +21013,12 @@ function gN(l) {
|
|
|
21013
21013
|
}
|
|
21014
21014
|
export {
|
|
21015
21015
|
KA as $,
|
|
21016
|
-
|
|
21017
|
-
|
|
21018
|
-
|
|
21016
|
+
iN as A,
|
|
21017
|
+
$M as B,
|
|
21018
|
+
Nm as C,
|
|
21019
21019
|
dS as D,
|
|
21020
|
-
|
|
21021
|
-
|
|
21020
|
+
sN as E,
|
|
21021
|
+
tf as F,
|
|
21022
21022
|
hN as G,
|
|
21023
21023
|
vN as H,
|
|
21024
21024
|
Mm as I,
|
|
@@ -21040,7 +21040,7 @@ export {
|
|
|
21040
21040
|
Vo as Y,
|
|
21041
21041
|
DD as Z,
|
|
21042
21042
|
gm as _,
|
|
21043
|
-
|
|
21043
|
+
yN as a,
|
|
21044
21044
|
OD as a0,
|
|
21045
21045
|
Ep as a1,
|
|
21046
21046
|
bC as a2,
|
|
@@ -21096,29 +21096,29 @@ export {
|
|
|
21096
21096
|
rC as ax,
|
|
21097
21097
|
HO as ay,
|
|
21098
21098
|
zC as az,
|
|
21099
|
-
|
|
21099
|
+
pN as b,
|
|
21100
21100
|
SO as c,
|
|
21101
|
-
|
|
21102
|
-
|
|
21103
|
-
|
|
21101
|
+
kA as d,
|
|
21102
|
+
xp as e,
|
|
21103
|
+
Dm as f,
|
|
21104
21104
|
dN as g,
|
|
21105
|
-
|
|
21105
|
+
mN as h,
|
|
21106
21106
|
gN as i,
|
|
21107
|
-
|
|
21108
|
-
|
|
21109
|
-
|
|
21107
|
+
AM as j,
|
|
21108
|
+
cN as k,
|
|
21109
|
+
fN as l,
|
|
21110
21110
|
ex as m,
|
|
21111
|
-
|
|
21112
|
-
|
|
21113
|
-
|
|
21114
|
-
|
|
21111
|
+
jO as n,
|
|
21112
|
+
qi as o,
|
|
21113
|
+
mm as p,
|
|
21114
|
+
GA as q,
|
|
21115
21115
|
uN as r,
|
|
21116
|
-
|
|
21117
|
-
|
|
21116
|
+
Ze as s,
|
|
21117
|
+
bn as t,
|
|
21118
21118
|
tS as u,
|
|
21119
|
-
|
|
21120
|
-
|
|
21121
|
-
|
|
21122
|
-
|
|
21123
|
-
|
|
21119
|
+
Et as v,
|
|
21120
|
+
ES as w,
|
|
21121
|
+
$O as x,
|
|
21122
|
+
Wo as y,
|
|
21123
|
+
JM as z
|
|
21124
21124
|
};
|
package/dist/assets/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as a from "react";
|
|
2
|
-
import { g as z, m as M, r as R, P as V,
|
|
2
|
+
import { g as z, m as M, r as R, P as V, C as S, c as P, a as A } from "./colors.js";
|
|
3
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
4
|
const b = (e) => e ? typeof e == "function" ? e() : e : null, q = (e) => {
|
|
5
5
|
const {
|
package/dist/assets/index2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as l from "react";
|
|
2
2
|
import { useMemo as et, useRef as X } from "react";
|
|
3
|
-
import { g as nt, K as z,
|
|
3
|
+
import { g as nt, K as z, b as rt, r as it, u as j, m as Ot, C as K, i as st, c as w, a as at, d as xt } from "./colors.js";
|
|
4
4
|
const wt = new z("antStatusProcessing", {
|
|
5
5
|
"0%": {
|
|
6
6
|
transform: "scale(0.8)",
|
|
@@ -65,8 +65,8 @@ const wt = new z("antStatusProcessing", {
|
|
|
65
65
|
indicatorHeight: s,
|
|
66
66
|
indicatorHeightSM: c,
|
|
67
67
|
marginXS: f,
|
|
68
|
-
calc:
|
|
69
|
-
} = t, u = `${n}-scroll-number`,
|
|
68
|
+
calc: C
|
|
69
|
+
} = t, u = `${n}-scroll-number`, v = rt(t, (b, $) => {
|
|
70
70
|
let {
|
|
71
71
|
darkColor: S
|
|
72
72
|
} = $;
|
|
@@ -101,7 +101,7 @@ const wt = new z("antStatusProcessing", {
|
|
|
101
101
|
whiteSpace: "nowrap",
|
|
102
102
|
textAlign: "center",
|
|
103
103
|
background: t.badgeColor,
|
|
104
|
-
borderRadius:
|
|
104
|
+
borderRadius: C(s).div(2).equal(),
|
|
105
105
|
boxShadow: `0 0 0 ${j(o)} ${t.badgeShadowColor}`,
|
|
106
106
|
transition: `background ${t.motionDurationMid}`,
|
|
107
107
|
a: {
|
|
@@ -119,7 +119,7 @@ const wt = new z("antStatusProcessing", {
|
|
|
119
119
|
height: c,
|
|
120
120
|
fontSize: h,
|
|
121
121
|
lineHeight: j(c),
|
|
122
|
-
borderRadius:
|
|
122
|
+
borderRadius: C(c).div(2).equal()
|
|
123
123
|
},
|
|
124
124
|
[`${e}-multiple-words`]: {
|
|
125
125
|
padding: `0 ${j(t.paddingXS)}`,
|
|
@@ -204,7 +204,7 @@ const wt = new z("antStatusProcessing", {
|
|
|
204
204
|
fontSize: t.fontSize
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
}),
|
|
207
|
+
}), v), {
|
|
208
208
|
[`${e}-zoom-appear, ${e}-zoom-enter`]: {
|
|
209
209
|
animationName: jt,
|
|
210
210
|
animationDuration: t.motionDurationSlow,
|
|
@@ -396,14 +396,14 @@ const wt = new z("antStatusProcessing", {
|
|
|
396
396
|
} = t, {
|
|
397
397
|
getPrefixCls: g,
|
|
398
398
|
direction: m
|
|
399
|
-
} = l.useContext(K), s = g("ribbon", i), c = `${s}-wrapper`, [f,
|
|
399
|
+
} = l.useContext(K), s = g("ribbon", i), c = `${s}-wrapper`, [f, C, u] = Dt(s, c), v = st(o, !1), b = w(s, `${s}-placement-${h}`, {
|
|
400
400
|
[`${s}-rtl`]: m === "rtl",
|
|
401
|
-
[`${s}-color-${o}`]:
|
|
401
|
+
[`${s}-color-${o}`]: v
|
|
402
402
|
}, e), $ = {}, S = {};
|
|
403
|
-
return o && !
|
|
404
|
-
className: w(c, y,
|
|
403
|
+
return o && !v && ($.background = o, S.color = o), f(/* @__PURE__ */ l.createElement("div", {
|
|
404
|
+
className: w(c, y, C, u)
|
|
405
405
|
}, d, /* @__PURE__ */ l.createElement("div", {
|
|
406
|
-
className: w(b,
|
|
406
|
+
className: w(b, C),
|
|
407
407
|
style: Object.assign(Object.assign({}, $), n)
|
|
408
408
|
}, /* @__PURE__ */ l.createElement("span", {
|
|
409
409
|
className: `${s}-text`
|
|
@@ -463,11 +463,11 @@ function Ft(t) {
|
|
|
463
463
|
};
|
|
464
464
|
else {
|
|
465
465
|
s = [];
|
|
466
|
-
const f = o + 10,
|
|
466
|
+
const f = o + 10, C = [];
|
|
467
467
|
for (let b = o; b <= f; b += 1)
|
|
468
|
-
|
|
469
|
-
const u =
|
|
470
|
-
s =
|
|
468
|
+
C.push(b);
|
|
469
|
+
const u = C.findIndex((b) => b % 10 === a);
|
|
470
|
+
s = C.map((b, $) => {
|
|
471
471
|
const S = b % 10;
|
|
472
472
|
return /* @__PURE__ */ l.createElement(ot, Object.assign({}, t, {
|
|
473
473
|
key: b,
|
|
@@ -476,9 +476,9 @@ function Ft(t) {
|
|
|
476
476
|
current: $ === u
|
|
477
477
|
}));
|
|
478
478
|
});
|
|
479
|
-
const
|
|
479
|
+
const v = y < d ? 1 : -1;
|
|
480
480
|
c = {
|
|
481
|
-
transform: `translateY(${-Wt(a, o,
|
|
481
|
+
transform: `translateY(${-Wt(a, o, v)}00%)`
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
484
|
return /* @__PURE__ */ l.createElement("span", {
|
|
@@ -509,7 +509,7 @@ const _t = /* @__PURE__ */ l.forwardRef((t, e) => {
|
|
|
509
509
|
children: m
|
|
510
510
|
} = t, s = Ht(t, ["prefixCls", "count", "className", "motionClassName", "style", "title", "show", "component", "children"]), {
|
|
511
511
|
getPrefixCls: c
|
|
512
|
-
} = l.useContext(K), f = c("scroll-number", i),
|
|
512
|
+
} = l.useContext(K), f = c("scroll-number", i), C = Object.assign(Object.assign({}, s), {
|
|
513
513
|
"data-show": y,
|
|
514
514
|
style: a,
|
|
515
515
|
className: w(f, o, d),
|
|
@@ -517,20 +517,20 @@ const _t = /* @__PURE__ */ l.forwardRef((t, e) => {
|
|
|
517
517
|
});
|
|
518
518
|
let u = n;
|
|
519
519
|
if (n && Number(n) % 1 === 0) {
|
|
520
|
-
const
|
|
521
|
-
u = /* @__PURE__ */ l.createElement("bdi", null,
|
|
520
|
+
const v = String(n).split("");
|
|
521
|
+
u = /* @__PURE__ */ l.createElement("bdi", null, v.map((b, $) => /* @__PURE__ */ l.createElement(Ft, {
|
|
522
522
|
prefixCls: f,
|
|
523
523
|
count: Number(n),
|
|
524
524
|
value: b,
|
|
525
525
|
// eslint-disable-next-line react/no-array-index-key
|
|
526
|
-
key:
|
|
526
|
+
key: v.length - $
|
|
527
527
|
})));
|
|
528
528
|
}
|
|
529
|
-
return a && a.borderColor && (
|
|
529
|
+
return a && a.borderColor && (C.style = Object.assign(Object.assign({}, a), {
|
|
530
530
|
boxShadow: `0 0 0 1px ${a.borderColor} inset`
|
|
531
|
-
})), m ? at(m, (
|
|
532
|
-
className: w(`${f}-custom-component`,
|
|
533
|
-
})) : /* @__PURE__ */ l.createElement(g, Object.assign({},
|
|
531
|
+
})), m ? at(m, (v) => ({
|
|
532
|
+
className: w(`${f}-custom-component`, v == null ? void 0 : v.className, d)
|
|
533
|
+
})) : /* @__PURE__ */ l.createElement(g, Object.assign({}, C, {
|
|
534
534
|
ref: e
|
|
535
535
|
}), u);
|
|
536
536
|
});
|
|
@@ -553,9 +553,9 @@ const Mt = /* @__PURE__ */ l.forwardRef((t, e) => {
|
|
|
553
553
|
text: s,
|
|
554
554
|
color: c,
|
|
555
555
|
count: f = null,
|
|
556
|
-
overflowCount:
|
|
556
|
+
overflowCount: C = 99,
|
|
557
557
|
dot: u = !1,
|
|
558
|
-
size:
|
|
558
|
+
size: v = "default",
|
|
559
559
|
title: b,
|
|
560
560
|
offset: $,
|
|
561
561
|
style: S,
|
|
@@ -568,7 +568,7 @@ const Mt = /* @__PURE__ */ l.forwardRef((t, e) => {
|
|
|
568
568
|
getPrefixCls: Y,
|
|
569
569
|
direction: H,
|
|
570
570
|
badge: r
|
|
571
|
-
} = l.useContext(K), p = Y("badge", h), [k, gt, ft] = Tt(p), _ = f >
|
|
571
|
+
} = l.useContext(K), p = Y("badge", h), [k, gt, ft] = Tt(p), _ = f > C ? `${C}+` : f, T = _ === "0" || _ === 0, pt = f === null || T && !F, Z = (m != null || c != null) && pt, B = u && !T, E = B ? "" : _, P = et(() => (E == null || E === "" || T && !F) && !B, [E, T, F, B]), G = X(f);
|
|
572
572
|
P || (G.current = f);
|
|
573
573
|
const I = G.current, J = X(E);
|
|
574
574
|
P || (J.current = E);
|
|
@@ -581,7 +581,7 @@ const Mt = /* @__PURE__ */ l.forwardRef((t, e) => {
|
|
|
581
581
|
marginTop: $[1]
|
|
582
582
|
};
|
|
583
583
|
return H === "rtl" ? O.left = parseInt($[0], 10) : O.right = -parseInt($[0], 10), Object.assign(Object.assign(Object.assign({}, O), r == null ? void 0 : r.style), S);
|
|
584
|
-
}, [H, $, S, r == null ? void 0 : r.style]),
|
|
584
|
+
}, [H, $, S, r == null ? void 0 : r.style]), Ct = b ?? (typeof I == "string" || typeof I == "number" ? I : void 0), vt = P || !s ? null : /* @__PURE__ */ l.createElement("span", {
|
|
585
585
|
className: `${p}-status-text`
|
|
586
586
|
}, s), $t = !I || typeof I != "object" ? void 0 : at(I, (O) => ({
|
|
587
587
|
style: Object.assign(Object.assign({}, R), O.style)
|
|
@@ -629,7 +629,7 @@ const Mt = /* @__PURE__ */ l.forwardRef((t, e) => {
|
|
|
629
629
|
const St = Y("scroll-number", y), L = Q.current, Nt = w(x == null ? void 0 : x.indicator, (A = r == null ? void 0 : r.classNames) === null || A === void 0 ? void 0 : A.indicator, {
|
|
630
630
|
[`${p}-dot`]: L,
|
|
631
631
|
[`${p}-count`]: !L,
|
|
632
|
-
[`${p}-count-sm`]:
|
|
632
|
+
[`${p}-count-sm`]: v === "small",
|
|
633
633
|
[`${p}-multiple-words`]: !L && M && M.toString().length > 1,
|
|
634
634
|
[`${p}-status-${m}`]: !!m,
|
|
635
635
|
[`${p}-color-${c}`]: D
|
|
@@ -641,11 +641,11 @@ const Mt = /* @__PURE__ */ l.forwardRef((t, e) => {
|
|
|
641
641
|
motionClassName: ht,
|
|
642
642
|
className: Nt,
|
|
643
643
|
count: M,
|
|
644
|
-
title:
|
|
644
|
+
title: Ct,
|
|
645
645
|
style: W,
|
|
646
646
|
key: "scrollNumber"
|
|
647
647
|
}, $t);
|
|
648
|
-
}),
|
|
648
|
+
}), vt));
|
|
649
649
|
}), ut = Mt;
|
|
650
650
|
ut.Ribbon = dt;
|
|
651
651
|
process.env.NODE_ENV !== "production" && (ut.displayName = "Badge");
|