@notificationapi/react 1.8.0 → 1.10.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 +57 -62
- package/dist/assets/Button.js +4 -3
- package/dist/assets/ButtonBase.js +6 -6
- package/dist/assets/DefaultPropsProvider.js +1 -1
- package/dist/assets/Divider.js +22 -19
- package/dist/assets/Grow.js +1512 -114
- package/dist/assets/IconButton.js +1 -1
- package/dist/assets/Modal.js +2 -2
- package/dist/assets/Notification.js +1 -1
- package/dist/assets/Paper.js +4 -4
- package/dist/assets/Popover.js +1 -1
- package/dist/assets/Portal.js +2 -2
- package/dist/assets/Stack.js +1 -1
- package/dist/assets/createTheme.js +2 -2
- package/dist/assets/useControlled.js +49 -0
- package/dist/assets/usePreviousProps.js +10 -0
- package/dist/assets/useTheme.js +1 -1
- package/dist/assets/utils.js +3 -3
- package/dist/components/Notifications/Inbox.js +4 -4
- package/dist/components/Notifications/InboxHeader.js +359 -1754
- package/dist/components/Preferences/NotificationPreferencesPopup.js +1 -1
- package/dist/components/Preferences/PreferenceInput.js +3 -3
- package/dist/components/Preferences/Preferences.js +2 -2
- package/dist/components/Slack/SlackConnect.js +4664 -2028
- package/package.json +2 -2
- package/dist/assets/dividerClasses.js +0 -57
package/dist/assets/Badge.js
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as X from "react";
|
|
2
2
|
import { g as Y, e as t, P as o } from "./createTheme.js";
|
|
3
|
-
import { g as w, s as
|
|
3
|
+
import { g as w, s as L, m as rr, u as or, c as I, a as ar } from "./DefaultPropsProvider.js";
|
|
4
|
+
import { u as M } from "./usePreviousProps.js";
|
|
4
5
|
import { c as nr } from "./createSimplePaletteValueFilter.js";
|
|
5
6
|
import { jsxs as tr, jsx as er } from "react/jsx-runtime";
|
|
6
|
-
import { u as
|
|
7
|
-
const U = (a) => {
|
|
8
|
-
const r = x.useRef({});
|
|
9
|
-
return x.useEffect(() => {
|
|
10
|
-
r.current = a;
|
|
11
|
-
}), r.current;
|
|
12
|
-
};
|
|
7
|
+
import { u as A } from "./useSlotProps.js";
|
|
13
8
|
function ir(a) {
|
|
14
9
|
const {
|
|
15
10
|
badgeContent: r,
|
|
16
11
|
invisible: n = !1,
|
|
17
12
|
max: e = 99,
|
|
18
13
|
showZero: l = !1
|
|
19
|
-
} = a, d =
|
|
14
|
+
} = a, d = M({
|
|
20
15
|
badgeContent: r,
|
|
21
16
|
max: e
|
|
22
17
|
});
|
|
@@ -76,7 +71,7 @@ const s = w("MuiBadge", [
|
|
|
76
71
|
badge: ["badge", d, e && "invisible", `anchorOrigin${t(n.vertical)}${t(n.horizontal)}`, `anchorOrigin${t(n.vertical)}${t(n.horizontal)}${t(l)}`, `overlap${t(l)}`, r !== "default" && `color${t(r)}`]
|
|
77
72
|
};
|
|
78
73
|
return ar(i, sr, c);
|
|
79
|
-
}, cr =
|
|
74
|
+
}, cr = L("span", {
|
|
80
75
|
name: "MuiBadge",
|
|
81
76
|
slot: "Root",
|
|
82
77
|
overridesResolver: (a, r) => r.root
|
|
@@ -86,7 +81,7 @@ const s = w("MuiBadge", [
|
|
|
86
81
|
// For correct alignment with the text.
|
|
87
82
|
verticalAlign: "middle",
|
|
88
83
|
flexShrink: 0
|
|
89
|
-
}), pr =
|
|
84
|
+
}), pr = L("span", {
|
|
90
85
|
name: "MuiBadge",
|
|
91
86
|
slot: "Badge",
|
|
92
87
|
overridesResolver: (a, r) => {
|
|
@@ -254,13 +249,13 @@ const s = w("MuiBadge", [
|
|
|
254
249
|
}
|
|
255
250
|
}]
|
|
256
251
|
})));
|
|
257
|
-
function
|
|
252
|
+
function F(a) {
|
|
258
253
|
return {
|
|
259
254
|
vertical: (a == null ? void 0 : a.vertical) ?? "top",
|
|
260
255
|
horizontal: (a == null ? void 0 : a.horizontal) ?? "right"
|
|
261
256
|
};
|
|
262
257
|
}
|
|
263
|
-
const gr = /* @__PURE__ */
|
|
258
|
+
const gr = /* @__PURE__ */ X.forwardRef(function(r, n) {
|
|
264
259
|
const e = or({
|
|
265
260
|
props: r,
|
|
266
261
|
name: "MuiBadge"
|
|
@@ -271,70 +266,70 @@ const gr = /* @__PURE__ */ x.forwardRef(function(r, n) {
|
|
|
271
266
|
component: i,
|
|
272
267
|
components: p = {},
|
|
273
268
|
componentsProps: m = {},
|
|
274
|
-
children:
|
|
275
|
-
overlap:
|
|
276
|
-
color:
|
|
277
|
-
invisible:
|
|
278
|
-
max:
|
|
279
|
-
badgeContent:
|
|
269
|
+
children: U,
|
|
270
|
+
overlap: x = "rectangular",
|
|
271
|
+
color: T = "default",
|
|
272
|
+
invisible: V = !1,
|
|
273
|
+
max: W = 99,
|
|
274
|
+
badgeContent: P,
|
|
280
275
|
slots: g,
|
|
281
276
|
slotProps: f,
|
|
282
|
-
showZero:
|
|
277
|
+
showZero: R = !1,
|
|
283
278
|
variant: h = "standard",
|
|
284
|
-
...
|
|
279
|
+
...k
|
|
285
280
|
} = e, {
|
|
286
|
-
badgeContent:
|
|
287
|
-
invisible:
|
|
288
|
-
max:
|
|
289
|
-
displayValue:
|
|
281
|
+
badgeContent: C,
|
|
282
|
+
invisible: E,
|
|
283
|
+
max: H,
|
|
284
|
+
displayValue: Z
|
|
290
285
|
} = ir({
|
|
291
|
-
max:
|
|
292
|
-
invisible:
|
|
293
|
-
badgeContent:
|
|
294
|
-
showZero:
|
|
295
|
-
}),
|
|
296
|
-
anchorOrigin:
|
|
297
|
-
color:
|
|
298
|
-
overlap:
|
|
286
|
+
max: W,
|
|
287
|
+
invisible: V,
|
|
288
|
+
badgeContent: P,
|
|
289
|
+
showZero: R
|
|
290
|
+
}), _ = M({
|
|
291
|
+
anchorOrigin: F(l),
|
|
292
|
+
color: T,
|
|
293
|
+
overlap: x,
|
|
299
294
|
variant: h,
|
|
300
|
-
badgeContent:
|
|
301
|
-
}),
|
|
302
|
-
color:
|
|
303
|
-
overlap:
|
|
304
|
-
anchorOrigin:
|
|
305
|
-
variant:
|
|
306
|
-
} =
|
|
295
|
+
badgeContent: P
|
|
296
|
+
}), B = E || C == null && h !== "dot", {
|
|
297
|
+
color: q = T,
|
|
298
|
+
overlap: G = x,
|
|
299
|
+
anchorOrigin: J,
|
|
300
|
+
variant: $ = h
|
|
301
|
+
} = B ? _ : e, K = F(J), z = $ !== "dot" ? Z : void 0, b = {
|
|
307
302
|
...e,
|
|
308
|
-
badgeContent:
|
|
309
|
-
invisible:
|
|
310
|
-
max:
|
|
311
|
-
displayValue:
|
|
312
|
-
showZero:
|
|
313
|
-
anchorOrigin:
|
|
314
|
-
color:
|
|
315
|
-
overlap:
|
|
316
|
-
variant:
|
|
317
|
-
},
|
|
318
|
-
elementType:
|
|
303
|
+
badgeContent: C,
|
|
304
|
+
invisible: B,
|
|
305
|
+
max: H,
|
|
306
|
+
displayValue: z,
|
|
307
|
+
showZero: R,
|
|
308
|
+
anchorOrigin: K,
|
|
309
|
+
color: q,
|
|
310
|
+
overlap: G,
|
|
311
|
+
variant: $
|
|
312
|
+
}, j = lr(b), N = (g == null ? void 0 : g.root) ?? p.Root ?? cr, D = (g == null ? void 0 : g.badge) ?? p.Badge ?? pr, u = (f == null ? void 0 : f.root) ?? m.root, v = (f == null ? void 0 : f.badge) ?? m.badge, Q = A({
|
|
313
|
+
elementType: N,
|
|
319
314
|
externalSlotProps: u,
|
|
320
|
-
externalForwardedProps:
|
|
315
|
+
externalForwardedProps: k,
|
|
321
316
|
additionalProps: {
|
|
322
317
|
ref: n,
|
|
323
318
|
as: i
|
|
324
319
|
},
|
|
325
320
|
ownerState: b,
|
|
326
|
-
className:
|
|
327
|
-
}),
|
|
328
|
-
elementType:
|
|
321
|
+
className: I(u == null ? void 0 : u.className, j.root, d)
|
|
322
|
+
}), S = A({
|
|
323
|
+
elementType: D,
|
|
329
324
|
externalSlotProps: v,
|
|
330
325
|
ownerState: b,
|
|
331
|
-
className:
|
|
326
|
+
className: I(j.badge, v == null ? void 0 : v.className)
|
|
332
327
|
});
|
|
333
|
-
return /* @__PURE__ */ tr(
|
|
334
|
-
...
|
|
335
|
-
children: [
|
|
336
|
-
...
|
|
337
|
-
children:
|
|
328
|
+
return /* @__PURE__ */ tr(N, {
|
|
329
|
+
...Q,
|
|
330
|
+
children: [U, /* @__PURE__ */ er(D, {
|
|
331
|
+
...S,
|
|
332
|
+
children: z
|
|
338
333
|
})]
|
|
339
334
|
});
|
|
340
335
|
});
|
package/dist/assets/Button.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as S from "react";
|
|
2
|
-
import { g as D, e as s, n as k, o as W, P as t,
|
|
2
|
+
import { g as D, e as s, n as k, o as W, P as t, b as B } from "./createTheme.js";
|
|
3
3
|
import { g as U, s as g, m as G, u as _, c as L, a as Z, r as X } from "./DefaultPropsProvider.js";
|
|
4
|
-
import {
|
|
4
|
+
import { a as j, B as Y } from "./ButtonBase.js";
|
|
5
5
|
import { c as h } from "./createSimplePaletteValueFilter.js";
|
|
6
6
|
import { c as m } from "./createSvgIcon.js";
|
|
7
7
|
import { jsx as r, jsxs as q } from "react/jsx-runtime";
|
|
@@ -779,5 +779,6 @@ process.env.NODE_ENV !== "production" && (Co.propTypes = {
|
|
|
779
779
|
});
|
|
780
780
|
export {
|
|
781
781
|
go as A,
|
|
782
|
-
Co as B
|
|
782
|
+
Co as B,
|
|
783
|
+
lo as C
|
|
783
784
|
};
|
|
@@ -1001,16 +1001,16 @@ process.env.NODE_ENV !== "production" && (Et.propTypes = {
|
|
|
1001
1001
|
});
|
|
1002
1002
|
export {
|
|
1003
1003
|
Et as B,
|
|
1004
|
-
|
|
1004
|
+
ie as T,
|
|
1005
1005
|
ot as _,
|
|
1006
|
-
|
|
1007
|
-
|
|
1006
|
+
It as a,
|
|
1007
|
+
tt as b,
|
|
1008
1008
|
He as c,
|
|
1009
|
-
|
|
1009
|
+
J as d,
|
|
1010
1010
|
Ze as e,
|
|
1011
|
-
|
|
1011
|
+
qe as f,
|
|
1012
1012
|
nt as g,
|
|
1013
|
-
|
|
1013
|
+
fe as h,
|
|
1014
1014
|
pe as i,
|
|
1015
1015
|
ne as j,
|
|
1016
1016
|
rt as k,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as ae,
|
|
1
|
+
import { g as ae, a as se, s as q, e as le, i as ue, c as ce, P as H } from "./createTheme.js";
|
|
2
2
|
import { w as fe, a as de, g as me, s as ee, b as pe, d as ye, i as he, T as ge, e as Se } from "./DefaultPropsProvider2.js";
|
|
3
3
|
import * as M from "react";
|
|
4
4
|
import "react/jsx-runtime";
|
package/dist/assets/Divider.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as A from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { s as
|
|
4
|
-
import { g as C } from "./dividerClasses.js";
|
|
2
|
+
import { g as C, b as D, P as i } from "./createTheme.js";
|
|
3
|
+
import { g as R, s as u, m as b, u as T, c as S, a as L } from "./DefaultPropsProvider.js";
|
|
5
4
|
import { jsx as v } from "react/jsx-runtime";
|
|
6
|
-
|
|
5
|
+
function W(e) {
|
|
6
|
+
return C("MuiDivider", e);
|
|
7
|
+
}
|
|
8
|
+
R("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]);
|
|
9
|
+
const I = (e) => {
|
|
7
10
|
const {
|
|
8
11
|
absolute: t,
|
|
9
12
|
children: r,
|
|
@@ -14,11 +17,11 @@ const L = (e) => {
|
|
|
14
17
|
textAlign: a,
|
|
15
18
|
variant: l
|
|
16
19
|
} = e;
|
|
17
|
-
return
|
|
20
|
+
return L({
|
|
18
21
|
root: ["root", t && "absolute", l, n && "light", o === "vertical" && "vertical", p && "flexItem", r && "withChildren", r && o === "vertical" && "withChildrenVertical", a === "right" && o !== "vertical" && "textAlignRight", a === "left" && o !== "vertical" && "textAlignLeft"],
|
|
19
22
|
wrapper: ["wrapper", o === "vertical" && "wrapperVertical"]
|
|
20
|
-
},
|
|
21
|
-
}, O =
|
|
23
|
+
}, W, s);
|
|
24
|
+
}, O = u("div", {
|
|
22
25
|
name: "MuiDivider",
|
|
23
26
|
slot: "Root",
|
|
24
27
|
overridesResolver: (e, t) => {
|
|
@@ -27,7 +30,7 @@ const L = (e) => {
|
|
|
27
30
|
} = e;
|
|
28
31
|
return [t.root, r.absolute && t.absolute, t[r.variant], r.light && t.light, r.orientation === "vertical" && t.vertical, r.flexItem && t.flexItem, r.children && t.withChildren, r.children && r.orientation === "vertical" && t.withChildrenVertical, r.textAlign === "right" && r.orientation !== "vertical" && t.textAlignRight, r.textAlign === "left" && r.orientation !== "vertical" && t.textAlignLeft];
|
|
29
32
|
}
|
|
30
|
-
})(
|
|
33
|
+
})(b(({
|
|
31
34
|
theme: e
|
|
32
35
|
}) => ({
|
|
33
36
|
margin: 0,
|
|
@@ -159,7 +162,7 @@ const L = (e) => {
|
|
|
159
162
|
}
|
|
160
163
|
}
|
|
161
164
|
}]
|
|
162
|
-
}))),
|
|
165
|
+
}))), V = u("span", {
|
|
163
166
|
name: "MuiDivider",
|
|
164
167
|
slot: "Wrapper",
|
|
165
168
|
overridesResolver: (e, t) => {
|
|
@@ -168,7 +171,7 @@ const L = (e) => {
|
|
|
168
171
|
} = e;
|
|
169
172
|
return [t.wrapper, r.orientation === "vertical" && t.wrapperVertical];
|
|
170
173
|
}
|
|
171
|
-
})(
|
|
174
|
+
})(b(({
|
|
172
175
|
theme: e
|
|
173
176
|
}) => ({
|
|
174
177
|
display: "inline-block",
|
|
@@ -184,7 +187,7 @@ const L = (e) => {
|
|
|
184
187
|
paddingBottom: `calc(${e.spacing(1)} * 1.2)`
|
|
185
188
|
}
|
|
186
189
|
}]
|
|
187
|
-
}))),
|
|
190
|
+
}))), g = /* @__PURE__ */ A.forwardRef(function(t, r) {
|
|
188
191
|
const s = T({
|
|
189
192
|
props: t,
|
|
190
193
|
name: "MuiDivider"
|
|
@@ -194,7 +197,7 @@ const L = (e) => {
|
|
|
194
197
|
className: o,
|
|
195
198
|
orientation: a = "horizontal",
|
|
196
199
|
component: l = n || a === "vertical" ? "div" : "hr",
|
|
197
|
-
flexItem:
|
|
200
|
+
flexItem: f = !1,
|
|
198
201
|
light: m = !1,
|
|
199
202
|
role: c = l !== "hr" ? "separator" : void 0,
|
|
200
203
|
textAlign: x = "center",
|
|
@@ -204,30 +207,30 @@ const L = (e) => {
|
|
|
204
207
|
...s,
|
|
205
208
|
absolute: p,
|
|
206
209
|
component: l,
|
|
207
|
-
flexItem:
|
|
210
|
+
flexItem: f,
|
|
208
211
|
light: m,
|
|
209
212
|
orientation: a,
|
|
210
213
|
role: c,
|
|
211
214
|
textAlign: x,
|
|
212
215
|
variant: w
|
|
213
|
-
}, h =
|
|
216
|
+
}, h = I(d);
|
|
214
217
|
return /* @__PURE__ */ v(O, {
|
|
215
218
|
as: l,
|
|
216
|
-
className:
|
|
219
|
+
className: S(h.root, o),
|
|
217
220
|
role: c,
|
|
218
221
|
ref: r,
|
|
219
222
|
ownerState: d,
|
|
220
223
|
"aria-orientation": c === "separator" && (l !== "hr" || a === "vertical") ? a : void 0,
|
|
221
224
|
...y,
|
|
222
|
-
children: n ? /* @__PURE__ */ v(
|
|
225
|
+
children: n ? /* @__PURE__ */ v(V, {
|
|
223
226
|
className: h.wrapper,
|
|
224
227
|
ownerState: d,
|
|
225
228
|
children: n
|
|
226
229
|
}) : null
|
|
227
230
|
});
|
|
228
231
|
});
|
|
229
|
-
|
|
230
|
-
process.env.NODE_ENV !== "production" && (
|
|
232
|
+
g && (g.muiSkipListHighlight = !0);
|
|
233
|
+
process.env.NODE_ENV !== "production" && (g.propTypes = {
|
|
231
234
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
232
235
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
233
236
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -291,5 +294,5 @@ process.env.NODE_ENV !== "production" && (f.propTypes = {
|
|
|
291
294
|
variant: i.oneOfType([i.oneOf(["fullWidth", "inset", "middle"]), i.string])
|
|
292
295
|
});
|
|
293
296
|
export {
|
|
294
|
-
|
|
297
|
+
g as D
|
|
295
298
|
};
|