@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
package/dist/assets/Badge.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { g as Y, e as
|
|
1
|
+
import * as X from "react";
|
|
2
|
+
import { g as Y, e as t, P as o } from "./createTheme.js";
|
|
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";
|
|
3
5
|
import { c as nr } from "./createSimplePaletteValueFilter.js";
|
|
4
6
|
import { jsxs as tr, jsx as er } from "react/jsx-runtime";
|
|
5
|
-
import { u as
|
|
6
|
-
const U = (a) => {
|
|
7
|
-
const r = x.useRef({});
|
|
8
|
-
return x.useEffect(() => {
|
|
9
|
-
r.current = a;
|
|
10
|
-
}), r.current;
|
|
11
|
-
};
|
|
7
|
+
import { u as A } from "./useSlotProps.js";
|
|
12
8
|
function ir(a) {
|
|
13
9
|
const {
|
|
14
10
|
badgeContent: r,
|
|
15
11
|
invisible: n = !1,
|
|
16
12
|
max: e = 99,
|
|
17
13
|
showZero: l = !1
|
|
18
|
-
} = a, d =
|
|
14
|
+
} = a, d = M({
|
|
19
15
|
badgeContent: r,
|
|
20
16
|
max: e
|
|
21
17
|
});
|
|
@@ -33,9 +29,9 @@ function ir(a) {
|
|
|
33
29
|
};
|
|
34
30
|
}
|
|
35
31
|
function sr(a) {
|
|
36
|
-
return
|
|
32
|
+
return Y("MuiBadge", a);
|
|
37
33
|
}
|
|
38
|
-
const s =
|
|
34
|
+
const s = w("MuiBadge", [
|
|
39
35
|
"root",
|
|
40
36
|
"badge",
|
|
41
37
|
"dot",
|
|
@@ -75,7 +71,7 @@ const s = Y("MuiBadge", [
|
|
|
75
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)}`]
|
|
76
72
|
};
|
|
77
73
|
return ar(i, sr, c);
|
|
78
|
-
}, cr =
|
|
74
|
+
}, cr = L("span", {
|
|
79
75
|
name: "MuiBadge",
|
|
80
76
|
slot: "Root",
|
|
81
77
|
overridesResolver: (a, r) => r.root
|
|
@@ -85,7 +81,7 @@ const s = Y("MuiBadge", [
|
|
|
85
81
|
// For correct alignment with the text.
|
|
86
82
|
verticalAlign: "middle",
|
|
87
83
|
flexShrink: 0
|
|
88
|
-
}), pr =
|
|
84
|
+
}), pr = L("span", {
|
|
89
85
|
name: "MuiBadge",
|
|
90
86
|
slot: "Badge",
|
|
91
87
|
overridesResolver: (a, r) => {
|
|
@@ -253,13 +249,13 @@ const s = Y("MuiBadge", [
|
|
|
253
249
|
}
|
|
254
250
|
}]
|
|
255
251
|
})));
|
|
256
|
-
function
|
|
252
|
+
function F(a) {
|
|
257
253
|
return {
|
|
258
254
|
vertical: (a == null ? void 0 : a.vertical) ?? "top",
|
|
259
255
|
horizontal: (a == null ? void 0 : a.horizontal) ?? "right"
|
|
260
256
|
};
|
|
261
257
|
}
|
|
262
|
-
const gr = /* @__PURE__ */
|
|
258
|
+
const gr = /* @__PURE__ */ X.forwardRef(function(r, n) {
|
|
263
259
|
const e = or({
|
|
264
260
|
props: r,
|
|
265
261
|
name: "MuiBadge"
|
|
@@ -270,70 +266,70 @@ const gr = /* @__PURE__ */ x.forwardRef(function(r, n) {
|
|
|
270
266
|
component: i,
|
|
271
267
|
components: p = {},
|
|
272
268
|
componentsProps: m = {},
|
|
273
|
-
children:
|
|
274
|
-
overlap:
|
|
275
|
-
color:
|
|
276
|
-
invisible:
|
|
277
|
-
max:
|
|
278
|
-
badgeContent:
|
|
269
|
+
children: U,
|
|
270
|
+
overlap: x = "rectangular",
|
|
271
|
+
color: T = "default",
|
|
272
|
+
invisible: V = !1,
|
|
273
|
+
max: W = 99,
|
|
274
|
+
badgeContent: P,
|
|
279
275
|
slots: g,
|
|
280
276
|
slotProps: f,
|
|
281
|
-
showZero:
|
|
277
|
+
showZero: R = !1,
|
|
282
278
|
variant: h = "standard",
|
|
283
|
-
...
|
|
279
|
+
...k
|
|
284
280
|
} = e, {
|
|
285
|
-
badgeContent:
|
|
286
|
-
invisible:
|
|
287
|
-
max:
|
|
288
|
-
displayValue:
|
|
281
|
+
badgeContent: C,
|
|
282
|
+
invisible: E,
|
|
283
|
+
max: H,
|
|
284
|
+
displayValue: Z
|
|
289
285
|
} = ir({
|
|
290
|
-
max:
|
|
291
|
-
invisible:
|
|
292
|
-
badgeContent:
|
|
293
|
-
showZero:
|
|
294
|
-
}),
|
|
295
|
-
anchorOrigin:
|
|
296
|
-
color:
|
|
297
|
-
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,
|
|
298
294
|
variant: h,
|
|
299
|
-
badgeContent:
|
|
300
|
-
}),
|
|
301
|
-
color:
|
|
302
|
-
overlap:
|
|
303
|
-
anchorOrigin:
|
|
304
|
-
variant:
|
|
305
|
-
} =
|
|
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 = {
|
|
306
302
|
...e,
|
|
307
|
-
badgeContent:
|
|
308
|
-
invisible:
|
|
309
|
-
max:
|
|
310
|
-
displayValue:
|
|
311
|
-
showZero:
|
|
312
|
-
anchorOrigin:
|
|
313
|
-
color:
|
|
314
|
-
overlap:
|
|
315
|
-
variant:
|
|
316
|
-
},
|
|
317
|
-
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,
|
|
318
314
|
externalSlotProps: u,
|
|
319
|
-
externalForwardedProps:
|
|
315
|
+
externalForwardedProps: k,
|
|
320
316
|
additionalProps: {
|
|
321
317
|
ref: n,
|
|
322
318
|
as: i
|
|
323
319
|
},
|
|
324
320
|
ownerState: b,
|
|
325
|
-
className:
|
|
326
|
-
}),
|
|
327
|
-
elementType:
|
|
321
|
+
className: I(u == null ? void 0 : u.className, j.root, d)
|
|
322
|
+
}), S = A({
|
|
323
|
+
elementType: D,
|
|
328
324
|
externalSlotProps: v,
|
|
329
325
|
ownerState: b,
|
|
330
|
-
className:
|
|
326
|
+
className: I(j.badge, v == null ? void 0 : v.className)
|
|
331
327
|
});
|
|
332
|
-
return /* @__PURE__ */ tr(
|
|
333
|
-
...
|
|
334
|
-
children: [
|
|
335
|
-
...
|
|
336
|
-
children:
|
|
328
|
+
return /* @__PURE__ */ tr(N, {
|
|
329
|
+
...Q,
|
|
330
|
+
children: [U, /* @__PURE__ */ er(D, {
|
|
331
|
+
...S,
|
|
332
|
+
children: z
|
|
337
333
|
})]
|
|
338
334
|
});
|
|
339
335
|
});
|
package/dist/assets/Box.js
CHANGED
|
@@ -1,39 +1,41 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as u, c as x, C as h, P as e } from "./createTheme.js";
|
|
2
|
+
import { T } from "./DefaultPropsProvider2.js";
|
|
3
|
+
import { b as y, c as B, g as N } from "./DefaultPropsProvider.js";
|
|
2
4
|
import * as C from "react";
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { u as
|
|
5
|
-
import { e as
|
|
6
|
-
function
|
|
5
|
+
import { jsx as b } from "react/jsx-runtime";
|
|
6
|
+
import { u as g } from "./useTheme.js";
|
|
7
|
+
import { e as v } from "./Typography.js";
|
|
8
|
+
function E(n = {}) {
|
|
7
9
|
const {
|
|
8
10
|
themeId: t,
|
|
9
11
|
defaultTheme: m,
|
|
10
12
|
defaultClassName: a = "MuiBox-root",
|
|
11
13
|
generateClassName: r
|
|
12
|
-
} = n, c =
|
|
14
|
+
} = n, c = y("div", {
|
|
13
15
|
shouldForwardProp: (o) => o !== "theme" && o !== "sx" && o !== "as"
|
|
14
|
-
})(
|
|
15
|
-
return /* @__PURE__ */ C.forwardRef(function(
|
|
16
|
-
const s =
|
|
16
|
+
})(u);
|
|
17
|
+
return /* @__PURE__ */ C.forwardRef(function(f, l) {
|
|
18
|
+
const s = g(m), {
|
|
17
19
|
className: i,
|
|
18
|
-
component:
|
|
19
|
-
...
|
|
20
|
-
} =
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
as:
|
|
23
|
-
ref:
|
|
24
|
-
className:
|
|
20
|
+
component: p = "div",
|
|
21
|
+
...d
|
|
22
|
+
} = v(f);
|
|
23
|
+
return /* @__PURE__ */ b(c, {
|
|
24
|
+
as: p,
|
|
25
|
+
ref: l,
|
|
26
|
+
className: B(i, r ? r(a) : a),
|
|
25
27
|
theme: t && s[t] || s,
|
|
26
|
-
...
|
|
28
|
+
...d
|
|
27
29
|
});
|
|
28
30
|
});
|
|
29
31
|
}
|
|
30
|
-
const
|
|
31
|
-
themeId:
|
|
32
|
-
defaultTheme:
|
|
33
|
-
defaultClassName:
|
|
34
|
-
generateClassName:
|
|
32
|
+
const O = N("MuiBox", ["root"]), P = x(), j = E({
|
|
33
|
+
themeId: T,
|
|
34
|
+
defaultTheme: P,
|
|
35
|
+
defaultClassName: O.root,
|
|
36
|
+
generateClassName: h.generate
|
|
35
37
|
});
|
|
36
|
-
process.env.NODE_ENV !== "production" && (
|
|
38
|
+
process.env.NODE_ENV !== "production" && (j.propTypes = {
|
|
37
39
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
38
40
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
39
41
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -53,5 +55,5 @@ process.env.NODE_ENV !== "production" && (P.propTypes = {
|
|
|
53
55
|
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
54
56
|
});
|
|
55
57
|
export {
|
|
56
|
-
|
|
58
|
+
j as B
|
|
57
59
|
};
|
package/dist/assets/Button.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import * as S from "react";
|
|
2
|
-
import { g as D, e as
|
|
3
|
-
import { a as
|
|
2
|
+
import { g as D, e as s, n as k, o as W, P as t, b as B } from "./createTheme.js";
|
|
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 { a as j, B as Y } from "./ButtonBase.js";
|
|
4
5
|
import { c as h } from "./createSimplePaletteValueFilter.js";
|
|
5
6
|
import { c as m } from "./createSvgIcon.js";
|
|
6
|
-
import { jsx as r, jsxs as
|
|
7
|
-
import { P as
|
|
8
|
-
import { I as
|
|
7
|
+
import { jsx as r, jsxs as q } from "react/jsx-runtime";
|
|
8
|
+
import { P as oo } from "./Paper.js";
|
|
9
|
+
import { I as to } from "./IconButton.js";
|
|
10
|
+
import { r as eo } from "./DefaultPropsProvider2.js";
|
|
9
11
|
function no(o) {
|
|
10
|
-
return
|
|
12
|
+
return D("MuiAlert", o);
|
|
11
13
|
}
|
|
12
|
-
const V =
|
|
14
|
+
const V = U("MuiAlert", ["root", "action", "icon", "message", "filled", "colorSuccess", "colorInfo", "colorWarning", "colorError", "filledSuccess", "filledInfo", "filledWarning", "filledError", "outlined", "outlinedSuccess", "outlinedInfo", "outlinedWarning", "outlinedError", "standard", "standardSuccess", "standardInfo", "standardWarning", "standardError"]), ao = m(/* @__PURE__ */ r("path", {
|
|
13
15
|
d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"
|
|
14
16
|
}), "SuccessOutlined"), ro = m(/* @__PURE__ */ r("path", {
|
|
15
17
|
d: "M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"
|
|
@@ -32,7 +34,7 @@ const V = D("MuiAlert", ["root", "action", "icon", "message", "filled", "colorSu
|
|
|
32
34
|
action: ["action"]
|
|
33
35
|
};
|
|
34
36
|
return Z(c, no, i);
|
|
35
|
-
}, po = g(
|
|
37
|
+
}, po = g(oo, {
|
|
36
38
|
name: "MuiAlert",
|
|
37
39
|
slot: "Root",
|
|
38
40
|
overridesResolver: (o, n) => {
|
|
@@ -174,7 +176,7 @@ const V = D("MuiAlert", ["root", "action", "icon", "message", "filled", "colorSu
|
|
|
174
176
|
...T
|
|
175
177
|
}
|
|
176
178
|
}, [v, E] = j("closeButton", {
|
|
177
|
-
elementType:
|
|
179
|
+
elementType: to,
|
|
178
180
|
externalForwardedProps: u,
|
|
179
181
|
ownerState: l
|
|
180
182
|
}), [N, P] = j("closeIcon", {
|
|
@@ -182,7 +184,7 @@ const V = D("MuiAlert", ["root", "action", "icon", "message", "filled", "colorSu
|
|
|
182
184
|
externalForwardedProps: u,
|
|
183
185
|
ownerState: l
|
|
184
186
|
});
|
|
185
|
-
return /* @__PURE__ */
|
|
187
|
+
return /* @__PURE__ */ q(po, {
|
|
186
188
|
role: $,
|
|
187
189
|
elevation: 0,
|
|
188
190
|
ownerState: l,
|
|
@@ -337,12 +339,12 @@ process.env.NODE_ENV !== "production" && (go.propTypes = {
|
|
|
337
339
|
variant: t.oneOfType([t.oneOf(["filled", "outlined", "standard"]), t.string])
|
|
338
340
|
});
|
|
339
341
|
function fo(o) {
|
|
340
|
-
return
|
|
342
|
+
return D("MuiButton", o);
|
|
341
343
|
}
|
|
342
|
-
const x =
|
|
343
|
-
process.env.NODE_ENV !== "production" && (
|
|
344
|
-
const
|
|
345
|
-
process.env.NODE_ENV !== "production" && (
|
|
344
|
+
const x = U("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge"]), J = /* @__PURE__ */ S.createContext({});
|
|
345
|
+
process.env.NODE_ENV !== "production" && (J.displayName = "ButtonGroupContext");
|
|
346
|
+
const K = /* @__PURE__ */ S.createContext(void 0);
|
|
347
|
+
process.env.NODE_ENV !== "production" && (K.displayName = "ButtonGroupButtonContext");
|
|
346
348
|
const yo = (o) => {
|
|
347
349
|
const {
|
|
348
350
|
color: n,
|
|
@@ -389,7 +391,7 @@ const yo = (o) => {
|
|
|
389
391
|
fontSize: 22
|
|
390
392
|
}
|
|
391
393
|
}
|
|
392
|
-
}], bo = g(
|
|
394
|
+
}], bo = g(Y, {
|
|
393
395
|
shouldForwardProp: (o) => X(o) || o === "classes",
|
|
394
396
|
name: "MuiButton",
|
|
395
397
|
slot: "Root",
|
|
@@ -628,7 +630,7 @@ const yo = (o) => {
|
|
|
628
630
|
}
|
|
629
631
|
}, ...Q]
|
|
630
632
|
}), Co = /* @__PURE__ */ S.forwardRef(function(n, a) {
|
|
631
|
-
const e = S.useContext(
|
|
633
|
+
const e = S.useContext(J), i = S.useContext(K), c = eo(e, n), p = _({
|
|
632
634
|
props: c,
|
|
633
635
|
name: "MuiButton"
|
|
634
636
|
}), {
|
|
@@ -667,7 +669,7 @@ const yo = (o) => {
|
|
|
667
669
|
ownerState: u,
|
|
668
670
|
children: $
|
|
669
671
|
}), P = i || "";
|
|
670
|
-
return /* @__PURE__ */
|
|
672
|
+
return /* @__PURE__ */ q(bo, {
|
|
671
673
|
ownerState: u,
|
|
672
674
|
className: L(e.className, v.root, A, P),
|
|
673
675
|
component: C,
|
|
@@ -777,5 +779,6 @@ process.env.NODE_ENV !== "production" && (Co.propTypes = {
|
|
|
777
779
|
});
|
|
778
780
|
export {
|
|
779
781
|
go as A,
|
|
780
|
-
Co as B
|
|
782
|
+
Co as B,
|
|
783
|
+
lo as C
|
|
781
784
|
};
|