@cgi-learning-hub/ui 0.0.1-dev.1708295525 → 0.0.1-dev.1708363971

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