@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.
@@ -1,5 +1,5 @@
1
1
  import * as c from "react";
2
- import { g as z, e as a, a as g, P as e } from "./createTheme.js";
2
+ import { g as z, e as a, b as g, P as e } from "./createTheme.js";
3
3
  import { g as R, s as I, m as f, u as O, c as C, a as h } from "./DefaultPropsProvider.js";
4
4
  import { c as y } from "./createSimplePaletteValueFilter.js";
5
5
  import { jsx as T } from "react/jsx-runtime";
@@ -3,10 +3,10 @@ import { P as e, g as le } from "./createTheme.js";
3
3
  import { g as de, s as J, u as ue, c as X, a as fe, m as ke } from "./DefaultPropsProvider.js";
4
4
  import { o as j, e as Q, g as pe, P as Pe, H as Ne } from "./Portal.js";
5
5
  import { u as Y, e as Ce } from "./resolveComponentProps.js";
6
- import { u as Se, b as H, f as oe } from "./ButtonBase.js";
6
+ import { u as Se, a as H, d as oe } from "./ButtonBase.js";
7
7
  import { c as re } from "./Stack.js";
8
8
  import { jsx as A, jsxs as be } from "react/jsx-runtime";
9
- import { T as we, r as Ie, g as se } from "./utils.js";
9
+ import { T as we, a as Ie, g as se } from "./utils.js";
10
10
  import { e as Oe } from "./exactProp.js";
11
11
  function _(t) {
12
12
  return j(t).defaultView || window;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _, jsxs as ut } from "react/jsx-runtime";
2
2
  import { g as ai, s as $t, m as ui, u as li, c as ci, a as fi, n as hi } from "./DefaultPropsProvider.js";
3
3
  import { getThemeColors as pi } from "../utils/theme.js";
4
- import { b as di, u as mi } from "./ButtonBase.js";
4
+ import { a as di, u as mi } from "./ButtonBase.js";
5
5
  import * as mt from "react";
6
6
  import De, { useMemo as ne, useCallback as gi, useRef as Kt, useState as yi, useEffect as er } from "react";
7
7
  import { g as wi, P as p, v as dn, q as vi } from "./createTheme.js";
@@ -1,13 +1,13 @@
1
1
  import * as P from "react";
2
- import { g as h, a as u, d as f, P as a } from "./createTheme.js";
3
- import { g as b, s as g, m as w, u as T, c as $, a as x } from "./DefaultPropsProvider.js";
2
+ import { g as b, b as u, P as a, d as f } from "./createTheme.js";
3
+ import { g as h, s as g, m as w, u as T, c as $, a as x } from "./DefaultPropsProvider.js";
4
4
  import { u as O, c as C } from "./ButtonBase.js";
5
5
  import { jsx as N } from "react/jsx-runtime";
6
6
  import { i as R } from "./integerPropType.js";
7
7
  function j(e) {
8
- return h("MuiPaper", e);
8
+ return b("MuiPaper", e);
9
9
  }
10
- b("MuiPaper", ["root", "rounded", "outlined", "elevation", "elevation0", "elevation1", "elevation2", "elevation3", "elevation4", "elevation5", "elevation6", "elevation7", "elevation8", "elevation9", "elevation10", "elevation11", "elevation12", "elevation13", "elevation14", "elevation15", "elevation16", "elevation17", "elevation18", "elevation19", "elevation20", "elevation21", "elevation22", "elevation23", "elevation24"]);
10
+ h("MuiPaper", ["root", "rounded", "outlined", "elevation", "elevation0", "elevation1", "elevation2", "elevation3", "elevation4", "elevation5", "elevation6", "elevation7", "elevation8", "elevation9", "elevation10", "elevation11", "elevation12", "elevation13", "elevation14", "elevation15", "elevation16", "elevation17", "elevation18", "elevation19", "elevation20", "elevation21", "elevation22", "elevation23", "elevation24"]);
11
11
  const E = (e) => {
12
12
  const {
13
13
  square: o,
@@ -2,7 +2,7 @@ import * as c from "react";
2
2
  import { g as Pe, P as e } from "./createTheme.js";
3
3
  import { g as ve, s as te, u as ye, c as Y, a as be } from "./DefaultPropsProvider.js";
4
4
  import { i as Te } from "./List.js";
5
- import { b as X, r as Ee, c as Oe, e as Re } from "./ButtonBase.js";
5
+ import { a as X, r as Ee, c as Oe, e as Re } from "./ButtonBase.js";
6
6
  import { jsx as z } from "react/jsx-runtime";
7
7
  import { M as we, o as J } from "./Modal.js";
8
8
  import { P as xe } from "./Paper.js";
@@ -1,7 +1,7 @@
1
1
  import { P as c } from "./createTheme.js";
2
- import { c as m, d as f } from "./ButtonBase.js";
2
+ import { c as m, f } from "./ButtonBase.js";
3
3
  import * as u from "react";
4
- import { a as P } from "./utils.js";
4
+ import { r as P } from "./utils.js";
5
5
  import { u as T, s as d } from "./resolveComponentProps.js";
6
6
  import { e as h } from "./exactProp.js";
7
7
  function R(e) {
@@ -1,5 +1,5 @@
1
1
  import * as l from "react";
2
- import { P as e, b as S, h as g, r as m, j as V, k as N, m as D, g as E, l as h } from "./createTheme.js";
2
+ import { P as e, a as S, h as g, r as m, j as V, k as N, m as D, g as E, l as h } from "./createTheme.js";
3
3
  import { e as R, c as B, a as M, s as w, u as G } from "./DefaultPropsProvider.js";
4
4
  import { jsx as U } from "react/jsx-runtime";
5
5
  import { e as _ } from "./Typography.js";
@@ -2803,8 +2803,8 @@ function Qn(e = {}, ...r) {
2803
2803
  export {
2804
2804
  tn as C,
2805
2805
  Ce as P,
2806
- ln as a,
2807
- en as b,
2806
+ en as a,
2807
+ ln as b,
2808
2808
  Qn as c,
2809
2809
  Mn as d,
2810
2810
  Nr as e,
@@ -0,0 +1,49 @@
1
+ import * as n from "react";
2
+ let l = 0;
3
+ function h(e) {
4
+ const [t, o] = n.useState(e), u = e || t;
5
+ return n.useEffect(() => {
6
+ t == null && (l += 1, o(`mui-${l}`));
7
+ }, [t]), u;
8
+ }
9
+ const I = {
10
+ ...n
11
+ }, r = I.useId;
12
+ function g(e) {
13
+ if (r !== void 0) {
14
+ const t = r();
15
+ return e ?? t;
16
+ }
17
+ return h(e);
18
+ }
19
+ function m({
20
+ controlled: e,
21
+ default: t,
22
+ name: o,
23
+ state: u = "value"
24
+ }) {
25
+ const {
26
+ current: s
27
+ } = n.useRef(e !== void 0), [i, f] = n.useState(t), a = s ? e : i;
28
+ if (process.env.NODE_ENV !== "production") {
29
+ n.useEffect(() => {
30
+ s !== (e !== void 0) && console.error([`MUI: A component is changing the ${s ? "" : "un"}controlled ${u} state of ${o} to be ${s ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${o} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
31
+ `));
32
+ }, [u, o, e]);
33
+ const {
34
+ current: c
35
+ } = n.useRef(t);
36
+ n.useEffect(() => {
37
+ !s && !Object.is(c, t) && console.error([`MUI: A component is changing the default ${u} state of an uncontrolled ${o} after being initialized. To suppress this warning opt to use a controlled ${o}.`].join(`
38
+ `));
39
+ }, [JSON.stringify(t)]);
40
+ }
41
+ const d = n.useCallback((c) => {
42
+ s || f(c);
43
+ }, []);
44
+ return [a, d];
45
+ }
46
+ export {
47
+ g as a,
48
+ m as u
49
+ };
@@ -0,0 +1,10 @@
1
+ import * as r from "react";
2
+ const t = (s) => {
3
+ const e = r.useRef({});
4
+ return r.useEffect(() => {
5
+ e.current = s;
6
+ }), e.current;
7
+ };
8
+ export {
9
+ t as u
10
+ };
@@ -1,4 +1,4 @@
1
- import { b as m } from "./createTheme.js";
1
+ import { a as m } from "./createTheme.js";
2
2
  import { u as t } from "./useThemeWithoutDefault.js";
3
3
  const r = m();
4
4
  function u(e = r) {
@@ -1,4 +1,4 @@
1
- import { _ as k, g as I, T as A } from "./ButtonBase.js";
1
+ import { _ as k, g as I, h as A } from "./ButtonBase.js";
2
2
  import { q as U, P as c } from "./createTheme.js";
3
3
  import T from "react";
4
4
  var N = { exports: {} }, y = {};
@@ -737,7 +737,7 @@ function Y(p, g) {
737
737
  export {
738
738
  D as R,
739
739
  E as T,
740
- G as a,
740
+ W as a,
741
741
  Y as g,
742
- W as r
742
+ G as r
743
743
  };
@@ -7,13 +7,13 @@ import { Filter as Yt } from "./interface.js";
7
7
  import { NotificationAPIContext as nn } from "../Provider/context.js";
8
8
  import { DefaultEmptyComponent as on } from "./DefaultEmpty.js";
9
9
  import { g as ze, s as he, u as Je, c as _e, a as Qe, m as et, _ as Ct } from "../../assets/DefaultPropsProvider.js";
10
- import { c as an, e as sn, B as cn, b as We, g as ln, j as un, k as fn, u as dn } from "../../assets/ButtonBase.js";
11
- import { g as tt, P as c, a as we, e as xe, q as vn } from "../../assets/createTheme.js";
12
- import { R as Gt, a as Ut } from "../../assets/utils.js";
10
+ import { c as an, e as sn, B as cn, a as We, g as ln, j as un, k as fn, u as dn } from "../../assets/ButtonBase.js";
11
+ import { g as tt, P as c, b as we, e as xe, q as vn } from "../../assets/createTheme.js";
12
+ import { R as Gt, r as Ut } from "../../assets/utils.js";
13
13
  import { getThemeColors as pn } from "../../utils/theme.js";
14
14
  import { b as Ge, a as vr, i as Xt, L as Kt } from "../../assets/List.js";
15
15
  import { u as hn } from "../../assets/resolveComponentProps.js";
16
- import { a as mn } from "../../assets/dividerClasses.js";
16
+ import { u as mn } from "../../assets/useControlled.js";
17
17
  import { i as Ae } from "../../assets/integerPropType.js";
18
18
  import { u as gn } from "../../assets/index.js";
19
19
  import { c as qt } from "../../assets/createSimplePaletteValueFilter.js";