@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
@@ -1,1179 +0,0 @@
1
- var ke = Object.defineProperty;
2
- var Be = (e, t, n) => t in e ? ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var W = (e, t, n) => Be(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { c as M } from "./identifier-DCmLmBSP.js";
5
- import * as h from "react";
6
- import q, { isValidElement as J, cloneElement as Q, Children as Ve } from "react";
7
- import { P as r } from "./createTheme-DkVAXJiq.js";
8
- import { j as U } from "./jsx-runtime-C5mzlN2N.js";
9
- import { g as Ue } from "./generateUtilityClasses-DStZbN71.js";
10
- import { u as me, s as ie, c as _e } from "./DefaultPropsProvider-DhE0_fCr.js";
11
- import { keyframes as re } from "@emotion/react";
12
- import { g as Fe, b as He } from "./buttonBaseClasses-D9p3ujfW.js";
13
- import { u as ze } from "./useEnhancedEffect-CJGo-L3B.js";
14
- function P(e) {
15
- const t = h.useRef(e);
16
- return ze(() => {
17
- t.current = e;
18
- }), h.useRef((...n) => (
19
- // @ts-expect-error hide `this`
20
- (0, t.current)(...n)
21
- )).current;
22
- }
23
- function te(...e) {
24
- const t = h.useRef(void 0), n = h.useCallback((s) => {
25
- const o = e.map((i) => {
26
- if (i == null)
27
- return null;
28
- if (typeof i == "function") {
29
- const u = i, c = u(s);
30
- return typeof c == "function" ? c : () => {
31
- u(null);
32
- };
33
- }
34
- return i.current = s, () => {
35
- i.current = null;
36
- };
37
- });
38
- return () => {
39
- o.forEach((i) => i == null ? void 0 : i());
40
- };
41
- }, e);
42
- return h.useMemo(() => e.every((s) => s == null) ? null : (s) => {
43
- t.current && (t.current(), t.current = void 0), s != null && (t.current = n(s));
44
- }, e);
45
- }
46
- function Ye(e, t) {
47
- const n = e.charCodeAt(2);
48
- return e[0] === "o" && e[1] === "n" && n >= 65 && n <= 90 && typeof t == "function";
49
- }
50
- function Lt(e, t) {
51
- if (!e)
52
- return t;
53
- function n(u, c) {
54
- const a = {};
55
- return Object.keys(c).forEach((l) => {
56
- Ye(l, c[l]) && typeof u[l] == "function" && (a[l] = (...d) => {
57
- u[l](...d), c[l](...d);
58
- });
59
- }), a;
60
- }
61
- if (typeof e == "function" || typeof t == "function")
62
- return (u) => {
63
- const c = typeof t == "function" ? t(u) : t, a = typeof e == "function" ? e({
64
- ...u,
65
- ...c
66
- }) : e, l = M(u == null ? void 0 : u.className, c == null ? void 0 : c.className, a == null ? void 0 : a.className), d = n(a, c);
67
- return {
68
- ...c,
69
- ...a,
70
- ...d,
71
- ...!!l && {
72
- className: l
73
- },
74
- ...(c == null ? void 0 : c.style) && (a == null ? void 0 : a.style) && {
75
- style: {
76
- ...c.style,
77
- ...a.style
78
- }
79
- },
80
- ...(c == null ? void 0 : c.sx) && (a == null ? void 0 : a.sx) && {
81
- sx: [...Array.isArray(c.sx) ? c.sx : [c.sx], ...Array.isArray(a.sx) ? a.sx : [a.sx]]
82
- }
83
- };
84
- };
85
- const s = t, o = n(e, s), i = M(s == null ? void 0 : s.className, e == null ? void 0 : e.className);
86
- return {
87
- ...t,
88
- ...e,
89
- ...o,
90
- ...!!i && {
91
- className: i
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 Xe(e, t) {
105
- return process.env.NODE_ENV === "production" ? () => null : function(...s) {
106
- return e(...s) || t(...s);
107
- };
108
- }
109
- const Ke = r.oneOfType([r.func, r.object]);
110
- function We(e) {
111
- const {
112
- prototype: t = {}
113
- } = e;
114
- return !!t.isReactComponent;
115
- }
116
- function qe(e, t, n, s, o) {
117
- const i = e[t], u = o || t;
118
- if (i == 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 c;
125
- return typeof i == "function" && !We(i) && (c = "Did you accidentally provide a plain function component instead?"), c !== void 0 ? new Error(`Invalid ${s} \`${u}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
126
- }
127
- const Ge = Xe(r.elementType, qe);
128
- function fe(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 pe = {};
138
- function ye(e, t) {
139
- const n = h.useRef(pe);
140
- return n.current === pe && (n.current = e(t)), n;
141
- }
142
- class S {
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 S();
158
- }
159
- static use() {
160
- const t = ye(S.create).current, [n, s] = h.useState(!1);
161
- return t.shouldMount = n, t.setShouldMount = s, h.useEffect(t.mountEffect, [n]), t;
162
- }
163
- mount() {
164
- return this.mounted || (this.mounted = Je(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
165
- }
166
- /* Ripple API */
167
- start(...t) {
168
- this.mount().then(() => {
169
- var n;
170
- return (n = this.ref.current) == null ? void 0 : n.start(...t);
171
- });
172
- }
173
- stop(...t) {
174
- this.mount().then(() => {
175
- var n;
176
- return (n = this.ref.current) == null ? void 0 : n.stop(...t);
177
- });
178
- }
179
- pulsate(...t) {
180
- this.mount().then(() => {
181
- var n;
182
- return (n = this.ref.current) == null ? void 0 : n.pulsate(...t);
183
- });
184
- }
185
- }
186
- function Ze() {
187
- return S.use();
188
- }
189
- function Je() {
190
- let e, t;
191
- const n = new Promise((s, o) => {
192
- e = s, t = o;
193
- });
194
- return n.resolve = e, n.reject = t, n;
195
- }
196
- function ne() {
197
- return ne = Object.assign ? Object.assign.bind() : function(e) {
198
- for (var t = 1; t < arguments.length; t++) {
199
- var n = arguments[t];
200
- for (var s in n) ({}).hasOwnProperty.call(n, s) && (e[s] = n[s]);
201
- }
202
- return e;
203
- }, ne.apply(null, arguments);
204
- }
205
- function Qe(e, t) {
206
- if (e == null) return {};
207
- var n = {};
208
- for (var s in e) if ({}.hasOwnProperty.call(e, s)) {
209
- if (t.indexOf(s) !== -1) continue;
210
- n[s] = e[s];
211
- }
212
- return n;
213
- }
214
- function se(e, t) {
215
- return se = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, s) {
216
- return n.__proto__ = s, n;
217
- }, se(e, t);
218
- }
219
- function Pe(e, t) {
220
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, se(e, t);
221
- }
222
- const de = q.createContext(null);
223
- function Se(e) {
224
- if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
225
- return e;
226
- }
227
- function ue(e, t) {
228
- var n = function(i) {
229
- return t && J(i) ? t(i) : i;
230
- }, s = /* @__PURE__ */ Object.create(null);
231
- return e && Ve.map(e, function(o) {
232
- return o;
233
- }).forEach(function(o) {
234
- s[o.key] = n(o);
235
- }), s;
236
- }
237
- function et(e, t) {
238
- e = e || {}, t = t || {};
239
- function n(d) {
240
- return d in t ? t[d] : e[d];
241
- }
242
- var s = /* @__PURE__ */ Object.create(null), o = [];
243
- for (var i in e)
244
- i in t ? o.length && (s[i] = o, o = []) : o.push(i);
245
- var u, c = {};
246
- for (var a in t) {
247
- if (s[a])
248
- for (u = 0; u < s[a].length; u++) {
249
- var l = s[a][u];
250
- c[s[a][u]] = n(l);
251
- }
252
- c[a] = n(a);
253
- }
254
- for (u = 0; u < o.length; u++)
255
- c[o[u]] = n(o[u]);
256
- return c;
257
- }
258
- function V(e, t, n) {
259
- return n[t] != null ? n[t] : e.props[t];
260
- }
261
- function tt(e, t) {
262
- return ue(e.children, function(n) {
263
- return Q(n, {
264
- onExited: t.bind(null, n),
265
- in: !0,
266
- appear: V(n, "appear", e),
267
- enter: V(n, "enter", e),
268
- exit: V(n, "exit", e)
269
- });
270
- });
271
- }
272
- function nt(e, t, n) {
273
- var s = ue(e.children), o = et(t, s);
274
- return Object.keys(o).forEach(function(i) {
275
- var u = o[i];
276
- if (J(u)) {
277
- var c = i in t, a = i in s, l = t[i], d = J(l) && !l.props.in;
278
- a && (!c || d) ? o[i] = Q(u, {
279
- onExited: n.bind(null, u),
280
- in: !0,
281
- exit: V(u, "exit", e),
282
- enter: V(u, "enter", e)
283
- }) : !a && c && !d ? o[i] = Q(u, {
284
- in: !1
285
- }) : a && c && J(l) && (o[i] = Q(u, {
286
- onExited: n.bind(null, u),
287
- in: l.props.in,
288
- exit: V(u, "exit", e),
289
- enter: V(u, "enter", e)
290
- }));
291
- }
292
- }), o;
293
- }
294
- var st = Object.values || function(e) {
295
- return Object.keys(e).map(function(t) {
296
- return e[t];
297
- });
298
- }, ot = {
299
- component: "div",
300
- childFactory: function(t) {
301
- return t;
302
- }
303
- }, ce = /* @__PURE__ */ function(e) {
304
- Pe(t, e);
305
- function t(s, o) {
306
- var i;
307
- i = e.call(this, s, o) || this;
308
- var u = i.handleExited.bind(Se(i));
309
- return i.state = {
310
- contextValue: {
311
- isMounting: !0
312
- },
313
- handleExited: u,
314
- firstRender: !0
315
- }, i;
316
- }
317
- var n = t.prototype;
318
- return n.componentDidMount = function() {
319
- this.mounted = !0, this.setState({
320
- contextValue: {
321
- isMounting: !1
322
- }
323
- });
324
- }, n.componentWillUnmount = function() {
325
- this.mounted = !1;
326
- }, t.getDerivedStateFromProps = function(o, i) {
327
- var u = i.children, c = i.handleExited, a = i.firstRender;
328
- return {
329
- children: a ? tt(o, c) : nt(o, u, c),
330
- firstRender: !1
331
- };
332
- }, n.handleExited = function(o, i) {
333
- var u = ue(this.props.children);
334
- o.key in u || (o.props.onExited && o.props.onExited(i), this.mounted && this.setState(function(c) {
335
- var a = ne({}, c.children);
336
- return delete a[o.key], {
337
- children: a
338
- };
339
- }));
340
- }, n.render = function() {
341
- var o = this.props, i = o.component, u = o.childFactory, c = Qe(o, ["component", "childFactory"]), a = this.state.contextValue, l = st(this.state.children).map(u);
342
- return delete c.appear, delete c.enter, delete c.exit, i === null ? /* @__PURE__ */ q.createElement(de.Provider, {
343
- value: a
344
- }, l) : /* @__PURE__ */ q.createElement(de.Provider, {
345
- value: a
346
- }, /* @__PURE__ */ q.createElement(i, c, l));
347
- }, t;
348
- }(q.Component);
349
- ce.propTypes = process.env.NODE_ENV !== "production" ? {
350
- /**
351
- * `<TransitionGroup>` renders a `<div>` by default. You can change this
352
- * behavior by providing a `component` prop.
353
- * If you use React v16+ and would like to avoid a wrapping `<div>` element
354
- * you can pass in `component={null}`. This is useful if the wrapping div
355
- * borks your css styles.
356
- */
357
- component: r.any,
358
- /**
359
- * A set of `<Transition>` components, that are toggled `in` and out as they
360
- * leave. the `<TransitionGroup>` will inject specific transition props, so
361
- * remember to spread them through if you are wrapping the `<Transition>` as
362
- * with our `<Fade>` example.
363
- *
364
- * While this component is meant for multiple `Transition` or `CSSTransition`
365
- * children, sometimes you may want to have a single transition child with
366
- * content that you want to be transitioned out and in when you change it
367
- * (e.g. routes, images etc.) In that case you can change the `key` prop of
368
- * the transition child as you change its content, this will cause
369
- * `TransitionGroup` to transition the child out and back in.
370
- */
371
- children: r.node,
372
- /**
373
- * A convenience prop that enables or disables appear animations
374
- * for all children. Note that specifying this will override any defaults set
375
- * on individual children Transitions.
376
- */
377
- appear: r.bool,
378
- /**
379
- * A convenience prop that enables or disables enter animations
380
- * for all children. Note that specifying this will override any defaults set
381
- * on individual children Transitions.
382
- */
383
- enter: r.bool,
384
- /**
385
- * A convenience prop that enables or disables exit animations
386
- * for all children. Note that specifying this will override any defaults set
387
- * on individual children Transitions.
388
- */
389
- exit: r.bool,
390
- /**
391
- * You may need to apply reactive updates to a child as it is exiting.
392
- * This is generally done by using `cloneElement` however in the case of an exiting
393
- * child the element has already been removed and not accessible to the consumer.
394
- *
395
- * If you do need to update a child as it leaves you can provide a `childFactory`
396
- * to wrap every child, even the ones that are leaving.
397
- *
398
- * @type Function(child: ReactElement) -> ReactElement
399
- */
400
- childFactory: r.func
401
- } : {};
402
- ce.defaultProps = ot;
403
- const it = [];
404
- function rt(e) {
405
- h.useEffect(e, it);
406
- }
407
- class ae {
408
- constructor() {
409
- W(this, "currentId", null);
410
- W(this, "clear", () => {
411
- this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
412
- });
413
- W(this, "disposeEffect", () => this.clear);
414
- }
415
- static create() {
416
- return new ae();
417
- }
418
- /**
419
- * Executes `fn` after `delay`, clearing any previously scheduled call.
420
- */
421
- start(t, n) {
422
- this.clear(), this.currentId = setTimeout(() => {
423
- this.currentId = null, n();
424
- }, t);
425
- }
426
- }
427
- function ut() {
428
- const e = ye(ae.create).current;
429
- return rt(e.disposeEffect), e;
430
- }
431
- function be(e) {
432
- const {
433
- className: t,
434
- classes: n,
435
- pulsate: s = !1,
436
- rippleX: o,
437
- rippleY: i,
438
- rippleSize: u,
439
- in: c,
440
- onExited: a,
441
- timeout: l
442
- } = e, [d, m] = h.useState(!1), b = M(t, n.ripple, n.rippleVisible, s && n.ripplePulsate), R = {
443
- width: u,
444
- height: u,
445
- top: -(u / 2) + i,
446
- left: -(u / 2) + o
447
- }, y = M(n.child, d && n.childLeaving, s && n.childPulsate);
448
- return !c && !d && m(!0), h.useEffect(() => {
449
- if (!c && a != null) {
450
- const E = setTimeout(a, l);
451
- return () => {
452
- clearTimeout(E);
453
- };
454
- }
455
- }, [a, c, l]), /* @__PURE__ */ U.jsx("span", {
456
- className: b,
457
- style: R,
458
- children: /* @__PURE__ */ U.jsx("span", {
459
- className: y
460
- })
461
- });
462
- }
463
- process.env.NODE_ENV !== "production" && (be.propTypes = {
464
- /**
465
- * Override or extend the styles applied to the component.
466
- */
467
- classes: r.object.isRequired,
468
- className: r.string,
469
- /**
470
- * @ignore - injected from TransitionGroup
471
- */
472
- in: r.bool,
473
- /**
474
- * @ignore - injected from TransitionGroup
475
- */
476
- onExited: r.func,
477
- /**
478
- * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
479
- */
480
- pulsate: r.bool,
481
- /**
482
- * Diameter of the ripple.
483
- */
484
- rippleSize: r.number,
485
- /**
486
- * Horizontal position of the ripple center.
487
- */
488
- rippleX: r.number,
489
- /**
490
- * Vertical position of the ripple center.
491
- */
492
- rippleY: r.number,
493
- /**
494
- * exit delay
495
- */
496
- timeout: r.number.isRequired
497
- });
498
- const T = Ue("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), oe = 550, ct = 80, at = re`
499
- 0% {
500
- transform: scale(0);
501
- opacity: 0.1;
502
- }
503
-
504
- 100% {
505
- transform: scale(1);
506
- opacity: 0.3;
507
- }
508
- `, lt = re`
509
- 0% {
510
- opacity: 1;
511
- }
512
-
513
- 100% {
514
- opacity: 0;
515
- }
516
- `, ft = re`
517
- 0% {
518
- transform: scale(1);
519
- }
520
-
521
- 50% {
522
- transform: scale(0.92);
523
- }
524
-
525
- 100% {
526
- transform: scale(1);
527
- }
528
- `, pt = ie("span", {
529
- name: "MuiTouchRipple",
530
- slot: "Root"
531
- })({
532
- overflow: "hidden",
533
- pointerEvents: "none",
534
- position: "absolute",
535
- zIndex: 0,
536
- top: 0,
537
- right: 0,
538
- bottom: 0,
539
- left: 0,
540
- borderRadius: "inherit"
541
- }), dt = ie(be, {
542
- name: "MuiTouchRipple",
543
- slot: "Ripple"
544
- })`
545
- opacity: 0;
546
- position: absolute;
547
-
548
- &.${T.rippleVisible} {
549
- opacity: 0.3;
550
- transform: scale(1);
551
- animation-name: ${at};
552
- animation-duration: ${oe}ms;
553
- animation-timing-function: ${({
554
- theme: e
555
- }) => e.transitions.easing.easeInOut};
556
- }
557
-
558
- &.${T.ripplePulsate} {
559
- animation-duration: ${({
560
- theme: e
561
- }) => e.transitions.duration.shorter}ms;
562
- }
563
-
564
- & .${T.child} {
565
- opacity: 1;
566
- display: block;
567
- width: 100%;
568
- height: 100%;
569
- border-radius: 50%;
570
- background-color: currentColor;
571
- }
572
-
573
- & .${T.childLeaving} {
574
- opacity: 0;
575
- animation-name: ${lt};
576
- animation-duration: ${oe}ms;
577
- animation-timing-function: ${({
578
- theme: e
579
- }) => e.transitions.easing.easeInOut};
580
- }
581
-
582
- & .${T.childPulsate} {
583
- position: absolute;
584
- /* @noflip */
585
- left: 0px;
586
- top: 0;
587
- animation-name: ${ft};
588
- animation-duration: 2500ms;
589
- animation-timing-function: ${({
590
- theme: e
591
- }) => e.transitions.easing.easeInOut};
592
- animation-iteration-count: infinite;
593
- animation-delay: 200ms;
594
- }
595
- `, ge = /* @__PURE__ */ h.forwardRef(function(t, n) {
596
- const s = me({
597
- props: t,
598
- name: "MuiTouchRipple"
599
- }), {
600
- center: o = !1,
601
- classes: i = {},
602
- className: u,
603
- ...c
604
- } = s, [a, l] = h.useState([]), d = h.useRef(0), m = h.useRef(null);
605
- h.useEffect(() => {
606
- m.current && (m.current(), m.current = null);
607
- }, [a]);
608
- const b = h.useRef(!1), R = ut(), y = h.useRef(null), E = h.useRef(null), C = h.useCallback((p) => {
609
- const {
610
- pulsate: O,
611
- rippleX: v,
612
- rippleY: F,
613
- rippleSize: $,
614
- cb: H
615
- } = p;
616
- l((j) => [...j, /* @__PURE__ */ U.jsx(dt, {
617
- classes: {
618
- ripple: M(i.ripple, T.ripple),
619
- rippleVisible: M(i.rippleVisible, T.rippleVisible),
620
- ripplePulsate: M(i.ripplePulsate, T.ripplePulsate),
621
- child: M(i.child, T.child),
622
- childLeaving: M(i.childLeaving, T.childLeaving),
623
- childPulsate: M(i.childPulsate, T.childPulsate)
624
- },
625
- timeout: oe,
626
- pulsate: O,
627
- rippleX: v,
628
- rippleY: F,
629
- rippleSize: $
630
- }, d.current)]), d.current += 1, m.current = H;
631
- }, [i]), D = h.useCallback((p = {}, O = {}, v = () => {
632
- }) => {
633
- const {
634
- pulsate: F = !1,
635
- center: $ = o || O.pulsate,
636
- fakeElement: H = !1
637
- // For test purposes
638
- } = O;
639
- if ((p == null ? void 0 : p.type) === "mousedown" && b.current) {
640
- b.current = !1;
641
- return;
642
- }
643
- (p == null ? void 0 : p.type) === "touchstart" && (b.current = !0);
644
- const j = H ? null : E.current, I = j ? j.getBoundingClientRect() : {
645
- width: 0,
646
- height: 0,
647
- left: 0,
648
- top: 0
649
- };
650
- let L, w, A;
651
- if ($ || p === void 0 || p.clientX === 0 && p.clientY === 0 || !p.clientX && !p.touches)
652
- L = Math.round(I.width / 2), w = Math.round(I.height / 2);
653
- else {
654
- const {
655
- clientX: z,
656
- clientY: k
657
- } = p.touches && p.touches.length > 0 ? p.touches[0] : p;
658
- L = Math.round(z - I.left), w = Math.round(k - I.top);
659
- }
660
- if ($)
661
- A = Math.sqrt((2 * I.width ** 2 + I.height ** 2) / 3), A % 2 === 0 && (A += 1);
662
- else {
663
- const z = Math.max(Math.abs((j ? j.clientWidth : 0) - L), L) * 2 + 2, k = Math.max(Math.abs((j ? j.clientHeight : 0) - w), w) * 2 + 2;
664
- A = Math.sqrt(z ** 2 + k ** 2);
665
- }
666
- p != null && p.touches ? y.current === null && (y.current = () => {
667
- C({
668
- pulsate: F,
669
- rippleX: L,
670
- rippleY: w,
671
- rippleSize: A,
672
- cb: v
673
- });
674
- }, R.start(ct, () => {
675
- y.current && (y.current(), y.current = null);
676
- })) : C({
677
- pulsate: F,
678
- rippleX: L,
679
- rippleY: w,
680
- rippleSize: A,
681
- cb: v
682
- });
683
- }, [o, C, R]), _ = h.useCallback(() => {
684
- D({}, {
685
- pulsate: !0
686
- });
687
- }, [D]), N = h.useCallback((p, O) => {
688
- if (R.clear(), (p == null ? void 0 : p.type) === "touchend" && y.current) {
689
- y.current(), y.current = null, R.start(0, () => {
690
- N(p, O);
691
- });
692
- return;
693
- }
694
- y.current = null, l((v) => v.length > 0 ? v.slice(1) : v), m.current = O;
695
- }, [R]);
696
- return h.useImperativeHandle(n, () => ({
697
- pulsate: _,
698
- start: D,
699
- stop: N
700
- }), [_, D, N]), /* @__PURE__ */ U.jsx(pt, {
701
- className: M(T.root, i.root, u),
702
- ref: E,
703
- ...c,
704
- children: /* @__PURE__ */ U.jsx(ce, {
705
- component: null,
706
- exit: !0,
707
- children: a
708
- })
709
- });
710
- });
711
- process.env.NODE_ENV !== "production" && (ge.propTypes = {
712
- /**
713
- * If `true`, the ripple starts at the center of the component
714
- * rather than at the point of interaction.
715
- */
716
- center: r.bool,
717
- /**
718
- * Override or extend the styles applied to the component.
719
- */
720
- classes: r.object,
721
- /**
722
- * @ignore
723
- */
724
- className: r.string
725
- });
726
- const ht = (e) => {
727
- const {
728
- disabled: t,
729
- focusVisible: n,
730
- focusVisibleClassName: s,
731
- classes: o
732
- } = e, u = _e({
733
- root: ["root", t && "disabled", n && "focusVisible"]
734
- }, Fe, o);
735
- return n && s && (u.root += ` ${s}`), u;
736
- }, mt = ie("button", {
737
- name: "MuiButtonBase",
738
- slot: "Root",
739
- overridesResolver: (e, t) => t.root
740
- })({
741
- display: "inline-flex",
742
- alignItems: "center",
743
- justifyContent: "center",
744
- position: "relative",
745
- boxSizing: "border-box",
746
- WebkitTapHighlightColor: "transparent",
747
- backgroundColor: "transparent",
748
- // Reset default value
749
- // We disable the focus ring for mouse, touch and keyboard users.
750
- outline: 0,
751
- border: 0,
752
- margin: 0,
753
- // Remove the margin in Safari
754
- borderRadius: 0,
755
- padding: 0,
756
- // Remove the padding in Firefox
757
- cursor: "pointer",
758
- userSelect: "none",
759
- verticalAlign: "middle",
760
- MozAppearance: "none",
761
- // Reset
762
- WebkitAppearance: "none",
763
- // Reset
764
- textDecoration: "none",
765
- // So we take precedent over the style of a native <a /> element.
766
- color: "inherit",
767
- "&::-moz-focus-inner": {
768
- borderStyle: "none"
769
- // Remove Firefox dotted outline.
770
- },
771
- [`&.${He.disabled}`]: {
772
- pointerEvents: "none",
773
- // Disable link interactions
774
- cursor: "default"
775
- },
776
- "@media print": {
777
- colorAdjust: "exact"
778
- }
779
- }), yt = /* @__PURE__ */ h.forwardRef(function(t, n) {
780
- const s = me({
781
- props: t,
782
- name: "MuiButtonBase"
783
- }), {
784
- action: o,
785
- centerRipple: i = !1,
786
- children: u,
787
- className: c,
788
- component: a = "button",
789
- disabled: l = !1,
790
- disableRipple: d = !1,
791
- disableTouchRipple: m = !1,
792
- focusRipple: b = !1,
793
- focusVisibleClassName: R,
794
- LinkComponent: y = "a",
795
- onBlur: E,
796
- onClick: C,
797
- onContextMenu: D,
798
- onDragLeave: _,
799
- onFocus: N,
800
- onFocusVisible: p,
801
- onKeyDown: O,
802
- onKeyUp: v,
803
- onMouseDown: F,
804
- onMouseLeave: $,
805
- onMouseUp: H,
806
- onTouchEnd: j,
807
- onTouchMove: I,
808
- onTouchStart: L,
809
- tabIndex: w = 0,
810
- TouchRippleProps: A,
811
- touchRippleRef: z,
812
- type: k,
813
- ...Y
814
- } = s, X = h.useRef(null), g = Ze(), Re = te(g.ref, z), [B, G] = h.useState(!1);
815
- l && B && G(!1), h.useImperativeHandle(o, () => ({
816
- focusVisible: () => {
817
- G(!0), X.current.focus();
818
- }
819
- }), []);
820
- const Ee = g.shouldMount && !d && !l;
821
- h.useEffect(() => {
822
- B && b && !d && g.pulsate();
823
- }, [d, b, B, g]);
824
- const Me = x(g, "start", F, m), Te = x(g, "stop", D, m), Ce = x(g, "stop", _, m), Ne = x(g, "stop", H, m), ve = x(g, "stop", (f) => {
825
- B && f.preventDefault(), $ && $(f);
826
- }, m), Oe = x(g, "start", L, m), je = x(g, "stop", j, m), we = x(g, "stop", I, m), xe = x(g, "stop", (f) => {
827
- fe(f.target) || G(!1), E && E(f);
828
- }, !1), De = P((f) => {
829
- X.current || (X.current = f.currentTarget), fe(f.target) && (G(!0), p && p(f)), N && N(f);
830
- }), ee = () => {
831
- const f = X.current;
832
- return a && a !== "button" && !(f.tagName === "A" && f.href);
833
- }, Ie = P((f) => {
834
- b && !f.repeat && B && f.key === " " && g.stop(f, () => {
835
- g.start(f);
836
- }), f.target === f.currentTarget && ee() && f.key === " " && f.preventDefault(), O && O(f), f.target === f.currentTarget && ee() && f.key === "Enter" && !l && (f.preventDefault(), C && C(f));
837
- }), Le = P((f) => {
838
- b && f.key === " " && B && !f.defaultPrevented && g.stop(f, () => {
839
- g.pulsate(f);
840
- }), v && v(f), C && f.target === f.currentTarget && ee() && f.key === " " && !f.defaultPrevented && C(f);
841
- });
842
- let Z = a;
843
- Z === "button" && (Y.href || Y.to) && (Z = y);
844
- const K = {};
845
- Z === "button" ? (K.type = k === void 0 ? "button" : k, K.disabled = l) : (!Y.href && !Y.to && (K.role = "button"), l && (K["aria-disabled"] = l));
846
- const Ae = te(n, X), le = {
847
- ...s,
848
- centerRipple: i,
849
- component: a,
850
- disabled: l,
851
- disableRipple: d,
852
- disableTouchRipple: m,
853
- focusRipple: b,
854
- tabIndex: w,
855
- focusVisible: B
856
- }, $e = ht(le);
857
- return /* @__PURE__ */ U.jsxs(mt, {
858
- as: Z,
859
- className: M($e.root, c),
860
- ownerState: le,
861
- onBlur: xe,
862
- onClick: C,
863
- onContextMenu: Te,
864
- onFocus: De,
865
- onKeyDown: Ie,
866
- onKeyUp: Le,
867
- onMouseDown: Me,
868
- onMouseLeave: ve,
869
- onMouseUp: Ne,
870
- onDragLeave: Ce,
871
- onTouchEnd: je,
872
- onTouchMove: we,
873
- onTouchStart: Oe,
874
- ref: Ae,
875
- tabIndex: l ? -1 : w,
876
- type: k,
877
- ...K,
878
- ...Y,
879
- children: [u, Ee ? /* @__PURE__ */ U.jsx(ge, {
880
- ref: Re,
881
- center: i,
882
- ...A
883
- }) : null]
884
- });
885
- });
886
- function x(e, t, n, s = !1) {
887
- return P((o) => (n && n(o), s || e[t](o), !0));
888
- }
889
- process.env.NODE_ENV !== "production" && (yt.propTypes = {
890
- // ┌────────────────────────────── Warning ──────────────────────────────┐
891
- // │ These PropTypes are generated from the TypeScript type definitions. │
892
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
893
- // └─────────────────────────────────────────────────────────────────────┘
894
- /**
895
- * A ref for imperative actions.
896
- * It currently only supports `focusVisible()` action.
897
- */
898
- action: Ke,
899
- /**
900
- * If `true`, the ripples are centered.
901
- * They won't start at the cursor interaction position.
902
- * @default false
903
- */
904
- centerRipple: r.bool,
905
- /**
906
- * The content of the component.
907
- */
908
- children: r.node,
909
- /**
910
- * Override or extend the styles applied to the component.
911
- */
912
- classes: r.object,
913
- /**
914
- * @ignore
915
- */
916
- className: r.string,
917
- /**
918
- * The component used for the root node.
919
- * Either a string to use a HTML element or a component.
920
- */
921
- component: Ge,
922
- /**
923
- * If `true`, the component is disabled.
924
- * @default false
925
- */
926
- disabled: r.bool,
927
- /**
928
- * If `true`, the ripple effect is disabled.
929
- *
930
- * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
931
- * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
932
- * @default false
933
- */
934
- disableRipple: r.bool,
935
- /**
936
- * If `true`, the touch ripple effect is disabled.
937
- * @default false
938
- */
939
- disableTouchRipple: r.bool,
940
- /**
941
- * If `true`, the base button will have a keyboard focus ripple.
942
- * @default false
943
- */
944
- focusRipple: r.bool,
945
- /**
946
- * This prop can help identify which element has keyboard focus.
947
- * The class name will be applied when the element gains the focus through keyboard interaction.
948
- * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
949
- * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
950
- * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
951
- * if needed.
952
- */
953
- focusVisibleClassName: r.string,
954
- /**
955
- * @ignore
956
- */
957
- href: r.any,
958
- /**
959
- * The component used to render a link when the `href` prop is provided.
960
- * @default 'a'
961
- */
962
- LinkComponent: r.elementType,
963
- /**
964
- * @ignore
965
- */
966
- onBlur: r.func,
967
- /**
968
- * @ignore
969
- */
970
- onClick: r.func,
971
- /**
972
- * @ignore
973
- */
974
- onContextMenu: r.func,
975
- /**
976
- * @ignore
977
- */
978
- onDragLeave: r.func,
979
- /**
980
- * @ignore
981
- */
982
- onFocus: r.func,
983
- /**
984
- * Callback fired when the component is focused with a keyboard.
985
- * We trigger a `onFocus` callback too.
986
- */
987
- onFocusVisible: r.func,
988
- /**
989
- * @ignore
990
- */
991
- onKeyDown: r.func,
992
- /**
993
- * @ignore
994
- */
995
- onKeyUp: r.func,
996
- /**
997
- * @ignore
998
- */
999
- onMouseDown: r.func,
1000
- /**
1001
- * @ignore
1002
- */
1003
- onMouseLeave: r.func,
1004
- /**
1005
- * @ignore
1006
- */
1007
- onMouseUp: r.func,
1008
- /**
1009
- * @ignore
1010
- */
1011
- onTouchEnd: r.func,
1012
- /**
1013
- * @ignore
1014
- */
1015
- onTouchMove: r.func,
1016
- /**
1017
- * @ignore
1018
- */
1019
- onTouchStart: r.func,
1020
- /**
1021
- * The system prop that allows defining system overrides as well as additional CSS styles.
1022
- */
1023
- sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
1024
- /**
1025
- * @default 0
1026
- */
1027
- tabIndex: r.number,
1028
- /**
1029
- * Props applied to the `TouchRipple` element.
1030
- */
1031
- TouchRippleProps: r.object,
1032
- /**
1033
- * A ref that points to the `TouchRipple` element.
1034
- */
1035
- touchRippleRef: r.oneOfType([r.func, r.shape({
1036
- current: r.shape({
1037
- pulsate: r.func.isRequired,
1038
- start: r.func.isRequired,
1039
- stop: r.func.isRequired
1040
- })
1041
- })]),
1042
- /**
1043
- * @ignore
1044
- */
1045
- type: r.oneOfType([r.oneOf(["button", "reset", "submit"]), r.string])
1046
- });
1047
- function bt(e) {
1048
- return typeof e == "string";
1049
- }
1050
- function gt(e, t, n) {
1051
- return e === void 0 || bt(e) ? t : {
1052
- ...t,
1053
- ownerState: {
1054
- ...t.ownerState,
1055
- ...n
1056
- }
1057
- };
1058
- }
1059
- function Rt(e, t, n) {
1060
- return typeof e == "function" ? e(t, n) : e;
1061
- }
1062
- function Et(e, t = []) {
1063
- if (e === void 0)
1064
- return {};
1065
- const n = {};
1066
- return Object.keys(e).filter((s) => s.match(/^on[A-Z]/) && typeof e[s] == "function" && !t.includes(s)).forEach((s) => {
1067
- n[s] = e[s];
1068
- }), n;
1069
- }
1070
- function he(e) {
1071
- if (e === void 0)
1072
- return {};
1073
- const t = {};
1074
- return Object.keys(e).filter((n) => !(n.match(/^on[A-Z]/) && typeof e[n] == "function")).forEach((n) => {
1075
- t[n] = e[n];
1076
- }), t;
1077
- }
1078
- function Mt(e) {
1079
- const {
1080
- getSlotProps: t,
1081
- additionalProps: n,
1082
- externalSlotProps: s,
1083
- externalForwardedProps: o,
1084
- className: i
1085
- } = e;
1086
- if (!t) {
1087
- const R = M(n == null ? void 0 : n.className, i, o == null ? void 0 : o.className, s == null ? void 0 : s.className), y = {
1088
- ...n == null ? void 0 : n.style,
1089
- ...o == null ? void 0 : o.style,
1090
- ...s == null ? void 0 : s.style
1091
- }, E = {
1092
- ...n,
1093
- ...o,
1094
- ...s
1095
- };
1096
- return R.length > 0 && (E.className = R), Object.keys(y).length > 0 && (E.style = y), {
1097
- props: E,
1098
- internalRef: void 0
1099
- };
1100
- }
1101
- const u = Et({
1102
- ...o,
1103
- ...s
1104
- }), c = he(s), a = he(o), l = t(u), d = M(l == null ? void 0 : l.className, n == null ? void 0 : n.className, i, o == null ? void 0 : o.className, s == null ? void 0 : s.className), m = {
1105
- ...l == null ? void 0 : l.style,
1106
- ...n == null ? void 0 : n.style,
1107
- ...o == null ? void 0 : o.style,
1108
- ...s == null ? void 0 : s.style
1109
- }, b = {
1110
- ...l,
1111
- ...n,
1112
- ...a,
1113
- ...c
1114
- };
1115
- return d.length > 0 && (b.className = d), Object.keys(m).length > 0 && (b.style = m), {
1116
- props: b,
1117
- internalRef: l.ref
1118
- };
1119
- }
1120
- function At(e, t) {
1121
- const {
1122
- className: n,
1123
- elementType: s,
1124
- ownerState: o,
1125
- externalForwardedProps: i,
1126
- internalForwardedProps: u,
1127
- shouldForwardComponentProp: c = !1,
1128
- ...a
1129
- } = t, {
1130
- component: l,
1131
- slots: d = {
1132
- [e]: void 0
1133
- },
1134
- slotProps: m = {
1135
- [e]: void 0
1136
- },
1137
- ...b
1138
- } = i, R = d[e] || s, y = Rt(m[e], o), {
1139
- props: {
1140
- component: E,
1141
- ...C
1142
- },
1143
- internalRef: D
1144
- } = Mt({
1145
- className: n,
1146
- ...a,
1147
- externalForwardedProps: e === "root" ? b : void 0,
1148
- externalSlotProps: y
1149
- }), _ = te(D, y == null ? void 0 : y.ref, t.ref), N = e === "root" ? E || l : E, p = gt(R, {
1150
- ...e === "root" && !l && !d[e] && u,
1151
- ...e !== "root" && !d[e] && u,
1152
- ...C,
1153
- ...N && !c && {
1154
- as: N
1155
- },
1156
- ...N && c && {
1157
- component: N
1158
- },
1159
- ref: _
1160
- }, o);
1161
- return [R, p];
1162
- }
1163
- export {
1164
- yt as B,
1165
- de as T,
1166
- Pe as _,
1167
- At as a,
1168
- Qe as b,
1169
- Xe as c,
1170
- ut as d,
1171
- Et as e,
1172
- Ge as f,
1173
- Rt as g,
1174
- Mt as h,
1175
- gt as i,
1176
- Lt as m,
1177
- Ke as r,
1178
- te as u
1179
- };