@loopr-ai/craft 0.1.0 → 0.2.0

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