@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.
Files changed (47) hide show
  1. package/dist/assets/Badge.js +60 -64
  2. package/dist/assets/Box.js +26 -24
  3. package/dist/assets/Button.js +22 -19
  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 +22 -18
  8. package/dist/assets/GlobalStyles.js +23 -0
  9. package/dist/assets/Grow.js +1513 -120
  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 +8 -8
  15. package/dist/assets/Popover.js +37 -36
  16. package/dist/assets/Portal.js +39 -49
  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/exactProp.js +13 -0
  22. package/dist/assets/index.js +19 -148
  23. package/dist/assets/index2.js +151 -0
  24. package/dist/assets/useControlled.js +49 -0
  25. package/dist/assets/usePreviousProps.js +10 -0
  26. package/dist/assets/useTheme.js +6 -7
  27. package/dist/assets/{useTheme2.js → useThemeWithoutDefault.js} +63 -67
  28. package/dist/assets/utils.js +4 -4
  29. package/dist/components/Notifications/Inbox.js +593 -583
  30. package/dist/components/Notifications/InboxHeader.js +360 -1754
  31. package/dist/components/Notifications/Notification.js +4 -2
  32. package/dist/components/Notifications/NotificationFeed.js +40 -32
  33. package/dist/components/Notifications/NotificationLauncher.js +90 -64
  34. package/dist/components/Notifications/NotificationPopup.js +76 -65
  35. package/dist/components/Preferences/NotificationPreferencesInline.js +57 -39
  36. package/dist/components/Preferences/NotificationPreferencesPopup.js +111 -99
  37. package/dist/components/Preferences/PreferenceInput.js +427 -414
  38. package/dist/components/Preferences/Preferences.js +329 -278
  39. package/dist/components/Provider/index.d.ts +2 -0
  40. package/dist/components/Provider/index.js +1008 -401
  41. package/dist/components/Slack/SlackConnect.js +4627 -2024
  42. package/dist/main.d.ts +2 -0
  43. package/dist/main.js +6 -3
  44. package/dist/utils/theme.d.ts +17 -0
  45. package/dist/utils/theme.js +104 -0
  46. package/package.json +1 -1
  47. package/dist/assets/dividerClasses.js +0 -56
@@ -1,25 +1,28 @@
1
1
  var Le = Object.defineProperty;
2
2
  var Be = (e, t, n) => t in e ? Le(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var K = (e, t, n) => Be(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { r as je, m as ke, u as te, a as Fe } from "./resolveComponentProps.js";
5
- import * as d from "react";
6
- import q, { Children as $e, isValidElement as G, cloneElement as Z } from "react";
7
- import { P as o, _ as Ue, c as x, g as de, s as re, u as he, e as _e, b as ze } from "./DefaultPropsProvider.js";
8
- import { jsx as U, jsxs as Ae } from "react/jsx-runtime";
9
- import { k as se } from "./useTheme2.js";
10
- const Ye = typeof window < "u" ? d.useLayoutEffect : d.useEffect;
11
- function Xe(e, t) {
4
+ import * as p from "react";
5
+ import q, { Children as je, isValidElement as G, cloneElement as Z } from "react";
6
+ import { d as ke, _ as $e, c as x, g as de, s as re, u as he, a as Fe } from "./DefaultPropsProvider.js";
7
+ import { T as _e } from "./DefaultPropsProvider2.js";
8
+ import { u as Ue } from "./useTheme.js";
9
+ import { r as ze, m as Ae, u as te, a as Ye } from "./resolveComponentProps.js";
10
+ import { P as o, g as Xe } from "./createTheme.js";
11
+ import { jsx as _, jsxs as Ke } from "react/jsx-runtime";
12
+ import { k as se } from "./useThemeWithoutDefault.js";
13
+ const qe = typeof window < "u" ? p.useLayoutEffect : p.useEffect;
14
+ function He(e, t) {
12
15
  return process.env.NODE_ENV === "production" ? () => null : function(...i) {
13
16
  return e(...i) || t(...i);
14
17
  };
15
18
  }
16
- function Ke(e) {
19
+ function We(e) {
17
20
  const {
18
21
  prototype: t = {}
19
22
  } = e;
20
23
  return !!t.isReactComponent;
21
24
  }
22
- function qe(e, t, n, i, r) {
25
+ function Ge(e, t, n, i, r) {
23
26
  const s = e[t], u = r || t;
24
27
  if (s == null || // When server-side rendering React doesn't warn either.
25
28
  // This is not an accurate check for SSR.
@@ -28,26 +31,26 @@ function qe(e, t, n, i, r) {
28
31
  typeof window > "u")
29
32
  return null;
30
33
  let c;
31
- return typeof s == "function" && !Ke(s) && (c = "Did you accidentally provide a plain function component instead?"), c !== void 0 ? new Error(`Invalid ${i} \`${u}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
34
+ return typeof s == "function" && !We(s) && (c = "Did you accidentally provide a plain function component instead?"), c !== void 0 ? new Error(`Invalid ${i} \`${u}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
32
35
  }
33
- const He = Xe(o.elementType, qe), We = o.oneOfType([o.func, o.object]);
36
+ const Ze = He(o.elementType, Ge), Je = o.oneOfType([o.func, o.object]);
34
37
  function J(e) {
35
- const t = d.useRef(e);
36
- return Ye(() => {
38
+ const t = p.useRef(e);
39
+ return qe(() => {
37
40
  t.current = e;
38
- }), d.useRef((...n) => (
41
+ }), p.useRef((...n) => (
39
42
  // @ts-expect-error hide `this`
40
43
  (0, t.current)(...n)
41
44
  )).current;
42
45
  }
43
46
  const ce = {};
44
47
  function me(e, t) {
45
- const n = d.useRef(ce);
48
+ const n = p.useRef(ce);
46
49
  return n.current === ce && (n.current = e(t)), n;
47
50
  }
48
- const Ge = [];
49
- function Ze(e) {
50
- d.useEffect(e, Ge);
51
+ const Qe = [];
52
+ function et(e) {
53
+ p.useEffect(e, Qe);
51
54
  }
52
55
  class ie {
53
56
  constructor() {
@@ -69,9 +72,9 @@ class ie {
69
72
  }, t);
70
73
  }
71
74
  }
72
- function Je() {
75
+ function tt() {
73
76
  const e = me(ie.create).current;
74
- return Ze(e.disposeEffect), e;
77
+ return et(e.disposeEffect), e;
75
78
  }
76
79
  function pe(e) {
77
80
  try {
@@ -82,7 +85,11 @@ function pe(e) {
82
85
  }
83
86
  return !1;
84
87
  }
85
- function Qe(e, t) {
88
+ function Vt() {
89
+ const e = Ue(ke);
90
+ return process.env.NODE_ENV !== "production" && p.useDebugValue(e), e[_e] || e;
91
+ }
92
+ function nt(e, t) {
86
93
  if (e == null) return {};
87
94
  var n = {};
88
95
  for (var i in e) if ({}.hasOwnProperty.call(e, i)) {
@@ -96,11 +103,11 @@ function ne(e, t) {
96
103
  return n.__proto__ = i, n;
97
104
  }, ne(e, t);
98
105
  }
99
- function et(e, t) {
106
+ function ot(e, t) {
100
107
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ne(e, t);
101
108
  }
102
109
  const fe = q.createContext(null);
103
- function tt(e) {
110
+ function rt(e) {
104
111
  if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
105
112
  return e;
106
113
  }
@@ -108,13 +115,13 @@ function ue(e, t) {
108
115
  var n = function(s) {
109
116
  return t && G(s) ? t(s) : s;
110
117
  }, i = /* @__PURE__ */ Object.create(null);
111
- return e && $e.map(e, function(r) {
118
+ return e && je.map(e, function(r) {
112
119
  return r;
113
120
  }).forEach(function(r) {
114
121
  i[r.key] = n(r);
115
122
  }), i;
116
123
  }
117
- function nt(e, t) {
124
+ function st(e, t) {
118
125
  e = e || {}, t = t || {};
119
126
  function n(h) {
120
127
  return h in t ? t[h] : e[h];
@@ -126,8 +133,8 @@ function nt(e, t) {
126
133
  for (var l in t) {
127
134
  if (i[l])
128
135
  for (u = 0; u < i[l].length; u++) {
129
- var p = i[l][u];
130
- c[i[l][u]] = n(p);
136
+ var f = i[l][u];
137
+ c[i[l][u]] = n(f);
131
138
  }
132
139
  c[l] = n(l);
133
140
  }
@@ -135,57 +142,57 @@ function nt(e, t) {
135
142
  c[r[u]] = n(r[u]);
136
143
  return c;
137
144
  }
138
- function F(e, t, n) {
145
+ function $(e, t, n) {
139
146
  return n[t] != null ? n[t] : e.props[t];
140
147
  }
141
- function ot(e, t) {
148
+ function it(e, t) {
142
149
  return ue(e.children, function(n) {
143
150
  return Z(n, {
144
151
  onExited: t.bind(null, n),
145
152
  in: !0,
146
- appear: F(n, "appear", e),
147
- enter: F(n, "enter", e),
148
- exit: F(n, "exit", e)
153
+ appear: $(n, "appear", e),
154
+ enter: $(n, "enter", e),
155
+ exit: $(n, "exit", e)
149
156
  });
150
157
  });
151
158
  }
152
- function rt(e, t, n) {
153
- var i = ue(e.children), r = nt(t, i);
159
+ function ut(e, t, n) {
160
+ var i = ue(e.children), r = st(t, i);
154
161
  return Object.keys(r).forEach(function(s) {
155
162
  var u = r[s];
156
163
  if (G(u)) {
157
- var c = s in t, l = s in i, p = t[s], h = G(p) && !p.props.in;
164
+ var c = s in t, l = s in i, f = t[s], h = G(f) && !f.props.in;
158
165
  l && (!c || h) ? r[s] = Z(u, {
159
166
  onExited: n.bind(null, u),
160
167
  in: !0,
161
- exit: F(u, "exit", e),
162
- enter: F(u, "enter", e)
168
+ exit: $(u, "exit", e),
169
+ enter: $(u, "enter", e)
163
170
  }) : !l && c && !h ? r[s] = Z(u, {
164
171
  in: !1
165
- }) : l && c && G(p) && (r[s] = Z(u, {
172
+ }) : l && c && G(f) && (r[s] = Z(u, {
166
173
  onExited: n.bind(null, u),
167
- in: p.props.in,
168
- exit: F(u, "exit", e),
169
- enter: F(u, "enter", e)
174
+ in: f.props.in,
175
+ exit: $(u, "exit", e),
176
+ enter: $(u, "enter", e)
170
177
  }));
171
178
  }
172
179
  }), r;
173
180
  }
174
- var st = Object.values || function(e) {
181
+ var at = Object.values || function(e) {
175
182
  return Object.keys(e).map(function(t) {
176
183
  return e[t];
177
184
  });
178
- }, it = {
185
+ }, lt = {
179
186
  component: "div",
180
187
  childFactory: function(t) {
181
188
  return t;
182
189
  }
183
190
  }, ae = /* @__PURE__ */ function(e) {
184
- et(t, e);
191
+ ot(t, e);
185
192
  function t(i, r) {
186
193
  var s;
187
194
  s = e.call(this, i, r) || this;
188
- var u = s.handleExited.bind(tt(s));
195
+ var u = s.handleExited.bind(rt(s));
189
196
  return s.state = {
190
197
  contextValue: {
191
198
  isMounting: !0
@@ -206,24 +213,24 @@ var st = Object.values || function(e) {
206
213
  }, t.getDerivedStateFromProps = function(r, s) {
207
214
  var u = s.children, c = s.handleExited, l = s.firstRender;
208
215
  return {
209
- children: l ? ot(r, c) : rt(r, u, c),
216
+ children: l ? it(r, c) : ut(r, u, c),
210
217
  firstRender: !1
211
218
  };
212
219
  }, n.handleExited = function(r, s) {
213
220
  var u = ue(this.props.children);
214
221
  r.key in u || (r.props.onExited && r.props.onExited(s), this.mounted && this.setState(function(c) {
215
- var l = Ue({}, c.children);
222
+ var l = $e({}, c.children);
216
223
  return delete l[r.key], {
217
224
  children: l
218
225
  };
219
226
  }));
220
227
  }, n.render = function() {
221
- var r = this.props, s = r.component, u = r.childFactory, c = Qe(r, ["component", "childFactory"]), l = this.state.contextValue, p = st(this.state.children).map(u);
228
+ var r = this.props, s = r.component, u = r.childFactory, c = nt(r, ["component", "childFactory"]), l = this.state.contextValue, f = at(this.state.children).map(u);
222
229
  return delete c.appear, delete c.enter, delete c.exit, s === null ? /* @__PURE__ */ q.createElement(fe.Provider, {
223
230
  value: l
224
- }, p) : /* @__PURE__ */ q.createElement(fe.Provider, {
231
+ }, f) : /* @__PURE__ */ q.createElement(fe.Provider, {
225
232
  value: l
226
- }, /* @__PURE__ */ q.createElement(s, c, p));
233
+ }, /* @__PURE__ */ q.createElement(s, c, f));
227
234
  }, t;
228
235
  }(q.Component);
229
236
  ae.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -279,8 +286,8 @@ ae.propTypes = process.env.NODE_ENV !== "production" ? {
279
286
  */
280
287
  childFactory: o.func
281
288
  } : {};
282
- ae.defaultProps = it;
283
- function wt(e, t) {
289
+ ae.defaultProps = lt;
290
+ function It(e, t) {
284
291
  const {
285
292
  className: n,
286
293
  elementType: i,
@@ -290,34 +297,34 @@ function wt(e, t) {
290
297
  ...c
291
298
  } = t, {
292
299
  component: l,
293
- slots: p = {
300
+ slots: f = {
294
301
  [e]: void 0
295
302
  },
296
303
  slotProps: h = {
297
304
  [e]: void 0
298
305
  },
299
306
  ...m
300
- } = s, y = p[e] || i, R = je(h[e], r), {
307
+ } = s, y = f[e] || i, T = ze(h[e], r), {
301
308
  props: {
302
309
  component: g,
303
310
  ...w
304
311
  },
305
- internalRef: T
306
- } = ke({
312
+ internalRef: M
313
+ } = Ae({
307
314
  className: n,
308
315
  ...c,
309
316
  externalForwardedProps: e === "root" ? m : void 0,
310
- externalSlotProps: R
311
- }), S = te(T, R == null ? void 0 : R.ref, t.ref), L = e === "root" ? g || l : g, D = Fe(y, {
312
- ...e === "root" && !l && !p[e] && u,
313
- ...e !== "root" && !p[e] && u,
317
+ externalSlotProps: T
318
+ }), D = te(M, T == null ? void 0 : T.ref, t.ref), L = e === "root" ? g || l : g, S = Ye(y, {
319
+ ...e === "root" && !l && !f[e] && u,
320
+ ...e !== "root" && !f[e] && u,
314
321
  ...w,
315
322
  ...L && {
316
323
  as: L
317
324
  },
318
- ref: S
325
+ ref: D
319
326
  }, r);
320
- return [y, D];
327
+ return [y, S];
321
328
  }
322
329
  class Q {
323
330
  constructor() {
@@ -337,11 +344,11 @@ class Q {
337
344
  return new Q();
338
345
  }
339
346
  static use() {
340
- const t = me(Q.create).current, [n, i] = d.useState(!1);
341
- return t.shouldMount = n, t.setShouldMount = i, d.useEffect(t.mountEffect, [n]), t;
347
+ const t = me(Q.create).current, [n, i] = p.useState(!1);
348
+ return t.shouldMount = n, t.setShouldMount = i, p.useEffect(t.mountEffect, [n]), t;
342
349
  }
343
350
  mount() {
344
- return this.mounted || (this.mounted = at(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
351
+ return this.mounted || (this.mounted = pt(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
345
352
  }
346
353
  /* Ripple API */
347
354
  start(...t) {
@@ -363,10 +370,10 @@ class Q {
363
370
  });
364
371
  }
365
372
  }
366
- function ut() {
373
+ function ct() {
367
374
  return Q.use();
368
375
  }
369
- function at() {
376
+ function pt() {
370
377
  let e, t;
371
378
  const n = new Promise((i, r) => {
372
379
  e = i, t = r;
@@ -383,24 +390,24 @@ function be(e) {
383
390
  rippleSize: u,
384
391
  in: c,
385
392
  onExited: l,
386
- timeout: p
387
- } = e, [h, m] = d.useState(!1), y = x(t, n.ripple, n.rippleVisible, i && n.ripplePulsate), R = {
393
+ timeout: f
394
+ } = e, [h, m] = p.useState(!1), y = x(t, n.ripple, n.rippleVisible, i && n.ripplePulsate), T = {
388
395
  width: u,
389
396
  height: u,
390
397
  top: -(u / 2) + s,
391
398
  left: -(u / 2) + r
392
399
  }, g = x(n.child, h && n.childLeaving, i && n.childPulsate);
393
- return !c && !h && m(!0), d.useEffect(() => {
400
+ return !c && !h && m(!0), p.useEffect(() => {
394
401
  if (!c && l != null) {
395
- const w = setTimeout(l, p);
402
+ const w = setTimeout(l, f);
396
403
  return () => {
397
404
  clearTimeout(w);
398
405
  };
399
406
  }
400
- }, [l, c, p]), /* @__PURE__ */ U("span", {
407
+ }, [l, c, f]), /* @__PURE__ */ _("span", {
401
408
  className: y,
402
- style: R,
403
- children: /* @__PURE__ */ U("span", {
409
+ style: T,
410
+ children: /* @__PURE__ */ _("span", {
404
411
  className: g
405
412
  })
406
413
  });
@@ -440,7 +447,7 @@ process.env.NODE_ENV !== "production" && (be.propTypes = {
440
447
  */
441
448
  timeout: o.number.isRequired
442
449
  });
443
- const M = de("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), oe = 550, lt = 80, ct = se`
450
+ const R = de("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), oe = 550, ft = 80, dt = se`
444
451
  0% {
445
452
  transform: scale(0);
446
453
  opacity: 0.1;
@@ -450,7 +457,7 @@ const M = de("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
450
457
  transform: scale(1);
451
458
  opacity: 0.3;
452
459
  }
453
- `, pt = se`
460
+ `, ht = se`
454
461
  0% {
455
462
  opacity: 1;
456
463
  }
@@ -458,7 +465,7 @@ const M = de("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
458
465
  100% {
459
466
  opacity: 0;
460
467
  }
461
- `, ft = se`
468
+ `, mt = se`
462
469
  0% {
463
470
  transform: scale(1);
464
471
  }
@@ -470,7 +477,7 @@ const M = de("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
470
477
  100% {
471
478
  transform: scale(1);
472
479
  }
473
- `, dt = re("span", {
480
+ `, bt = re("span", {
474
481
  name: "MuiTouchRipple",
475
482
  slot: "Root"
476
483
  })({
@@ -483,30 +490,30 @@ const M = de("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
483
490
  bottom: 0,
484
491
  left: 0,
485
492
  borderRadius: "inherit"
486
- }), ht = re(be, {
493
+ }), gt = re(be, {
487
494
  name: "MuiTouchRipple",
488
495
  slot: "Ripple"
489
496
  })`
490
497
  opacity: 0;
491
498
  position: absolute;
492
499
 
493
- &.${M.rippleVisible} {
500
+ &.${R.rippleVisible} {
494
501
  opacity: 0.3;
495
502
  transform: scale(1);
496
- animation-name: ${ct};
503
+ animation-name: ${dt};
497
504
  animation-duration: ${oe}ms;
498
505
  animation-timing-function: ${({
499
506
  theme: e
500
507
  }) => e.transitions.easing.easeInOut};
501
508
  }
502
509
 
503
- &.${M.ripplePulsate} {
510
+ &.${R.ripplePulsate} {
504
511
  animation-duration: ${({
505
512
  theme: e
506
513
  }) => e.transitions.duration.shorter}ms;
507
514
  }
508
515
 
509
- & .${M.child} {
516
+ & .${R.child} {
510
517
  opacity: 1;
511
518
  display: block;
512
519
  width: 100%;
@@ -515,21 +522,21 @@ const M = de("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
515
522
  background-color: currentColor;
516
523
  }
517
524
 
518
- & .${M.childLeaving} {
525
+ & .${R.childLeaving} {
519
526
  opacity: 0;
520
- animation-name: ${pt};
527
+ animation-name: ${ht};
521
528
  animation-duration: ${oe}ms;
522
529
  animation-timing-function: ${({
523
530
  theme: e
524
531
  }) => e.transitions.easing.easeInOut};
525
532
  }
526
533
 
527
- & .${M.childPulsate} {
534
+ & .${R.childPulsate} {
528
535
  position: absolute;
529
536
  /* @noflip */
530
537
  left: 0px;
531
538
  top: 0;
532
- animation-name: ${ft};
539
+ animation-name: ${mt};
533
540
  animation-duration: 2500ms;
534
541
  animation-timing-function: ${({
535
542
  theme: e
@@ -537,7 +544,7 @@ const M = de("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
537
544
  animation-iteration-count: infinite;
538
545
  animation-delay: 200ms;
539
546
  }
540
- `, ge = /* @__PURE__ */ d.forwardRef(function(t, n) {
547
+ `, ge = /* @__PURE__ */ p.forwardRef(function(t, n) {
541
548
  const i = he({
542
549
  props: t,
543
550
  name: "MuiTouchRipple"
@@ -546,60 +553,60 @@ const M = de("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
546
553
  classes: s = {},
547
554
  className: u,
548
555
  ...c
549
- } = i, [l, p] = d.useState([]), h = d.useRef(0), m = d.useRef(null);
550
- d.useEffect(() => {
556
+ } = i, [l, f] = p.useState([]), h = p.useRef(0), m = p.useRef(null);
557
+ p.useEffect(() => {
551
558
  m.current && (m.current(), m.current = null);
552
559
  }, [l]);
553
- const y = d.useRef(!1), R = Je(), g = d.useRef(null), w = d.useRef(null), T = d.useCallback((f) => {
560
+ const y = p.useRef(!1), T = tt(), g = p.useRef(null), w = p.useRef(null), M = p.useCallback((d) => {
554
561
  const {
555
562
  pulsate: C,
556
563
  rippleX: E,
557
- rippleY: $,
564
+ rippleY: F,
558
565
  rippleSize: B,
559
- cb: _
560
- } = f;
561
- p((P) => [...P, /* @__PURE__ */ U(ht, {
566
+ cb: U
567
+ } = d;
568
+ f((P) => [...P, /* @__PURE__ */ _(gt, {
562
569
  classes: {
563
- ripple: x(s.ripple, M.ripple),
564
- rippleVisible: x(s.rippleVisible, M.rippleVisible),
565
- ripplePulsate: x(s.ripplePulsate, M.ripplePulsate),
566
- child: x(s.child, M.child),
567
- childLeaving: x(s.childLeaving, M.childLeaving),
568
- childPulsate: x(s.childPulsate, M.childPulsate)
570
+ ripple: x(s.ripple, R.ripple),
571
+ rippleVisible: x(s.rippleVisible, R.rippleVisible),
572
+ ripplePulsate: x(s.ripplePulsate, R.ripplePulsate),
573
+ child: x(s.child, R.child),
574
+ childLeaving: x(s.childLeaving, R.childLeaving),
575
+ childPulsate: x(s.childPulsate, R.childPulsate)
569
576
  },
570
577
  timeout: oe,
571
578
  pulsate: C,
572
579
  rippleX: E,
573
- rippleY: $,
580
+ rippleY: F,
574
581
  rippleSize: B
575
- }, h.current)]), h.current += 1, m.current = _;
576
- }, [s]), S = d.useCallback((f = {}, C = {}, E = () => {
582
+ }, h.current)]), h.current += 1, m.current = U;
583
+ }, [s]), D = p.useCallback((d = {}, C = {}, E = () => {
577
584
  }) => {
578
585
  const {
579
- pulsate: $ = !1,
586
+ pulsate: F = !1,
580
587
  center: B = r || C.pulsate,
581
- fakeElement: _ = !1
588
+ fakeElement: U = !1
582
589
  // For test purposes
583
590
  } = C;
584
- if ((f == null ? void 0 : f.type) === "mousedown" && y.current) {
591
+ if ((d == null ? void 0 : d.type) === "mousedown" && y.current) {
585
592
  y.current = !1;
586
593
  return;
587
594
  }
588
- (f == null ? void 0 : f.type) === "touchstart" && (y.current = !0);
589
- const P = _ ? null : w.current, O = P ? P.getBoundingClientRect() : {
595
+ (d == null ? void 0 : d.type) === "touchstart" && (y.current = !0);
596
+ const P = U ? null : w.current, O = P ? P.getBoundingClientRect() : {
590
597
  width: 0,
591
598
  height: 0,
592
599
  left: 0,
593
600
  top: 0
594
601
  };
595
602
  let V, N, I;
596
- if (B || f === void 0 || f.clientX === 0 && f.clientY === 0 || !f.clientX && !f.touches)
603
+ if (B || d === void 0 || d.clientX === 0 && d.clientY === 0 || !d.clientX && !d.touches)
597
604
  V = Math.round(O.width / 2), N = Math.round(O.height / 2);
598
605
  else {
599
606
  const {
600
607
  clientX: z,
601
608
  clientY: j
602
- } = f.touches && f.touches.length > 0 ? f.touches[0] : f;
609
+ } = d.touches && d.touches.length > 0 ? d.touches[0] : d;
603
610
  V = Math.round(z - O.left), N = Math.round(j - O.top);
604
611
  }
605
612
  if (B)
@@ -608,45 +615,45 @@ const M = de("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
608
615
  const z = Math.max(Math.abs((P ? P.clientWidth : 0) - V), V) * 2 + 2, j = Math.max(Math.abs((P ? P.clientHeight : 0) - N), N) * 2 + 2;
609
616
  I = Math.sqrt(z ** 2 + j ** 2);
610
617
  }
611
- f != null && f.touches ? g.current === null && (g.current = () => {
612
- T({
613
- pulsate: $,
618
+ d != null && d.touches ? g.current === null && (g.current = () => {
619
+ M({
620
+ pulsate: F,
614
621
  rippleX: V,
615
622
  rippleY: N,
616
623
  rippleSize: I,
617
624
  cb: E
618
625
  });
619
- }, R.start(lt, () => {
626
+ }, T.start(ft, () => {
620
627
  g.current && (g.current(), g.current = null);
621
- })) : T({
622
- pulsate: $,
628
+ })) : M({
629
+ pulsate: F,
623
630
  rippleX: V,
624
631
  rippleY: N,
625
632
  rippleSize: I,
626
633
  cb: E
627
634
  });
628
- }, [r, T, R]), L = d.useCallback(() => {
629
- S({}, {
635
+ }, [r, M, T]), L = p.useCallback(() => {
636
+ D({}, {
630
637
  pulsate: !0
631
638
  });
632
- }, [S]), D = d.useCallback((f, C) => {
633
- if (R.clear(), (f == null ? void 0 : f.type) === "touchend" && g.current) {
634
- g.current(), g.current = null, R.start(0, () => {
635
- D(f, C);
639
+ }, [D]), S = p.useCallback((d, C) => {
640
+ if (T.clear(), (d == null ? void 0 : d.type) === "touchend" && g.current) {
641
+ g.current(), g.current = null, T.start(0, () => {
642
+ S(d, C);
636
643
  });
637
644
  return;
638
645
  }
639
- g.current = null, p((E) => E.length > 0 ? E.slice(1) : E), m.current = C;
640
- }, [R]);
641
- return d.useImperativeHandle(n, () => ({
646
+ g.current = null, f((E) => E.length > 0 ? E.slice(1) : E), m.current = C;
647
+ }, [T]);
648
+ return p.useImperativeHandle(n, () => ({
642
649
  pulsate: L,
643
- start: S,
644
- stop: D
645
- }), [L, S, D]), /* @__PURE__ */ U(dt, {
646
- className: x(M.root, s.root, u),
650
+ start: D,
651
+ stop: S
652
+ }), [L, D, S]), /* @__PURE__ */ _(bt, {
653
+ className: x(R.root, s.root, u),
647
654
  ref: w,
648
655
  ...c,
649
- children: /* @__PURE__ */ U(ae, {
656
+ children: /* @__PURE__ */ _(ae, {
650
657
  component: null,
651
658
  exit: !0,
652
659
  children: l
@@ -668,20 +675,20 @@ process.env.NODE_ENV !== "production" && (ge.propTypes = {
668
675
  */
669
676
  className: o.string
670
677
  });
671
- function mt(e) {
672
- return _e("MuiButtonBase", e);
678
+ function yt(e) {
679
+ return Xe("MuiButtonBase", e);
673
680
  }
674
- const bt = de("MuiButtonBase", ["root", "disabled", "focusVisible"]), gt = (e) => {
681
+ const Tt = de("MuiButtonBase", ["root", "disabled", "focusVisible"]), Rt = (e) => {
675
682
  const {
676
683
  disabled: t,
677
684
  focusVisible: n,
678
685
  focusVisibleClassName: i,
679
686
  classes: r
680
- } = e, u = ze({
687
+ } = e, u = Fe({
681
688
  root: ["root", t && "disabled", n && "focusVisible"]
682
- }, mt, r);
689
+ }, yt, r);
683
690
  return n && i && (u.root += ` ${i}`), u;
684
- }, yt = re("button", {
691
+ }, Mt = re("button", {
685
692
  name: "MuiButtonBase",
686
693
  slot: "Root",
687
694
  overridesResolver: (e, t) => t.root
@@ -716,7 +723,7 @@ const bt = de("MuiButtonBase", ["root", "disabled", "focusVisible"]), gt = (e) =
716
723
  borderStyle: "none"
717
724
  // Remove Firefox dotted outline.
718
725
  },
719
- [`&.${bt.disabled}`]: {
726
+ [`&.${Tt.disabled}`]: {
720
727
  pointerEvents: "none",
721
728
  // Disable link interactions
722
729
  cursor: "default"
@@ -724,7 +731,7 @@ const bt = de("MuiButtonBase", ["root", "disabled", "focusVisible"]), gt = (e) =
724
731
  "@media print": {
725
732
  colorAdjust: "exact"
726
733
  }
727
- }), Rt = /* @__PURE__ */ d.forwardRef(function(t, n) {
734
+ }), Et = /* @__PURE__ */ p.forwardRef(function(t, n) {
728
735
  const i = he({
729
736
  props: t,
730
737
  name: "MuiButtonBase"
@@ -734,23 +741,23 @@ const bt = de("MuiButtonBase", ["root", "disabled", "focusVisible"]), gt = (e) =
734
741
  children: u,
735
742
  className: c,
736
743
  component: l = "button",
737
- disabled: p = !1,
744
+ disabled: f = !1,
738
745
  disableRipple: h = !1,
739
746
  disableTouchRipple: m = !1,
740
747
  focusRipple: y = !1,
741
- focusVisibleClassName: R,
748
+ focusVisibleClassName: T,
742
749
  LinkComponent: g = "a",
743
750
  onBlur: w,
744
- onClick: T,
745
- onContextMenu: S,
751
+ onClick: M,
752
+ onContextMenu: D,
746
753
  onDragLeave: L,
747
- onFocus: D,
748
- onFocusVisible: f,
754
+ onFocus: S,
755
+ onFocusVisible: d,
749
756
  onKeyDown: C,
750
757
  onKeyUp: E,
751
- onMouseDown: $,
758
+ onMouseDown: F,
752
759
  onMouseLeave: B,
753
- onMouseUp: _,
760
+ onMouseUp: U,
754
761
  onTouchEnd: P,
755
762
  onTouchMove: O,
756
763
  onTouchStart: V,
@@ -759,60 +766,60 @@ const bt = de("MuiButtonBase", ["root", "disabled", "focusVisible"]), gt = (e) =
759
766
  touchRippleRef: z,
760
767
  type: j,
761
768
  ...A
762
- } = i, Y = d.useRef(null), b = ut(), ye = te(b.ref, z), [k, H] = d.useState(!1);
763
- p && k && H(!1), d.useImperativeHandle(r, () => ({
769
+ } = i, Y = p.useRef(null), b = ct(), ye = te(b.ref, z), [k, H] = p.useState(!1);
770
+ f && k && H(!1), p.useImperativeHandle(r, () => ({
764
771
  focusVisible: () => {
765
772
  H(!0), Y.current.focus();
766
773
  }
767
774
  }), []);
768
- const Re = b.shouldMount && !h && !p;
769
- d.useEffect(() => {
775
+ const Te = b.shouldMount && !h && !f;
776
+ p.useEffect(() => {
770
777
  k && y && !h && b.pulsate();
771
778
  }, [h, y, k, b]);
772
- const Me = v(b, "start", $, m), Te = v(b, "stop", S, m), Ee = v(b, "stop", L, m), Ce = v(b, "stop", _, m), Pe = v(b, "stop", (a) => {
779
+ const Re = v(b, "start", F, m), Me = v(b, "stop", D, m), Ee = v(b, "stop", L, m), Ce = v(b, "stop", U, m), Pe = v(b, "stop", (a) => {
773
780
  k && a.preventDefault(), B && B(a);
774
781
  }, m), xe = v(b, "start", V, m), we = v(b, "stop", P, m), Ne = v(b, "stop", O, m), ve = v(b, "stop", (a) => {
775
782
  pe(a.target) || H(!1), w && w(a);
776
- }, !1), Se = J((a) => {
777
- Y.current || (Y.current = a.currentTarget), pe(a.target) && (H(!0), f && f(a)), D && D(a);
783
+ }, !1), De = J((a) => {
784
+ Y.current || (Y.current = a.currentTarget), pe(a.target) && (H(!0), d && d(a)), S && S(a);
778
785
  }), ee = () => {
779
786
  const a = Y.current;
780
787
  return l && l !== "button" && !(a.tagName === "A" && a.href);
781
- }, De = J((a) => {
788
+ }, Se = J((a) => {
782
789
  y && !a.repeat && k && a.key === " " && b.stop(a, () => {
783
790
  b.start(a);
784
- }), a.target === a.currentTarget && ee() && a.key === " " && a.preventDefault(), C && C(a), a.target === a.currentTarget && ee() && a.key === "Enter" && !p && (a.preventDefault(), T && T(a));
791
+ }), a.target === a.currentTarget && ee() && a.key === " " && a.preventDefault(), C && C(a), a.target === a.currentTarget && ee() && a.key === "Enter" && !f && (a.preventDefault(), M && M(a));
785
792
  }), Oe = J((a) => {
786
793
  y && a.key === " " && k && !a.defaultPrevented && b.stop(a, () => {
787
794
  b.pulsate(a);
788
- }), E && E(a), T && a.target === a.currentTarget && ee() && a.key === " " && !a.defaultPrevented && T(a);
795
+ }), E && E(a), M && a.target === a.currentTarget && ee() && a.key === " " && !a.defaultPrevented && M(a);
789
796
  });
790
797
  let W = l;
791
798
  W === "button" && (A.href || A.to) && (W = g);
792
799
  const X = {};
793
- W === "button" ? (X.type = j === void 0 ? "button" : j, X.disabled = p) : (!A.href && !A.to && (X.role = "button"), p && (X["aria-disabled"] = p));
800
+ W === "button" ? (X.type = j === void 0 ? "button" : j, X.disabled = f) : (!A.href && !A.to && (X.role = "button"), f && (X["aria-disabled"] = f));
794
801
  const Ve = te(n, Y), le = {
795
802
  ...i,
796
803
  centerRipple: s,
797
804
  component: l,
798
- disabled: p,
805
+ disabled: f,
799
806
  disableRipple: h,
800
807
  disableTouchRipple: m,
801
808
  focusRipple: y,
802
809
  tabIndex: N,
803
810
  focusVisible: k
804
- }, Ie = gt(le);
805
- return /* @__PURE__ */ Ae(yt, {
811
+ }, Ie = Rt(le);
812
+ return /* @__PURE__ */ Ke(Mt, {
806
813
  as: W,
807
814
  className: x(Ie.root, c),
808
815
  ownerState: le,
809
816
  onBlur: ve,
810
- onClick: T,
811
- onContextMenu: Te,
812
- onFocus: Se,
813
- onKeyDown: De,
817
+ onClick: M,
818
+ onContextMenu: Me,
819
+ onFocus: De,
820
+ onKeyDown: Se,
814
821
  onKeyUp: Oe,
815
- onMouseDown: Me,
822
+ onMouseDown: Re,
816
823
  onMouseLeave: Pe,
817
824
  onMouseUp: Ce,
818
825
  onDragLeave: Ee,
@@ -820,11 +827,11 @@ const bt = de("MuiButtonBase", ["root", "disabled", "focusVisible"]), gt = (e) =
820
827
  onTouchMove: Ne,
821
828
  onTouchStart: xe,
822
829
  ref: Ve,
823
- tabIndex: p ? -1 : N,
830
+ tabIndex: f ? -1 : N,
824
831
  type: j,
825
832
  ...X,
826
833
  ...A,
827
- children: [u, Re ? /* @__PURE__ */ U(ge, {
834
+ children: [u, Te ? /* @__PURE__ */ _(ge, {
828
835
  ref: ye,
829
836
  center: s,
830
837
  ...I
@@ -834,7 +841,7 @@ const bt = de("MuiButtonBase", ["root", "disabled", "focusVisible"]), gt = (e) =
834
841
  function v(e, t, n, i = !1) {
835
842
  return J((r) => (n && n(r), i || e[t](r), !0));
836
843
  }
837
- process.env.NODE_ENV !== "production" && (Rt.propTypes = {
844
+ process.env.NODE_ENV !== "production" && (Et.propTypes = {
838
845
  // ┌────────────────────────────── Warning ──────────────────────────────┐
839
846
  // │ These PropTypes are generated from the TypeScript type definitions. │
840
847
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -843,7 +850,7 @@ process.env.NODE_ENV !== "production" && (Rt.propTypes = {
843
850
  * A ref for imperative actions.
844
851
  * It currently only supports `focusVisible()` action.
845
852
  */
846
- action: We,
853
+ action: Je,
847
854
  /**
848
855
  * If `true`, the ripples are centered.
849
856
  * They won't start at the cursor interaction position.
@@ -866,7 +873,7 @@ process.env.NODE_ENV !== "production" && (Rt.propTypes = {
866
873
  * The component used for the root node.
867
874
  * Either a string to use a HTML element or a component.
868
875
  */
869
- component: He,
876
+ component: Ze,
870
877
  /**
871
878
  * If `true`, the component is disabled.
872
879
  * @default false
@@ -993,19 +1000,20 @@ process.env.NODE_ENV !== "production" && (Rt.propTypes = {
993
1000
  type: o.oneOfType([o.oneOf(["button", "reset", "submit"]), o.string])
994
1001
  });
995
1002
  export {
996
- Rt as B,
997
- fe as T,
998
- et as _,
999
- wt as a,
1000
- Ye as b,
1001
- Xe as c,
1003
+ Et as B,
1004
+ ie as T,
1005
+ ot as _,
1006
+ It as a,
1007
+ tt as b,
1008
+ He as c,
1002
1009
  J as d,
1003
- He as e,
1004
- Qe as f,
1005
- ie as g,
1006
- ne as h,
1010
+ Ze as e,
1011
+ qe as f,
1012
+ nt as g,
1013
+ fe as h,
1007
1014
  pe as i,
1008
- tt as j,
1009
- We as r,
1010
- Je as u
1015
+ ne as j,
1016
+ rt as k,
1017
+ Je as r,
1018
+ Vt as u
1011
1019
  };