@hai-dev/ui-kit 1.0.11 → 1.1.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 (73) hide show
  1. package/dist/{Box-D8oKffw9.js → Box-CykjCaXY.js} +21 -22
  2. package/dist/{Button-BBF8hp7e.js → Button-CcvrOEKV.js} +6 -5
  3. package/dist/{ButtonBase-T2KH9jsD.js → ButtonBase-DPLf5-lz.js} +226 -279
  4. package/dist/{CircularProgress-BQQkuSse.js → CircularProgress-CrHaMZDC.js} +4 -3
  5. package/dist/{Dialog-B97c7WYP.js → Dialog-DqFOpJyx.js} +118 -125
  6. package/dist/{DialogTitle-Du4tqTs0.js → DialogTitle-CeM_Z851.js} +4 -4
  7. package/dist/{Typography-r_TXEM1e.js → Typography-DDVoglvI.js} +38 -40
  8. package/dist/assets/centered-decorator.css +1 -0
  9. package/dist/assets/circular-progress-loader.css +1 -1
  10. package/dist/assets/code-input.css +1 -0
  11. package/dist/assets/dark-decorator.css +1 -0
  12. package/dist/assets/upload-dialog-errors.css +1 -1
  13. package/dist/chainPropTypes-C04Ex8aP.js +413 -0
  14. package/dist/components/button/button.js +1 -1
  15. package/dist/components/circular-progress-loader/circular-progress-loader.js +29 -27
  16. package/dist/components/circular-progress-loader/constants.d.ts +3 -1
  17. package/dist/components/circular-progress-loader/constants.js +4 -2
  18. package/dist/components/code-input/code-input.d.ts +3 -0
  19. package/dist/components/code-input/code-input.js +934 -0
  20. package/dist/components/code-input/code-input.stories.d.ts +7 -0
  21. package/dist/components/code-input/constants.d.ts +8 -0
  22. package/dist/components/code-input/constants.js +11 -0
  23. package/dist/components/code-input/index.d.ts +1 -0
  24. package/dist/components/code-input/index.js +4 -0
  25. package/dist/components/code-input/types.d.ts +11 -0
  26. package/dist/components/code-input/utils/get-code-input-label.d.ts +2 -0
  27. package/dist/components/code-input/utils/get-code-input-label.js +5 -0
  28. package/dist/components/code-input/utils/index.d.ts +2 -0
  29. package/dist/components/code-input/utils/index.js +6 -0
  30. package/dist/components/code-input/utils/slide-down-animate.d.ts +1 -0
  31. package/dist/components/code-input/utils/slide-down-animate.js +10 -0
  32. package/dist/components/index.d.ts +1 -0
  33. package/dist/components/index.js +4 -2
  34. package/dist/components/photo-crop-uploader/components/error-upload-dialog/error-upload-dialog.js +6 -6
  35. package/dist/components/photo-crop-uploader/components/photo-list/photo-list.js +1 -1
  36. package/dist/components/photo-crop-uploader/components/upload-button/upload-button.js +1 -1
  37. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog-errors.js +2 -2
  38. package/dist/components/photo-crop-uploader/components/upload-dialog/upload-dialog.js +12 -10
  39. package/dist/components/photo-crop-uploader/photo-crop-uploader.d.ts +2 -2
  40. package/dist/components/photo-crop-uploader/photo-crop-uploader.js +183 -168
  41. package/dist/components/photo-crop-uploader/types.d.ts +8 -7
  42. package/dist/components/photo-crop-uploader/utils/draw-cropped-image.js +28 -29
  43. package/dist/components/photo-crop-uploader/utils/get-default-cropped-photo.d.ts +4 -2
  44. package/dist/components/photo-crop-uploader/utils/get-default-cropped-photo.js +34 -32
  45. package/dist/createSimplePaletteValueFilter-B7--0ryQ.js +17 -0
  46. package/dist/{createTheme-RvzX1VSA.js → createTheme-RRQUOQoF.js} +182 -178
  47. package/dist/decorators/centered-decorator/centered-decorator.js +7 -0
  48. package/dist/decorators/centered-decorator/index.d.ts +2 -0
  49. package/dist/decorators/centered-decorator/index.js +4 -0
  50. package/dist/decorators/centered-decorator/types.js +1 -0
  51. package/dist/decorators/dark-decorator/dark-decorator.d.ts +3 -0
  52. package/dist/decorators/dark-decorator/dark-decorator.js +7 -0
  53. package/dist/decorators/dark-decorator/index.d.ts +2 -0
  54. package/dist/decorators/dark-decorator/index.js +4 -0
  55. package/dist/decorators/dark-decorator/types.d.ts +4 -0
  56. package/dist/decorators/dark-decorator/types.js +1 -0
  57. package/dist/decorators/index.d.ts +2 -1
  58. package/dist/decorators/index.js +4 -2
  59. package/dist/extendSxProp-VC2-7DJw.js +49 -0
  60. package/dist/index-BMkXyDFs.js +91 -0
  61. package/dist/isHostComponent-Dm_U9uOy.js +14 -0
  62. package/dist/memoTheme-5A7c_y33.js +15 -0
  63. package/dist/refType-CCKoQjVR.js +61 -0
  64. package/dist/{upload-dialog-errors-ku54UrUb.js → upload-dialog-errors-Bxun25O-.js} +41 -41
  65. package/package.json +1 -1
  66. package/dist/chainPropTypes-KIxDwPzf.js +0 -387
  67. package/dist/createSimplePaletteValueFilter-nb0wSOzC.js +0 -30
  68. package/dist/decorators/centered-decorator.js +0 -16
  69. package/dist/extendSxProp-BW9e6LtL.js +0 -36
  70. package/dist/useTheme-CsjkCBFJ.js +0 -16
  71. /package/dist/{decorators → components/code-input}/types.js +0 -0
  72. /package/dist/decorators/{centered-decorator.d.ts → centered-decorator/centered-decorator.d.ts} +0 -0
  73. /package/dist/decorators/{types.d.ts → centered-decorator/types.d.ts} +0 -0
@@ -1,56 +1,24 @@
1
- import * as c from "react";
2
- import X, { isValidElement as W, cloneElement as G, Children as Ie } from "react";
3
- import { _ as Be, P as n, c as C, a as fe, g as Le } from "./createTheme-RvzX1VSA.js";
4
- import { jsx as F, jsxs as ke } from "react/jsx-runtime";
5
- import { b as je, u as de, s as ne, k as oe, c as $e } from "./chainPropTypes-KIxDwPzf.js";
6
- const Fe = typeof window < "u" ? c.useLayoutEffect : c.useEffect;
7
- function Z(e) {
8
- const t = c.useRef(e);
9
- return Fe(() => {
10
- t.current = e;
11
- }), c.useRef((...o) => (
12
- // @ts-expect-error hide `this`
13
- (0, t.current)(...o)
14
- )).current;
15
- }
16
- function ae(...e) {
17
- const t = c.useRef(void 0), o = c.useCallback((i) => {
18
- const s = e.map((r) => {
19
- if (r == null)
20
- return null;
21
- if (typeof r == "function") {
22
- const u = r, l = u(i);
23
- return typeof l == "function" ? l : () => {
24
- u(null);
25
- };
26
- }
27
- return r.current = i, () => {
28
- r.current = null;
29
- };
30
- });
31
- return () => {
32
- s.forEach((r) => r?.());
33
- };
34
- }, e);
35
- return c.useMemo(() => e.every((i) => i == null) ? null : (i) => {
36
- t.current && (t.current(), t.current = void 0), i != null && (t.current = o(i));
37
- }, e);
38
- }
39
- function Ue(e, t) {
1
+ import * as f from "react";
2
+ import X, { isValidElement as H, cloneElement as G, Children as Ie } from "react";
3
+ import { _ as Be, P as n, c as C, a as fe, g as Le } from "./createTheme-RRQUOQoF.js";
4
+ import { jsx as U, jsxs as je } from "react/jsx-runtime";
5
+ import { u as de, s as ne, k as oe, c as ke } from "./chainPropTypes-C04Ex8aP.js";
6
+ import { u as ae, a as Z, e as Fe, r as Ue } from "./refType-CCKoQjVR.js";
7
+ function _e(e, t) {
40
8
  if (e == null) return {};
41
9
  var o = {};
42
- for (var i in e) if ({}.hasOwnProperty.call(e, i)) {
43
- if (t.indexOf(i) !== -1) continue;
44
- o[i] = e[i];
10
+ for (var s in e) if ({}.hasOwnProperty.call(e, s)) {
11
+ if (t.indexOf(s) !== -1) continue;
12
+ o[s] = e[s];
45
13
  }
46
14
  return o;
47
15
  }
48
16
  function ee(e, t) {
49
- return ee = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, i) {
50
- return o.__proto__ = i, o;
17
+ return ee = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, s) {
18
+ return o.__proto__ = s, o;
51
19
  }, ee(e, t);
52
20
  }
53
- function _e(e, t) {
21
+ function $e(e, t) {
54
22
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ee(e, t);
55
23
  }
56
24
  const le = X.createContext(null);
@@ -59,35 +27,35 @@ function ze(e) {
59
27
  return e;
60
28
  }
61
29
  function re(e, t) {
62
- var o = function(r) {
63
- return t && W(r) ? t(r) : r;
64
- }, i = /* @__PURE__ */ Object.create(null);
65
- return e && Ie.map(e, function(s) {
66
- return s;
67
- }).forEach(function(s) {
68
- i[s.key] = o(s);
69
- }), i;
30
+ var o = function(i) {
31
+ return t && H(i) ? t(i) : i;
32
+ }, s = /* @__PURE__ */ Object.create(null);
33
+ return e && Ie.map(e, function(r) {
34
+ return r;
35
+ }).forEach(function(r) {
36
+ s[r.key] = o(r);
37
+ }), s;
70
38
  }
71
39
  function Ae(e, t) {
72
40
  e = e || {}, t = t || {};
73
41
  function o(h) {
74
42
  return h in t ? t[h] : e[h];
75
43
  }
76
- var i = /* @__PURE__ */ Object.create(null), s = [];
77
- for (var r in e)
78
- r in t ? s.length && (i[r] = s, s = []) : s.push(r);
79
- var u, l = {};
80
- for (var p in t) {
81
- if (i[p])
82
- for (u = 0; u < i[p].length; u++) {
83
- var f = i[p][u];
84
- l[i[p][u]] = o(f);
44
+ var s = /* @__PURE__ */ Object.create(null), r = [];
45
+ for (var i in e)
46
+ i in t ? r.length && (s[i] = r, r = []) : r.push(i);
47
+ var u, c = {};
48
+ for (var l in t) {
49
+ if (s[l])
50
+ for (u = 0; u < s[l].length; u++) {
51
+ var p = s[l][u];
52
+ c[s[l][u]] = o(p);
85
53
  }
86
- l[p] = o(p);
54
+ c[l] = o(l);
87
55
  }
88
- for (u = 0; u < s.length; u++)
89
- l[s[u]] = o(s[u]);
90
- return l;
56
+ for (u = 0; u < r.length; u++)
57
+ c[r[u]] = o(r[u]);
58
+ return c;
91
59
  }
92
60
  function L(e, t, o) {
93
61
  return o[t] != null ? o[t] : e.props[t];
@@ -104,26 +72,26 @@ function Ye(e, t) {
104
72
  });
105
73
  }
106
74
  function Xe(e, t, o) {
107
- var i = re(e.children), s = Ae(t, i);
108
- return Object.keys(s).forEach(function(r) {
109
- var u = s[r];
110
- if (W(u)) {
111
- var l = r in t, p = r in i, f = t[r], h = W(f) && !f.props.in;
112
- p && (!l || h) ? s[r] = G(u, {
75
+ var s = re(e.children), r = Ae(t, s);
76
+ return Object.keys(r).forEach(function(i) {
77
+ var u = r[i];
78
+ if (H(u)) {
79
+ var c = i in t, l = i in s, p = t[i], h = H(p) && !p.props.in;
80
+ l && (!c || h) ? r[i] = G(u, {
113
81
  onExited: o.bind(null, u),
114
82
  in: !0,
115
83
  exit: L(u, "exit", e),
116
84
  enter: L(u, "enter", e)
117
- }) : !p && l && !h ? s[r] = G(u, {
85
+ }) : !l && c && !h ? r[i] = G(u, {
118
86
  in: !1
119
- }) : p && l && W(f) && (s[r] = G(u, {
87
+ }) : l && c && H(p) && (r[i] = G(u, {
120
88
  onExited: o.bind(null, u),
121
- in: f.props.in,
89
+ in: p.props.in,
122
90
  exit: L(u, "exit", e),
123
91
  enter: L(u, "enter", e)
124
92
  }));
125
93
  }
126
- }), s;
94
+ }), r;
127
95
  }
128
96
  var Ke = Object.values || function(e) {
129
97
  return Object.keys(e).map(function(t) {
@@ -135,18 +103,18 @@ var Ke = Object.values || function(e) {
135
103
  return t;
136
104
  }
137
105
  }, ie = /* @__PURE__ */ (function(e) {
138
- _e(t, e);
139
- function t(i, s) {
140
- var r;
141
- r = e.call(this, i, s) || this;
142
- var u = r.handleExited.bind(ze(r));
143
- return r.state = {
106
+ $e(t, e);
107
+ function t(s, r) {
108
+ var i;
109
+ i = e.call(this, s, r) || this;
110
+ var u = i.handleExited.bind(ze(i));
111
+ return i.state = {
144
112
  contextValue: {
145
113
  isMounting: !0
146
114
  },
147
115
  handleExited: u,
148
116
  firstRender: !0
149
- }, r;
117
+ }, i;
150
118
  }
151
119
  var o = t.prototype;
152
120
  return o.componentDidMount = function() {
@@ -157,27 +125,27 @@ var Ke = Object.values || function(e) {
157
125
  });
158
126
  }, o.componentWillUnmount = function() {
159
127
  this.mounted = !1;
160
- }, t.getDerivedStateFromProps = function(s, r) {
161
- var u = r.children, l = r.handleExited, p = r.firstRender;
128
+ }, t.getDerivedStateFromProps = function(r, i) {
129
+ var u = i.children, c = i.handleExited, l = i.firstRender;
162
130
  return {
163
- children: p ? Ye(s, l) : Xe(s, u, l),
131
+ children: l ? Ye(r, c) : Xe(r, u, c),
164
132
  firstRender: !1
165
133
  };
166
- }, o.handleExited = function(s, r) {
134
+ }, o.handleExited = function(r, i) {
167
135
  var u = re(this.props.children);
168
- s.key in u || (s.props.onExited && s.props.onExited(r), this.mounted && this.setState(function(l) {
169
- var p = Be({}, l.children);
170
- return delete p[s.key], {
171
- children: p
136
+ r.key in u || (r.props.onExited && r.props.onExited(i), this.mounted && this.setState(function(c) {
137
+ var l = Be({}, c.children);
138
+ return delete l[r.key], {
139
+ children: l
172
140
  };
173
141
  }));
174
142
  }, o.render = function() {
175
- var s = this.props, r = s.component, u = s.childFactory, l = Ue(s, ["component", "childFactory"]), p = this.state.contextValue, f = Ke(this.state.children).map(u);
176
- return delete l.appear, delete l.enter, delete l.exit, r === null ? /* @__PURE__ */ X.createElement(le.Provider, {
177
- value: p
178
- }, f) : /* @__PURE__ */ X.createElement(le.Provider, {
179
- value: p
180
- }, /* @__PURE__ */ X.createElement(r, l, f));
143
+ var r = this.props, i = r.component, u = r.childFactory, c = _e(r, ["component", "childFactory"]), l = this.state.contextValue, p = Ke(this.state.children).map(u);
144
+ return delete c.appear, delete c.enter, delete c.exit, i === null ? /* @__PURE__ */ X.createElement(le.Provider, {
145
+ value: l
146
+ }, p) : /* @__PURE__ */ X.createElement(le.Provider, {
147
+ value: l
148
+ }, /* @__PURE__ */ X.createElement(i, c, p));
181
149
  }, t;
182
150
  })(X.Component);
183
151
  ie.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -236,12 +204,12 @@ ie.propTypes = process.env.NODE_ENV !== "production" ? {
236
204
  ie.defaultProps = qe;
237
205
  const ce = {};
238
206
  function he(e, t) {
239
- const o = c.useRef(ce);
207
+ const o = f.useRef(ce);
240
208
  return o.current === ce && (o.current = e(t)), o;
241
209
  }
242
- const He = [];
243
- function We(e) {
244
- c.useEffect(e, He);
210
+ const We = [];
211
+ function He(e) {
212
+ f.useEffect(e, We);
245
213
  }
246
214
  class se {
247
215
  static create() {
@@ -263,26 +231,8 @@ class se {
263
231
  }
264
232
  function Ge() {
265
233
  const e = he(se.create).current;
266
- return We(e.disposeEffect), e;
267
- }
268
- function Ze(e) {
269
- const {
270
- prototype: t = {}
271
- } = e;
272
- return !!t.isReactComponent;
273
- }
274
- function Je(e, t, o, i, s) {
275
- const r = e[t], u = s || t;
276
- if (r == null || // When server-side rendering React doesn't warn either.
277
- // This is not an accurate check for SSR.
278
- // This is only in place for emotion compat.
279
- // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
280
- typeof window > "u")
281
- return null;
282
- let l;
283
- return typeof r == "function" && !Ze(r) && (l = "Did you accidentally provide a plain function component instead?"), l !== void 0 ? new Error(`Invalid ${i} \`${u}\` supplied to \`${o}\`. Expected an element type that can hold a ref. ${l} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
234
+ return He(e.disposeEffect), e;
284
235
  }
285
- const Qe = je(n.elementType, Je), et = n.oneOfType([n.func, n.object]);
286
236
  function pe(e) {
287
237
  try {
288
238
  return e.matches(":focus-visible");
@@ -302,8 +252,8 @@ class J {
302
252
  return new J();
303
253
  }
304
254
  static use() {
305
- const t = he(J.create).current, [o, i] = c.useState(!1);
306
- return t.shouldMount = o, t.setShouldMount = i, c.useEffect(t.mountEffect, [o]), t;
255
+ const t = he(J.create).current, [o, s] = f.useState(!1);
256
+ return t.shouldMount = o, t.setShouldMount = s, f.useEffect(t.mountEffect, [o]), t;
307
257
  }
308
258
  constructor() {
309
259
  this.ref = {
@@ -311,7 +261,7 @@ class J {
311
261
  }, this.mounted = null, this.didMount = !1, this.shouldMount = !1, this.setShouldMount = null;
312
262
  }
313
263
  mount() {
314
- return this.mounted || (this.mounted = nt(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
264
+ return this.mounted || (this.mounted = Je(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
315
265
  }
316
266
  mountEffect = () => {
317
267
  this.shouldMount && !this.didMount && this.ref.current !== null && (this.didMount = !0, this.mounted.resolve());
@@ -327,13 +277,13 @@ class J {
327
277
  this.mount().then(() => this.ref.current?.pulsate(...t));
328
278
  }
329
279
  }
330
- function tt() {
280
+ function Ze() {
331
281
  return J.use();
332
282
  }
333
- function nt() {
283
+ function Je() {
334
284
  let e, t;
335
- const o = new Promise((i, s) => {
336
- e = i, t = s;
285
+ const o = new Promise((s, r) => {
286
+ e = s, t = r;
337
287
  });
338
288
  return o.resolve = e, o.reject = t, o;
339
289
  }
@@ -341,30 +291,30 @@ function me(e) {
341
291
  const {
342
292
  className: t,
343
293
  classes: o,
344
- pulsate: i = !1,
345
- rippleX: s,
346
- rippleY: r,
294
+ pulsate: s = !1,
295
+ rippleX: r,
296
+ rippleY: i,
347
297
  rippleSize: u,
348
- in: l,
349
- onExited: p,
350
- timeout: f
351
- } = e, [h, m] = c.useState(!1), R = C(t, o.ripple, o.rippleVisible, i && o.ripplePulsate), w = {
298
+ in: c,
299
+ onExited: l,
300
+ timeout: p
301
+ } = e, [h, m] = f.useState(!1), M = C(t, o.ripple, o.rippleVisible, s && o.ripplePulsate), N = {
352
302
  width: u,
353
303
  height: u,
354
- top: -(u / 2) + r,
355
- left: -(u / 2) + s
356
- }, g = C(o.child, h && o.childLeaving, i && o.childPulsate);
357
- return !l && !h && m(!0), c.useEffect(() => {
358
- if (!l && p != null) {
359
- const V = setTimeout(p, f);
304
+ top: -(u / 2) + i,
305
+ left: -(u / 2) + r
306
+ }, g = C(o.child, h && o.childLeaving, s && o.childPulsate);
307
+ return !c && !h && m(!0), f.useEffect(() => {
308
+ if (!c && l != null) {
309
+ const V = setTimeout(l, p);
360
310
  return () => {
361
311
  clearTimeout(V);
362
312
  };
363
313
  }
364
- }, [p, l, f]), /* @__PURE__ */ F("span", {
365
- className: R,
366
- style: w,
367
- children: /* @__PURE__ */ F("span", {
314
+ }, [l, c, p]), /* @__PURE__ */ U("span", {
315
+ className: M,
316
+ style: N,
317
+ children: /* @__PURE__ */ U("span", {
368
318
  className: g
369
319
  })
370
320
  });
@@ -404,7 +354,7 @@ process.env.NODE_ENV !== "production" && (me.propTypes = {
404
354
  */
405
355
  timeout: n.number.isRequired
406
356
  });
407
- const y = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), te = 550, ot = 80, rt = oe`
357
+ const y = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), te = 550, Qe = 80, et = oe`
408
358
  0% {
409
359
  transform: scale(0);
410
360
  opacity: 0.1;
@@ -414,7 +364,7 @@ const y = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
414
364
  transform: scale(1);
415
365
  opacity: 0.3;
416
366
  }
417
- `, it = oe`
367
+ `, tt = oe`
418
368
  0% {
419
369
  opacity: 1;
420
370
  }
@@ -422,7 +372,7 @@ const y = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
422
372
  100% {
423
373
  opacity: 0;
424
374
  }
425
- `, st = oe`
375
+ `, nt = oe`
426
376
  0% {
427
377
  transform: scale(1);
428
378
  }
@@ -434,7 +384,7 @@ const y = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
434
384
  100% {
435
385
  transform: scale(1);
436
386
  }
437
- `, ut = ne("span", {
387
+ `, ot = ne("span", {
438
388
  name: "MuiTouchRipple",
439
389
  slot: "Root"
440
390
  })({
@@ -447,7 +397,7 @@ const y = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
447
397
  bottom: 0,
448
398
  left: 0,
449
399
  borderRadius: "inherit"
450
- }), at = ne(me, {
400
+ }), rt = ne(me, {
451
401
  name: "MuiTouchRipple",
452
402
  slot: "Ripple"
453
403
  })`
@@ -457,7 +407,7 @@ const y = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
457
407
  &.${y.rippleVisible} {
458
408
  opacity: 0.3;
459
409
  transform: scale(1);
460
- animation-name: ${rt};
410
+ animation-name: ${et};
461
411
  animation-duration: ${te}ms;
462
412
  animation-timing-function: ${({
463
413
  theme: e
@@ -481,7 +431,7 @@ const y = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
481
431
 
482
432
  & .${y.childLeaving} {
483
433
  opacity: 0;
484
- animation-name: ${it};
434
+ animation-name: ${tt};
485
435
  animation-duration: ${te}ms;
486
436
  animation-timing-function: ${({
487
437
  theme: e
@@ -493,7 +443,7 @@ const y = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
493
443
  /* @noflip */
494
444
  left: 0px;
495
445
  top: 0;
496
- animation-name: ${st};
446
+ animation-name: ${nt};
497
447
  animation-duration: 2500ms;
498
448
  animation-timing-function: ${({
499
449
  theme: e
@@ -501,56 +451,56 @@ const y = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
501
451
  animation-iteration-count: infinite;
502
452
  animation-delay: 200ms;
503
453
  }
504
- `, be = /* @__PURE__ */ c.forwardRef(function(t, o) {
505
- const i = de({
454
+ `, be = /* @__PURE__ */ f.forwardRef(function(t, o) {
455
+ const s = de({
506
456
  props: t,
507
457
  name: "MuiTouchRipple"
508
458
  }), {
509
- center: s = !1,
510
- classes: r = {},
459
+ center: r = !1,
460
+ classes: i = {},
511
461
  className: u,
512
- ...l
513
- } = i, [p, f] = c.useState([]), h = c.useRef(0), m = c.useRef(null);
514
- c.useEffect(() => {
462
+ ...c
463
+ } = s, [l, p] = f.useState([]), h = f.useRef(0), m = f.useRef(null);
464
+ f.useEffect(() => {
515
465
  m.current && (m.current(), m.current = null);
516
- }, [p]);
517
- const R = c.useRef(!1), w = Ge(), g = c.useRef(null), V = c.useRef(null), v = c.useCallback((d) => {
466
+ }, [l]);
467
+ const M = f.useRef(!1), N = Ge(), g = f.useRef(null), V = f.useRef(null), v = f.useCallback((d) => {
518
468
  const {
519
469
  pulsate: T,
520
- rippleX: M,
521
- rippleY: $,
470
+ rippleX: R,
471
+ rippleY: F,
522
472
  rippleSize: S,
523
- cb: U
473
+ cb: _
524
474
  } = d;
525
- f((E) => [...E, /* @__PURE__ */ F(at, {
475
+ p((E) => [...E, /* @__PURE__ */ U(rt, {
526
476
  classes: {
527
- ripple: C(r.ripple, y.ripple),
528
- rippleVisible: C(r.rippleVisible, y.rippleVisible),
529
- ripplePulsate: C(r.ripplePulsate, y.ripplePulsate),
530
- child: C(r.child, y.child),
531
- childLeaving: C(r.childLeaving, y.childLeaving),
532
- childPulsate: C(r.childPulsate, y.childPulsate)
477
+ ripple: C(i.ripple, y.ripple),
478
+ rippleVisible: C(i.rippleVisible, y.rippleVisible),
479
+ ripplePulsate: C(i.ripplePulsate, y.ripplePulsate),
480
+ child: C(i.child, y.child),
481
+ childLeaving: C(i.childLeaving, y.childLeaving),
482
+ childPulsate: C(i.childPulsate, y.childPulsate)
533
483
  },
534
484
  timeout: te,
535
485
  pulsate: T,
536
- rippleX: M,
537
- rippleY: $,
486
+ rippleX: R,
487
+ rippleY: F,
538
488
  rippleSize: S
539
- }, h.current)]), h.current += 1, m.current = U;
540
- }, [r]), k = c.useCallback((d = {}, T = {}, M = () => {
489
+ }, h.current)]), h.current += 1, m.current = _;
490
+ }, [i]), j = f.useCallback((d = {}, T = {}, R = () => {
541
491
  }) => {
542
492
  const {
543
- pulsate: $ = !1,
544
- center: S = s || T.pulsate,
545
- fakeElement: U = !1
493
+ pulsate: F = !1,
494
+ center: S = r || T.pulsate,
495
+ fakeElement: _ = !1
546
496
  // For test purposes
547
497
  } = T;
548
- if (d?.type === "mousedown" && R.current) {
549
- R.current = !1;
498
+ if (d?.type === "mousedown" && M.current) {
499
+ M.current = !1;
550
500
  return;
551
501
  }
552
- d?.type === "touchstart" && (R.current = !0);
553
- const E = U ? null : V.current, N = E ? E.getBoundingClientRect() : {
502
+ d?.type === "touchstart" && (M.current = !0);
503
+ const E = _ ? null : V.current, w = E ? E.getBoundingClientRect() : {
554
504
  width: 0,
555
505
  height: 0,
556
506
  left: 0,
@@ -558,62 +508,62 @@ const y = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsat
558
508
  };
559
509
  let D, x, O;
560
510
  if (S || d === void 0 || d.clientX === 0 && d.clientY === 0 || !d.clientX && !d.touches)
561
- D = Math.round(N.width / 2), x = Math.round(N.height / 2);
511
+ D = Math.round(w.width / 2), x = Math.round(w.height / 2);
562
512
  else {
563
513
  const {
564
- clientX: _,
514
+ clientX: $,
565
515
  clientY: I
566
516
  } = d.touches && d.touches.length > 0 ? d.touches[0] : d;
567
- D = Math.round(_ - N.left), x = Math.round(I - N.top);
517
+ D = Math.round($ - w.left), x = Math.round(I - w.top);
568
518
  }
569
519
  if (S)
570
- O = Math.sqrt((2 * N.width ** 2 + N.height ** 2) / 3), O % 2 === 0 && (O += 1);
520
+ O = Math.sqrt((2 * w.width ** 2 + w.height ** 2) / 3), O % 2 === 0 && (O += 1);
571
521
  else {
572
- const _ = Math.max(Math.abs((E ? E.clientWidth : 0) - D), D) * 2 + 2, I = Math.max(Math.abs((E ? E.clientHeight : 0) - x), x) * 2 + 2;
573
- O = Math.sqrt(_ ** 2 + I ** 2);
522
+ const $ = Math.max(Math.abs((E ? E.clientWidth : 0) - D), D) * 2 + 2, I = Math.max(Math.abs((E ? E.clientHeight : 0) - x), x) * 2 + 2;
523
+ O = Math.sqrt($ ** 2 + I ** 2);
574
524
  }
575
525
  d?.touches ? g.current === null && (g.current = () => {
576
526
  v({
577
- pulsate: $,
527
+ pulsate: F,
578
528
  rippleX: D,
579
529
  rippleY: x,
580
530
  rippleSize: O,
581
- cb: M
531
+ cb: R
582
532
  });
583
- }, w.start(ot, () => {
533
+ }, N.start(Qe, () => {
584
534
  g.current && (g.current(), g.current = null);
585
535
  })) : v({
586
- pulsate: $,
536
+ pulsate: F,
587
537
  rippleX: D,
588
538
  rippleY: x,
589
539
  rippleSize: O,
590
- cb: M
540
+ cb: R
591
541
  });
592
- }, [s, v, w]), K = c.useCallback(() => {
593
- k({}, {
542
+ }, [r, v, N]), K = f.useCallback(() => {
543
+ j({}, {
594
544
  pulsate: !0
595
545
  });
596
- }, [k]), j = c.useCallback((d, T) => {
597
- if (w.clear(), d?.type === "touchend" && g.current) {
598
- g.current(), g.current = null, w.start(0, () => {
599
- j(d, T);
546
+ }, [j]), k = f.useCallback((d, T) => {
547
+ if (N.clear(), d?.type === "touchend" && g.current) {
548
+ g.current(), g.current = null, N.start(0, () => {
549
+ k(d, T);
600
550
  });
601
551
  return;
602
552
  }
603
- g.current = null, f((M) => M.length > 0 ? M.slice(1) : M), m.current = T;
604
- }, [w]);
605
- return c.useImperativeHandle(o, () => ({
553
+ g.current = null, p((R) => R.length > 0 ? R.slice(1) : R), m.current = T;
554
+ }, [N]);
555
+ return f.useImperativeHandle(o, () => ({
606
556
  pulsate: K,
607
- start: k,
608
- stop: j
609
- }), [K, k, j]), /* @__PURE__ */ F(ut, {
610
- className: C(y.root, r.root, u),
557
+ start: j,
558
+ stop: k
559
+ }), [K, j, k]), /* @__PURE__ */ U(ot, {
560
+ className: C(y.root, i.root, u),
611
561
  ref: V,
612
- ...l,
613
- children: /* @__PURE__ */ F(ie, {
562
+ ...c,
563
+ children: /* @__PURE__ */ U(ie, {
614
564
  component: null,
615
565
  exit: !0,
616
- children: p
566
+ children: l
617
567
  })
618
568
  });
619
569
  });
@@ -632,20 +582,20 @@ process.env.NODE_ENV !== "production" && (be.propTypes = {
632
582
  */
633
583
  className: n.string
634
584
  });
635
- function lt(e) {
585
+ function it(e) {
636
586
  return Le("MuiButtonBase", e);
637
587
  }
638
- const ct = fe("MuiButtonBase", ["root", "disabled", "focusVisible"]), pt = (e) => {
588
+ const st = fe("MuiButtonBase", ["root", "disabled", "focusVisible"]), ut = (e) => {
639
589
  const {
640
590
  disabled: t,
641
591
  focusVisible: o,
642
- focusVisibleClassName: i,
643
- classes: s
644
- } = e, u = $e({
592
+ focusVisibleClassName: s,
593
+ classes: r
594
+ } = e, u = ke({
645
595
  root: ["root", t && "disabled", o && "focusVisible"]
646
- }, lt, s);
647
- return o && i && (u.root += ` ${i}`), u;
648
- }, ft = ne("button", {
596
+ }, it, r);
597
+ return o && s && (u.root += ` ${s}`), u;
598
+ }, at = ne("button", {
649
599
  name: "MuiButtonBase",
650
600
  slot: "Root"
651
601
  })({
@@ -679,7 +629,7 @@ const ct = fe("MuiButtonBase", ["root", "disabled", "focusVisible"]), pt = (e) =
679
629
  borderStyle: "none"
680
630
  // Remove Firefox dotted outline.
681
631
  },
682
- [`&.${ct.disabled}`]: {
632
+ [`&.${st.disabled}`]: {
683
633
  pointerEvents: "none",
684
634
  // Disable link interactions
685
635
  cursor: "default"
@@ -687,95 +637,95 @@ const ct = fe("MuiButtonBase", ["root", "disabled", "focusVisible"]), pt = (e) =
687
637
  "@media print": {
688
638
  colorAdjust: "exact"
689
639
  }
690
- }), dt = /* @__PURE__ */ c.forwardRef(function(t, o) {
691
- const i = de({
640
+ }), lt = /* @__PURE__ */ f.forwardRef(function(t, o) {
641
+ const s = de({
692
642
  props: t,
693
643
  name: "MuiButtonBase"
694
644
  }), {
695
- action: s,
696
- centerRipple: r = !1,
645
+ action: r,
646
+ centerRipple: i = !1,
697
647
  children: u,
698
- className: l,
699
- component: p = "button",
700
- disabled: f = !1,
648
+ className: c,
649
+ component: l = "button",
650
+ disabled: p = !1,
701
651
  disableRipple: h = !1,
702
652
  disableTouchRipple: m = !1,
703
- focusRipple: R = !1,
704
- focusVisibleClassName: w,
653
+ focusRipple: M = !1,
654
+ focusVisibleClassName: N,
705
655
  LinkComponent: g = "a",
706
656
  onBlur: V,
707
657
  onClick: v,
708
- onContextMenu: k,
658
+ onContextMenu: j,
709
659
  onDragLeave: K,
710
- onFocus: j,
660
+ onFocus: k,
711
661
  onFocusVisible: d,
712
662
  onKeyDown: T,
713
- onKeyUp: M,
714
- onMouseDown: $,
663
+ onKeyUp: R,
664
+ onMouseDown: F,
715
665
  onMouseLeave: S,
716
- onMouseUp: U,
666
+ onMouseUp: _,
717
667
  onTouchEnd: E,
718
- onTouchMove: N,
668
+ onTouchMove: w,
719
669
  onTouchStart: D,
720
670
  tabIndex: x = 0,
721
671
  TouchRippleProps: O,
722
- touchRippleRef: _,
672
+ touchRippleRef: $,
723
673
  type: I,
724
674
  ...z
725
- } = i, A = c.useRef(null), b = tt(), ge = ae(b.ref, _), [B, q] = c.useState(!1);
726
- f && B && q(!1), c.useImperativeHandle(s, () => ({
675
+ } = s, A = f.useRef(null), b = Ze(), ge = ae(b.ref, $), [B, q] = f.useState(!1);
676
+ p && B && q(!1), f.useImperativeHandle(r, () => ({
727
677
  focusVisible: () => {
728
678
  q(!0), A.current.focus();
729
679
  }
730
680
  }), []);
731
- const ye = b.shouldMount && !h && !f;
732
- c.useEffect(() => {
733
- B && R && !h && b.pulsate();
734
- }, [h, R, B, b]);
735
- const Re = P(b, "start", $, m), Me = P(b, "stop", k, m), Te = P(b, "stop", K, m), Ee = P(b, "stop", U, m), Ce = P(b, "stop", (a) => {
681
+ const ye = b.shouldMount && !h && !p;
682
+ f.useEffect(() => {
683
+ B && M && !h && b.pulsate();
684
+ }, [h, M, B, b]);
685
+ const Me = P(b, "start", F, m), Re = P(b, "stop", j, m), Te = P(b, "stop", K, m), Ee = P(b, "stop", _, m), Ce = P(b, "stop", (a) => {
736
686
  B && a.preventDefault(), S && S(a);
737
- }, m), ve = P(b, "start", D, m), xe = P(b, "stop", E, m), Pe = P(b, "stop", N, m), we = P(b, "stop", (a) => {
687
+ }, m), ve = P(b, "start", D, m), xe = P(b, "stop", E, m), Pe = P(b, "stop", w, m), Ne = P(b, "stop", (a) => {
738
688
  pe(a.target) || q(!1), V && V(a);
739
- }, !1), Ne = Z((a) => {
740
- A.current || (A.current = a.currentTarget), pe(a.target) && (q(!0), d && d(a)), j && j(a);
689
+ }, !1), we = Z((a) => {
690
+ A.current || (A.current = a.currentTarget), pe(a.target) && (q(!0), d && d(a)), k && k(a);
741
691
  }), Q = () => {
742
692
  const a = A.current;
743
- return p && p !== "button" && !(a.tagName === "A" && a.href);
693
+ return l && l !== "button" && !(a.tagName === "A" && a.href);
744
694
  }, De = Z((a) => {
745
- R && !a.repeat && B && a.key === " " && b.stop(a, () => {
695
+ M && !a.repeat && B && a.key === " " && b.stop(a, () => {
746
696
  b.start(a);
747
- }), a.target === a.currentTarget && Q() && a.key === " " && a.preventDefault(), T && T(a), a.target === a.currentTarget && Q() && a.key === "Enter" && !f && (a.preventDefault(), v && v(a));
697
+ }), a.target === a.currentTarget && Q() && a.key === " " && a.preventDefault(), T && T(a), a.target === a.currentTarget && Q() && a.key === "Enter" && !p && (a.preventDefault(), v && v(a));
748
698
  }), Oe = Z((a) => {
749
- R && a.key === " " && B && !a.defaultPrevented && b.stop(a, () => {
699
+ M && a.key === " " && B && !a.defaultPrevented && b.stop(a, () => {
750
700
  b.pulsate(a);
751
- }), M && M(a), v && a.target === a.currentTarget && Q() && a.key === " " && !a.defaultPrevented && v(a);
701
+ }), R && R(a), v && a.target === a.currentTarget && Q() && a.key === " " && !a.defaultPrevented && v(a);
752
702
  });
753
- let H = p;
754
- H === "button" && (z.href || z.to) && (H = g);
703
+ let W = l;
704
+ W === "button" && (z.href || z.to) && (W = g);
755
705
  const Y = {};
756
- H === "button" ? (Y.type = I === void 0 ? "button" : I, Y.disabled = f) : (!z.href && !z.to && (Y.role = "button"), f && (Y["aria-disabled"] = f));
706
+ W === "button" ? (Y.type = I === void 0 ? "button" : I, Y.disabled = p) : (!z.href && !z.to && (Y.role = "button"), p && (Y["aria-disabled"] = p));
757
707
  const Ve = ae(o, A), ue = {
758
- ...i,
759
- centerRipple: r,
760
- component: p,
761
- disabled: f,
708
+ ...s,
709
+ centerRipple: i,
710
+ component: l,
711
+ disabled: p,
762
712
  disableRipple: h,
763
713
  disableTouchRipple: m,
764
- focusRipple: R,
714
+ focusRipple: M,
765
715
  tabIndex: x,
766
716
  focusVisible: B
767
- }, Se = pt(ue);
768
- return /* @__PURE__ */ ke(ft, {
769
- as: H,
770
- className: C(Se.root, l),
717
+ }, Se = ut(ue);
718
+ return /* @__PURE__ */ je(at, {
719
+ as: W,
720
+ className: C(Se.root, c),
771
721
  ownerState: ue,
772
- onBlur: we,
722
+ onBlur: Ne,
773
723
  onClick: v,
774
- onContextMenu: Me,
775
- onFocus: Ne,
724
+ onContextMenu: Re,
725
+ onFocus: we,
776
726
  onKeyDown: De,
777
727
  onKeyUp: Oe,
778
- onMouseDown: Re,
728
+ onMouseDown: Me,
779
729
  onMouseLeave: Ce,
780
730
  onMouseUp: Ee,
781
731
  onDragLeave: Te,
@@ -783,21 +733,21 @@ const ct = fe("MuiButtonBase", ["root", "disabled", "focusVisible"]), pt = (e) =
783
733
  onTouchMove: Pe,
784
734
  onTouchStart: ve,
785
735
  ref: Ve,
786
- tabIndex: f ? -1 : x,
736
+ tabIndex: p ? -1 : x,
787
737
  type: I,
788
738
  ...Y,
789
739
  ...z,
790
- children: [u, ye ? /* @__PURE__ */ F(be, {
740
+ children: [u, ye ? /* @__PURE__ */ U(be, {
791
741
  ref: ge,
792
- center: r,
742
+ center: i,
793
743
  ...O
794
744
  }) : null]
795
745
  });
796
746
  });
797
- function P(e, t, o, i = !1) {
798
- return Z((s) => (o && o(s), i || e[t](s), !0));
747
+ function P(e, t, o, s = !1) {
748
+ return Z((r) => (o && o(r), s || e[t](r), !0));
799
749
  }
800
- process.env.NODE_ENV !== "production" && (dt.propTypes = {
750
+ process.env.NODE_ENV !== "production" && (lt.propTypes = {
801
751
  // ┌────────────────────────────── Warning ──────────────────────────────┐
802
752
  // │ These PropTypes are generated from the TypeScript type definitions. │
803
753
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -806,7 +756,7 @@ process.env.NODE_ENV !== "production" && (dt.propTypes = {
806
756
  * A ref for imperative actions.
807
757
  * It currently only supports `focusVisible()` action.
808
758
  */
809
- action: et,
759
+ action: Ue,
810
760
  /**
811
761
  * If `true`, the ripples are centered.
812
762
  * They won't start at the cursor interaction position.
@@ -829,7 +779,7 @@ process.env.NODE_ENV !== "production" && (dt.propTypes = {
829
779
  * The component used for the root node.
830
780
  * Either a string to use a HTML element or a component.
831
781
  */
832
- component: Qe,
782
+ component: Fe,
833
783
  /**
834
784
  * If `true`, the component is disabled.
835
785
  * @default false
@@ -956,11 +906,8 @@ process.env.NODE_ENV !== "production" && (dt.propTypes = {
956
906
  type: n.oneOfType([n.oneOf(["button", "reset", "submit"]), n.string])
957
907
  });
958
908
  export {
959
- dt as B,
909
+ lt as B,
960
910
  le as T,
961
- _e as _,
962
- Ue as a,
963
- Fe as b,
964
- Z as c,
965
- ae as u
911
+ $e as _,
912
+ _e as a
966
913
  };