@notificationapi/react 1.7.0 → 1.9.0
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 +60 -64
- package/dist/assets/Box.js +26 -24
- package/dist/assets/Button.js +22 -19
- package/dist/assets/ButtonBase.js +193 -185
- package/dist/assets/DefaultPropsProvider.js +416 -4199
- package/dist/assets/DefaultPropsProvider2.js +992 -0
- package/dist/assets/Divider.js +22 -18
- package/dist/assets/GlobalStyles.js +23 -0
- package/dist/assets/Grow.js +1513 -120
- package/dist/assets/IconButton.js +8 -7
- package/dist/assets/List.js +12 -11
- package/dist/assets/Modal.js +18 -17
- package/dist/assets/Notification.js +787 -770
- package/dist/assets/Paper.js +8 -8
- package/dist/assets/Popover.js +37 -36
- package/dist/assets/Portal.js +39 -49
- package/dist/assets/Stack.js +32 -30
- package/dist/assets/Typography.js +84 -97
- package/dist/assets/createSvgIcon.js +25 -24
- package/dist/assets/createTheme.js +2828 -0
- package/dist/assets/exactProp.js +13 -0
- package/dist/assets/index.js +19 -148
- package/dist/assets/index2.js +151 -0
- package/dist/assets/useControlled.js +49 -0
- package/dist/assets/usePreviousProps.js +10 -0
- package/dist/assets/useTheme.js +6 -7
- package/dist/assets/{useTheme2.js → useThemeWithoutDefault.js} +63 -67
- package/dist/assets/utils.js +4 -4
- package/dist/components/Notifications/Inbox.js +593 -583
- package/dist/components/Notifications/InboxHeader.js +360 -1754
- package/dist/components/Notifications/Notification.js +4 -2
- package/dist/components/Notifications/NotificationFeed.js +40 -32
- package/dist/components/Notifications/NotificationLauncher.js +90 -64
- package/dist/components/Notifications/NotificationPopup.js +76 -65
- package/dist/components/Preferences/NotificationPreferencesInline.js +57 -39
- package/dist/components/Preferences/NotificationPreferencesPopup.js +111 -99
- package/dist/components/Preferences/PreferenceInput.js +427 -414
- package/dist/components/Preferences/Preferences.js +329 -278
- package/dist/components/Provider/index.d.ts +2 -0
- package/dist/components/Provider/index.js +1008 -401
- package/dist/components/Slack/SlackConnect.js +4627 -2024
- package/dist/main.d.ts +2 -0
- package/dist/main.js +6 -3
- package/dist/utils/theme.d.ts +17 -0
- package/dist/utils/theme.js +104 -0
- package/package.json +1 -1
- package/dist/assets/dividerClasses.js +0 -56
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as c from "react";
|
|
2
|
-
import { g as z, e as
|
|
2
|
+
import { g as z, e as a, b as g, P as e } from "./createTheme.js";
|
|
3
|
+
import { g as R, s as I, m as f, u as O, c as C, a as h } from "./DefaultPropsProvider.js";
|
|
3
4
|
import { c as y } from "./createSimplePaletteValueFilter.js";
|
|
4
5
|
import { jsx as T } from "react/jsx-runtime";
|
|
5
6
|
import { B as S, c as $ } from "./ButtonBase.js";
|
|
6
7
|
function x(o) {
|
|
7
|
-
return
|
|
8
|
+
return z("MuiIconButton", o);
|
|
8
9
|
}
|
|
9
|
-
const w =
|
|
10
|
+
const w = R("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge"]), j = (o) => {
|
|
10
11
|
const {
|
|
11
12
|
classes: t,
|
|
12
13
|
disabled: r,
|
|
@@ -26,7 +27,7 @@ const w = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
26
27
|
} = o;
|
|
27
28
|
return [t.root, r.color !== "default" && t[`color${a(r.color)}`], r.edge && t[`edge${a(r.edge)}`], t[`size${a(r.size)}`]];
|
|
28
29
|
}
|
|
29
|
-
})(
|
|
30
|
+
})(f(({
|
|
30
31
|
theme: o
|
|
31
32
|
}) => ({
|
|
32
33
|
textAlign: "center",
|
|
@@ -41,7 +42,7 @@ const w = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
41
42
|
variants: [{
|
|
42
43
|
props: (t) => !t.disableRipple,
|
|
43
44
|
style: {
|
|
44
|
-
"--IconButton-hoverBg": o.vars ? `rgba(${o.vars.palette.action.activeChannel} / ${o.vars.palette.action.hoverOpacity})` :
|
|
45
|
+
"--IconButton-hoverBg": o.vars ? `rgba(${o.vars.palette.action.activeChannel} / ${o.vars.palette.action.hoverOpacity})` : g(o.palette.action.active, o.palette.action.hoverOpacity),
|
|
45
46
|
"&:hover": {
|
|
46
47
|
backgroundColor: "var(--IconButton-hoverBg)",
|
|
47
48
|
// Reset on touch devices, it doesn't add specificity
|
|
@@ -81,7 +82,7 @@ const w = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
81
82
|
marginRight: -3
|
|
82
83
|
}
|
|
83
84
|
}]
|
|
84
|
-
})),
|
|
85
|
+
})), f(({
|
|
85
86
|
theme: o
|
|
86
87
|
}) => ({
|
|
87
88
|
variants: [{
|
|
@@ -103,7 +104,7 @@ const w = z("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary"
|
|
|
103
104
|
color: t
|
|
104
105
|
},
|
|
105
106
|
style: {
|
|
106
|
-
"--IconButton-hoverBg": o.vars ? `rgba(${(o.vars || o).palette[t].mainChannel} / ${o.vars.palette.action.hoverOpacity})` :
|
|
107
|
+
"--IconButton-hoverBg": o.vars ? `rgba(${(o.vars || o).palette[t].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : g((o.vars || o).palette[t].main, o.palette.action.hoverOpacity)
|
|
107
108
|
}
|
|
108
109
|
})), {
|
|
109
110
|
props: {
|
package/dist/assets/List.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i from "react";
|
|
2
|
-
import { g as y,
|
|
2
|
+
import { g as y, P as s } from "./createTheme.js";
|
|
3
|
+
import { g as h, s as L, u as v, c as x, a as N } from "./DefaultPropsProvider.js";
|
|
3
4
|
import { jsx as C, jsxs as P } from "react/jsx-runtime";
|
|
4
|
-
function
|
|
5
|
+
function S(e, o) {
|
|
5
6
|
var t, n, a;
|
|
6
7
|
return /* @__PURE__ */ i.isValidElement(e) && o.indexOf(
|
|
7
8
|
// For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
@@ -10,15 +11,15 @@ function w(e, o) {
|
|
|
10
11
|
e.type.muiName ?? ((a = (n = (t = e.type) == null ? void 0 : t._payload) == null ? void 0 : n.value) == null ? void 0 : a.muiName)
|
|
11
12
|
) !== -1;
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
+
function U(e) {
|
|
14
15
|
return typeof e == "string";
|
|
15
16
|
}
|
|
16
17
|
const c = /* @__PURE__ */ i.createContext({});
|
|
17
18
|
process.env.NODE_ENV !== "production" && (c.displayName = "ListContext");
|
|
18
19
|
function T(e) {
|
|
19
|
-
return
|
|
20
|
+
return y("MuiList", e);
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
+
h("MuiList", ["root", "padding", "dense", "subheader"]);
|
|
22
23
|
const E = (e) => {
|
|
23
24
|
const {
|
|
24
25
|
classes: o,
|
|
@@ -70,8 +71,8 @@ const E = (e) => {
|
|
|
70
71
|
dense: r = !1,
|
|
71
72
|
disablePadding: u = !1,
|
|
72
73
|
subheader: m,
|
|
73
|
-
...
|
|
74
|
-
} = n,
|
|
74
|
+
...f
|
|
75
|
+
} = n, b = i.useMemo(() => ({
|
|
75
76
|
dense: r
|
|
76
77
|
}), [r]), p = {
|
|
77
78
|
...n,
|
|
@@ -80,13 +81,13 @@ const E = (e) => {
|
|
|
80
81
|
disablePadding: u
|
|
81
82
|
}, g = E(p);
|
|
82
83
|
return /* @__PURE__ */ C(c.Provider, {
|
|
83
|
-
value:
|
|
84
|
+
value: b,
|
|
84
85
|
children: /* @__PURE__ */ P(M, {
|
|
85
86
|
as: l,
|
|
86
87
|
className: x(g.root, d),
|
|
87
88
|
ref: t,
|
|
88
89
|
ownerState: p,
|
|
89
|
-
...
|
|
90
|
+
...f,
|
|
90
91
|
children: [m, a]
|
|
91
92
|
})
|
|
92
93
|
});
|
|
@@ -136,7 +137,7 @@ process.env.NODE_ENV !== "production" && (O.propTypes = {
|
|
|
136
137
|
});
|
|
137
138
|
export {
|
|
138
139
|
O as L,
|
|
139
|
-
|
|
140
|
+
S as a,
|
|
140
141
|
c as b,
|
|
141
|
-
|
|
142
|
+
U as i
|
|
142
143
|
};
|
package/dist/assets/Modal.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as f from "react";
|
|
2
|
-
import { P as e, g as le
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { P as e, g as le } from "./createTheme.js";
|
|
3
|
+
import { g as de, s as J, u as ue, c as X, a as fe, m as ke } from "./DefaultPropsProvider.js";
|
|
4
|
+
import { o as j, e as Q, g as pe, P as Pe, H as Ne } from "./Portal.js";
|
|
5
|
+
import { u as Y, e as Ce } from "./resolveComponentProps.js";
|
|
6
|
+
import { u as Se, a as H, d as oe } from "./ButtonBase.js";
|
|
6
7
|
import { c as re } from "./Stack.js";
|
|
7
8
|
import { jsx as A, jsxs as be } from "react/jsx-runtime";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
9
|
+
import { T as we, a as Ie, g as se } from "./utils.js";
|
|
10
|
+
import { e as Oe } from "./exactProp.js";
|
|
10
11
|
function _(t) {
|
|
11
12
|
return j(t).defaultView || window;
|
|
12
13
|
}
|
|
@@ -22,7 +23,7 @@ const Me = {
|
|
|
22
23
|
opacity: 1
|
|
23
24
|
}
|
|
24
25
|
}, me = /* @__PURE__ */ f.forwardRef(function(n, r) {
|
|
25
|
-
const o =
|
|
26
|
+
const o = Se(), i = {
|
|
26
27
|
enter: o.transitions.duration.enteringScreen,
|
|
27
28
|
exit: o.transitions.duration.leavingScreen
|
|
28
29
|
}, {
|
|
@@ -40,7 +41,7 @@ const Me = {
|
|
|
40
41
|
style: T,
|
|
41
42
|
timeout: k = i,
|
|
42
43
|
// eslint-disable-next-line react/prop-types
|
|
43
|
-
TransitionComponent: N =
|
|
44
|
+
TransitionComponent: N = we,
|
|
44
45
|
...l
|
|
45
46
|
} = n, m = f.useRef(null), C = Y(m, pe(c), r), x = (E) => (d) => {
|
|
46
47
|
if (E) {
|
|
@@ -48,7 +49,7 @@ const Me = {
|
|
|
48
49
|
d === void 0 ? E(u) : E(u, d);
|
|
49
50
|
}
|
|
50
51
|
}, R = x(v), S = x((E, d) => {
|
|
51
|
-
|
|
52
|
+
Ie(E);
|
|
52
53
|
const u = se({
|
|
53
54
|
style: T,
|
|
54
55
|
timeout: k,
|
|
@@ -174,9 +175,9 @@ process.env.NODE_ENV !== "production" && (me.propTypes = {
|
|
|
174
175
|
})])
|
|
175
176
|
});
|
|
176
177
|
function Ae(t) {
|
|
177
|
-
return
|
|
178
|
+
return le("MuiBackdrop", t);
|
|
178
179
|
}
|
|
179
|
-
|
|
180
|
+
de("MuiBackdrop", ["root", "invisible"]);
|
|
180
181
|
const De = (t) => {
|
|
181
182
|
const {
|
|
182
183
|
classes: n,
|
|
@@ -643,7 +644,7 @@ process.env.NODE_ENV !== "production" && ($.propTypes = {
|
|
|
643
644
|
*/
|
|
644
645
|
open: e.bool.isRequired
|
|
645
646
|
});
|
|
646
|
-
process.env.NODE_ENV !== "production" && ($.propTypes =
|
|
647
|
+
process.env.NODE_ENV !== "production" && ($.propTypes = Oe($.propTypes));
|
|
647
648
|
function Ye(t) {
|
|
648
649
|
return typeof t == "function" ? t() : t;
|
|
649
650
|
}
|
|
@@ -694,7 +695,7 @@ function Xe(t) {
|
|
|
694
695
|
};
|
|
695
696
|
return {
|
|
696
697
|
getRootProps: (d = {}) => {
|
|
697
|
-
const u =
|
|
698
|
+
const u = Ce(t);
|
|
698
699
|
delete u.onTransitionEnter, delete u.onTransitionExited;
|
|
699
700
|
const O = {
|
|
700
701
|
...u,
|
|
@@ -741,9 +742,9 @@ function Xe(t) {
|
|
|
741
742
|
};
|
|
742
743
|
}
|
|
743
744
|
function Je(t) {
|
|
744
|
-
return
|
|
745
|
+
return le("MuiModal", t);
|
|
745
746
|
}
|
|
746
|
-
|
|
747
|
+
de("MuiModal", ["root", "hidden", "backdrop"]);
|
|
747
748
|
const Qe = (t) => {
|
|
748
749
|
const {
|
|
749
750
|
open: n,
|
|
@@ -886,7 +887,7 @@ const Qe = (t) => {
|
|
|
886
887
|
className: X(s == null ? void 0 : s.className, M == null ? void 0 : M.backdrop),
|
|
887
888
|
ownerState: K
|
|
888
889
|
}), ve = Y(s == null ? void 0 : s.ref, ne.ref);
|
|
889
|
-
return !C && !F && (!ee || Z) ? null : /* @__PURE__ */ A(
|
|
890
|
+
return !C && !F && (!ee || Z) ? null : /* @__PURE__ */ A(Pe, {
|
|
890
891
|
ref: ge,
|
|
891
892
|
container: P,
|
|
892
893
|
disablePortal: k,
|
|
@@ -986,7 +987,7 @@ process.env.NODE_ENV !== "production" && (tt.propTypes = {
|
|
|
986
987
|
* By default, it uses the body of the top-level document object,
|
|
987
988
|
* so it's simply `document.body` most of the time.
|
|
988
989
|
*/
|
|
989
|
-
container: e.oneOfType([
|
|
990
|
+
container: e.oneOfType([Ne, e.func]),
|
|
990
991
|
/**
|
|
991
992
|
* If `true`, the modal will not automatically shift focus to itself when it opens, and
|
|
992
993
|
* replace it to the last focused element when it closes.
|