@notificationapi/react 1.6.2 → 1.8.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.
Files changed (57) hide show
  1. package/dist/assets/Badge.js +4 -3
  2. package/dist/assets/Box.js +26 -24
  3. package/dist/assets/Button.js +20 -18
  4. package/dist/assets/ButtonBase.js +193 -185
  5. package/dist/assets/DefaultPropsProvider.js +416 -4199
  6. package/dist/assets/DefaultPropsProvider2.js +992 -0
  7. package/dist/assets/Divider.js +2 -1
  8. package/dist/assets/GlobalStyles.js +23 -0
  9. package/dist/assets/Grow.js +87 -92
  10. package/dist/assets/IconButton.js +8 -7
  11. package/dist/assets/List.js +12 -11
  12. package/dist/assets/Modal.js +18 -17
  13. package/dist/assets/Notification.js +787 -770
  14. package/dist/assets/Paper.js +6 -6
  15. package/dist/assets/Popover.js +38 -37
  16. package/dist/assets/Portal.js +38 -48
  17. package/dist/assets/Stack.js +32 -30
  18. package/dist/assets/Typography.js +84 -97
  19. package/dist/assets/createSvgIcon.js +25 -24
  20. package/dist/assets/createTheme.js +2828 -0
  21. package/dist/assets/dividerClasses.js +16 -15
  22. package/dist/assets/exactProp.js +13 -0
  23. package/dist/assets/index.js +19 -148
  24. package/dist/assets/index2.js +151 -0
  25. package/dist/assets/useTheme.js +6 -7
  26. package/dist/assets/{useTheme2.js → useThemeWithoutDefault.js} +63 -67
  27. package/dist/assets/utils.js +2 -2
  28. package/dist/components/Notifications/DefaultEmpty.d.ts +0 -1
  29. package/dist/components/Notifications/Inbox.d.ts +0 -1
  30. package/dist/components/Notifications/Inbox.js +592 -582
  31. package/dist/components/Notifications/InboxHeader.js +31 -30
  32. package/dist/components/Notifications/Notification.d.ts +0 -1
  33. package/dist/components/Notifications/Notification.js +4 -2
  34. package/dist/components/Notifications/NotificationCounter.d.ts +0 -1
  35. package/dist/components/Notifications/NotificationFeed.d.ts +0 -1
  36. package/dist/components/Notifications/NotificationFeed.js +40 -32
  37. package/dist/components/Notifications/NotificationLauncher.d.ts +0 -1
  38. package/dist/components/Notifications/NotificationLauncher.js +90 -64
  39. package/dist/components/Notifications/NotificationPopup.d.ts +0 -1
  40. package/dist/components/Notifications/NotificationPopup.js +76 -65
  41. package/dist/components/Notifications/UnreadBadge.d.ts +0 -1
  42. package/dist/components/Preferences/NotificationPreferencesInline.js +57 -39
  43. package/dist/components/Preferences/NotificationPreferencesPopup.js +111 -99
  44. package/dist/components/Preferences/PreferenceInput.d.ts +0 -1
  45. package/dist/components/Preferences/PreferenceInput.js +427 -414
  46. package/dist/components/Preferences/Preferences.js +329 -278
  47. package/dist/components/Preferences/channelUtils.d.ts +0 -1
  48. package/dist/components/Provider/context.d.ts +0 -1
  49. package/dist/components/Provider/index.d.ts +4 -2
  50. package/dist/components/Provider/index.js +986 -375
  51. package/dist/components/Slack/SlackConnect.js +8 -7
  52. package/dist/components/WebPush/WebPushOptInMessage.d.ts +0 -1
  53. package/dist/main.d.ts +2 -1
  54. package/dist/main.js +6 -3
  55. package/dist/utils/theme.d.ts +17 -0
  56. package/dist/utils/theme.js +104 -0
  57. package/package.json +7 -3
@@ -1,5 +1,6 @@
1
1
  import * as x from "react";
2
- import { g as Y, e as w, s as M, h as t, m as rr, u as or, c as A, P as o, b as ar } from "./DefaultPropsProvider.js";
2
+ import { g as Y, e as t, P as o } from "./createTheme.js";
3
+ import { g as w, s as M, m as rr, u as or, c as A, a as ar } from "./DefaultPropsProvider.js";
3
4
  import { c as nr } from "./createSimplePaletteValueFilter.js";
4
5
  import { jsxs as tr, jsx as er } from "react/jsx-runtime";
5
6
  import { u as F } from "./useSlotProps.js";
@@ -33,9 +34,9 @@ function ir(a) {
33
34
  };
34
35
  }
35
36
  function sr(a) {
36
- return w("MuiBadge", a);
37
+ return Y("MuiBadge", a);
37
38
  }
38
- const s = Y("MuiBadge", [
39
+ const s = w("MuiBadge", [
39
40
  "root",
40
41
  "badge",
41
42
  "dot",
@@ -1,39 +1,41 @@
1
- import { i as x, j as p, c as h, g as T, k as y, T as B, C as N, P as e } from "./DefaultPropsProvider.js";
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 g } from "react/jsx-runtime";
4
- import { u as b } from "./useTheme2.js";
5
- import { e as j } from "./Typography.js";
6
- function v(n = {}) {
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 = x("div", {
14
+ } = n, c = y("div", {
13
15
  shouldForwardProp: (o) => o !== "theme" && o !== "sx" && o !== "as"
14
- })(p);
15
- return /* @__PURE__ */ C.forwardRef(function(l, f) {
16
- const s = b(m), {
16
+ })(u);
17
+ return /* @__PURE__ */ C.forwardRef(function(f, l) {
18
+ const s = g(m), {
17
19
  className: i,
18
- component: d = "div",
19
- ...u
20
- } = j(l);
21
- return /* @__PURE__ */ g(c, {
22
- as: d,
23
- ref: f,
24
- className: h(i, r ? r(a) : a),
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
- ...u
28
+ ...d
27
29
  });
28
30
  });
29
31
  }
30
- const E = T("MuiBox", ["root"]), O = y(), P = v({
31
- themeId: B,
32
- defaultTheme: O,
33
- defaultClassName: E.root,
34
- generateClassName: N.generate
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" && (P.propTypes = {
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
- P as B
58
+ j as B
57
59
  };
@@ -1,15 +1,17 @@
1
1
  import * as S from "react";
2
- import { g as D, e as U, s as g, h as s, m as G, I as k, J as W, u as _, c as L, P as t, b as Z, K as X, a as B, r as Y } from "./DefaultPropsProvider.js";
3
- import { a as j, B as oo } from "./ButtonBase.js";
2
+ import { g as D, e as s, n as k, o as W, P as t, a 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 { b 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 J } from "react/jsx-runtime";
7
- import { P as to } from "./Paper.js";
8
- import { I as eo } from "./IconButton.js";
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 U("MuiAlert", o);
12
+ return D("MuiAlert", o);
11
13
  }
12
- const V = D("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", {
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(to, {
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: eo,
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__ */ J(po, {
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 U("MuiButton", o);
342
+ return D("MuiButton", o);
341
343
  }
342
- const x = D("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"]), K = /* @__PURE__ */ S.createContext({});
343
- process.env.NODE_ENV !== "production" && (K.displayName = "ButtonGroupContext");
344
- const q = /* @__PURE__ */ S.createContext(void 0);
345
- process.env.NODE_ENV !== "production" && (q.displayName = "ButtonGroupButtonContext");
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(oo, {
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(K), i = S.useContext(q), c = Y(e, n), p = _({
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__ */ J(bo, {
672
+ return /* @__PURE__ */ q(bo, {
671
673
  ownerState: u,
672
674
  className: L(e.className, v.root, A, P),
673
675
  component: C,