@solostylist/ui-kit 1.0.162 → 1.0.163

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