@solostylist/ui-kit 1.0.21 → 1.0.24

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