@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,31 +1,18 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { P as t,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
function T(o) {
|
|
10
|
-
const {
|
|
11
|
-
styles: r,
|
|
12
|
-
defaultTheme: e = {}
|
|
13
|
-
} = o;
|
|
14
|
-
return /* @__PURE__ */ p($, {
|
|
15
|
-
styles: typeof r == "function" ? (a) => r(k(a) ? e : a) : r
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
process.env.NODE_ENV !== "production" && (T.propTypes = {
|
|
19
|
-
defaultTheme: t.object,
|
|
20
|
-
styles: t.oneOfType([t.array, t.string, t.object, t.func])
|
|
21
|
-
});
|
|
1
|
+
import * as j from "react";
|
|
2
|
+
import { P as t, f as C, i as B, g as E, e as u } from "./createTheme.js";
|
|
3
|
+
import { d as w, g as N, s as W, m as M, u as D, c as R, a as _ } from "./DefaultPropsProvider.js";
|
|
4
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
5
|
+
import { T as $ } from "./DefaultPropsProvider2.js";
|
|
6
|
+
import { u as A } from "./useTheme.js";
|
|
7
|
+
import { G } from "./GlobalStyles.js";
|
|
8
|
+
import { c as V } from "./createSimplePaletteValueFilter.js";
|
|
22
9
|
function x({
|
|
23
|
-
styles:
|
|
24
|
-
themeId:
|
|
10
|
+
styles: r,
|
|
11
|
+
themeId: o,
|
|
25
12
|
defaultTheme: e = {}
|
|
26
13
|
}) {
|
|
27
|
-
const n = A(e), a = typeof
|
|
28
|
-
return /* @__PURE__ */
|
|
14
|
+
const n = A(e), a = typeof r == "function" ? r(o && n[o] || n) : r;
|
|
15
|
+
return /* @__PURE__ */ l(G, {
|
|
29
16
|
styles: a
|
|
30
17
|
});
|
|
31
18
|
}
|
|
@@ -47,47 +34,47 @@ process.env.NODE_ENV !== "production" && (x.propTypes = {
|
|
|
47
34
|
*/
|
|
48
35
|
themeId: t.string
|
|
49
36
|
});
|
|
50
|
-
const
|
|
37
|
+
const U = (r) => {
|
|
51
38
|
var n;
|
|
52
|
-
const
|
|
39
|
+
const o = {
|
|
53
40
|
systemProps: {},
|
|
54
41
|
otherProps: {}
|
|
55
|
-
}, e = ((n =
|
|
56
|
-
return Object.keys(
|
|
57
|
-
e[a] ?
|
|
58
|
-
}),
|
|
42
|
+
}, e = ((n = r == null ? void 0 : r.theme) == null ? void 0 : n.unstable_sxConfig) ?? C;
|
|
43
|
+
return Object.keys(r).forEach((a) => {
|
|
44
|
+
e[a] ? o.systemProps[a] = r[a] : o.otherProps[a] = r[a];
|
|
45
|
+
}), o;
|
|
59
46
|
};
|
|
60
|
-
function
|
|
47
|
+
function H(r) {
|
|
61
48
|
const {
|
|
62
|
-
sx:
|
|
49
|
+
sx: o,
|
|
63
50
|
...e
|
|
64
|
-
} =
|
|
51
|
+
} = r, {
|
|
65
52
|
systemProps: n,
|
|
66
53
|
otherProps: a
|
|
67
|
-
} =
|
|
54
|
+
} = U(e);
|
|
68
55
|
let s;
|
|
69
|
-
return Array.isArray(
|
|
70
|
-
const i =
|
|
71
|
-
return
|
|
56
|
+
return Array.isArray(o) ? s = [n, ...o] : typeof o == "function" ? s = (...p) => {
|
|
57
|
+
const i = o(...p);
|
|
58
|
+
return B(i) ? {
|
|
72
59
|
...n,
|
|
73
60
|
...i
|
|
74
61
|
} : n;
|
|
75
62
|
} : s = {
|
|
76
63
|
...n,
|
|
77
|
-
...
|
|
64
|
+
...o
|
|
78
65
|
}, {
|
|
79
66
|
...a,
|
|
80
67
|
sx: s
|
|
81
68
|
};
|
|
82
69
|
}
|
|
83
|
-
function
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
...
|
|
86
|
-
defaultTheme:
|
|
87
|
-
themeId:
|
|
70
|
+
function T(r) {
|
|
71
|
+
return /* @__PURE__ */ l(x, {
|
|
72
|
+
...r,
|
|
73
|
+
defaultTheme: w,
|
|
74
|
+
themeId: $
|
|
88
75
|
});
|
|
89
76
|
}
|
|
90
|
-
process.env.NODE_ENV !== "production" && (
|
|
77
|
+
process.env.NODE_ENV !== "production" && (T.propTypes = {
|
|
91
78
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
92
79
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
93
80
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -97,27 +84,27 @@ process.env.NODE_ENV !== "production" && (v.propTypes = {
|
|
|
97
84
|
*/
|
|
98
85
|
styles: t.oneOfType([t.array, t.func, t.number, t.object, t.string, t.bool])
|
|
99
86
|
});
|
|
100
|
-
function
|
|
87
|
+
function rt(r) {
|
|
101
88
|
return function(e) {
|
|
102
89
|
return (
|
|
103
90
|
// Pigment CSS `globalCss` support callback with theme inside an object but `GlobalStyles` support theme as a callback value.
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
styles: typeof
|
|
91
|
+
/* @__PURE__ */ l(T, {
|
|
92
|
+
styles: typeof r == "function" ? (n) => r({
|
|
106
93
|
theme: n,
|
|
107
94
|
...e
|
|
108
|
-
}) :
|
|
95
|
+
}) : r
|
|
109
96
|
})
|
|
110
97
|
);
|
|
111
98
|
};
|
|
112
99
|
}
|
|
113
|
-
function
|
|
114
|
-
return
|
|
100
|
+
function I() {
|
|
101
|
+
return H;
|
|
115
102
|
}
|
|
116
|
-
function
|
|
117
|
-
return
|
|
103
|
+
function k(r) {
|
|
104
|
+
return E("MuiTypography", r);
|
|
118
105
|
}
|
|
119
|
-
|
|
120
|
-
const
|
|
106
|
+
N("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]);
|
|
107
|
+
const z = {
|
|
121
108
|
primary: !0,
|
|
122
109
|
secondary: !0,
|
|
123
110
|
error: !0,
|
|
@@ -127,31 +114,31 @@ const J = {
|
|
|
127
114
|
textPrimary: !0,
|
|
128
115
|
textSecondary: !0,
|
|
129
116
|
textDisabled: !0
|
|
130
|
-
},
|
|
117
|
+
}, F = I(), J = (r) => {
|
|
131
118
|
const {
|
|
132
|
-
align:
|
|
119
|
+
align: o,
|
|
133
120
|
gutterBottom: e,
|
|
134
121
|
noWrap: n,
|
|
135
122
|
paragraph: a,
|
|
136
123
|
variant: s,
|
|
137
|
-
classes:
|
|
138
|
-
} =
|
|
139
|
-
root: ["root", s,
|
|
124
|
+
classes: p
|
|
125
|
+
} = r, i = {
|
|
126
|
+
root: ["root", s, r.align !== "inherit" && `align${u(o)}`, e && "gutterBottom", n && "noWrap", a && "paragraph"]
|
|
140
127
|
};
|
|
141
|
-
return
|
|
142
|
-
},
|
|
128
|
+
return _(i, k, p);
|
|
129
|
+
}, L = W("span", {
|
|
143
130
|
name: "MuiTypography",
|
|
144
131
|
slot: "Root",
|
|
145
|
-
overridesResolver: (
|
|
132
|
+
overridesResolver: (r, o) => {
|
|
146
133
|
const {
|
|
147
134
|
ownerState: e
|
|
148
|
-
} =
|
|
149
|
-
return [
|
|
135
|
+
} = r;
|
|
136
|
+
return [o.root, e.variant && o[e.variant], e.align !== "inherit" && o[`align${u(e.align)}`], e.noWrap && o.noWrap, e.gutterBottom && o.gutterBottom, e.paragraph && o.paragraph];
|
|
150
137
|
}
|
|
151
|
-
})(
|
|
152
|
-
theme:
|
|
138
|
+
})(M(({
|
|
139
|
+
theme: r
|
|
153
140
|
}) => {
|
|
154
|
-
var
|
|
141
|
+
var o;
|
|
155
142
|
return {
|
|
156
143
|
margin: 0,
|
|
157
144
|
variants: [{
|
|
@@ -164,24 +151,24 @@ const J = {
|
|
|
164
151
|
lineHeight: "inherit",
|
|
165
152
|
letterSpacing: "inherit"
|
|
166
153
|
}
|
|
167
|
-
}, ...Object.entries(
|
|
154
|
+
}, ...Object.entries(r.typography).filter(([e, n]) => e !== "inherit" && n && typeof n == "object").map(([e, n]) => ({
|
|
168
155
|
props: {
|
|
169
156
|
variant: e
|
|
170
157
|
},
|
|
171
158
|
style: n
|
|
172
|
-
})), ...Object.entries(
|
|
159
|
+
})), ...Object.entries(r.palette).filter(V()).map(([e]) => ({
|
|
173
160
|
props: {
|
|
174
161
|
color: e
|
|
175
162
|
},
|
|
176
163
|
style: {
|
|
177
|
-
color: (
|
|
164
|
+
color: (r.vars || r).palette[e].main
|
|
178
165
|
}
|
|
179
|
-
})), ...Object.entries(((
|
|
166
|
+
})), ...Object.entries(((o = r.palette) == null ? void 0 : o.text) || {}).filter(([, e]) => typeof e == "string").map(([e]) => ({
|
|
180
167
|
props: {
|
|
181
168
|
color: `text${u(e)}`
|
|
182
169
|
},
|
|
183
170
|
style: {
|
|
184
|
-
color: (
|
|
171
|
+
color: (r.vars || r).palette.text[e]
|
|
185
172
|
}
|
|
186
173
|
})), {
|
|
187
174
|
props: ({
|
|
@@ -227,14 +214,14 @@ const J = {
|
|
|
227
214
|
body1: "p",
|
|
228
215
|
body2: "p",
|
|
229
216
|
inherit: "p"
|
|
230
|
-
},
|
|
217
|
+
}, q = /* @__PURE__ */ j.forwardRef(function(o, e) {
|
|
231
218
|
const {
|
|
232
219
|
color: n,
|
|
233
220
|
...a
|
|
234
|
-
} =
|
|
235
|
-
props:
|
|
221
|
+
} = D({
|
|
222
|
+
props: o,
|
|
236
223
|
name: "MuiTypography"
|
|
237
|
-
}), s = !
|
|
224
|
+
}), s = !z[n], p = F({
|
|
238
225
|
...a,
|
|
239
226
|
...s && {
|
|
240
227
|
color: n
|
|
@@ -242,29 +229,29 @@ const J = {
|
|
|
242
229
|
}), {
|
|
243
230
|
align: i = "inherit",
|
|
244
231
|
className: y,
|
|
245
|
-
component:
|
|
246
|
-
gutterBottom:
|
|
247
|
-
noWrap:
|
|
248
|
-
paragraph:
|
|
232
|
+
component: h,
|
|
233
|
+
gutterBottom: v = !1,
|
|
234
|
+
noWrap: O = !1,
|
|
235
|
+
paragraph: g = !1,
|
|
249
236
|
variant: c = "body1",
|
|
250
|
-
variantMapping:
|
|
237
|
+
variantMapping: f = d,
|
|
251
238
|
...m
|
|
252
|
-
} =
|
|
253
|
-
...
|
|
239
|
+
} = p, b = {
|
|
240
|
+
...p,
|
|
254
241
|
align: i,
|
|
255
242
|
color: n,
|
|
256
243
|
className: y,
|
|
257
|
-
component:
|
|
258
|
-
gutterBottom:
|
|
259
|
-
noWrap:
|
|
260
|
-
paragraph:
|
|
244
|
+
component: h,
|
|
245
|
+
gutterBottom: v,
|
|
246
|
+
noWrap: O,
|
|
247
|
+
paragraph: g,
|
|
261
248
|
variant: c,
|
|
262
|
-
variantMapping:
|
|
263
|
-
},
|
|
264
|
-
return /* @__PURE__ */
|
|
265
|
-
as:
|
|
249
|
+
variantMapping: f
|
|
250
|
+
}, S = h || (g ? "p" : f[c] || d[c]) || "span", P = J(b);
|
|
251
|
+
return /* @__PURE__ */ l(L, {
|
|
252
|
+
as: S,
|
|
266
253
|
ref: e,
|
|
267
|
-
className: R(
|
|
254
|
+
className: R(P.root, y),
|
|
268
255
|
...m,
|
|
269
256
|
ownerState: b,
|
|
270
257
|
style: {
|
|
@@ -275,7 +262,7 @@ const J = {
|
|
|
275
262
|
}
|
|
276
263
|
});
|
|
277
264
|
});
|
|
278
|
-
process.env.NODE_ENV !== "production" && (
|
|
265
|
+
process.env.NODE_ENV !== "production" && (q.propTypes = {
|
|
279
266
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
280
267
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
281
268
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -362,7 +349,7 @@ process.env.NODE_ENV !== "production" && (Q.propTypes = {
|
|
|
362
349
|
variantMapping: t.object
|
|
363
350
|
});
|
|
364
351
|
export {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
352
|
+
q as T,
|
|
353
|
+
H as e,
|
|
354
|
+
rt as g
|
|
368
355
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as h from "react";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import {
|
|
2
|
+
import { jsxs as b, jsx as I } from "react/jsx-runtime";
|
|
3
|
+
import { g as w, e as z, P as e } from "./createTheme.js";
|
|
4
|
+
import { g as C, s as T, m as N, u as O, c as R, a as j } from "./DefaultPropsProvider.js";
|
|
4
5
|
function E(o) {
|
|
5
6
|
return w("MuiSvgIcon", o);
|
|
6
7
|
}
|
|
@@ -8,33 +9,33 @@ C("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "color
|
|
|
8
9
|
const $ = (o) => {
|
|
9
10
|
const {
|
|
10
11
|
color: r,
|
|
11
|
-
fontSize:
|
|
12
|
+
fontSize: t,
|
|
12
13
|
classes: s
|
|
13
|
-
} = o,
|
|
14
|
-
root: ["root", r !== "inherit" && `color${z(r)}`, `fontSize${z(
|
|
14
|
+
} = o, n = {
|
|
15
|
+
root: ["root", r !== "inherit" && `color${z(r)}`, `fontSize${z(t)}`]
|
|
15
16
|
};
|
|
16
|
-
return j(
|
|
17
|
+
return j(n, E, s);
|
|
17
18
|
}, A = T("svg", {
|
|
18
19
|
name: "MuiSvgIcon",
|
|
19
20
|
slot: "Root",
|
|
20
21
|
overridesResolver: (o, r) => {
|
|
21
22
|
const {
|
|
22
|
-
ownerState:
|
|
23
|
+
ownerState: t
|
|
23
24
|
} = o;
|
|
24
|
-
return [r.root,
|
|
25
|
+
return [r.root, t.color !== "inherit" && r[`color${z(t.color)}`], r[`fontSize${z(t.fontSize)}`]];
|
|
25
26
|
}
|
|
26
27
|
})(N(({
|
|
27
28
|
theme: o
|
|
28
29
|
}) => {
|
|
29
|
-
var r,
|
|
30
|
+
var r, t, s, n, c, u, a, g, p, d, l, m, y, f;
|
|
30
31
|
return {
|
|
31
32
|
userSelect: "none",
|
|
32
33
|
width: "1em",
|
|
33
34
|
height: "1em",
|
|
34
35
|
display: "inline-block",
|
|
35
36
|
flexShrink: 0,
|
|
36
|
-
transition: (
|
|
37
|
-
duration: (s = (
|
|
37
|
+
transition: (n = (r = o.transitions) == null ? void 0 : r.create) == null ? void 0 : n.call(r, "fill", {
|
|
38
|
+
duration: (s = (t = (o.vars ?? o).transitions) == null ? void 0 : t.duration) == null ? void 0 : s.shorter
|
|
38
39
|
}),
|
|
39
40
|
variants: [
|
|
40
41
|
{
|
|
@@ -115,12 +116,12 @@ const $ = (o) => {
|
|
|
115
116
|
}
|
|
116
117
|
]
|
|
117
118
|
};
|
|
118
|
-
})), x = /* @__PURE__ */ h.forwardRef(function(r,
|
|
119
|
+
})), x = /* @__PURE__ */ h.forwardRef(function(r, t) {
|
|
119
120
|
const s = O({
|
|
120
121
|
props: r,
|
|
121
122
|
name: "MuiSvgIcon"
|
|
122
123
|
}), {
|
|
123
|
-
children:
|
|
124
|
+
children: n,
|
|
124
125
|
className: c,
|
|
125
126
|
color: u = "inherit",
|
|
126
127
|
component: a = "svg",
|
|
@@ -130,7 +131,7 @@ const $ = (o) => {
|
|
|
130
131
|
titleAccess: l,
|
|
131
132
|
viewBox: m = "0 0 24 24",
|
|
132
133
|
...y
|
|
133
|
-
} = s, f = /* @__PURE__ */ h.isValidElement(
|
|
134
|
+
} = s, f = /* @__PURE__ */ h.isValidElement(n) && n.type === "svg", i = {
|
|
134
135
|
...s,
|
|
135
136
|
color: u,
|
|
136
137
|
component: a,
|
|
@@ -142,19 +143,19 @@ const $ = (o) => {
|
|
|
142
143
|
}, S = {};
|
|
143
144
|
d || (S.viewBox = m);
|
|
144
145
|
const v = $(i);
|
|
145
|
-
return /* @__PURE__ */
|
|
146
|
+
return /* @__PURE__ */ b(A, {
|
|
146
147
|
as: a,
|
|
147
148
|
className: R(v.root, c),
|
|
148
149
|
focusable: "false",
|
|
149
150
|
color: p,
|
|
150
151
|
"aria-hidden": l ? void 0 : !0,
|
|
151
152
|
role: l ? "img" : void 0,
|
|
152
|
-
ref:
|
|
153
|
+
ref: t,
|
|
153
154
|
...S,
|
|
154
155
|
...y,
|
|
155
|
-
...f &&
|
|
156
|
+
...f && n.props,
|
|
156
157
|
ownerState: i,
|
|
157
|
-
children: [f ?
|
|
158
|
+
children: [f ? n.props.children : n, l ? /* @__PURE__ */ I("title", {
|
|
158
159
|
children: l
|
|
159
160
|
}) : null]
|
|
160
161
|
});
|
|
@@ -232,18 +233,18 @@ process.env.NODE_ENV !== "production" && (x.propTypes = {
|
|
|
232
233
|
viewBox: e.string
|
|
233
234
|
});
|
|
234
235
|
x.muiName = "SvgIcon";
|
|
235
|
-
function
|
|
236
|
-
function
|
|
237
|
-
return /* @__PURE__ */
|
|
236
|
+
function D(o, r) {
|
|
237
|
+
function t(s, n) {
|
|
238
|
+
return /* @__PURE__ */ I(x, {
|
|
238
239
|
"data-testid": `${r}Icon`,
|
|
239
|
-
ref:
|
|
240
|
+
ref: n,
|
|
240
241
|
...s,
|
|
241
242
|
children: o
|
|
242
243
|
});
|
|
243
244
|
}
|
|
244
|
-
return process.env.NODE_ENV !== "production" && (
|
|
245
|
+
return process.env.NODE_ENV !== "production" && (t.displayName = `${r}Icon`), t.muiName = x.muiName, /* @__PURE__ */ h.memo(/* @__PURE__ */ h.forwardRef(t));
|
|
245
246
|
}
|
|
246
247
|
export {
|
|
247
248
|
x as S,
|
|
248
|
-
|
|
249
|
+
D as c
|
|
249
250
|
};
|