@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,36 +1,37 @@
1
- import { jsx as i, jsxs as G, Fragment as he } from "react/jsx-runtime";
2
- import * as p from "react";
3
- import { useContext as ye } from "react";
4
- import { NotificationAPIContext as be } from "../Provider/context.js";
1
+ import { jsx as s, jsxs as G, Fragment as he } from "react/jsx-runtime";
2
+ import * as u from "react";
3
+ import { useContext as xe } from "react";
4
+ import { NotificationAPIContext as ye } from "../Provider/context.js";
5
5
  import { PreferenceInput as ie } from "./PreferenceInput.js";
6
- import { r as xe } from "../../assets/index.js";
7
- import { g as q, e as _, s as T, m as I, u as J, c as U, P as e, b as K, L as ve } from "../../assets/DefaultPropsProvider.js";
8
- import { u as Ce, e as Te, a as se, c as we, B as Ee } from "../../assets/ButtonBase.js";
9
- import { P as Re } from "../../assets/Paper.js";
10
- import { a as Ae } from "../../assets/dividerClasses.js";
11
- import { u as Se } from "../../assets/useTheme.js";
12
- import { T as Ne, g as ae } from "../../assets/utils.js";
13
- import { u as Ie } from "../../assets/resolveComponentProps.js";
14
- import { c as De } from "../../assets/createSvgIcon.js";
6
+ import { getThemeColors as ve } from "../../utils/theme.js";
7
+ import { u as le, a as Ce, e as Te, b as se, c as we, B as Ee } from "../../assets/ButtonBase.js";
8
+ import { r as Re } from "../../assets/index2.js";
9
+ import { g as q, P as e, p as Ae } from "../../assets/createTheme.js";
10
+ import { g as _, s as E, m as I, u as J, c as U, a as K } from "../../assets/DefaultPropsProvider.js";
11
+ import { P as Se } from "../../assets/Paper.js";
12
+ import { a as Ne } from "../../assets/dividerClasses.js";
13
+ import { T as Ie, g as ae } from "../../assets/utils.js";
14
+ import { u as De } from "../../assets/resolveComponentProps.js";
15
+ import { c as ke } from "../../assets/createSvgIcon.js";
15
16
  import { T as ce } from "../../assets/Typography.js";
16
17
  import { B as Me } from "../../assets/Box.js";
17
18
  function Pe(o) {
18
- return _("MuiCollapse", o);
19
+ return q("MuiCollapse", o);
19
20
  }
20
- q("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]);
21
+ _("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]);
21
22
  const Oe = (o) => {
22
23
  const {
23
24
  orientation: t,
24
25
  classes: n
25
- } = o, s = {
26
+ } = o, c = {
26
27
  root: ["root", `${t}`],
27
28
  entered: ["entered"],
28
29
  hidden: ["hidden"],
29
30
  wrapper: ["wrapper", `${t}`],
30
31
  wrapperInner: ["wrapperInner", `${t}`]
31
32
  };
32
- return K(s, Pe, n);
33
- }, $e = T("div", {
33
+ return K(c, Pe, n);
34
+ }, $e = E("div", {
34
35
  name: "MuiCollapse",
35
36
  slot: "Root",
36
37
  overridesResolver: (o, t) => {
@@ -78,7 +79,7 @@ const Oe = (o) => {
78
79
  visibility: "hidden"
79
80
  }
80
81
  }]
81
- }))), ze = T("div", {
82
+ }))), ze = E("div", {
82
83
  name: "MuiCollapse",
83
84
  slot: "Wrapper",
84
85
  overridesResolver: (o, t) => t.wrapper
@@ -95,7 +96,7 @@ const Oe = (o) => {
95
96
  height: "100%"
96
97
  }
97
98
  }]
98
- }), je = T("div", {
99
+ }), je = E("div", {
99
100
  name: "MuiCollapse",
100
101
  slot: "WrapperInner",
101
102
  overridesResolver: (o, t) => t.wrapperInner
@@ -110,129 +111,129 @@ const Oe = (o) => {
110
111
  height: "100%"
111
112
  }
112
113
  }]
113
- }), L = /* @__PURE__ */ p.forwardRef(function(t, n) {
114
- const s = J({
114
+ }), L = /* @__PURE__ */ u.forwardRef(function(t, n) {
115
+ const c = J({
115
116
  props: t,
116
117
  name: "MuiCollapse"
117
118
  }), {
118
- addEndListener: c,
119
- children: l,
120
- className: u,
119
+ addEndListener: i,
120
+ children: p,
121
+ className: l,
121
122
  collapsedSize: d = "0px",
122
123
  component: g,
123
- easing: a,
124
+ easing: C,
124
125
  in: m,
125
- onEnter: E,
126
- onEntered: R,
126
+ onEnter: a,
127
+ onEntered: x,
127
128
  onEntering: A,
128
129
  onExit: D,
129
- onExited: w,
130
- onExiting: v,
130
+ onExited: R,
131
+ onExiting: T,
131
132
  orientation: f = "vertical",
132
- style: M,
133
- timeout: b = ve.standard,
133
+ style: k,
134
+ timeout: y = Ae.standard,
134
135
  // eslint-disable-next-line react/prop-types
135
- TransitionComponent: k = Ne,
136
+ TransitionComponent: W = Ie,
136
137
  ...Q
137
- } = s, P = {
138
- ...s,
138
+ } = c, M = {
139
+ ...c,
139
140
  orientation: f,
140
141
  collapsedSize: d
141
- }, x = Oe(P), O = Se(), X = Ce(), C = p.useRef(null), $ = p.useRef(), z = typeof d == "number" ? `${d}px` : d, S = f === "horizontal", N = S ? "width" : "height", j = p.useRef(null), Y = Ie(n, j), V = (r) => (h) => {
142
+ }, v = Oe(M), P = le(), X = Ce(), w = u.useRef(null), O = u.useRef(), $ = typeof d == "number" ? `${d}px` : d, S = f === "horizontal", N = S ? "width" : "height", z = u.useRef(null), Y = De(n, z), j = (r) => (b) => {
142
143
  if (r) {
143
- const y = j.current;
144
- h === void 0 ? r(y) : r(y, h);
144
+ const h = z.current;
145
+ b === void 0 ? r(h) : r(h, b);
145
146
  }
146
- }, Z = () => C.current ? C.current[S ? "clientWidth" : "clientHeight"] : 0, le = V((r, h) => {
147
- C.current && S && (C.current.style.position = "absolute"), r.style[N] = z, E && E(r, h);
148
- }), pe = V((r, h) => {
149
- const y = Z();
150
- C.current && S && (C.current.style.position = "");
147
+ }, Z = () => w.current ? w.current[S ? "clientWidth" : "clientHeight"] : 0, pe = j((r, b) => {
148
+ w.current && S && (w.current.style.position = "absolute"), r.style[N] = $, a && a(r, b);
149
+ }), ue = j((r, b) => {
150
+ const h = Z();
151
+ w.current && S && (w.current.style.position = "");
151
152
  const {
152
153
  duration: B,
153
154
  easing: H
154
155
  } = ae({
155
- style: M,
156
- timeout: b,
157
- easing: a
156
+ style: k,
157
+ timeout: y,
158
+ easing: C
158
159
  }, {
159
160
  mode: "enter"
160
161
  });
161
- if (b === "auto") {
162
- const re = O.transitions.getAutoHeightDuration(y);
163
- r.style.transitionDuration = `${re}ms`, $.current = re;
162
+ if (y === "auto") {
163
+ const re = P.transitions.getAutoHeightDuration(h);
164
+ r.style.transitionDuration = `${re}ms`, O.current = re;
164
165
  } else
165
166
  r.style.transitionDuration = typeof B == "string" ? B : `${B}ms`;
166
- r.style[N] = `${y}px`, r.style.transitionTimingFunction = H, A && A(r, h);
167
- }), ue = V((r, h) => {
168
- r.style[N] = "auto", R && R(r, h);
169
- }), fe = V((r) => {
167
+ r.style[N] = `${h}px`, r.style.transitionTimingFunction = H, A && A(r, b);
168
+ }), fe = j((r, b) => {
169
+ r.style[N] = "auto", x && x(r, b);
170
+ }), me = j((r) => {
170
171
  r.style[N] = `${Z()}px`, D && D(r);
171
- }), me = V(w), ge = V((r) => {
172
- const h = Z(), {
173
- duration: y,
172
+ }), ge = j(R), be = j((r) => {
173
+ const b = Z(), {
174
+ duration: h,
174
175
  easing: B
175
176
  } = ae({
176
- style: M,
177
- timeout: b,
178
- easing: a
177
+ style: k,
178
+ timeout: y,
179
+ easing: C
179
180
  }, {
180
181
  mode: "exit"
181
182
  });
182
- if (b === "auto") {
183
- const H = O.transitions.getAutoHeightDuration(h);
184
- r.style.transitionDuration = `${H}ms`, $.current = H;
183
+ if (y === "auto") {
184
+ const H = P.transitions.getAutoHeightDuration(b);
185
+ r.style.transitionDuration = `${H}ms`, O.current = H;
185
186
  } else
186
- r.style.transitionDuration = typeof y == "string" ? y : `${y}ms`;
187
- r.style[N] = z, r.style.transitionTimingFunction = B, v && v(r);
187
+ r.style.transitionDuration = typeof h == "string" ? h : `${h}ms`;
188
+ r.style[N] = $, r.style.transitionTimingFunction = B, T && T(r);
188
189
  });
189
- return /* @__PURE__ */ i(k, {
190
+ return /* @__PURE__ */ s(W, {
190
191
  in: m,
191
- onEnter: le,
192
- onEntered: ue,
193
- onEntering: pe,
194
- onExit: fe,
195
- onExited: me,
196
- onExiting: ge,
192
+ onEnter: pe,
193
+ onEntered: fe,
194
+ onEntering: ue,
195
+ onExit: me,
196
+ onExited: ge,
197
+ onExiting: be,
197
198
  addEndListener: (r) => {
198
- b === "auto" && X.start($.current || 0, r), c && c(j.current, r);
199
+ y === "auto" && X.start(O.current || 0, r), i && i(z.current, r);
199
200
  },
200
- nodeRef: j,
201
- timeout: b === "auto" ? null : b,
201
+ nodeRef: z,
202
+ timeout: y === "auto" ? null : y,
202
203
  ...Q,
203
204
  children: (r, {
204
- ownerState: h,
205
- ...y
206
- }) => /* @__PURE__ */ i($e, {
205
+ ownerState: b,
206
+ ...h
207
+ }) => /* @__PURE__ */ s($e, {
207
208
  as: g,
208
- className: U(x.root, u, {
209
- entered: x.entered,
210
- exited: !m && z === "0px" && x.hidden
209
+ className: U(v.root, l, {
210
+ entered: v.entered,
211
+ exited: !m && $ === "0px" && v.hidden
211
212
  }[r]),
212
213
  style: {
213
- [S ? "minWidth" : "minHeight"]: z,
214
- ...M
214
+ [S ? "minWidth" : "minHeight"]: $,
215
+ ...k
215
216
  },
216
217
  ref: Y,
217
218
  ownerState: {
218
- ...P,
219
+ ...M,
219
220
  state: r
220
221
  },
221
- ...y,
222
- children: /* @__PURE__ */ i(ze, {
222
+ ...h,
223
+ children: /* @__PURE__ */ s(ze, {
223
224
  ownerState: {
224
- ...P,
225
+ ...M,
225
226
  state: r
226
227
  },
227
- className: x.wrapper,
228
- ref: C,
229
- children: /* @__PURE__ */ i(je, {
228
+ className: v.wrapper,
229
+ ref: w,
230
+ children: /* @__PURE__ */ s(je, {
230
231
  ownerState: {
231
- ...P,
232
+ ...M,
232
233
  state: r
233
234
  },
234
- className: x.wrapperInner,
235
- children: l
235
+ className: v.wrapperInner,
236
+ children: p
236
237
  })
237
238
  })
238
239
  })
@@ -334,25 +335,25 @@ process.env.NODE_ENV !== "production" && (L.propTypes = {
334
335
  })])
335
336
  });
336
337
  L && (L.muiSupportAuto = !0);
337
- const ne = /* @__PURE__ */ p.createContext({});
338
+ const ne = /* @__PURE__ */ u.createContext({});
338
339
  process.env.NODE_ENV !== "production" && (ne.displayName = "AccordionContext");
339
340
  function Ve(o) {
340
- return _("MuiAccordion", o);
341
+ return q("MuiAccordion", o);
341
342
  }
342
- const F = q("MuiAccordion", ["root", "heading", "rounded", "expanded", "disabled", "gutters", "region"]), We = (o) => {
343
+ const F = _("MuiAccordion", ["root", "heading", "rounded", "expanded", "disabled", "gutters", "region"]), We = (o) => {
343
344
  const {
344
345
  classes: t,
345
346
  square: n,
346
- expanded: s,
347
- disabled: c,
348
- disableGutters: l
347
+ expanded: c,
348
+ disabled: i,
349
+ disableGutters: p
349
350
  } = o;
350
351
  return K({
351
- root: ["root", !n && "rounded", s && "expanded", c && "disabled", !l && "gutters"],
352
+ root: ["root", !n && "rounded", c && "expanded", i && "disabled", !p && "gutters"],
352
353
  heading: ["heading"],
353
354
  region: ["region"]
354
355
  }, Ve, t);
355
- }, ke = T(Re, {
356
+ }, Be = E(Se, {
356
357
  name: "MuiAccordion",
357
358
  slot: "Root",
358
359
  overridesResolver: (o, t) => {
@@ -439,88 +440,88 @@ const F = q("MuiAccordion", ["root", "heading", "rounded", "expanded", "disabled
439
440
  }
440
441
  }
441
442
  }]
442
- }))), Be = T("h3", {
443
+ }))), Ge = E("h3", {
443
444
  name: "MuiAccordion",
444
445
  slot: "Heading",
445
446
  overridesResolver: (o, t) => t.heading
446
447
  })({
447
448
  all: "unset"
448
- }), ee = /* @__PURE__ */ p.forwardRef(function(t, n) {
449
- const s = J({
449
+ }), ee = /* @__PURE__ */ u.forwardRef(function(t, n) {
450
+ const c = J({
450
451
  props: t,
451
452
  name: "MuiAccordion"
452
453
  }), {
453
- children: c,
454
- className: l,
455
- defaultExpanded: u = !1,
454
+ children: i,
455
+ className: p,
456
+ defaultExpanded: l = !1,
456
457
  disabled: d = !1,
457
458
  disableGutters: g = !1,
458
- expanded: a,
459
+ expanded: C,
459
460
  onChange: m,
460
- square: E = !1,
461
- slots: R = {},
461
+ square: a = !1,
462
+ slots: x = {},
462
463
  slotProps: A = {},
463
464
  TransitionComponent: D,
464
- TransitionProps: w,
465
- ...v
466
- } = s, [f, M] = Ae({
467
- controlled: a,
468
- default: u,
465
+ TransitionProps: R,
466
+ ...T
467
+ } = c, [f, k] = Ne({
468
+ controlled: C,
469
+ default: l,
469
470
  name: "Accordion",
470
471
  state: "expanded"
471
- }), b = p.useCallback((Y) => {
472
- M(!f), m && m(Y, !f);
473
- }, [f, m, M]), [k, ...Q] = p.Children.toArray(c), P = p.useMemo(() => ({
472
+ }), y = u.useCallback((Y) => {
473
+ k(!f), m && m(Y, !f);
474
+ }, [f, m, k]), [W, ...Q] = u.Children.toArray(i), M = u.useMemo(() => ({
474
475
  expanded: f,
475
476
  disabled: d,
476
477
  disableGutters: g,
477
- toggle: b
478
- }), [f, d, g, b]), x = {
479
- ...s,
480
- square: E,
478
+ toggle: y
479
+ }), [f, d, g, y]), v = {
480
+ ...c,
481
+ square: a,
481
482
  disabled: d,
482
483
  disableGutters: g,
483
484
  expanded: f
484
- }, O = We(x), X = {
485
+ }, P = We(v), X = {
485
486
  transition: D,
486
- ...R
487
- }, C = {
488
- transition: w,
487
+ ...x
488
+ }, w = {
489
+ transition: R,
489
490
  ...A
490
- }, $ = {
491
+ }, O = {
491
492
  slots: X,
492
- slotProps: C
493
- }, [z, S] = se("heading", {
494
- elementType: Be,
495
- externalForwardedProps: $,
496
- className: O.heading,
497
- ownerState: x
498
- }), [N, j] = se("transition", {
493
+ slotProps: w
494
+ }, [$, S] = se("heading", {
495
+ elementType: Ge,
496
+ externalForwardedProps: O,
497
+ className: P.heading,
498
+ ownerState: v
499
+ }), [N, z] = se("transition", {
499
500
  elementType: L,
500
- externalForwardedProps: $,
501
- ownerState: x
501
+ externalForwardedProps: O,
502
+ ownerState: v
502
503
  });
503
- return /* @__PURE__ */ G(ke, {
504
- className: U(O.root, l),
504
+ return /* @__PURE__ */ G(Be, {
505
+ className: U(P.root, p),
505
506
  ref: n,
506
- ownerState: x,
507
- square: E,
508
- ...v,
509
- children: [/* @__PURE__ */ i(z, {
507
+ ownerState: v,
508
+ square: a,
509
+ ...T,
510
+ children: [/* @__PURE__ */ s($, {
510
511
  ...S,
511
- children: /* @__PURE__ */ i(ne.Provider, {
512
- value: P,
513
- children: k
512
+ children: /* @__PURE__ */ s(ne.Provider, {
513
+ value: M,
514
+ children: W
514
515
  })
515
- }), /* @__PURE__ */ i(N, {
516
+ }), /* @__PURE__ */ s(N, {
516
517
  in: f,
517
518
  timeout: "auto",
518
- ...j,
519
- children: /* @__PURE__ */ i("div", {
520
- "aria-labelledby": k.props.id,
521
- id: k.props["aria-controls"],
519
+ ...z,
520
+ children: /* @__PURE__ */ s("div", {
521
+ "aria-labelledby": W.props.id,
522
+ id: W.props["aria-controls"],
522
523
  role: "region",
523
- className: O.region,
524
+ className: P.region,
524
525
  children: Q
525
526
  })
526
527
  })]
@@ -535,8 +536,8 @@ process.env.NODE_ENV !== "production" && (ee.propTypes = {
535
536
  * The content of the component.
536
537
  */
537
538
  children: we(e.node.isRequired, (o) => {
538
- const t = p.Children.toArray(o.children)[0];
539
- return xe.isFragment(t) ? new Error("MUI: The Accordion doesn't accept a Fragment as a child. Consider providing an array instead.") : /* @__PURE__ */ p.isValidElement(t) ? null : new Error("MUI: Expected the first child of Accordion to be a valid element.");
539
+ const t = u.Children.toArray(o.children)[0];
540
+ return Re.isFragment(t) ? new Error("MUI: The Accordion doesn't accept a Fragment as a child. Consider providing an array instead.") : /* @__PURE__ */ u.isValidElement(t) ? null : new Error("MUI: Expected the first child of Accordion to be a valid element.");
540
541
  }),
541
542
  /**
542
543
  * Override or extend the styles applied to the component.
@@ -611,18 +612,18 @@ process.env.NODE_ENV !== "production" && (ee.propTypes = {
611
612
  */
612
613
  TransitionProps: e.object
613
614
  });
614
- function Ge(o) {
615
- return _("MuiAccordionDetails", o);
615
+ function Ue(o) {
616
+ return q("MuiAccordionDetails", o);
616
617
  }
617
- q("MuiAccordionDetails", ["root"]);
618
- const Ue = (o) => {
618
+ _("MuiAccordionDetails", ["root"]);
619
+ const He = (o) => {
619
620
  const {
620
621
  classes: t
621
622
  } = o;
622
623
  return K({
623
624
  root: ["root"]
624
- }, Ge, t);
625
- }, He = T("div", {
625
+ }, Ue, t);
626
+ }, Fe = E("div", {
626
627
  name: "MuiAccordionDetails",
627
628
  slot: "Root",
628
629
  overridesResolver: (o, t) => t.root
@@ -630,19 +631,19 @@ const Ue = (o) => {
630
631
  theme: o
631
632
  }) => ({
632
633
  padding: o.spacing(1, 2, 2)
633
- }))), oe = /* @__PURE__ */ p.forwardRef(function(t, n) {
634
- const s = J({
634
+ }))), oe = /* @__PURE__ */ u.forwardRef(function(t, n) {
635
+ const c = J({
635
636
  props: t,
636
637
  name: "MuiAccordionDetails"
637
638
  }), {
638
- className: c,
639
- ...l
640
- } = s, u = s, d = Ue(u);
641
- return /* @__PURE__ */ i(He, {
642
- className: U(d.root, c),
639
+ className: i,
640
+ ...p
641
+ } = c, l = c, d = He(l);
642
+ return /* @__PURE__ */ s(Fe, {
643
+ className: U(d.root, i),
643
644
  ref: n,
644
- ownerState: u,
645
- ...l
645
+ ownerState: l,
646
+ ...p
646
647
  });
647
648
  });
648
649
  process.env.NODE_ENV !== "production" && (oe.propTypes = {
@@ -667,23 +668,23 @@ process.env.NODE_ENV !== "production" && (oe.propTypes = {
667
668
  */
668
669
  sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
669
670
  });
670
- function Fe(o) {
671
- return _("MuiAccordionSummary", o);
671
+ function Le(o) {
672
+ return q("MuiAccordionSummary", o);
672
673
  }
673
- const W = q("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disabled", "gutters", "contentGutters", "content", "expandIconWrapper"]), Le = (o) => {
674
+ const V = _("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disabled", "gutters", "contentGutters", "content", "expandIconWrapper"]), qe = (o) => {
674
675
  const {
675
676
  classes: t,
676
677
  expanded: n,
677
- disabled: s,
678
- disableGutters: c
678
+ disabled: c,
679
+ disableGutters: i
679
680
  } = o;
680
681
  return K({
681
- root: ["root", n && "expanded", s && "disabled", !c && "gutters"],
682
+ root: ["root", n && "expanded", c && "disabled", !i && "gutters"],
682
683
  focusVisible: ["focusVisible"],
683
- content: ["content", n && "expanded", !c && "contentGutters"],
684
+ content: ["content", n && "expanded", !i && "contentGutters"],
684
685
  expandIconWrapper: ["expandIconWrapper", n && "expanded"]
685
- }, Fe, t);
686
- }, qe = T(Ee, {
686
+ }, Le, t);
687
+ }, _e = E(Ee, {
687
688
  name: "MuiAccordionSummary",
688
689
  slot: "Root",
689
690
  overridesResolver: (o, t) => t.root
@@ -699,25 +700,25 @@ const W = q("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disable
699
700
  minHeight: 48,
700
701
  padding: o.spacing(0, 2),
701
702
  transition: o.transitions.create(["min-height", "background-color"], t),
702
- [`&.${W.focusVisible}`]: {
703
+ [`&.${V.focusVisible}`]: {
703
704
  backgroundColor: (o.vars || o).palette.action.focus
704
705
  },
705
- [`&.${W.disabled}`]: {
706
+ [`&.${V.disabled}`]: {
706
707
  opacity: (o.vars || o).palette.action.disabledOpacity
707
708
  },
708
- [`&:hover:not(.${W.disabled})`]: {
709
+ [`&:hover:not(.${V.disabled})`]: {
709
710
  cursor: "pointer"
710
711
  },
711
712
  variants: [{
712
713
  props: (n) => !n.disableGutters,
713
714
  style: {
714
- [`&.${W.expanded}`]: {
715
+ [`&.${V.expanded}`]: {
715
716
  minHeight: 64
716
717
  }
717
718
  }
718
719
  }]
719
720
  };
720
- })), _e = T("span", {
721
+ })), Je = E("span", {
721
722
  name: "MuiAccordionSummary",
722
723
  slot: "Content",
723
724
  overridesResolver: (o, t) => t.content
@@ -734,12 +735,12 @@ const W = q("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disable
734
735
  transition: o.transitions.create(["margin"], {
735
736
  duration: o.transitions.duration.shortest
736
737
  }),
737
- [`&.${W.expanded}`]: {
738
+ [`&.${V.expanded}`]: {
738
739
  margin: "20px 0"
739
740
  }
740
741
  }
741
742
  }]
742
- }))), Je = T("span", {
743
+ }))), Ke = E("span", {
743
744
  name: "MuiAccordionSummary",
744
745
  slot: "ExpandIconWrapper",
745
746
  overridesResolver: (o, t) => t.expandIconWrapper
@@ -752,52 +753,52 @@ const W = q("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disable
752
753
  transition: o.transitions.create("transform", {
753
754
  duration: o.transitions.duration.shortest
754
755
  }),
755
- [`&.${W.expanded}`]: {
756
+ [`&.${V.expanded}`]: {
756
757
  transform: "rotate(180deg)"
757
758
  }
758
- }))), te = /* @__PURE__ */ p.forwardRef(function(t, n) {
759
- const s = J({
759
+ }))), te = /* @__PURE__ */ u.forwardRef(function(t, n) {
760
+ const c = J({
760
761
  props: t,
761
762
  name: "MuiAccordionSummary"
762
763
  }), {
763
- children: c,
764
- className: l,
765
- expandIcon: u,
764
+ children: i,
765
+ className: p,
766
+ expandIcon: l,
766
767
  focusVisibleClassName: d,
767
768
  onClick: g,
768
- ...a
769
- } = s, {
769
+ ...C
770
+ } = c, {
770
771
  disabled: m = !1,
771
- disableGutters: E,
772
- expanded: R,
772
+ disableGutters: a,
773
+ expanded: x,
773
774
  toggle: A
774
- } = p.useContext(ne), D = (f) => {
775
+ } = u.useContext(ne), D = (f) => {
775
776
  A && A(f), g && g(f);
776
- }, w = {
777
- ...s,
778
- expanded: R,
777
+ }, R = {
778
+ ...c,
779
+ expanded: x,
779
780
  disabled: m,
780
- disableGutters: E
781
- }, v = Le(w);
782
- return /* @__PURE__ */ G(qe, {
781
+ disableGutters: a
782
+ }, T = qe(R);
783
+ return /* @__PURE__ */ G(_e, {
783
784
  focusRipple: !1,
784
785
  disableRipple: !0,
785
786
  disabled: m,
786
- "aria-expanded": R,
787
- className: U(v.root, l),
788
- focusVisibleClassName: U(v.focusVisible, d),
787
+ "aria-expanded": x,
788
+ className: U(T.root, p),
789
+ focusVisibleClassName: U(T.focusVisible, d),
789
790
  onClick: D,
790
791
  ref: n,
791
- ownerState: w,
792
- ...a,
793
- children: [/* @__PURE__ */ i(_e, {
794
- className: v.content,
795
- ownerState: w,
796
- children: c
797
- }), u && /* @__PURE__ */ i(Je, {
798
- className: v.expandIconWrapper,
799
- ownerState: w,
800
- children: u
792
+ ownerState: R,
793
+ ...C,
794
+ children: [/* @__PURE__ */ s(Je, {
795
+ className: T.content,
796
+ ownerState: R,
797
+ children: i
798
+ }), l && /* @__PURE__ */ s(Ke, {
799
+ className: T.expandIconWrapper,
800
+ ownerState: R,
801
+ children: l
801
802
  })]
802
803
  });
803
804
  });
@@ -840,94 +841,144 @@ process.env.NODE_ENV !== "production" && (te.propTypes = {
840
841
  */
841
842
  sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
842
843
  });
843
- const de = De(/* @__PURE__ */ i("path", {
844
+ const de = ke(/* @__PURE__ */ s("path", {
844
845
  d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
845
846
  }), "ExpandMore");
846
- function uo() {
847
- const o = ye(be);
847
+ function mo() {
848
+ const o = xe(ye), t = le(), n = ve(t);
848
849
  if (!o || !o.preferences)
849
850
  return null;
850
- const t = o.preferences.notifications.sort((n, s) => n.title.localeCompare(s.title)).map((n) => {
851
- var u, d, g;
852
- const s = (u = o.preferences) == null ? void 0 : u.preferences.filter(
853
- (a) => a.notificationId === n.notificationId && !a.subNotificationId
854
- ), c = (d = o.preferences) == null ? void 0 : d.preferences.filter(
855
- (a) => a.notificationId === n.notificationId && a.subNotificationId
856
- ), l = (g = o.preferences) == null ? void 0 : g.subNotifications.filter(
857
- (a) => c == null ? void 0 : c.find(
858
- (m) => m.subNotificationId === a.subNotificationId && m.notificationId === a.notificationId
851
+ const c = o.preferences.notifications.sort((i, p) => i.title.localeCompare(p.title)).map((i) => {
852
+ var g, C, m;
853
+ const p = (g = o.preferences) == null ? void 0 : g.preferences.filter(
854
+ (a) => a.notificationId === i.notificationId && !a.subNotificationId
855
+ ), l = (C = o.preferences) == null ? void 0 : C.preferences.filter(
856
+ (a) => a.notificationId === i.notificationId && a.subNotificationId
857
+ ), d = (m = o.preferences) == null ? void 0 : m.subNotifications.filter(
858
+ (a) => l == null ? void 0 : l.find(
859
+ (x) => x.subNotificationId === a.subNotificationId && x.notificationId === a.notificationId
859
860
  )
860
861
  );
861
862
  return /* @__PURE__ */ G(
862
863
  ee,
863
864
  {
864
- style: {
865
+ sx: {
865
866
  marginBottom: 0,
866
- marginTop: 0
867
+ marginTop: 0,
868
+ backgroundColor: n.paper,
869
+ color: n.text,
870
+ "&:before": {
871
+ backgroundColor: n.divider
872
+ }
867
873
  },
868
874
  children: [
869
- /* @__PURE__ */ i(
875
+ /* @__PURE__ */ s(
870
876
  te,
871
877
  {
872
- expandIcon: /* @__PURE__ */ i(de, {}),
873
- style: {
874
- backgroundColor: "#f0f0f0",
878
+ expandIcon: /* @__PURE__ */ s(de, { sx: { color: n.text } }),
879
+ sx: {
880
+ backgroundColor: t.palette.mode === "dark" ? "rgba(255, 255, 255, 0.05)" : "rgba(0, 0, 0, 0.02)",
875
881
  flexDirection: "row-reverse",
876
- gap: 16
882
+ gap: 16,
883
+ "&:hover": {
884
+ backgroundColor: t.palette.mode === "dark" ? "rgba(255, 255, 255, 0.08)" : "rgba(0, 0, 0, 0.04)"
885
+ }
877
886
  },
878
- children: /* @__PURE__ */ i(ce, { variant: "body1", children: n.title })
887
+ children: /* @__PURE__ */ s(ce, { variant: "body1", sx: { color: n.text }, children: i.title })
879
888
  }
880
889
  ),
881
- /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ G(he, { children: [
882
- /* @__PURE__ */ i(
883
- ie,
884
- {
885
- notification: n,
886
- preferences: s || [],
887
- updateDelivery: o.updateDelivery
888
- },
889
- n.notificationId
890
- ),
891
- l == null ? void 0 : l.map((a) => /* @__PURE__ */ G(
892
- ee,
893
- {
894
- style: {
895
- marginTop: 12
896
- },
897
- children: [
898
- /* @__PURE__ */ i(
899
- te,
900
- {
901
- expandIcon: /* @__PURE__ */ i(de, {}),
902
- style: {
903
- flexDirection: "row-reverse",
904
- gap: 16
905
- },
906
- children: /* @__PURE__ */ i(ce, { variant: "body1", children: a.title })
907
- }
908
- ),
909
- /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i(
910
- ie,
911
- {
912
- notification: n,
913
- preferences: c || [],
914
- updateDelivery: o.updateDelivery,
915
- subNotificationId: a.subNotificationId
890
+ /* @__PURE__ */ s(
891
+ oe,
892
+ {
893
+ sx: { backgroundColor: n.paper, color: n.text },
894
+ children: /* @__PURE__ */ G(he, { children: [
895
+ /* @__PURE__ */ s(
896
+ ie,
897
+ {
898
+ notification: i,
899
+ preferences: p || [],
900
+ updateDelivery: o.updateDelivery
901
+ },
902
+ i.notificationId
903
+ ),
904
+ d == null ? void 0 : d.map((a) => /* @__PURE__ */ G(
905
+ ee,
906
+ {
907
+ sx: {
908
+ marginTop: 12,
909
+ backgroundColor: n.paper,
910
+ color: n.text,
911
+ "&:before": {
912
+ backgroundColor: n.divider
913
+ }
916
914
  },
917
- a.subNotificationId
918
- ) })
919
- ]
920
- },
921
- `${a.notificationId}-${a.subNotificationId}`
922
- ))
923
- ] }) })
915
+ children: [
916
+ /* @__PURE__ */ s(
917
+ te,
918
+ {
919
+ expandIcon: /* @__PURE__ */ s(de, { sx: { color: n.text } }),
920
+ sx: {
921
+ flexDirection: "row-reverse",
922
+ gap: 16,
923
+ backgroundColor: t.palette.mode === "dark" ? "rgba(255, 255, 255, 0.03)" : "rgba(0, 0, 0, 0.01)",
924
+ "&:hover": {
925
+ backgroundColor: t.palette.mode === "dark" ? "rgba(255, 255, 255, 0.06)" : "rgba(0, 0, 0, 0.02)"
926
+ }
927
+ },
928
+ children: /* @__PURE__ */ s(
929
+ ce,
930
+ {
931
+ variant: "body1",
932
+ sx: { color: n.text },
933
+ children: a.title
934
+ }
935
+ )
936
+ }
937
+ ),
938
+ /* @__PURE__ */ s(
939
+ oe,
940
+ {
941
+ sx: {
942
+ backgroundColor: n.paper,
943
+ color: n.text
944
+ },
945
+ children: /* @__PURE__ */ s(
946
+ ie,
947
+ {
948
+ notification: i,
949
+ preferences: l || [],
950
+ updateDelivery: o.updateDelivery,
951
+ subNotificationId: a.subNotificationId
952
+ },
953
+ a.subNotificationId
954
+ )
955
+ }
956
+ )
957
+ ]
958
+ },
959
+ `${a.notificationId}-${a.subNotificationId}`
960
+ ))
961
+ ] })
962
+ }
963
+ )
924
964
  ]
925
965
  },
926
- n.notificationId
966
+ i.notificationId
927
967
  );
928
968
  });
929
- return /* @__PURE__ */ i(Me, { sx: { borderRadius: 2, overflow: "hidden" }, children: t });
969
+ return /* @__PURE__ */ s(
970
+ Me,
971
+ {
972
+ sx: {
973
+ borderRadius: 2,
974
+ overflow: "hidden",
975
+ backgroundColor: n.paper,
976
+ color: n.text
977
+ },
978
+ children: c
979
+ }
980
+ );
930
981
  }
931
982
  export {
932
- uo as Preferences
983
+ mo as Preferences
933
984
  };