@solostylist/ui-kit 1.0.88 → 1.0.89

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 (65) hide show
  1. package/dist/{Box-Cf99MewL.js → Box-CJmG1mTu.js} +3 -3
  2. package/dist/ButtonBase-C0g54hXq.js +910 -0
  3. package/dist/{ChevronRight-D5BryGH5.js → ChevronRight-CtkI4XwH.js} +1 -1
  4. package/dist/{Close-CKpTrk7X.js → Close--Sf9yZGB.js} +1 -1
  5. package/dist/{Menu-D2LDo0yd.js → Menu-BuktPpzX.js} +914 -1453
  6. package/dist/{MenuItem-JkMrBIMD.js → MenuItem-sL2AcofB.js} +8 -8
  7. package/dist/Paper-CH6cuu9i.js +553 -0
  8. package/dist/{Select-4BjFewNI.js → Select-D2lV25sl.js} +16 -15
  9. package/dist/{Stack-UjxgGQu9.js → Stack-CIrlOUXL.js} +4 -4
  10. package/dist/{TransitionGroup-DzGaAPUk.js → TransitionGroup-SToIdl-5.js} +3 -3
  11. package/dist/{Typography-CGoVq27h.js → Typography-D-VP4V1G.js} +3 -3
  12. package/dist/{createSvgIcon-vJH0FaMW.js → createSvgIcon-DpVs_nKR.js} +5 -5
  13. package/dist/{createTheme-DjqDAiZm.js → createTheme-DbdaZ0Ku.js} +3 -2
  14. package/dist/{defaultTheme-CaAxts6z.js → defaultTheme-CFAmbghg.js} +1 -1
  15. package/dist/{extendSxProp-BnfiUPQK.js → extendSxProp-CQnEn3aw.js} +1 -1
  16. package/dist/{index-DcImsw9J.js → index-CjPqjRDL.js} +4 -4
  17. package/dist/main.d.ts +4 -0
  18. package/dist/main.js +117 -113
  19. package/dist/mergeSlotProps-N47mO9C9.js +62 -0
  20. package/dist/s-accordion/index.d.ts +2 -0
  21. package/dist/s-accordion/index.js +4 -0
  22. package/dist/s-accordion/package.json +5 -0
  23. package/dist/s-accordion/s-accordion.d.ts +9 -0
  24. package/dist/s-accordion/s-accordion.js +924 -0
  25. package/dist/s-avatar/index.d.ts +2 -0
  26. package/dist/s-avatar/index.js +4 -0
  27. package/dist/s-avatar/package.json +5 -0
  28. package/dist/s-avatar/s-avatar.d.ts +10 -0
  29. package/dist/s-avatar/s-avatar.js +9 -0
  30. package/dist/s-chat-input/s-chat-input.js +6 -6
  31. package/dist/s-copyable-text/s-copyable-text.js +1 -1
  32. package/dist/s-data-table/s-data-table.js +12 -10
  33. package/dist/s-date-picker/s-date-picker.js +24 -24
  34. package/dist/s-datetime-picker/s-datetime-picker.js +13 -12
  35. package/dist/s-dialog/s-dialog.js +1 -1
  36. package/dist/s-dialog-confirm/s-dialog-confirm.js +2 -2
  37. package/dist/s-dialog-message/s-dialog-message.js +2 -2
  38. package/dist/s-file-dropzone/s-file-dropzone.js +8 -8
  39. package/dist/s-file-icon/s-file-icon.js +1 -1
  40. package/dist/s-image-comparison/s-image-comparison.js +1 -1
  41. package/dist/s-image-modal/s-image-modal.js +2 -2
  42. package/dist/s-label/s-label.js +1 -1
  43. package/dist/s-localization-provider/s-localization-provider.js +1 -1
  44. package/dist/s-multi-select/s-multi-select.js +5 -5
  45. package/dist/s-smart-text-field/s-smart-text-field.js +2 -2
  46. package/dist/s-text-editor/s-text-editor-toolbar.js +8 -8
  47. package/dist/s-text-editor/s-text-editor.js +1 -1
  48. package/dist/s-text-field/s-text-field.js +5 -5
  49. package/dist/s-tip/s-tip.js +3 -3
  50. package/dist/theme/components/avatar.js +3 -3
  51. package/dist/theme/components/button.d.ts +2 -2
  52. package/dist/theme/components/chip.js +1 -1
  53. package/dist/theme/components/components.d.ts +2 -2
  54. package/dist/theme/customizations/inputs.js +1 -1
  55. package/dist/theme/customizations/navigation.js +1 -1
  56. package/dist/theme/theme-primitives.js +1 -1
  57. package/dist/useControlled-nm4pBabJ.js +31 -0
  58. package/dist/useFormControl-CatNKXAi.js +10 -0
  59. package/dist/{useMobilePicker-DmFQ075P.js → useMobilePicker-CRxlxUeh.js} +100 -98
  60. package/dist/{useTheme-DPtt6ExE.js → useTheme-CjYoxoob.js} +1 -1
  61. package/dist/{useThemeProps-DQiCrjPQ.js → useThemeProps-DdCEfRBE.js} +2 -2
  62. package/dist/{warning-UxpRUL3s.js → warning-CiVr8tE6.js} +3 -3
  63. package/package.json +1 -1
  64. package/dist/useFormControl-B3RPiDsz.js +0 -38
  65. package/dist/useSlot-DFSsVuMw.js +0 -969
@@ -0,0 +1,910 @@
1
+ var De = Object.defineProperty;
2
+ var xe = (t, n, e) => n in t ? De(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
3
+ var q = (t, n, e) => xe(t, typeof n != "symbol" ? n + "" : n, e);
4
+ import { c as oe } from "./defaultTheme-CFAmbghg.js";
5
+ import * as l from "react";
6
+ import { P as o } from "./createTheme-DbdaZ0Ku.js";
7
+ import { c as D, u as ue, s as Q, a as Ie } from "./createSvgIcon-DpVs_nKR.js";
8
+ import { j as P } from "./jsx-runtime-DywqP_6a.js";
9
+ import { g as Se } from "./generateUtilityClasses-BtVDwGrk.js";
10
+ import { a as Ve } from "./TransitionGroup-SToIdl-5.js";
11
+ import { keyframes as ee } from "@emotion/react";
12
+ import { g as je, b as Le } from "./buttonBaseClasses-jCihfot4.js";
13
+ import { u as Oe } from "./useEnhancedEffect-CJGo-L3B.js";
14
+ function Z(t) {
15
+ const n = l.useRef(t);
16
+ return Oe(() => {
17
+ n.current = t;
18
+ }), l.useRef((...e) => (
19
+ // @ts-expect-error hide `this`
20
+ (0, n.current)(...e)
21
+ )).current;
22
+ }
23
+ function v(...t) {
24
+ const n = l.useRef(void 0), e = l.useCallback((s) => {
25
+ const i = t.map((u) => {
26
+ if (u == null)
27
+ return null;
28
+ if (typeof u == "function") {
29
+ const f = u, h = f(s);
30
+ return typeof h == "function" ? h : () => {
31
+ f(null);
32
+ };
33
+ }
34
+ return u.current = s, () => {
35
+ u.current = null;
36
+ };
37
+ });
38
+ return () => {
39
+ i.forEach((u) => u == null ? void 0 : u());
40
+ };
41
+ }, t);
42
+ return l.useMemo(() => t.every((s) => s == null) ? null : (s) => {
43
+ n.current && (n.current(), n.current = void 0), s != null && (n.current = e(s));
44
+ }, t);
45
+ }
46
+ function $e(t, n) {
47
+ return process.env.NODE_ENV === "production" ? () => null : function(...s) {
48
+ return t(...s) || n(...s);
49
+ };
50
+ }
51
+ const se = {};
52
+ function ce(t, n) {
53
+ const e = l.useRef(se);
54
+ return e.current === se && (e.current = t(n)), e;
55
+ }
56
+ const Be = [];
57
+ function Pe(t) {
58
+ l.useEffect(t, Be);
59
+ }
60
+ class te {
61
+ constructor() {
62
+ q(this, "currentId", null);
63
+ q(this, "clear", () => {
64
+ this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
65
+ });
66
+ q(this, "disposeEffect", () => this.clear);
67
+ }
68
+ static create() {
69
+ return new te();
70
+ }
71
+ /**
72
+ * Executes `fn` after `delay`, clearing any previously scheduled call.
73
+ */
74
+ start(n, e) {
75
+ this.clear(), this.currentId = setTimeout(() => {
76
+ this.currentId = null, e();
77
+ }, n);
78
+ }
79
+ }
80
+ function Ue() {
81
+ const t = ce(te.create).current;
82
+ return Pe(t.disposeEffect), t;
83
+ }
84
+ function Ae(t) {
85
+ const {
86
+ prototype: n = {}
87
+ } = t;
88
+ return !!n.isReactComponent;
89
+ }
90
+ function ze(t, n, e, s, i) {
91
+ const u = t[n], f = i || n;
92
+ if (u == null || // When server-side rendering React doesn't warn either.
93
+ // This is not an accurate check for SSR.
94
+ // This is only in place for emotion compat.
95
+ // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
96
+ typeof window > "u")
97
+ return null;
98
+ let h;
99
+ return typeof u == "function" && !Ae(u) && (h = "Did you accidentally provide a plain function component instead?"), h !== void 0 ? new Error(`Invalid ${s} \`${f}\` supplied to \`${e}\`. Expected an element type that can hold a ref. ${h} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
100
+ }
101
+ const He = $e(o.elementType, ze);
102
+ function Ke(t) {
103
+ return typeof t == "string";
104
+ }
105
+ function Ye(t, n, e) {
106
+ return t === void 0 || Ke(t) ? n : {
107
+ ...n,
108
+ ownerState: {
109
+ ...n.ownerState,
110
+ ...e
111
+ }
112
+ };
113
+ }
114
+ function Xe(t, n, e) {
115
+ return typeof t == "function" ? t(n, e) : t;
116
+ }
117
+ function qe(t, n = []) {
118
+ if (t === void 0)
119
+ return {};
120
+ const e = {};
121
+ return Object.keys(t).filter((s) => s.match(/^on[A-Z]/) && typeof t[s] == "function" && !n.includes(s)).forEach((s) => {
122
+ e[s] = t[s];
123
+ }), e;
124
+ }
125
+ function re(t) {
126
+ if (t === void 0)
127
+ return {};
128
+ const n = {};
129
+ return Object.keys(t).filter((e) => !(e.match(/^on[A-Z]/) && typeof t[e] == "function")).forEach((e) => {
130
+ n[e] = t[e];
131
+ }), n;
132
+ }
133
+ function Fe(t) {
134
+ const {
135
+ getSlotProps: n,
136
+ additionalProps: e,
137
+ externalSlotProps: s,
138
+ externalForwardedProps: i,
139
+ className: u
140
+ } = t;
141
+ if (!n) {
142
+ const R = oe(e == null ? void 0 : e.className, u, i == null ? void 0 : i.className, s == null ? void 0 : s.className), d = {
143
+ ...e == null ? void 0 : e.style,
144
+ ...i == null ? void 0 : i.style,
145
+ ...s == null ? void 0 : s.style
146
+ }, T = {
147
+ ...e,
148
+ ...i,
149
+ ...s
150
+ };
151
+ return R.length > 0 && (T.className = R), Object.keys(d).length > 0 && (T.style = d), {
152
+ props: T,
153
+ internalRef: void 0
154
+ };
155
+ }
156
+ const f = qe({
157
+ ...i,
158
+ ...s
159
+ }), h = re(s), g = re(i), a = n(f), m = oe(a == null ? void 0 : a.className, e == null ? void 0 : e.className, u, i == null ? void 0 : i.className, s == null ? void 0 : s.className), p = {
160
+ ...a == null ? void 0 : a.style,
161
+ ...e == null ? void 0 : e.style,
162
+ ...i == null ? void 0 : i.style,
163
+ ...s == null ? void 0 : s.style
164
+ }, y = {
165
+ ...a,
166
+ ...e,
167
+ ...g,
168
+ ...h
169
+ };
170
+ return m.length > 0 && (y.className = m), Object.keys(p).length > 0 && (y.style = p), {
171
+ props: y,
172
+ internalRef: a.ref
173
+ };
174
+ }
175
+ function mt(t, n) {
176
+ const {
177
+ className: e,
178
+ elementType: s,
179
+ ownerState: i,
180
+ externalForwardedProps: u,
181
+ internalForwardedProps: f,
182
+ shouldForwardComponentProp: h = !1,
183
+ ...g
184
+ } = n, {
185
+ component: a,
186
+ slots: m = {
187
+ [t]: void 0
188
+ },
189
+ slotProps: p = {
190
+ [t]: void 0
191
+ },
192
+ ...y
193
+ } = u, R = m[t] || s, d = Xe(p[t], i), {
194
+ props: {
195
+ component: T,
196
+ ...E
197
+ },
198
+ internalRef: S
199
+ } = Fe({
200
+ className: e,
201
+ ...g,
202
+ externalForwardedProps: t === "root" ? y : void 0,
203
+ externalSlotProps: d
204
+ }), U = v(S, d == null ? void 0 : d.ref, n.ref), C = t === "root" ? T || a : T, c = Ye(R, {
205
+ ...t === "root" && !a && !m[t] && f,
206
+ ...t !== "root" && !m[t] && f,
207
+ ...E,
208
+ ...C && !h && {
209
+ as: C
210
+ },
211
+ ...C && h && {
212
+ component: C
213
+ },
214
+ ref: U
215
+ }, i);
216
+ return [R, c];
217
+ }
218
+ const We = o.oneOfType([o.func, o.object]);
219
+ function ie(t) {
220
+ try {
221
+ return t.matches(":focus-visible");
222
+ } catch {
223
+ process.env.NODE_ENV !== "production" && !/jsdom/.test(window.navigator.userAgent) && console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.", "Some components rely on this feature to work properly."].join(`
224
+ `));
225
+ }
226
+ return !1;
227
+ }
228
+ class _ {
229
+ constructor() {
230
+ q(this, "mountEffect", () => {
231
+ this.shouldMount && !this.didMount && this.ref.current !== null && (this.didMount = !0, this.mounted.resolve());
232
+ });
233
+ this.ref = {
234
+ current: null
235
+ }, this.mounted = null, this.didMount = !1, this.shouldMount = !1, this.setShouldMount = null;
236
+ }
237
+ /** React ref to the ripple instance */
238
+ /** If the ripple component should be mounted */
239
+ /** Promise that resolves when the ripple component is mounted */
240
+ /** If the ripple component has been mounted */
241
+ /** React state hook setter */
242
+ static create() {
243
+ return new _();
244
+ }
245
+ static use() {
246
+ const n = ce(_.create).current, [e, s] = l.useState(!1);
247
+ return n.shouldMount = e, n.setShouldMount = s, l.useEffect(n.mountEffect, [e]), n;
248
+ }
249
+ mount() {
250
+ return this.mounted || (this.mounted = _e(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
251
+ }
252
+ /* Ripple API */
253
+ start(...n) {
254
+ this.mount().then(() => {
255
+ var e;
256
+ return (e = this.ref.current) == null ? void 0 : e.start(...n);
257
+ });
258
+ }
259
+ stop(...n) {
260
+ this.mount().then(() => {
261
+ var e;
262
+ return (e = this.ref.current) == null ? void 0 : e.stop(...n);
263
+ });
264
+ }
265
+ pulsate(...n) {
266
+ this.mount().then(() => {
267
+ var e;
268
+ return (e = this.ref.current) == null ? void 0 : e.pulsate(...n);
269
+ });
270
+ }
271
+ }
272
+ function Ze() {
273
+ return _.use();
274
+ }
275
+ function _e() {
276
+ let t, n;
277
+ const e = new Promise((s, i) => {
278
+ t = s, n = i;
279
+ });
280
+ return e.resolve = t, e.reject = n, e;
281
+ }
282
+ function le(t) {
283
+ const {
284
+ className: n,
285
+ classes: e,
286
+ pulsate: s = !1,
287
+ rippleX: i,
288
+ rippleY: u,
289
+ rippleSize: f,
290
+ in: h,
291
+ onExited: g,
292
+ timeout: a
293
+ } = t, [m, p] = l.useState(!1), y = D(n, e.ripple, e.rippleVisible, s && e.ripplePulsate), R = {
294
+ width: f,
295
+ height: f,
296
+ top: -(f / 2) + u,
297
+ left: -(f / 2) + i
298
+ }, d = D(e.child, m && e.childLeaving, s && e.childPulsate);
299
+ return !h && !m && p(!0), l.useEffect(() => {
300
+ if (!h && g != null) {
301
+ const T = setTimeout(g, a);
302
+ return () => {
303
+ clearTimeout(T);
304
+ };
305
+ }
306
+ }, [g, h, a]), /* @__PURE__ */ P.jsx("span", {
307
+ className: y,
308
+ style: R,
309
+ children: /* @__PURE__ */ P.jsx("span", {
310
+ className: d
311
+ })
312
+ });
313
+ }
314
+ process.env.NODE_ENV !== "production" && (le.propTypes = {
315
+ /**
316
+ * Override or extend the styles applied to the component.
317
+ */
318
+ classes: o.object.isRequired,
319
+ className: o.string,
320
+ /**
321
+ * @ignore - injected from TransitionGroup
322
+ */
323
+ in: o.bool,
324
+ /**
325
+ * @ignore - injected from TransitionGroup
326
+ */
327
+ onExited: o.func,
328
+ /**
329
+ * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
330
+ */
331
+ pulsate: o.bool,
332
+ /**
333
+ * Diameter of the ripple.
334
+ */
335
+ rippleSize: o.number,
336
+ /**
337
+ * Horizontal position of the ripple center.
338
+ */
339
+ rippleX: o.number,
340
+ /**
341
+ * Vertical position of the ripple center.
342
+ */
343
+ rippleY: o.number,
344
+ /**
345
+ * exit delay
346
+ */
347
+ timeout: o.number.isRequired
348
+ });
349
+ const M = Se("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), J = 550, Ge = 80, ve = ee`
350
+ 0% {
351
+ transform: scale(0);
352
+ opacity: 0.1;
353
+ }
354
+
355
+ 100% {
356
+ transform: scale(1);
357
+ opacity: 0.3;
358
+ }
359
+ `, Je = ee`
360
+ 0% {
361
+ opacity: 1;
362
+ }
363
+
364
+ 100% {
365
+ opacity: 0;
366
+ }
367
+ `, Qe = ee`
368
+ 0% {
369
+ transform: scale(1);
370
+ }
371
+
372
+ 50% {
373
+ transform: scale(0.92);
374
+ }
375
+
376
+ 100% {
377
+ transform: scale(1);
378
+ }
379
+ `, et = Q("span", {
380
+ name: "MuiTouchRipple",
381
+ slot: "Root"
382
+ })({
383
+ overflow: "hidden",
384
+ pointerEvents: "none",
385
+ position: "absolute",
386
+ zIndex: 0,
387
+ top: 0,
388
+ right: 0,
389
+ bottom: 0,
390
+ left: 0,
391
+ borderRadius: "inherit"
392
+ }), tt = Q(le, {
393
+ name: "MuiTouchRipple",
394
+ slot: "Ripple"
395
+ })`
396
+ opacity: 0;
397
+ position: absolute;
398
+
399
+ &.${M.rippleVisible} {
400
+ opacity: 0.3;
401
+ transform: scale(1);
402
+ animation-name: ${ve};
403
+ animation-duration: ${J}ms;
404
+ animation-timing-function: ${({
405
+ theme: t
406
+ }) => t.transitions.easing.easeInOut};
407
+ }
408
+
409
+ &.${M.ripplePulsate} {
410
+ animation-duration: ${({
411
+ theme: t
412
+ }) => t.transitions.duration.shorter}ms;
413
+ }
414
+
415
+ & .${M.child} {
416
+ opacity: 1;
417
+ display: block;
418
+ width: 100%;
419
+ height: 100%;
420
+ border-radius: 50%;
421
+ background-color: currentColor;
422
+ }
423
+
424
+ & .${M.childLeaving} {
425
+ opacity: 0;
426
+ animation-name: ${Je};
427
+ animation-duration: ${J}ms;
428
+ animation-timing-function: ${({
429
+ theme: t
430
+ }) => t.transitions.easing.easeInOut};
431
+ }
432
+
433
+ & .${M.childPulsate} {
434
+ position: absolute;
435
+ /* @noflip */
436
+ left: 0px;
437
+ top: 0;
438
+ animation-name: ${Qe};
439
+ animation-duration: 2500ms;
440
+ animation-timing-function: ${({
441
+ theme: t
442
+ }) => t.transitions.easing.easeInOut};
443
+ animation-iteration-count: infinite;
444
+ animation-delay: 200ms;
445
+ }
446
+ `, ae = /* @__PURE__ */ l.forwardRef(function(n, e) {
447
+ const s = ue({
448
+ props: n,
449
+ name: "MuiTouchRipple"
450
+ }), {
451
+ center: i = !1,
452
+ classes: u = {},
453
+ className: f,
454
+ ...h
455
+ } = s, [g, a] = l.useState([]), m = l.useRef(0), p = l.useRef(null);
456
+ l.useEffect(() => {
457
+ p.current && (p.current(), p.current = null);
458
+ }, [g]);
459
+ const y = l.useRef(!1), R = Ue(), d = l.useRef(null), T = l.useRef(null), E = l.useCallback((c) => {
460
+ const {
461
+ pulsate: w,
462
+ rippleX: N,
463
+ rippleY: A,
464
+ rippleSize: O,
465
+ cb: z
466
+ } = c;
467
+ a((k) => [...k, /* @__PURE__ */ P.jsx(tt, {
468
+ classes: {
469
+ ripple: D(u.ripple, M.ripple),
470
+ rippleVisible: D(u.rippleVisible, M.rippleVisible),
471
+ ripplePulsate: D(u.ripplePulsate, M.ripplePulsate),
472
+ child: D(u.child, M.child),
473
+ childLeaving: D(u.childLeaving, M.childLeaving),
474
+ childPulsate: D(u.childPulsate, M.childPulsate)
475
+ },
476
+ timeout: J,
477
+ pulsate: w,
478
+ rippleX: N,
479
+ rippleY: A,
480
+ rippleSize: O
481
+ }, m.current)]), m.current += 1, p.current = z;
482
+ }, [u]), S = l.useCallback((c = {}, w = {}, N = () => {
483
+ }) => {
484
+ const {
485
+ pulsate: A = !1,
486
+ center: O = i || w.pulsate,
487
+ fakeElement: z = !1
488
+ // For test purposes
489
+ } = w;
490
+ if ((c == null ? void 0 : c.type) === "mousedown" && y.current) {
491
+ y.current = !1;
492
+ return;
493
+ }
494
+ (c == null ? void 0 : c.type) === "touchstart" && (y.current = !0);
495
+ const k = z ? null : T.current, V = k ? k.getBoundingClientRect() : {
496
+ width: 0,
497
+ height: 0,
498
+ left: 0,
499
+ top: 0
500
+ };
501
+ let j, x, L;
502
+ if (O || c === void 0 || c.clientX === 0 && c.clientY === 0 || !c.clientX && !c.touches)
503
+ j = Math.round(V.width / 2), x = Math.round(V.height / 2);
504
+ else {
505
+ const {
506
+ clientX: H,
507
+ clientY: $
508
+ } = c.touches && c.touches.length > 0 ? c.touches[0] : c;
509
+ j = Math.round(H - V.left), x = Math.round($ - V.top);
510
+ }
511
+ if (O)
512
+ L = Math.sqrt((2 * V.width ** 2 + V.height ** 2) / 3), L % 2 === 0 && (L += 1);
513
+ else {
514
+ const H = Math.max(Math.abs((k ? k.clientWidth : 0) - j), j) * 2 + 2, $ = Math.max(Math.abs((k ? k.clientHeight : 0) - x), x) * 2 + 2;
515
+ L = Math.sqrt(H ** 2 + $ ** 2);
516
+ }
517
+ c != null && c.touches ? d.current === null && (d.current = () => {
518
+ E({
519
+ pulsate: A,
520
+ rippleX: j,
521
+ rippleY: x,
522
+ rippleSize: L,
523
+ cb: N
524
+ });
525
+ }, R.start(Ge, () => {
526
+ d.current && (d.current(), d.current = null);
527
+ })) : E({
528
+ pulsate: A,
529
+ rippleX: j,
530
+ rippleY: x,
531
+ rippleSize: L,
532
+ cb: N
533
+ });
534
+ }, [i, E, R]), U = l.useCallback(() => {
535
+ S({}, {
536
+ pulsate: !0
537
+ });
538
+ }, [S]), C = l.useCallback((c, w) => {
539
+ if (R.clear(), (c == null ? void 0 : c.type) === "touchend" && d.current) {
540
+ d.current(), d.current = null, R.start(0, () => {
541
+ C(c, w);
542
+ });
543
+ return;
544
+ }
545
+ d.current = null, a((N) => N.length > 0 ? N.slice(1) : N), p.current = w;
546
+ }, [R]);
547
+ return l.useImperativeHandle(e, () => ({
548
+ pulsate: U,
549
+ start: S,
550
+ stop: C
551
+ }), [U, S, C]), /* @__PURE__ */ P.jsx(et, {
552
+ className: D(M.root, u.root, f),
553
+ ref: T,
554
+ ...h,
555
+ children: /* @__PURE__ */ P.jsx(Ve, {
556
+ component: null,
557
+ exit: !0,
558
+ children: g
559
+ })
560
+ });
561
+ });
562
+ process.env.NODE_ENV !== "production" && (ae.propTypes = {
563
+ /**
564
+ * If `true`, the ripple starts at the center of the component
565
+ * rather than at the point of interaction.
566
+ */
567
+ center: o.bool,
568
+ /**
569
+ * Override or extend the styles applied to the component.
570
+ */
571
+ classes: o.object,
572
+ /**
573
+ * @ignore
574
+ */
575
+ className: o.string
576
+ });
577
+ const nt = (t) => {
578
+ const {
579
+ disabled: n,
580
+ focusVisible: e,
581
+ focusVisibleClassName: s,
582
+ classes: i
583
+ } = t, f = Ie({
584
+ root: ["root", n && "disabled", e && "focusVisible"]
585
+ }, je, i);
586
+ return e && s && (f.root += ` ${s}`), f;
587
+ }, ot = Q("button", {
588
+ name: "MuiButtonBase",
589
+ slot: "Root"
590
+ })({
591
+ display: "inline-flex",
592
+ alignItems: "center",
593
+ justifyContent: "center",
594
+ position: "relative",
595
+ boxSizing: "border-box",
596
+ WebkitTapHighlightColor: "transparent",
597
+ backgroundColor: "transparent",
598
+ // Reset default value
599
+ // We disable the focus ring for mouse, touch and keyboard users.
600
+ outline: 0,
601
+ border: 0,
602
+ margin: 0,
603
+ // Remove the margin in Safari
604
+ borderRadius: 0,
605
+ padding: 0,
606
+ // Remove the padding in Firefox
607
+ cursor: "pointer",
608
+ userSelect: "none",
609
+ verticalAlign: "middle",
610
+ MozAppearance: "none",
611
+ // Reset
612
+ WebkitAppearance: "none",
613
+ // Reset
614
+ textDecoration: "none",
615
+ // So we take precedent over the style of a native <a /> element.
616
+ color: "inherit",
617
+ "&::-moz-focus-inner": {
618
+ borderStyle: "none"
619
+ // Remove Firefox dotted outline.
620
+ },
621
+ [`&.${Le.disabled}`]: {
622
+ pointerEvents: "none",
623
+ // Disable link interactions
624
+ cursor: "default"
625
+ },
626
+ "@media print": {
627
+ colorAdjust: "exact"
628
+ }
629
+ }), st = /* @__PURE__ */ l.forwardRef(function(n, e) {
630
+ const s = ue({
631
+ props: n,
632
+ name: "MuiButtonBase"
633
+ }), {
634
+ action: i,
635
+ centerRipple: u = !1,
636
+ children: f,
637
+ className: h,
638
+ component: g = "button",
639
+ disabled: a = !1,
640
+ disableRipple: m = !1,
641
+ disableTouchRipple: p = !1,
642
+ focusRipple: y = !1,
643
+ focusVisibleClassName: R,
644
+ LinkComponent: d = "a",
645
+ onBlur: T,
646
+ onClick: E,
647
+ onContextMenu: S,
648
+ onDragLeave: U,
649
+ onFocus: C,
650
+ onFocusVisible: c,
651
+ onKeyDown: w,
652
+ onKeyUp: N,
653
+ onMouseDown: A,
654
+ onMouseLeave: O,
655
+ onMouseUp: z,
656
+ onTouchEnd: k,
657
+ onTouchMove: V,
658
+ onTouchStart: j,
659
+ tabIndex: x = 0,
660
+ TouchRippleProps: L,
661
+ touchRippleRef: H,
662
+ type: $,
663
+ ...K
664
+ } = s, Y = l.useRef(null), b = Ze(), pe = v(b.ref, H), [B, F] = l.useState(!1);
665
+ a && B && F(!1), l.useImperativeHandle(i, () => ({
666
+ focusVisible: () => {
667
+ F(!0), Y.current.focus();
668
+ }
669
+ }), []);
670
+ const fe = b.shouldMount && !m && !a;
671
+ l.useEffect(() => {
672
+ B && y && !m && b.pulsate();
673
+ }, [m, y, B, b]);
674
+ const de = I(b, "start", A, p), he = I(b, "stop", S, p), me = I(b, "stop", U, p), ye = I(b, "stop", z, p), be = I(b, "stop", (r) => {
675
+ B && r.preventDefault(), O && O(r);
676
+ }, p), ge = I(b, "start", j, p), Re = I(b, "stop", k, p), Te = I(b, "stop", V, p), Me = I(b, "stop", (r) => {
677
+ ie(r.target) || F(!1), T && T(r);
678
+ }, !1), Ee = Z((r) => {
679
+ Y.current || (Y.current = r.currentTarget), ie(r.target) && (F(!0), c && c(r)), C && C(r);
680
+ }), G = () => {
681
+ const r = Y.current;
682
+ return g && g !== "button" && !(r.tagName === "A" && r.href);
683
+ }, Ce = Z((r) => {
684
+ y && !r.repeat && B && r.key === " " && b.stop(r, () => {
685
+ b.start(r);
686
+ }), r.target === r.currentTarget && G() && r.key === " " && r.preventDefault(), w && w(r), r.target === r.currentTarget && G() && r.key === "Enter" && !a && (r.preventDefault(), E && E(r));
687
+ }), Ne = Z((r) => {
688
+ y && r.key === " " && B && !r.defaultPrevented && b.stop(r, () => {
689
+ b.pulsate(r);
690
+ }), N && N(r), E && r.target === r.currentTarget && G() && r.key === " " && !r.defaultPrevented && E(r);
691
+ });
692
+ let W = g;
693
+ W === "button" && (K.href || K.to) && (W = d);
694
+ const X = {};
695
+ W === "button" ? (X.type = $ === void 0 ? "button" : $, X.disabled = a) : (!K.href && !K.to && (X.role = "button"), a && (X["aria-disabled"] = a));
696
+ const we = v(e, Y), ne = {
697
+ ...s,
698
+ centerRipple: u,
699
+ component: g,
700
+ disabled: a,
701
+ disableRipple: m,
702
+ disableTouchRipple: p,
703
+ focusRipple: y,
704
+ tabIndex: x,
705
+ focusVisible: B
706
+ }, ke = nt(ne);
707
+ return /* @__PURE__ */ P.jsxs(ot, {
708
+ as: W,
709
+ className: D(ke.root, h),
710
+ ownerState: ne,
711
+ onBlur: Me,
712
+ onClick: E,
713
+ onContextMenu: he,
714
+ onFocus: Ee,
715
+ onKeyDown: Ce,
716
+ onKeyUp: Ne,
717
+ onMouseDown: de,
718
+ onMouseLeave: be,
719
+ onMouseUp: ye,
720
+ onDragLeave: me,
721
+ onTouchEnd: Re,
722
+ onTouchMove: Te,
723
+ onTouchStart: ge,
724
+ ref: we,
725
+ tabIndex: a ? -1 : x,
726
+ type: $,
727
+ ...X,
728
+ ...K,
729
+ children: [f, fe ? /* @__PURE__ */ P.jsx(ae, {
730
+ ref: pe,
731
+ center: u,
732
+ ...L
733
+ }) : null]
734
+ });
735
+ });
736
+ function I(t, n, e, s = !1) {
737
+ return Z((i) => (e && e(i), s || t[n](i), !0));
738
+ }
739
+ process.env.NODE_ENV !== "production" && (st.propTypes = {
740
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
741
+ // │ These PropTypes are generated from the TypeScript type definitions. │
742
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
743
+ // └─────────────────────────────────────────────────────────────────────┘
744
+ /**
745
+ * A ref for imperative actions.
746
+ * It currently only supports `focusVisible()` action.
747
+ */
748
+ action: We,
749
+ /**
750
+ * If `true`, the ripples are centered.
751
+ * They won't start at the cursor interaction position.
752
+ * @default false
753
+ */
754
+ centerRipple: o.bool,
755
+ /**
756
+ * The content of the component.
757
+ */
758
+ children: o.node,
759
+ /**
760
+ * Override or extend the styles applied to the component.
761
+ */
762
+ classes: o.object,
763
+ /**
764
+ * @ignore
765
+ */
766
+ className: o.string,
767
+ /**
768
+ * The component used for the root node.
769
+ * Either a string to use a HTML element or a component.
770
+ */
771
+ component: He,
772
+ /**
773
+ * If `true`, the component is disabled.
774
+ * @default false
775
+ */
776
+ disabled: o.bool,
777
+ /**
778
+ * If `true`, the ripple effect is disabled.
779
+ *
780
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
781
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
782
+ * @default false
783
+ */
784
+ disableRipple: o.bool,
785
+ /**
786
+ * If `true`, the touch ripple effect is disabled.
787
+ * @default false
788
+ */
789
+ disableTouchRipple: o.bool,
790
+ /**
791
+ * If `true`, the base button will have a keyboard focus ripple.
792
+ * @default false
793
+ */
794
+ focusRipple: o.bool,
795
+ /**
796
+ * This prop can help identify which element has keyboard focus.
797
+ * The class name will be applied when the element gains the focus through keyboard interaction.
798
+ * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
799
+ * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
800
+ * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
801
+ * if needed.
802
+ */
803
+ focusVisibleClassName: o.string,
804
+ /**
805
+ * @ignore
806
+ */
807
+ href: o.any,
808
+ /**
809
+ * The component used to render a link when the `href` prop is provided.
810
+ * @default 'a'
811
+ */
812
+ LinkComponent: o.elementType,
813
+ /**
814
+ * @ignore
815
+ */
816
+ onBlur: o.func,
817
+ /**
818
+ * @ignore
819
+ */
820
+ onClick: o.func,
821
+ /**
822
+ * @ignore
823
+ */
824
+ onContextMenu: o.func,
825
+ /**
826
+ * @ignore
827
+ */
828
+ onDragLeave: o.func,
829
+ /**
830
+ * @ignore
831
+ */
832
+ onFocus: o.func,
833
+ /**
834
+ * Callback fired when the component is focused with a keyboard.
835
+ * We trigger a `onFocus` callback too.
836
+ */
837
+ onFocusVisible: o.func,
838
+ /**
839
+ * @ignore
840
+ */
841
+ onKeyDown: o.func,
842
+ /**
843
+ * @ignore
844
+ */
845
+ onKeyUp: o.func,
846
+ /**
847
+ * @ignore
848
+ */
849
+ onMouseDown: o.func,
850
+ /**
851
+ * @ignore
852
+ */
853
+ onMouseLeave: o.func,
854
+ /**
855
+ * @ignore
856
+ */
857
+ onMouseUp: o.func,
858
+ /**
859
+ * @ignore
860
+ */
861
+ onTouchEnd: o.func,
862
+ /**
863
+ * @ignore
864
+ */
865
+ onTouchMove: o.func,
866
+ /**
867
+ * @ignore
868
+ */
869
+ onTouchStart: o.func,
870
+ /**
871
+ * The system prop that allows defining system overrides as well as additional CSS styles.
872
+ */
873
+ sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
874
+ /**
875
+ * @default 0
876
+ */
877
+ tabIndex: o.number,
878
+ /**
879
+ * Props applied to the `TouchRipple` element.
880
+ */
881
+ TouchRippleProps: o.object,
882
+ /**
883
+ * A ref that points to the `TouchRipple` element.
884
+ */
885
+ touchRippleRef: o.oneOfType([o.func, o.shape({
886
+ current: o.shape({
887
+ pulsate: o.func.isRequired,
888
+ start: o.func.isRequired,
889
+ stop: o.func.isRequired
890
+ })
891
+ })]),
892
+ /**
893
+ * @ignore
894
+ */
895
+ type: o.oneOfType([o.oneOf(["button", "reset", "submit"]), o.string])
896
+ });
897
+ export {
898
+ st as B,
899
+ Xe as a,
900
+ Ue as b,
901
+ $e as c,
902
+ mt as d,
903
+ He as e,
904
+ Z as f,
905
+ qe as g,
906
+ Ye as h,
907
+ Fe as m,
908
+ We as r,
909
+ v as u
910
+ };