@amateescu/portal-ui-components 0.0.6 → 0.0.7-beta0

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.
@@ -1,1316 +1,19 @@
1
- import { jsx as k, jsxs as Ne } from "react/jsx-runtime";
2
- import { a as m, _ as ne } from "../../index-kNWC7pFF.js";
3
- import * as c from "react";
4
- import G, { Children as rt, isValidElement as ee, cloneElement as te } from "react";
5
- import { P as n, n as st, b as M, g as fe, u as he, k as A, m as be, h as $e, j as Ve, r as at, i as B, o as lt, p as Z } from "../../generateUtilityClasses-BjilB7Gl.js";
6
- import { _ as ct, a as ut } from "../../assertThisInitialized-BUtkG-md.js";
7
- const pt = n.oneOfType([n.func, n.object]);
8
- function dt(e) {
9
- const {
10
- prototype: t = {}
11
- } = e;
12
- return !!t.isReactComponent;
13
- }
14
- function ft(e, t, o, a, i) {
15
- const r = e[t], s = i || t;
16
- if (r == null || // When server-side rendering React doesn't warn either.
17
- // This is not an accurate check for SSR.
18
- // This is only in place for emotion compat.
19
- // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
20
- typeof window > "u")
21
- return null;
22
- let u;
23
- return typeof r == "function" && !dt(r) && (u = "Did you accidentally provide a plain function component instead?"), u !== void 0 ? new Error(`Invalid ${a} \`${s}\` supplied to \`${o}\`. Expected an element type that can hold a ref. ${u} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
24
- }
25
- const ht = st(n.elementType, ft);
26
- function bt(e, t) {
27
- typeof e == "function" ? e(t) : e && (e.current = t);
28
- }
29
- function Ce(...e) {
30
- return c.useMemo(() => e.every((t) => t == null) ? null : (t) => {
31
- e.forEach((o) => {
32
- bt(o, t);
33
- });
34
- }, e);
35
- }
36
- const mt = typeof window < "u" ? c.useLayoutEffect : c.useEffect;
37
- function J(e) {
38
- const t = c.useRef(e);
39
- return mt(() => {
40
- t.current = e;
41
- }), c.useRef((...o) => (
42
- // @ts-expect-error hide `this`
43
- (0, t.current)(...o)
44
- )).current;
45
- }
46
- const Ee = {};
47
- function gt(e, t) {
48
- const o = c.useRef(Ee);
49
- return o.current === Ee && (o.current = e(t)), o;
50
- }
51
- const vt = [];
52
- function yt(e) {
53
- c.useEffect(e, vt);
54
- }
55
- class oe {
56
- constructor() {
57
- this.currentId = null, this.clear = () => {
58
- this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
59
- }, this.disposeEffect = () => this.clear;
60
- }
61
- static create() {
62
- return new oe();
63
- }
64
- /**
65
- * Executes `fn` after `delay`, clearing any previously scheduled call.
66
- */
67
- start(t, o) {
68
- this.clear(), this.currentId = setTimeout(() => {
69
- this.currentId = null, o();
70
- }, t);
71
- }
72
- }
73
- function xt() {
74
- const e = gt(oe.create).current;
75
- return yt(e.disposeEffect), e;
76
- }
77
- let ie = !0, pe = !1;
78
- const Rt = new oe(), Ct = {
79
- text: !0,
80
- search: !0,
81
- url: !0,
82
- tel: !0,
83
- email: !0,
84
- password: !0,
85
- number: !0,
86
- date: !0,
87
- month: !0,
88
- week: !0,
89
- time: !0,
90
- datetime: !0,
91
- "datetime-local": !0
92
- };
93
- function Et(e) {
94
- const {
95
- type: t,
96
- tagName: o
97
- } = e;
98
- return !!(o === "INPUT" && Ct[t] && !e.readOnly || o === "TEXTAREA" && !e.readOnly || e.isContentEditable);
99
- }
100
- function Tt(e) {
101
- e.metaKey || e.altKey || e.ctrlKey || (ie = !0);
102
- }
103
- function ue() {
104
- ie = !1;
105
- }
106
- function Mt() {
107
- this.visibilityState === "hidden" && pe && (ie = !0);
108
- }
109
- function It(e) {
110
- e.addEventListener("keydown", Tt, !0), e.addEventListener("mousedown", ue, !0), e.addEventListener("pointerdown", ue, !0), e.addEventListener("touchstart", ue, !0), e.addEventListener("visibilitychange", Mt, !0);
111
- }
112
- function zt(e) {
113
- const {
114
- target: t
115
- } = e;
116
- try {
117
- return t.matches(":focus-visible");
118
- } catch {
119
- }
120
- return ie || Et(t);
121
- }
122
- function Bt() {
123
- const e = c.useCallback((i) => {
124
- i != null && It(i.ownerDocument);
125
- }, []), t = c.useRef(!1);
126
- function o() {
127
- return t.current ? (pe = !0, Rt.start(100, () => {
128
- pe = !1;
129
- }), t.current = !1, !0) : !1;
130
- }
131
- function a(i) {
132
- return zt(i) ? (t.current = !0, !0) : !1;
133
- }
134
- return {
135
- isFocusVisibleRef: t,
136
- onFocus: a,
137
- onBlur: o,
138
- ref: e
139
- };
140
- }
141
- function Nt(e, t) {
142
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ct(e, t);
143
- }
144
- const Te = G.createContext(null);
145
- function me(e, t) {
146
- var o = function(r) {
147
- return t && ee(r) ? t(r) : r;
148
- }, a = /* @__PURE__ */ Object.create(null);
149
- return e && rt.map(e, function(i) {
150
- return i;
151
- }).forEach(function(i) {
152
- a[i.key] = o(i);
153
- }), a;
154
- }
155
- function $t(e, t) {
156
- e = e || {}, t = t || {};
157
- function o(h) {
158
- return h in t ? t[h] : e[h];
159
- }
160
- var a = /* @__PURE__ */ Object.create(null), i = [];
161
- for (var r in e)
162
- r in t ? i.length && (a[r] = i, i = []) : i.push(r);
163
- var s, u = {};
164
- for (var p in t) {
165
- if (a[p])
166
- for (s = 0; s < a[p].length; s++) {
167
- var d = a[p][s];
168
- u[a[p][s]] = o(d);
169
- }
170
- u[p] = o(p);
171
- }
172
- for (s = 0; s < i.length; s++)
173
- u[i[s]] = o(i[s]);
174
- return u;
175
- }
176
- function K(e, t, o) {
177
- return o[t] != null ? o[t] : e.props[t];
178
- }
179
- function Vt(e, t) {
180
- return me(e.children, function(o) {
181
- return te(o, {
182
- onExited: t.bind(null, o),
183
- in: !0,
184
- appear: K(o, "appear", e),
185
- enter: K(o, "enter", e),
186
- exit: K(o, "exit", e)
187
- });
188
- });
189
- }
190
- function Pt(e, t, o) {
191
- var a = me(e.children), i = $t(t, a);
192
- return Object.keys(i).forEach(function(r) {
193
- var s = i[r];
194
- if (ee(s)) {
195
- var u = r in t, p = r in a, d = t[r], h = ee(d) && !d.props.in;
196
- p && (!u || h) ? i[r] = te(s, {
197
- onExited: o.bind(null, s),
198
- in: !0,
199
- exit: K(s, "exit", e),
200
- enter: K(s, "enter", e)
201
- }) : !p && u && !h ? i[r] = te(s, {
202
- in: !1
203
- }) : p && u && ee(d) && (i[r] = te(s, {
204
- onExited: o.bind(null, s),
205
- in: d.props.in,
206
- exit: K(s, "exit", e),
207
- enter: K(s, "enter", e)
208
- }));
209
- }
210
- }), i;
211
- }
212
- var kt = Object.values || function(e) {
213
- return Object.keys(e).map(function(t) {
214
- return e[t];
215
- });
216
- }, Ot = {
217
- component: "div",
218
- childFactory: function(t) {
219
- return t;
220
- }
221
- }, ge = /* @__PURE__ */ function(e) {
222
- Nt(t, e);
223
- function t(a, i) {
224
- var r;
225
- r = e.call(this, a, i) || this;
226
- var s = r.handleExited.bind(ut(r));
227
- return r.state = {
228
- contextValue: {
229
- isMounting: !0
230
- },
231
- handleExited: s,
232
- firstRender: !0
233
- }, r;
234
- }
235
- var o = t.prototype;
236
- return o.componentDidMount = function() {
237
- this.mounted = !0, this.setState({
238
- contextValue: {
239
- isMounting: !1
240
- }
241
- });
242
- }, o.componentWillUnmount = function() {
243
- this.mounted = !1;
244
- }, t.getDerivedStateFromProps = function(i, r) {
245
- var s = r.children, u = r.handleExited, p = r.firstRender;
246
- return {
247
- children: p ? Vt(i, u) : Pt(i, s, u),
248
- firstRender: !1
249
- };
250
- }, o.handleExited = function(i, r) {
251
- var s = me(this.props.children);
252
- i.key in s || (i.props.onExited && i.props.onExited(r), this.mounted && this.setState(function(u) {
253
- var p = m({}, u.children);
254
- return delete p[i.key], {
255
- children: p
256
- };
257
- }));
258
- }, o.render = function() {
259
- var i = this.props, r = i.component, s = i.childFactory, u = ne(i, ["component", "childFactory"]), p = this.state.contextValue, d = kt(this.state.children).map(s);
260
- return delete u.appear, delete u.enter, delete u.exit, r === null ? /* @__PURE__ */ G.createElement(Te.Provider, {
261
- value: p
262
- }, d) : /* @__PURE__ */ G.createElement(Te.Provider, {
263
- value: p
264
- }, /* @__PURE__ */ G.createElement(r, u, d));
265
- }, t;
266
- }(G.Component);
267
- ge.propTypes = process.env.NODE_ENV !== "production" ? {
268
- /**
269
- * `<TransitionGroup>` renders a `<div>` by default. You can change this
270
- * behavior by providing a `component` prop.
271
- * If you use React v16+ and would like to avoid a wrapping `<div>` element
272
- * you can pass in `component={null}`. This is useful if the wrapping div
273
- * borks your css styles.
274
- */
275
- component: n.any,
276
- /**
277
- * A set of `<Transition>` components, that are toggled `in` and out as they
278
- * leave. the `<TransitionGroup>` will inject specific transition props, so
279
- * remember to spread them through if you are wrapping the `<Transition>` as
280
- * with our `<Fade>` example.
281
- *
282
- * While this component is meant for multiple `Transition` or `CSSTransition`
283
- * children, sometimes you may want to have a single transition child with
284
- * content that you want to be transitioned out and in when you change it
285
- * (e.g. routes, images etc.) In that case you can change the `key` prop of
286
- * the transition child as you change its content, this will cause
287
- * `TransitionGroup` to transition the child out and back in.
288
- */
289
- children: n.node,
290
- /**
291
- * A convenience prop that enables or disables appear animations
292
- * for all children. Note that specifying this will override any defaults set
293
- * on individual children Transitions.
294
- */
295
- appear: n.bool,
296
- /**
297
- * A convenience prop that enables or disables enter animations
298
- * for all children. Note that specifying this will override any defaults set
299
- * on individual children Transitions.
300
- */
301
- enter: n.bool,
302
- /**
303
- * A convenience prop that enables or disables exit animations
304
- * for all children. Note that specifying this will override any defaults set
305
- * on individual children Transitions.
306
- */
307
- exit: n.bool,
308
- /**
309
- * You may need to apply reactive updates to a child as it is exiting.
310
- * This is generally done by using `cloneElement` however in the case of an exiting
311
- * child the element has already been removed and not accessible to the consumer.
312
- *
313
- * If you do need to update a child as it leaves you can provide a `childFactory`
314
- * to wrap every child, even the ones that are leaving.
315
- *
316
- * @type Function(child: ReactElement) -> ReactElement
317
- */
318
- childFactory: n.func
319
- } : {};
320
- ge.defaultProps = Ot;
321
- function Pe(e) {
322
- const {
323
- className: t,
324
- classes: o,
325
- pulsate: a = !1,
326
- rippleX: i,
327
- rippleY: r,
328
- rippleSize: s,
329
- in: u,
330
- onExited: p,
331
- timeout: d
332
- } = e, [h, v] = c.useState(!1), y = M(t, o.ripple, o.rippleVisible, a && o.ripplePulsate), R = {
333
- width: s,
334
- height: s,
335
- top: -(s / 2) + r,
336
- left: -(s / 2) + i
337
- }, b = M(o.child, h && o.childLeaving, a && o.childPulsate);
338
- return !u && !h && v(!0), c.useEffect(() => {
339
- if (!u && p != null) {
340
- const C = setTimeout(p, d);
341
- return () => {
342
- clearTimeout(C);
343
- };
344
- }
345
- }, [p, u, d]), /* @__PURE__ */ k("span", {
346
- className: y,
347
- style: R,
348
- children: /* @__PURE__ */ k("span", {
349
- className: b
350
- })
351
- });
352
- }
353
- process.env.NODE_ENV !== "production" && (Pe.propTypes = {
354
- /**
355
- * Override or extend the styles applied to the component.
356
- */
357
- classes: n.object.isRequired,
358
- className: n.string,
359
- /**
360
- * @ignore - injected from TransitionGroup
361
- */
362
- in: n.bool,
363
- /**
364
- * @ignore - injected from TransitionGroup
365
- */
366
- onExited: n.func,
367
- /**
368
- * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
369
- */
370
- pulsate: n.bool,
371
- /**
372
- * Diameter of the ripple.
373
- */
374
- rippleSize: n.number,
375
- /**
376
- * Horizontal position of the ripple center.
377
- */
378
- rippleX: n.number,
379
- /**
380
- * Vertical position of the ripple center.
381
- */
382
- rippleY: n.number,
383
- /**
384
- * exit delay
385
- */
386
- timeout: n.number.isRequired
387
- });
388
- const I = fe("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), Dt = ["center", "classes", "className"];
389
- let re = (e) => e, Me, Ie, ze, Be;
390
- const de = 550, Lt = 80, St = be(Me || (Me = re`
391
- 0% {
392
- transform: scale(0);
393
- opacity: 0.1;
394
- }
395
-
396
- 100% {
397
- transform: scale(1);
398
- opacity: 0.3;
399
- }
400
- `)), Ft = be(Ie || (Ie = re`
401
- 0% {
402
- opacity: 1;
403
- }
404
-
405
- 100% {
406
- opacity: 0;
407
- }
408
- `)), _t = be(ze || (ze = re`
409
- 0% {
410
- transform: scale(1);
411
- }
412
-
413
- 50% {
414
- transform: scale(0.92);
415
- }
416
-
417
- 100% {
418
- transform: scale(1);
419
- }
420
- `)), jt = A("span", {
421
- name: "MuiTouchRipple",
422
- slot: "Root"
423
- })({
424
- overflow: "hidden",
425
- pointerEvents: "none",
426
- position: "absolute",
427
- zIndex: 0,
428
- top: 0,
429
- right: 0,
430
- bottom: 0,
431
- left: 0,
432
- borderRadius: "inherit"
433
- }), Ut = A(Pe, {
434
- name: "MuiTouchRipple",
435
- slot: "Ripple"
436
- })(Be || (Be = re`
437
- opacity: 0;
438
- position: absolute;
439
-
440
- &.${0} {
441
- opacity: 0.3;
442
- transform: scale(1);
443
- animation-name: ${0};
444
- animation-duration: ${0}ms;
445
- animation-timing-function: ${0};
446
- }
447
-
448
- &.${0} {
449
- animation-duration: ${0}ms;
450
- }
451
-
452
- & .${0} {
453
- opacity: 1;
454
- display: block;
455
- width: 100%;
456
- height: 100%;
457
- border-radius: 50%;
458
- background-color: currentColor;
459
- }
460
-
461
- & .${0} {
462
- opacity: 0;
463
- animation-name: ${0};
464
- animation-duration: ${0}ms;
465
- animation-timing-function: ${0};
466
- }
467
-
468
- & .${0} {
469
- position: absolute;
470
- /* @noflip */
471
- left: 0px;
472
- top: 0;
473
- animation-name: ${0};
474
- animation-duration: 2500ms;
475
- animation-timing-function: ${0};
476
- animation-iteration-count: infinite;
477
- animation-delay: 200ms;
478
- }
479
- `), I.rippleVisible, St, de, ({
480
- theme: e
481
- }) => e.transitions.easing.easeInOut, I.ripplePulsate, ({
482
- theme: e
483
- }) => e.transitions.duration.shorter, I.child, I.childLeaving, Ft, de, ({
484
- theme: e
485
- }) => e.transitions.easing.easeInOut, I.childPulsate, _t, ({
486
- theme: e
487
- }) => e.transitions.easing.easeInOut), ke = /* @__PURE__ */ c.forwardRef(function(t, o) {
488
- const a = he({
489
- props: t,
490
- name: "MuiTouchRipple"
491
- }), {
492
- center: i = !1,
493
- classes: r = {},
494
- className: s
495
- } = a, u = ne(a, Dt), [p, d] = c.useState([]), h = c.useRef(0), v = c.useRef(null);
496
- c.useEffect(() => {
497
- v.current && (v.current(), v.current = null);
498
- }, [p]);
499
- const y = c.useRef(!1), R = xt(), b = c.useRef(null), C = c.useRef(null), j = c.useCallback((f) => {
500
- const {
501
- pulsate: E,
502
- rippleX: g,
503
- rippleY: x,
504
- rippleSize: L,
505
- cb: U
506
- } = f;
507
- d((T) => [...T, /* @__PURE__ */ k(Ut, {
508
- classes: {
509
- ripple: M(r.ripple, I.ripple),
510
- rippleVisible: M(r.rippleVisible, I.rippleVisible),
511
- ripplePulsate: M(r.ripplePulsate, I.ripplePulsate),
512
- child: M(r.child, I.child),
513
- childLeaving: M(r.childLeaving, I.childLeaving),
514
- childPulsate: M(r.childPulsate, I.childPulsate)
515
- },
516
- timeout: de,
517
- pulsate: E,
518
- rippleX: g,
519
- rippleY: x,
520
- rippleSize: L
521
- }, h.current)]), h.current += 1, v.current = U;
522
- }, [r]), O = c.useCallback((f = {}, E = {}, g = () => {
523
- }) => {
524
- const {
525
- pulsate: x = !1,
526
- center: L = i || E.pulsate,
527
- fakeElement: U = !1
528
- // For test purposes
529
- } = E;
530
- if ((f == null ? void 0 : f.type) === "mousedown" && y.current) {
531
- y.current = !1;
532
- return;
533
- }
534
- (f == null ? void 0 : f.type) === "touchstart" && (y.current = !0);
535
- const T = U ? null : C.current, S = T ? T.getBoundingClientRect() : {
536
- width: 0,
537
- height: 0,
538
- left: 0,
539
- top: 0
540
- };
541
- let $, F, _;
542
- if (L || f === void 0 || f.clientX === 0 && f.clientY === 0 || !f.clientX && !f.touches)
543
- $ = Math.round(S.width / 2), F = Math.round(S.height / 2);
544
- else {
545
- const {
546
- clientX: W,
547
- clientY: V
548
- } = f.touches && f.touches.length > 0 ? f.touches[0] : f;
549
- $ = Math.round(W - S.left), F = Math.round(V - S.top);
550
- }
551
- if (L)
552
- _ = Math.sqrt((2 * S.width ** 2 + S.height ** 2) / 3), _ % 2 === 0 && (_ += 1);
553
- else {
554
- const W = Math.max(Math.abs((T ? T.clientWidth : 0) - $), $) * 2 + 2, V = Math.max(Math.abs((T ? T.clientHeight : 0) - F), F) * 2 + 2;
555
- _ = Math.sqrt(W ** 2 + V ** 2);
556
- }
557
- f != null && f.touches ? b.current === null && (b.current = () => {
558
- j({
559
- pulsate: x,
560
- rippleX: $,
561
- rippleY: F,
562
- rippleSize: _,
563
- cb: g
564
- });
565
- }, R.start(Lt, () => {
566
- b.current && (b.current(), b.current = null);
567
- })) : j({
568
- pulsate: x,
569
- rippleX: $,
570
- rippleY: F,
571
- rippleSize: _,
572
- cb: g
573
- });
574
- }, [i, j, R]), D = c.useCallback(() => {
575
- O({}, {
576
- pulsate: !0
577
- });
578
- }, [O]), N = c.useCallback((f, E) => {
579
- if (R.clear(), (f == null ? void 0 : f.type) === "touchend" && b.current) {
580
- b.current(), b.current = null, R.start(0, () => {
581
- N(f, E);
582
- });
583
- return;
584
- }
585
- b.current = null, d((g) => g.length > 0 ? g.slice(1) : g), v.current = E;
586
- }, [R]);
587
- return c.useImperativeHandle(o, () => ({
588
- pulsate: D,
589
- start: O,
590
- stop: N
591
- }), [D, O, N]), /* @__PURE__ */ k(jt, m({
592
- className: M(I.root, r.root, s),
593
- ref: C
594
- }, u, {
595
- children: /* @__PURE__ */ k(ge, {
596
- component: null,
597
- exit: !0,
598
- children: p
599
- })
600
- }));
601
- });
602
- process.env.NODE_ENV !== "production" && (ke.propTypes = {
603
- /**
604
- * If `true`, the ripple starts at the center of the component
605
- * rather than at the point of interaction.
606
- */
607
- center: n.bool,
608
- /**
609
- * Override or extend the styles applied to the component.
610
- */
611
- classes: n.object,
612
- /**
613
- * @ignore
614
- */
615
- className: n.string
616
- });
617
- function Wt(e) {
618
- return $e("MuiButtonBase", e);
619
- }
620
- const wt = fe("MuiButtonBase", ["root", "disabled", "focusVisible"]), Kt = ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "touchRippleRef", "type"], At = (e) => {
621
- const {
622
- disabled: t,
623
- focusVisible: o,
624
- focusVisibleClassName: a,
625
- classes: i
626
- } = e, s = Ve({
627
- root: ["root", t && "disabled", o && "focusVisible"]
628
- }, Wt, i);
629
- return o && a && (s.root += ` ${a}`), s;
630
- }, Xt = A("button", {
631
- name: "MuiButtonBase",
632
- slot: "Root",
633
- overridesResolver: (e, t) => t.root
634
- })({
635
- display: "inline-flex",
636
- alignItems: "center",
637
- justifyContent: "center",
638
- position: "relative",
639
- boxSizing: "border-box",
640
- WebkitTapHighlightColor: "transparent",
641
- backgroundColor: "transparent",
642
- // Reset default value
643
- // We disable the focus ring for mouse, touch and keyboard users.
644
- outline: 0,
645
- border: 0,
646
- margin: 0,
647
- // Remove the margin in Safari
648
- borderRadius: 0,
649
- padding: 0,
650
- // Remove the padding in Firefox
651
- cursor: "pointer",
652
- userSelect: "none",
653
- verticalAlign: "middle",
654
- MozAppearance: "none",
655
- // Reset
656
- WebkitAppearance: "none",
657
- // Reset
658
- textDecoration: "none",
659
- // So we take precedent over the style of a native <a /> element.
660
- color: "inherit",
661
- "&::-moz-focus-inner": {
662
- borderStyle: "none"
663
- // Remove Firefox dotted outline.
664
- },
665
- [`&.${wt.disabled}`]: {
666
- pointerEvents: "none",
667
- // Disable link interactions
668
- cursor: "default"
669
- },
670
- "@media print": {
671
- colorAdjust: "exact"
672
- }
673
- }), Oe = /* @__PURE__ */ c.forwardRef(function(t, o) {
674
- const a = he({
675
- props: t,
676
- name: "MuiButtonBase"
677
- }), {
678
- action: i,
679
- centerRipple: r = !1,
680
- children: s,
681
- className: u,
682
- component: p = "button",
683
- disabled: d = !1,
684
- disableRipple: h = !1,
685
- disableTouchRipple: v = !1,
686
- focusRipple: y = !1,
687
- LinkComponent: R = "a",
688
- onBlur: b,
689
- onClick: C,
690
- onContextMenu: j,
691
- onDragLeave: O,
692
- onFocus: D,
693
- onFocusVisible: N,
694
- onKeyDown: f,
695
- onKeyUp: E,
696
- onMouseDown: g,
697
- onMouseLeave: x,
698
- onMouseUp: L,
699
- onTouchEnd: U,
700
- onTouchMove: T,
701
- onTouchStart: S,
702
- tabIndex: $ = 0,
703
- TouchRippleProps: F,
704
- touchRippleRef: _,
705
- type: W
706
- } = a, V = ne(a, Kt), X = c.useRef(null), z = c.useRef(null), _e = Ce(z, _), {
707
- isFocusVisibleRef: ve,
708
- onFocus: je,
709
- onBlur: Ue,
710
- ref: We
711
- } = Bt(), [w, H] = c.useState(!1);
712
- d && w && H(!1), c.useImperativeHandle(i, () => ({
713
- focusVisible: () => {
714
- H(!0), X.current.focus();
715
- }
716
- }), []);
717
- const [se, we] = c.useState(!1);
718
- c.useEffect(() => {
719
- we(!0);
720
- }, []);
721
- const ae = se && !h && !d;
722
- c.useEffect(() => {
723
- w && y && !h && se && z.current.pulsate();
724
- }, [h, y, w, se]);
725
- function P(l, xe, it = v) {
726
- return J((Re) => (xe && xe(Re), !it && z.current && z.current[l](Re), !0));
727
- }
728
- const Ke = P("start", g), Ae = P("stop", j), Xe = P("stop", O), Ye = P("stop", L), Ge = P("stop", (l) => {
729
- w && l.preventDefault(), x && x(l);
730
- }), He = P("start", S), qe = P("stop", U), Ze = P("stop", T), Je = P("stop", (l) => {
731
- Ue(l), ve.current === !1 && H(!1), b && b(l);
732
- }, !1), Qe = J((l) => {
733
- X.current || (X.current = l.currentTarget), je(l), ve.current === !0 && (H(!0), N && N(l)), D && D(l);
734
- }), le = () => {
735
- const l = X.current;
736
- return p && p !== "button" && !(l.tagName === "A" && l.href);
737
- }, ce = c.useRef(!1), et = J((l) => {
738
- y && !ce.current && w && z.current && l.key === " " && (ce.current = !0, z.current.stop(l, () => {
739
- z.current.start(l);
740
- })), l.target === l.currentTarget && le() && l.key === " " && l.preventDefault(), f && f(l), l.target === l.currentTarget && le() && l.key === "Enter" && !d && (l.preventDefault(), C && C(l));
741
- }), tt = J((l) => {
742
- y && l.key === " " && z.current && w && !l.defaultPrevented && (ce.current = !1, z.current.stop(l, () => {
743
- z.current.pulsate(l);
744
- })), E && E(l), C && l.target === l.currentTarget && le() && l.key === " " && !l.defaultPrevented && C(l);
745
- });
746
- let q = p;
747
- q === "button" && (V.href || V.to) && (q = R);
748
- const Y = {};
749
- q === "button" ? (Y.type = W === void 0 ? "button" : W, Y.disabled = d) : (!V.href && !V.to && (Y.role = "button"), d && (Y["aria-disabled"] = d));
750
- const nt = Ce(o, We, X);
751
- process.env.NODE_ENV !== "production" && c.useEffect(() => {
752
- ae && !z.current && console.error(["MUI: The `component` prop provided to ButtonBase is invalid.", "Please make sure the children prop is rendered in this custom component."].join(`
753
- `));
754
- }, [ae]);
755
- const ye = m({}, a, {
756
- centerRipple: r,
757
- component: p,
758
- disabled: d,
759
- disableRipple: h,
760
- disableTouchRipple: v,
761
- focusRipple: y,
762
- tabIndex: $,
763
- focusVisible: w
764
- }), ot = At(ye);
765
- return /* @__PURE__ */ Ne(Xt, m({
766
- as: q,
767
- className: M(ot.root, u),
768
- ownerState: ye,
769
- onBlur: Je,
770
- onClick: C,
771
- onContextMenu: Ae,
772
- onFocus: Qe,
773
- onKeyDown: et,
774
- onKeyUp: tt,
775
- onMouseDown: Ke,
776
- onMouseLeave: Ge,
777
- onMouseUp: Ye,
778
- onDragLeave: Xe,
779
- onTouchEnd: qe,
780
- onTouchMove: Ze,
781
- onTouchStart: He,
782
- ref: nt,
783
- tabIndex: d ? -1 : $,
784
- type: W
785
- }, Y, V, {
786
- children: [s, ae ? (
787
- /* TouchRipple is only needed client-side, x2 boost on the server. */
788
- /* @__PURE__ */ k(ke, m({
789
- ref: _e,
790
- center: r
791
- }, F))
792
- ) : null]
793
- }));
794
- });
795
- process.env.NODE_ENV !== "production" && (Oe.propTypes = {
796
- // ┌────────────────────────────── Warning ──────────────────────────────┐
797
- // │ These PropTypes are generated from the TypeScript type definitions. │
798
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
799
- // └─────────────────────────────────────────────────────────────────────┘
800
- /**
801
- * A ref for imperative actions.
802
- * It currently only supports `focusVisible()` action.
803
- */
804
- action: pt,
805
- /**
806
- * If `true`, the ripples are centered.
807
- * They won't start at the cursor interaction position.
808
- * @default false
809
- */
810
- centerRipple: n.bool,
811
- /**
812
- * The content of the component.
813
- */
814
- children: n.node,
815
- /**
816
- * Override or extend the styles applied to the component.
817
- */
818
- classes: n.object,
819
- /**
820
- * @ignore
821
- */
822
- className: n.string,
823
- /**
824
- * The component used for the root node.
825
- * Either a string to use a HTML element or a component.
826
- */
827
- component: ht,
828
- /**
829
- * If `true`, the component is disabled.
830
- * @default false
831
- */
832
- disabled: n.bool,
833
- /**
834
- * If `true`, the ripple effect is disabled.
835
- *
836
- * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
837
- * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
838
- * @default false
839
- */
840
- disableRipple: n.bool,
841
- /**
842
- * If `true`, the touch ripple effect is disabled.
843
- * @default false
844
- */
845
- disableTouchRipple: n.bool,
846
- /**
847
- * If `true`, the base button will have a keyboard focus ripple.
848
- * @default false
849
- */
850
- focusRipple: n.bool,
851
- /**
852
- * This prop can help identify which element has keyboard focus.
853
- * The class name will be applied when the element gains the focus through keyboard interaction.
854
- * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
855
- * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
856
- * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
857
- * if needed.
858
- */
859
- focusVisibleClassName: n.string,
860
- /**
861
- * @ignore
862
- */
863
- href: n.any,
864
- /**
865
- * The component used to render a link when the `href` prop is provided.
866
- * @default 'a'
867
- */
868
- LinkComponent: n.elementType,
869
- /**
870
- * @ignore
871
- */
872
- onBlur: n.func,
873
- /**
874
- * @ignore
875
- */
876
- onClick: n.func,
877
- /**
878
- * @ignore
879
- */
880
- onContextMenu: n.func,
881
- /**
882
- * @ignore
883
- */
884
- onDragLeave: n.func,
885
- /**
886
- * @ignore
887
- */
888
- onFocus: n.func,
889
- /**
890
- * Callback fired when the component is focused with a keyboard.
891
- * We trigger a `onFocus` callback too.
892
- */
893
- onFocusVisible: n.func,
894
- /**
895
- * @ignore
896
- */
897
- onKeyDown: n.func,
898
- /**
899
- * @ignore
900
- */
901
- onKeyUp: n.func,
902
- /**
903
- * @ignore
904
- */
905
- onMouseDown: n.func,
906
- /**
907
- * @ignore
908
- */
909
- onMouseLeave: n.func,
910
- /**
911
- * @ignore
912
- */
913
- onMouseUp: n.func,
914
- /**
915
- * @ignore
916
- */
917
- onTouchEnd: n.func,
918
- /**
919
- * @ignore
920
- */
921
- onTouchMove: n.func,
922
- /**
923
- * @ignore
924
- */
925
- onTouchStart: n.func,
926
- /**
927
- * The system prop that allows defining system overrides as well as additional CSS styles.
928
- */
929
- sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
930
- /**
931
- * @default 0
932
- */
933
- tabIndex: n.number,
934
- /**
935
- * Props applied to the `TouchRipple` element.
936
- */
937
- TouchRippleProps: n.object,
938
- /**
939
- * A ref that points to the `TouchRipple` element.
940
- */
941
- touchRippleRef: n.oneOfType([n.func, n.shape({
942
- current: n.shape({
943
- pulsate: n.func.isRequired,
944
- start: n.func.isRequired,
945
- stop: n.func.isRequired
946
- })
947
- })]),
948
- /**
949
- * @ignore
950
- */
951
- type: n.oneOfType([n.oneOf(["button", "reset", "submit"]), n.string])
952
- });
953
- function Yt(e) {
954
- return $e("MuiButton", e);
955
- }
956
- const Q = fe("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge"]), De = /* @__PURE__ */ c.createContext({});
957
- process.env.NODE_ENV !== "production" && (De.displayName = "ButtonGroupContext");
958
- const Le = /* @__PURE__ */ c.createContext(void 0);
959
- process.env.NODE_ENV !== "production" && (Le.displayName = "ButtonGroupButtonContext");
960
- const Gt = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"], Ht = (e) => {
961
- const {
962
- color: t,
963
- disableElevation: o,
964
- fullWidth: a,
965
- size: i,
966
- variant: r,
967
- classes: s
968
- } = e, u = {
969
- root: ["root", r, `${r}${B(t)}`, `size${B(i)}`, `${r}Size${B(i)}`, `color${B(t)}`, o && "disableElevation", a && "fullWidth"],
970
- label: ["label"],
971
- startIcon: ["icon", "startIcon", `iconSize${B(i)}`],
972
- endIcon: ["icon", "endIcon", `iconSize${B(i)}`]
973
- }, p = Ve(u, Yt, s);
974
- return m({}, s, p);
975
- }, Se = (e) => m({}, e.size === "small" && {
976
- "& > *:nth-of-type(1)": {
977
- fontSize: 18
978
- }
979
- }, e.size === "medium" && {
980
- "& > *:nth-of-type(1)": {
981
- fontSize: 20
982
- }
983
- }, e.size === "large" && {
984
- "& > *:nth-of-type(1)": {
985
- fontSize: 22
986
- }
987
- }), qt = A(Oe, {
988
- shouldForwardProp: (e) => lt(e) || e === "classes",
989
- name: "MuiButton",
990
- slot: "Root",
991
- overridesResolver: (e, t) => {
992
- const {
993
- ownerState: o
994
- } = e;
995
- return [t.root, t[o.variant], t[`${o.variant}${B(o.color)}`], t[`size${B(o.size)}`], t[`${o.variant}Size${B(o.size)}`], o.color === "inherit" && t.colorInherit, o.disableElevation && t.disableElevation, o.fullWidth && t.fullWidth];
996
- }
997
- })(({
998
- theme: e,
999
- ownerState: t
1000
- }) => {
1001
- var o, a;
1002
- const i = e.palette.mode === "light" ? e.palette.grey[300] : e.palette.grey[800], r = e.palette.mode === "light" ? e.palette.grey.A100 : e.palette.grey[700];
1003
- return m({}, e.typography.button, {
1004
- minWidth: 64,
1005
- padding: "6px 16px",
1006
- borderRadius: (e.vars || e).shape.borderRadius,
1007
- transition: e.transitions.create(["background-color", "box-shadow", "border-color", "color"], {
1008
- duration: e.transitions.duration.short
1009
- }),
1010
- "&:hover": m({
1011
- textDecoration: "none",
1012
- backgroundColor: e.vars ? `rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})` : Z(e.palette.text.primary, e.palette.action.hoverOpacity),
1013
- // Reset on touch devices, it doesn't add specificity
1014
- "@media (hover: none)": {
1015
- backgroundColor: "transparent"
1016
- }
1017
- }, t.variant === "text" && t.color !== "inherit" && {
1018
- backgroundColor: e.vars ? `rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : Z(e.palette[t.color].main, e.palette.action.hoverOpacity),
1019
- // Reset on touch devices, it doesn't add specificity
1020
- "@media (hover: none)": {
1021
- backgroundColor: "transparent"
1022
- }
1023
- }, t.variant === "outlined" && t.color !== "inherit" && {
1024
- border: `1px solid ${(e.vars || e).palette[t.color].main}`,
1025
- backgroundColor: e.vars ? `rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : Z(e.palette[t.color].main, e.palette.action.hoverOpacity),
1026
- // Reset on touch devices, it doesn't add specificity
1027
- "@media (hover: none)": {
1028
- backgroundColor: "transparent"
1029
- }
1030
- }, t.variant === "contained" && {
1031
- backgroundColor: e.vars ? e.vars.palette.Button.inheritContainedHoverBg : r,
1032
- boxShadow: (e.vars || e).shadows[4],
1033
- // Reset on touch devices, it doesn't add specificity
1034
- "@media (hover: none)": {
1035
- boxShadow: (e.vars || e).shadows[2],
1036
- backgroundColor: (e.vars || e).palette.grey[300]
1037
- }
1038
- }, t.variant === "contained" && t.color !== "inherit" && {
1039
- backgroundColor: (e.vars || e).palette[t.color].dark,
1040
- // Reset on touch devices, it doesn't add specificity
1041
- "@media (hover: none)": {
1042
- backgroundColor: (e.vars || e).palette[t.color].main
1043
- }
1044
- }),
1045
- "&:active": m({}, t.variant === "contained" && {
1046
- boxShadow: (e.vars || e).shadows[8]
1047
- }),
1048
- [`&.${Q.focusVisible}`]: m({}, t.variant === "contained" && {
1049
- boxShadow: (e.vars || e).shadows[6]
1050
- }),
1051
- [`&.${Q.disabled}`]: m({
1052
- color: (e.vars || e).palette.action.disabled
1053
- }, t.variant === "outlined" && {
1054
- border: `1px solid ${(e.vars || e).palette.action.disabledBackground}`
1055
- }, t.variant === "contained" && {
1056
- color: (e.vars || e).palette.action.disabled,
1057
- boxShadow: (e.vars || e).shadows[0],
1058
- backgroundColor: (e.vars || e).palette.action.disabledBackground
1059
- })
1060
- }, t.variant === "text" && {
1061
- padding: "6px 8px"
1062
- }, t.variant === "text" && t.color !== "inherit" && {
1063
- color: (e.vars || e).palette[t.color].main
1064
- }, t.variant === "outlined" && {
1065
- padding: "5px 15px",
1066
- border: "1px solid currentColor"
1067
- }, t.variant === "outlined" && t.color !== "inherit" && {
1068
- color: (e.vars || e).palette[t.color].main,
1069
- border: e.vars ? `1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)` : `1px solid ${Z(e.palette[t.color].main, 0.5)}`
1070
- }, t.variant === "contained" && {
1071
- color: e.vars ? (
1072
- // this is safe because grey does not change between default light/dark mode
1073
- e.vars.palette.text.primary
1074
- ) : (o = (a = e.palette).getContrastText) == null ? void 0 : o.call(a, e.palette.grey[300]),
1075
- backgroundColor: e.vars ? e.vars.palette.Button.inheritContainedBg : i,
1076
- boxShadow: (e.vars || e).shadows[2]
1077
- }, t.variant === "contained" && t.color !== "inherit" && {
1078
- color: (e.vars || e).palette[t.color].contrastText,
1079
- backgroundColor: (e.vars || e).palette[t.color].main
1080
- }, t.color === "inherit" && {
1081
- color: "inherit",
1082
- borderColor: "currentColor"
1083
- }, t.size === "small" && t.variant === "text" && {
1084
- padding: "4px 5px",
1085
- fontSize: e.typography.pxToRem(13)
1086
- }, t.size === "large" && t.variant === "text" && {
1087
- padding: "8px 11px",
1088
- fontSize: e.typography.pxToRem(15)
1089
- }, t.size === "small" && t.variant === "outlined" && {
1090
- padding: "3px 9px",
1091
- fontSize: e.typography.pxToRem(13)
1092
- }, t.size === "large" && t.variant === "outlined" && {
1093
- padding: "7px 21px",
1094
- fontSize: e.typography.pxToRem(15)
1095
- }, t.size === "small" && t.variant === "contained" && {
1096
- padding: "4px 10px",
1097
- fontSize: e.typography.pxToRem(13)
1098
- }, t.size === "large" && t.variant === "contained" && {
1099
- padding: "8px 22px",
1100
- fontSize: e.typography.pxToRem(15)
1101
- }, t.fullWidth && {
1102
- width: "100%"
1103
- });
1104
- }, ({
1105
- ownerState: e
1106
- }) => e.disableElevation && {
1107
- boxShadow: "none",
1108
- "&:hover": {
1109
- boxShadow: "none"
1110
- },
1111
- [`&.${Q.focusVisible}`]: {
1112
- boxShadow: "none"
1113
- },
1114
- "&:active": {
1115
- boxShadow: "none"
1116
- },
1117
- [`&.${Q.disabled}`]: {
1118
- boxShadow: "none"
1119
- }
1120
- }), Zt = A("span", {
1121
- name: "MuiButton",
1122
- slot: "StartIcon",
1123
- overridesResolver: (e, t) => {
1124
- const {
1125
- ownerState: o
1126
- } = e;
1127
- return [t.startIcon, t[`iconSize${B(o.size)}`]];
1128
- }
1129
- })(({
1130
- ownerState: e
1131
- }) => m({
1132
- display: "inherit",
1133
- marginRight: 8,
1134
- marginLeft: -4
1135
- }, e.size === "small" && {
1136
- marginLeft: -2
1137
- }, Se(e))), Jt = A("span", {
1138
- name: "MuiButton",
1139
- slot: "EndIcon",
1140
- overridesResolver: (e, t) => {
1141
- const {
1142
- ownerState: o
1143
- } = e;
1144
- return [t.endIcon, t[`iconSize${B(o.size)}`]];
1145
- }
1146
- })(({
1147
- ownerState: e
1148
- }) => m({
1149
- display: "inherit",
1150
- marginRight: -4,
1151
- marginLeft: 8
1152
- }, e.size === "small" && {
1153
- marginRight: -2
1154
- }, Se(e))), Fe = /* @__PURE__ */ c.forwardRef(function(t, o) {
1155
- const a = c.useContext(De), i = c.useContext(Le), r = at(a, t), s = he({
1156
- props: r,
1157
- name: "MuiButton"
1158
- }), {
1159
- children: u,
1160
- color: p = "primary",
1161
- component: d = "button",
1162
- className: h,
1163
- disabled: v = !1,
1164
- disableElevation: y = !1,
1165
- disableFocusRipple: R = !1,
1166
- endIcon: b,
1167
- focusVisibleClassName: C,
1168
- fullWidth: j = !1,
1169
- size: O = "medium",
1170
- startIcon: D,
1171
- type: N,
1172
- variant: f = "text"
1173
- } = s, E = ne(s, Gt), g = m({}, s, {
1174
- color: p,
1175
- component: d,
1176
- disabled: v,
1177
- disableElevation: y,
1178
- disableFocusRipple: R,
1179
- fullWidth: j,
1180
- size: O,
1181
- type: N,
1182
- variant: f
1183
- }), x = Ht(g), L = D && /* @__PURE__ */ k(Zt, {
1184
- className: x.startIcon,
1185
- ownerState: g,
1186
- children: D
1187
- }), U = b && /* @__PURE__ */ k(Jt, {
1188
- className: x.endIcon,
1189
- ownerState: g,
1190
- children: b
1191
- }), T = i || "";
1192
- return /* @__PURE__ */ Ne(qt, m({
1193
- ownerState: g,
1194
- className: M(a.className, x.root, h, T),
1195
- component: d,
1196
- disabled: v,
1197
- focusRipple: !R,
1198
- focusVisibleClassName: M(x.focusVisible, C),
1199
- ref: o,
1200
- type: N
1201
- }, E, {
1202
- classes: x,
1203
- children: [L, u, U]
1204
- }));
1205
- });
1206
- process.env.NODE_ENV !== "production" && (Fe.propTypes = {
1207
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1208
- // │ These PropTypes are generated from the TypeScript type definitions. │
1209
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1210
- // └─────────────────────────────────────────────────────────────────────┘
1211
- /**
1212
- * The content of the component.
1213
- */
1214
- children: n.node,
1215
- /**
1216
- * Override or extend the styles applied to the component.
1217
- */
1218
- classes: n.object,
1219
- /**
1220
- * @ignore
1221
- */
1222
- className: n.string,
1223
- /**
1224
- * The color of the component.
1225
- * It supports both default and custom theme colors, which can be added as shown in the
1226
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1227
- * @default 'primary'
1228
- */
1229
- color: n.oneOfType([n.oneOf(["inherit", "primary", "secondary", "success", "error", "info", "warning"]), n.string]),
1230
- /**
1231
- * The component used for the root node.
1232
- * Either a string to use a HTML element or a component.
1233
- */
1234
- component: n.elementType,
1235
- /**
1236
- * If `true`, the component is disabled.
1237
- * @default false
1238
- */
1239
- disabled: n.bool,
1240
- /**
1241
- * If `true`, no elevation is used.
1242
- * @default false
1243
- */
1244
- disableElevation: n.bool,
1245
- /**
1246
- * If `true`, the keyboard focus ripple is disabled.
1247
- * @default false
1248
- */
1249
- disableFocusRipple: n.bool,
1250
- /**
1251
- * If `true`, the ripple effect is disabled.
1252
- *
1253
- * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
1254
- * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
1255
- * @default false
1256
- */
1257
- disableRipple: n.bool,
1258
- /**
1259
- * Element placed after the children.
1260
- */
1261
- endIcon: n.node,
1262
- /**
1263
- * @ignore
1264
- */
1265
- focusVisibleClassName: n.string,
1266
- /**
1267
- * If `true`, the button will take up the full width of its container.
1268
- * @default false
1269
- */
1270
- fullWidth: n.bool,
1271
- /**
1272
- * The URL to link to when the button is clicked.
1273
- * If defined, an `a` element will be used as the root node.
1274
- */
1275
- href: n.string,
1276
- /**
1277
- * The size of the component.
1278
- * `small` is equivalent to the dense button styling.
1279
- * @default 'medium'
1280
- */
1281
- size: n.oneOfType([n.oneOf(["small", "medium", "large"]), n.string]),
1282
- /**
1283
- * Element placed before the children.
1284
- */
1285
- startIcon: n.node,
1286
- /**
1287
- * The system prop that allows defining system overrides as well as additional CSS styles.
1288
- */
1289
- sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
1290
- /**
1291
- * @ignore
1292
- */
1293
- type: n.oneOfType([n.oneOf(["button", "reset", "submit"]), n.string]),
1294
- /**
1295
- * The variant to use.
1296
- * @default 'text'
1297
- */
1298
- variant: n.oneOfType([n.oneOf(["contained", "outlined", "text"]), n.string])
1299
- });
1300
- const sn = ({ content: e, height: t = "40px", width: o = "120px", direction: a = "left", ...i }) => /* @__PURE__ */ k(
1301
- Fe,
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { B as a } from "../../Button-BgbkoKxR.js";
3
+ const d = ({ content: o, height: r = "40px", width: t = "120px", direction: n = "left", ...e }) => /* @__PURE__ */ i(
4
+ a,
1302
5
  {
1303
6
  variant: "outlined",
1304
7
  disableElevation: !0,
1305
8
  color: "primary",
1306
9
  sx: {
1307
- float: a,
1308
- height: t,
10
+ float: n,
11
+ height: r,
1309
12
  borderRadius: 2,
1310
13
  border: "1px solid #E0E0E0",
1311
14
  color: "#48464A",
1312
15
  fontWeight: "400",
1313
- width: o,
16
+ width: t,
1314
17
  textTransform: "none",
1315
18
  // '& .MuiButton-endIcon': {
1316
19
  // marginInlineStart: '10px',
@@ -1323,10 +26,10 @@ const sn = ({ content: e, height: t = "40px", width: o = "120px", direction: a =
1323
26
  border: "1px solid #E0E0E0"
1324
27
  }
1325
28
  },
1326
- ...i,
1327
- children: e
29
+ ...e,
30
+ children: o
1328
31
  }
1329
32
  );
1330
33
  export {
1331
- sn as CustomButton
34
+ d as CustomButton
1332
35
  };