@fangzsx/component-library 0.0.11 → 0.0.13

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 (35) hide show
  1. package/dist/Box-DPlM16yK.js +30 -0
  2. package/dist/ButtonBase-qMhxbNdC.js +878 -0
  3. package/dist/FormLabel-DKoCtSGZ.js +600 -0
  4. package/dist/{Paper-CAUsv8qs.js → Paper-DyRh03We.js} +54 -51
  5. package/dist/SwitchBase-DStPyUhD.js +311 -0
  6. package/dist/Typography-B0rSrz7H.js +253 -0
  7. package/dist/components/AppBarPublic/index.js +83 -105
  8. package/dist/components/Button/index.js +1 -1
  9. package/dist/components/Checkbox/index.js +103 -607
  10. package/dist/components/CheckboxGroup/index.d.ts +17 -0
  11. package/dist/components/CheckboxGroup/index.js +68 -0
  12. package/dist/components/Dropdown/index.d.ts +22 -0
  13. package/dist/components/Dropdown/index.js +120 -0
  14. package/dist/components/LinearProgress/index.d.ts +3 -0
  15. package/dist/components/LinearProgress/index.js +19 -0
  16. package/dist/components/MediaCardWithAction/index.js +157 -436
  17. package/dist/components/RadioButtonGroup/index.d.ts +17 -0
  18. package/dist/components/RadioButtonGroup/index.js +836 -0
  19. package/dist/components/TextFieldInput/index.d.ts +15 -0
  20. package/dist/components/TextFieldInput/index.js +6578 -0
  21. package/dist/{createSvgIcon-DAI5icic.js → createSvgIcon-Dj0SJuc1.js} +8 -7
  22. package/dist/generateUtilityClasses-BCID9NF1.js +2806 -0
  23. package/dist/{index-DGepNtNg.js → index-CoBGCD2e.js} +143 -158
  24. package/dist/index-o1i1vy-V.js +73 -0
  25. package/dist/main.d.ts +5 -1
  26. package/dist/main.js +21 -13
  27. package/dist/mergeSlotProps-C-n2ing7.js +62 -0
  28. package/dist/useId-CK6Kn3Tn.js +21 -0
  29. package/dist/useSlot-S2pEBHE8.js +161 -0
  30. package/dist/useTimeout-BWi4JTOH.js +635 -0
  31. package/package.json +1 -1
  32. package/dist/ButtonBase-CAtBagnK.js +0 -4293
  33. package/dist/assets/index2.css +0 -1
  34. package/dist/components/Input/index.d.ts +0 -1
  35. package/dist/components/Input/index.js +0 -11
@@ -0,0 +1,878 @@
1
+ import * as f from "react";
2
+ import W, { isValidElement as H, cloneElement as G, Children as Ve } from "react";
3
+ import { P as e, a as ce, g as Se } from "./generateUtilityClasses-BCID9NF1.js";
4
+ import { i as Be, _ as Oe, j as Le, T as ae, c as v, u as pe, k as je, s as ne, h as ue, l as J, a as ke, n as Fe, d as Ie } from "./useTimeout-BWi4JTOH.js";
5
+ import { jsx as $, jsxs as Ue } from "react/jsx-runtime";
6
+ import { keyframes as oe } from "@mui/system";
7
+ function le(n) {
8
+ try {
9
+ return n.matches(":focus-visible");
10
+ } catch {
11
+ process.env.NODE_ENV !== "production" && !window.navigator.userAgent.includes("jsdom") && console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.", "Some components rely on this feature to work properly."].join(`
12
+ `));
13
+ }
14
+ return !1;
15
+ }
16
+ class Q {
17
+ /** React ref to the ripple instance */
18
+ /** If the ripple component should be mounted */
19
+ /** Promise that resolves when the ripple component is mounted */
20
+ /** If the ripple component has been mounted */
21
+ /** React state hook setter */
22
+ static create() {
23
+ return new Q();
24
+ }
25
+ static use() {
26
+ const t = Be(Q.create).current, [o, u] = f.useState(!1);
27
+ return t.shouldMount = o, t.setShouldMount = u, f.useEffect(t.mountEffect, [o]), t;
28
+ }
29
+ constructor() {
30
+ this.ref = {
31
+ current: null
32
+ }, this.mounted = null, this.didMount = !1, this.shouldMount = !1, this.setShouldMount = null;
33
+ }
34
+ mount() {
35
+ return this.mounted || (this.mounted = ze(), this.shouldMount = !0, this.setShouldMount(this.shouldMount)), this.mounted;
36
+ }
37
+ mountEffect = () => {
38
+ this.shouldMount && !this.didMount && this.ref.current !== null && (this.didMount = !0, this.mounted.resolve());
39
+ };
40
+ /* Ripple API */
41
+ start(...t) {
42
+ this.mount().then(() => this.ref.current?.start(...t));
43
+ }
44
+ stop(...t) {
45
+ this.mount().then(() => this.ref.current?.stop(...t));
46
+ }
47
+ pulsate(...t) {
48
+ this.mount().then(() => this.ref.current?.pulsate(...t));
49
+ }
50
+ }
51
+ function $e() {
52
+ return Q.use();
53
+ }
54
+ function ze() {
55
+ let n, t;
56
+ const o = new Promise((u, i) => {
57
+ n = u, t = i;
58
+ });
59
+ return o.resolve = n, o.reject = t, o;
60
+ }
61
+ function ee() {
62
+ return ee = Object.assign ? Object.assign.bind() : function(n) {
63
+ for (var t = 1; t < arguments.length; t++) {
64
+ var o = arguments[t];
65
+ for (var u in o) ({}).hasOwnProperty.call(o, u) && (n[u] = o[u]);
66
+ }
67
+ return n;
68
+ }, ee.apply(null, arguments);
69
+ }
70
+ function Ae(n) {
71
+ if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
72
+ return n;
73
+ }
74
+ function ie(n, t) {
75
+ var o = function(s) {
76
+ return t && H(s) ? t(s) : s;
77
+ }, u = /* @__PURE__ */ Object.create(null);
78
+ return n && Ve.map(n, function(i) {
79
+ return i;
80
+ }).forEach(function(i) {
81
+ u[i.key] = o(i);
82
+ }), u;
83
+ }
84
+ function _e(n, t) {
85
+ n = n || {}, t = t || {};
86
+ function o(h) {
87
+ return h in t ? t[h] : n[h];
88
+ }
89
+ var u = /* @__PURE__ */ Object.create(null), i = [];
90
+ for (var s in n)
91
+ s in t ? i.length && (u[s] = i, i = []) : i.push(s);
92
+ var r, c = {};
93
+ for (var l in t) {
94
+ if (u[l])
95
+ for (r = 0; r < u[l].length; r++) {
96
+ var p = u[l][r];
97
+ c[u[l][r]] = o(p);
98
+ }
99
+ c[l] = o(l);
100
+ }
101
+ for (r = 0; r < i.length; r++)
102
+ c[i[r]] = o(i[r]);
103
+ return c;
104
+ }
105
+ function j(n, t, o) {
106
+ return o[t] != null ? o[t] : n.props[t];
107
+ }
108
+ function Xe(n, t) {
109
+ return ie(n.children, function(o) {
110
+ return G(o, {
111
+ onExited: t.bind(null, o),
112
+ in: !0,
113
+ appear: j(o, "appear", n),
114
+ enter: j(o, "enter", n),
115
+ exit: j(o, "exit", n)
116
+ });
117
+ });
118
+ }
119
+ function Ye(n, t, o) {
120
+ var u = ie(n.children), i = _e(t, u);
121
+ return Object.keys(i).forEach(function(s) {
122
+ var r = i[s];
123
+ if (H(r)) {
124
+ var c = s in t, l = s in u, p = t[s], h = H(p) && !p.props.in;
125
+ l && (!c || h) ? i[s] = G(r, {
126
+ onExited: o.bind(null, r),
127
+ in: !0,
128
+ exit: j(r, "exit", n),
129
+ enter: j(r, "enter", n)
130
+ }) : !l && c && !h ? i[s] = G(r, {
131
+ in: !1
132
+ }) : l && c && H(p) && (i[s] = G(r, {
133
+ onExited: o.bind(null, r),
134
+ in: p.props.in,
135
+ exit: j(r, "exit", n),
136
+ enter: j(r, "enter", n)
137
+ }));
138
+ }
139
+ }), i;
140
+ }
141
+ var Ke = Object.values || function(n) {
142
+ return Object.keys(n).map(function(t) {
143
+ return n[t];
144
+ });
145
+ }, qe = {
146
+ component: "div",
147
+ childFactory: function(t) {
148
+ return t;
149
+ }
150
+ }, se = /* @__PURE__ */ (function(n) {
151
+ Oe(t, n);
152
+ function t(u, i) {
153
+ var s;
154
+ s = n.call(this, u, i) || this;
155
+ var r = s.handleExited.bind(Ae(s));
156
+ return s.state = {
157
+ contextValue: {
158
+ isMounting: !0
159
+ },
160
+ handleExited: r,
161
+ firstRender: !0
162
+ }, s;
163
+ }
164
+ var o = t.prototype;
165
+ return o.componentDidMount = function() {
166
+ this.mounted = !0, this.setState({
167
+ contextValue: {
168
+ isMounting: !1
169
+ }
170
+ });
171
+ }, o.componentWillUnmount = function() {
172
+ this.mounted = !1;
173
+ }, t.getDerivedStateFromProps = function(i, s) {
174
+ var r = s.children, c = s.handleExited, l = s.firstRender;
175
+ return {
176
+ children: l ? Xe(i, c) : Ye(i, r, c),
177
+ firstRender: !1
178
+ };
179
+ }, o.handleExited = function(i, s) {
180
+ var r = ie(this.props.children);
181
+ i.key in r || (i.props.onExited && i.props.onExited(s), this.mounted && this.setState(function(c) {
182
+ var l = ee({}, c.children);
183
+ return delete l[i.key], {
184
+ children: l
185
+ };
186
+ }));
187
+ }, o.render = function() {
188
+ var i = this.props, s = i.component, r = i.childFactory, c = Le(i, ["component", "childFactory"]), l = this.state.contextValue, p = Ke(this.state.children).map(r);
189
+ return delete c.appear, delete c.enter, delete c.exit, s === null ? /* @__PURE__ */ W.createElement(ae.Provider, {
190
+ value: l
191
+ }, p) : /* @__PURE__ */ W.createElement(ae.Provider, {
192
+ value: l
193
+ }, /* @__PURE__ */ W.createElement(s, c, p));
194
+ }, t;
195
+ })(W.Component);
196
+ se.propTypes = process.env.NODE_ENV !== "production" ? {
197
+ /**
198
+ * `<TransitionGroup>` renders a `<div>` by default. You can change this
199
+ * behavior by providing a `component` prop.
200
+ * If you use React v16+ and would like to avoid a wrapping `<div>` element
201
+ * you can pass in `component={null}`. This is useful if the wrapping div
202
+ * borks your css styles.
203
+ */
204
+ component: e.any,
205
+ /**
206
+ * A set of `<Transition>` components, that are toggled `in` and out as they
207
+ * leave. the `<TransitionGroup>` will inject specific transition props, so
208
+ * remember to spread them through if you are wrapping the `<Transition>` as
209
+ * with our `<Fade>` example.
210
+ *
211
+ * While this component is meant for multiple `Transition` or `CSSTransition`
212
+ * children, sometimes you may want to have a single transition child with
213
+ * content that you want to be transitioned out and in when you change it
214
+ * (e.g. routes, images etc.) In that case you can change the `key` prop of
215
+ * the transition child as you change its content, this will cause
216
+ * `TransitionGroup` to transition the child out and back in.
217
+ */
218
+ children: e.node,
219
+ /**
220
+ * A convenience prop that enables or disables appear animations
221
+ * for all children. Note that specifying this will override any defaults set
222
+ * on individual children Transitions.
223
+ */
224
+ appear: e.bool,
225
+ /**
226
+ * A convenience prop that enables or disables enter animations
227
+ * for all children. Note that specifying this will override any defaults set
228
+ * on individual children Transitions.
229
+ */
230
+ enter: e.bool,
231
+ /**
232
+ * A convenience prop that enables or disables exit animations
233
+ * for all children. Note that specifying this will override any defaults set
234
+ * on individual children Transitions.
235
+ */
236
+ exit: e.bool,
237
+ /**
238
+ * You may need to apply reactive updates to a child as it is exiting.
239
+ * This is generally done by using `cloneElement` however in the case of an exiting
240
+ * child the element has already been removed and not accessible to the consumer.
241
+ *
242
+ * If you do need to update a child as it leaves you can provide a `childFactory`
243
+ * to wrap every child, even the ones that are leaving.
244
+ *
245
+ * @type Function(child: ReactElement) -> ReactElement
246
+ */
247
+ childFactory: e.func
248
+ } : {};
249
+ se.defaultProps = qe;
250
+ function fe(n) {
251
+ const {
252
+ className: t,
253
+ classes: o,
254
+ pulsate: u = !1,
255
+ rippleX: i,
256
+ rippleY: s,
257
+ rippleSize: r,
258
+ in: c,
259
+ onExited: l,
260
+ timeout: p
261
+ } = n, [h, m] = f.useState(!1), M = v(t, o.ripple, o.rippleVisible, u && o.ripplePulsate), N = {
262
+ width: r,
263
+ height: r,
264
+ top: -(r / 2) + s,
265
+ left: -(r / 2) + i
266
+ }, g = v(o.child, h && o.childLeaving, u && o.childPulsate);
267
+ return !c && !h && m(!0), f.useEffect(() => {
268
+ if (!c && l != null) {
269
+ const S = setTimeout(l, p);
270
+ return () => {
271
+ clearTimeout(S);
272
+ };
273
+ }
274
+ }, [l, c, p]), /* @__PURE__ */ $("span", {
275
+ className: M,
276
+ style: N,
277
+ children: /* @__PURE__ */ $("span", {
278
+ className: g
279
+ })
280
+ });
281
+ }
282
+ process.env.NODE_ENV !== "production" && (fe.propTypes = {
283
+ /**
284
+ * Override or extend the styles applied to the component.
285
+ */
286
+ classes: e.object.isRequired,
287
+ className: e.string,
288
+ /**
289
+ * @ignore - injected from TransitionGroup
290
+ */
291
+ in: e.bool,
292
+ /**
293
+ * @ignore - injected from TransitionGroup
294
+ */
295
+ onExited: e.func,
296
+ /**
297
+ * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
298
+ */
299
+ pulsate: e.bool,
300
+ /**
301
+ * Diameter of the ripple.
302
+ */
303
+ rippleSize: e.number,
304
+ /**
305
+ * Horizontal position of the ripple center.
306
+ */
307
+ rippleX: e.number,
308
+ /**
309
+ * Vertical position of the ripple center.
310
+ */
311
+ rippleY: e.number,
312
+ /**
313
+ * exit delay
314
+ */
315
+ timeout: e.number.isRequired
316
+ });
317
+ const y = ce("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), te = 550, We = 80, He = oe`
318
+ 0% {
319
+ transform: scale(0);
320
+ opacity: 0.1;
321
+ }
322
+
323
+ 100% {
324
+ transform: scale(1);
325
+ opacity: 0.3;
326
+ }
327
+ `, Ge = oe`
328
+ 0% {
329
+ opacity: 1;
330
+ }
331
+
332
+ 100% {
333
+ opacity: 0;
334
+ }
335
+ `, Je = oe`
336
+ 0% {
337
+ transform: scale(1);
338
+ }
339
+
340
+ 50% {
341
+ transform: scale(0.92);
342
+ }
343
+
344
+ 100% {
345
+ transform: scale(1);
346
+ }
347
+ `, Qe = ne("span", {
348
+ name: "MuiTouchRipple",
349
+ slot: "Root"
350
+ })({
351
+ overflow: "hidden",
352
+ pointerEvents: "none",
353
+ position: "absolute",
354
+ zIndex: 0,
355
+ top: 0,
356
+ right: 0,
357
+ bottom: 0,
358
+ left: 0,
359
+ borderRadius: "inherit"
360
+ }), Ze = ne(fe, {
361
+ name: "MuiTouchRipple",
362
+ slot: "Ripple"
363
+ })`
364
+ opacity: 0;
365
+ position: absolute;
366
+
367
+ &.${y.rippleVisible} {
368
+ opacity: 0.3;
369
+ transform: scale(1);
370
+ animation-name: ${He};
371
+ animation-duration: ${te}ms;
372
+ animation-timing-function: ${({
373
+ theme: n
374
+ }) => n.transitions.easing.easeInOut};
375
+ }
376
+
377
+ &.${y.ripplePulsate} {
378
+ animation-duration: ${({
379
+ theme: n
380
+ }) => n.transitions.duration.shorter}ms;
381
+ }
382
+
383
+ & .${y.child} {
384
+ opacity: 1;
385
+ display: block;
386
+ width: 100%;
387
+ height: 100%;
388
+ border-radius: 50%;
389
+ background-color: currentColor;
390
+ }
391
+
392
+ & .${y.childLeaving} {
393
+ opacity: 0;
394
+ animation-name: ${Ge};
395
+ animation-duration: ${te}ms;
396
+ animation-timing-function: ${({
397
+ theme: n
398
+ }) => n.transitions.easing.easeInOut};
399
+ }
400
+
401
+ & .${y.childPulsate} {
402
+ position: absolute;
403
+ /* @noflip */
404
+ left: 0px;
405
+ top: 0;
406
+ animation-name: ${Je};
407
+ animation-duration: 2500ms;
408
+ animation-timing-function: ${({
409
+ theme: n
410
+ }) => n.transitions.easing.easeInOut};
411
+ animation-iteration-count: infinite;
412
+ animation-delay: 200ms;
413
+ }
414
+ `, de = /* @__PURE__ */ f.forwardRef(function(t, o) {
415
+ const u = pe({
416
+ props: t,
417
+ name: "MuiTouchRipple"
418
+ }), {
419
+ center: i = !1,
420
+ classes: s = {},
421
+ className: r,
422
+ ...c
423
+ } = u, [l, p] = f.useState([]), h = f.useRef(0), m = f.useRef(null);
424
+ f.useEffect(() => {
425
+ m.current && (m.current(), m.current = null);
426
+ }, [l]);
427
+ const M = f.useRef(!1), N = je(), g = f.useRef(null), S = f.useRef(null), C = f.useCallback((d) => {
428
+ const {
429
+ pulsate: T,
430
+ rippleX: R,
431
+ rippleY: I,
432
+ rippleSize: B,
433
+ cb: z
434
+ } = d;
435
+ p((E) => [...E, /* @__PURE__ */ $(Ze, {
436
+ classes: {
437
+ ripple: v(s.ripple, y.ripple),
438
+ rippleVisible: v(s.rippleVisible, y.rippleVisible),
439
+ ripplePulsate: v(s.ripplePulsate, y.ripplePulsate),
440
+ child: v(s.child, y.child),
441
+ childLeaving: v(s.childLeaving, y.childLeaving),
442
+ childPulsate: v(s.childPulsate, y.childPulsate)
443
+ },
444
+ timeout: te,
445
+ pulsate: T,
446
+ rippleX: R,
447
+ rippleY: I,
448
+ rippleSize: B
449
+ }, h.current)]), h.current += 1, m.current = z;
450
+ }, [s]), k = f.useCallback((d = {}, T = {}, R = () => {
451
+ }) => {
452
+ const {
453
+ pulsate: I = !1,
454
+ center: B = i || T.pulsate,
455
+ fakeElement: z = !1
456
+ // For test purposes
457
+ } = T;
458
+ if (d?.type === "mousedown" && M.current) {
459
+ M.current = !1;
460
+ return;
461
+ }
462
+ d?.type === "touchstart" && (M.current = !0);
463
+ const E = z ? null : S.current, w = E ? E.getBoundingClientRect() : {
464
+ width: 0,
465
+ height: 0,
466
+ left: 0,
467
+ top: 0
468
+ };
469
+ let D, x, V;
470
+ if (B || d === void 0 || d.clientX === 0 && d.clientY === 0 || !d.clientX && !d.touches)
471
+ D = Math.round(w.width / 2), x = Math.round(w.height / 2);
472
+ else {
473
+ const {
474
+ clientX: A,
475
+ clientY: O
476
+ } = d.touches && d.touches.length > 0 ? d.touches[0] : d;
477
+ D = Math.round(A - w.left), x = Math.round(O - w.top);
478
+ }
479
+ if (B)
480
+ V = Math.sqrt((2 * w.width ** 2 + w.height ** 2) / 3), V % 2 === 0 && (V += 1);
481
+ else {
482
+ const A = Math.max(Math.abs((E ? E.clientWidth : 0) - D), D) * 2 + 2, O = Math.max(Math.abs((E ? E.clientHeight : 0) - x), x) * 2 + 2;
483
+ V = Math.sqrt(A ** 2 + O ** 2);
484
+ }
485
+ d?.touches ? g.current === null && (g.current = () => {
486
+ C({
487
+ pulsate: I,
488
+ rippleX: D,
489
+ rippleY: x,
490
+ rippleSize: V,
491
+ cb: R
492
+ });
493
+ }, N.start(We, () => {
494
+ g.current && (g.current(), g.current = null);
495
+ })) : C({
496
+ pulsate: I,
497
+ rippleX: D,
498
+ rippleY: x,
499
+ rippleSize: V,
500
+ cb: R
501
+ });
502
+ }, [i, C, N]), Y = f.useCallback(() => {
503
+ k({}, {
504
+ pulsate: !0
505
+ });
506
+ }, [k]), F = f.useCallback((d, T) => {
507
+ if (N.clear(), d?.type === "touchend" && g.current) {
508
+ g.current(), g.current = null, N.start(0, () => {
509
+ F(d, T);
510
+ });
511
+ return;
512
+ }
513
+ g.current = null, p((R) => R.length > 0 ? R.slice(1) : R), m.current = T;
514
+ }, [N]);
515
+ return f.useImperativeHandle(o, () => ({
516
+ pulsate: Y,
517
+ start: k,
518
+ stop: F
519
+ }), [Y, k, F]), /* @__PURE__ */ $(Qe, {
520
+ className: v(y.root, s.root, r),
521
+ ref: S,
522
+ ...c,
523
+ children: /* @__PURE__ */ $(se, {
524
+ component: null,
525
+ exit: !0,
526
+ children: l
527
+ })
528
+ });
529
+ });
530
+ process.env.NODE_ENV !== "production" && (de.propTypes = {
531
+ /**
532
+ * If `true`, the ripple starts at the center of the component
533
+ * rather than at the point of interaction.
534
+ */
535
+ center: e.bool,
536
+ /**
537
+ * Override or extend the styles applied to the component.
538
+ */
539
+ classes: e.object,
540
+ /**
541
+ * @ignore
542
+ */
543
+ className: e.string
544
+ });
545
+ function et(n) {
546
+ return Se("MuiButtonBase", n);
547
+ }
548
+ const tt = ce("MuiButtonBase", ["root", "disabled", "focusVisible"]), nt = (n) => {
549
+ const {
550
+ disabled: t,
551
+ focusVisible: o,
552
+ focusVisibleClassName: u,
553
+ classes: i
554
+ } = n, r = ke({
555
+ root: ["root", t && "disabled", o && "focusVisible"]
556
+ }, et, i);
557
+ return o && u && (r.root += ` ${u}`), r;
558
+ }, ot = ne("button", {
559
+ name: "MuiButtonBase",
560
+ slot: "Root"
561
+ })({
562
+ display: "inline-flex",
563
+ alignItems: "center",
564
+ justifyContent: "center",
565
+ position: "relative",
566
+ boxSizing: "border-box",
567
+ WebkitTapHighlightColor: "transparent",
568
+ backgroundColor: "transparent",
569
+ // Reset default value
570
+ // We disable the focus ring for mouse, touch and keyboard users.
571
+ outline: 0,
572
+ border: 0,
573
+ margin: 0,
574
+ // Remove the margin in Safari
575
+ borderRadius: 0,
576
+ padding: 0,
577
+ // Remove the padding in Firefox
578
+ cursor: "pointer",
579
+ userSelect: "none",
580
+ verticalAlign: "middle",
581
+ MozAppearance: "none",
582
+ // Reset
583
+ WebkitAppearance: "none",
584
+ // Reset
585
+ textDecoration: "none",
586
+ // So we take precedent over the style of a native <a /> element.
587
+ color: "inherit",
588
+ "&::-moz-focus-inner": {
589
+ borderStyle: "none"
590
+ // Remove Firefox dotted outline.
591
+ },
592
+ [`&.${tt.disabled}`]: {
593
+ pointerEvents: "none",
594
+ // Disable link interactions
595
+ cursor: "default"
596
+ },
597
+ "@media print": {
598
+ colorAdjust: "exact"
599
+ }
600
+ }), it = /* @__PURE__ */ f.forwardRef(function(t, o) {
601
+ const u = pe({
602
+ props: t,
603
+ name: "MuiButtonBase"
604
+ }), {
605
+ action: i,
606
+ centerRipple: s = !1,
607
+ children: r,
608
+ className: c,
609
+ component: l = "button",
610
+ disabled: p = !1,
611
+ disableRipple: h = !1,
612
+ disableTouchRipple: m = !1,
613
+ focusRipple: M = !1,
614
+ focusVisibleClassName: N,
615
+ LinkComponent: g = "a",
616
+ onBlur: S,
617
+ onClick: C,
618
+ onContextMenu: k,
619
+ onDragLeave: Y,
620
+ onFocus: F,
621
+ onFocusVisible: d,
622
+ onKeyDown: T,
623
+ onKeyUp: R,
624
+ onMouseDown: I,
625
+ onMouseLeave: B,
626
+ onMouseUp: z,
627
+ onTouchEnd: E,
628
+ onTouchMove: w,
629
+ onTouchStart: D,
630
+ tabIndex: x = 0,
631
+ TouchRippleProps: V,
632
+ touchRippleRef: A,
633
+ type: O,
634
+ ...U
635
+ } = u, _ = f.useRef(null), b = $e(), he = ue(b.ref, A), [L, K] = f.useState(!1);
636
+ p && L && K(!1), f.useImperativeHandle(i, () => ({
637
+ focusVisible: () => {
638
+ K(!0), _.current.focus();
639
+ }
640
+ }), []);
641
+ const me = b.shouldMount && !h && !p;
642
+ f.useEffect(() => {
643
+ L && M && !h && b.pulsate();
644
+ }, [h, M, L, b]);
645
+ const be = P(b, "start", I, m), ge = P(b, "stop", k, m), ye = P(b, "stop", Y, m), Me = P(b, "stop", z, m), Re = P(b, "stop", (a) => {
646
+ L && a.preventDefault(), B && B(a);
647
+ }, m), Te = P(b, "start", D, m), Ee = P(b, "stop", E, m), ve = P(b, "stop", w, m), Ce = P(b, "stop", (a) => {
648
+ le(a.target) || K(!1), S && S(a);
649
+ }, !1), xe = J((a) => {
650
+ _.current || (_.current = a.currentTarget), le(a.target) && (K(!0), d && d(a)), F && F(a);
651
+ }), Z = () => {
652
+ const a = _.current;
653
+ return l && l !== "button" && !(a.tagName === "A" && a.href);
654
+ }, Pe = J((a) => {
655
+ M && !a.repeat && L && a.key === " " && b.stop(a, () => {
656
+ b.start(a);
657
+ }), a.target === a.currentTarget && Z() && a.key === " " && a.preventDefault(), T && T(a), a.target === a.currentTarget && Z() && a.key === "Enter" && !p && (a.preventDefault(), C && C(a));
658
+ }), Ne = J((a) => {
659
+ M && a.key === " " && L && !a.defaultPrevented && b.stop(a, () => {
660
+ b.pulsate(a);
661
+ }), R && R(a), C && a.target === a.currentTarget && Z() && a.key === " " && !a.defaultPrevented && C(a);
662
+ });
663
+ let q = l;
664
+ q === "button" && (U.href || U.to) && (q = g);
665
+ const X = {};
666
+ if (q === "button") {
667
+ const a = !!U.formAction;
668
+ X.type = O === void 0 && !a ? "button" : O, X.disabled = p;
669
+ } else
670
+ !U.href && !U.to && (X.role = "button"), p && (X["aria-disabled"] = p);
671
+ const we = ue(o, _), re = {
672
+ ...u,
673
+ centerRipple: s,
674
+ component: l,
675
+ disabled: p,
676
+ disableRipple: h,
677
+ disableTouchRipple: m,
678
+ focusRipple: M,
679
+ tabIndex: x,
680
+ focusVisible: L
681
+ }, De = nt(re);
682
+ return /* @__PURE__ */ Ue(ot, {
683
+ as: q,
684
+ className: v(De.root, c),
685
+ ownerState: re,
686
+ onBlur: Ce,
687
+ onClick: C,
688
+ onContextMenu: ge,
689
+ onFocus: xe,
690
+ onKeyDown: Pe,
691
+ onKeyUp: Ne,
692
+ onMouseDown: be,
693
+ onMouseLeave: Re,
694
+ onMouseUp: Me,
695
+ onDragLeave: ye,
696
+ onTouchEnd: Ee,
697
+ onTouchMove: ve,
698
+ onTouchStart: Te,
699
+ ref: we,
700
+ tabIndex: p ? -1 : x,
701
+ type: O,
702
+ ...X,
703
+ ...U,
704
+ children: [r, me ? /* @__PURE__ */ $(de, {
705
+ ref: he,
706
+ center: s,
707
+ ...V
708
+ }) : null]
709
+ });
710
+ });
711
+ function P(n, t, o, u = !1) {
712
+ return J((i) => (o && o(i), u || n[t](i), !0));
713
+ }
714
+ process.env.NODE_ENV !== "production" && (it.propTypes = {
715
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
716
+ // │ These PropTypes are generated from the TypeScript type definitions. │
717
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
718
+ // └─────────────────────────────────────────────────────────────────────┘
719
+ /**
720
+ * A ref for imperative actions.
721
+ * It currently only supports `focusVisible()` action.
722
+ */
723
+ action: Ie,
724
+ /**
725
+ * If `true`, the ripples are centered.
726
+ * They won't start at the cursor interaction position.
727
+ * @default false
728
+ */
729
+ centerRipple: e.bool,
730
+ /**
731
+ * The content of the component.
732
+ */
733
+ children: e.node,
734
+ /**
735
+ * Override or extend the styles applied to the component.
736
+ */
737
+ classes: e.object,
738
+ /**
739
+ * @ignore
740
+ */
741
+ className: e.string,
742
+ /**
743
+ * The component used for the root node.
744
+ * Either a string to use a HTML element or a component.
745
+ */
746
+ component: Fe,
747
+ /**
748
+ * If `true`, the component is disabled.
749
+ * @default false
750
+ */
751
+ disabled: e.bool,
752
+ /**
753
+ * If `true`, the ripple effect is disabled.
754
+ *
755
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
756
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
757
+ * @default false
758
+ */
759
+ disableRipple: e.bool,
760
+ /**
761
+ * If `true`, the touch ripple effect is disabled.
762
+ * @default false
763
+ */
764
+ disableTouchRipple: e.bool,
765
+ /**
766
+ * If `true`, the base button will have a keyboard focus ripple.
767
+ * @default false
768
+ */
769
+ focusRipple: e.bool,
770
+ /**
771
+ * This prop can help identify which element has keyboard focus.
772
+ * The class name will be applied when the element gains the focus through keyboard interaction.
773
+ * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
774
+ * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
775
+ * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
776
+ * if needed.
777
+ */
778
+ focusVisibleClassName: e.string,
779
+ /**
780
+ * @ignore
781
+ */
782
+ formAction: e.oneOfType([e.func, e.string]),
783
+ /**
784
+ * @ignore
785
+ */
786
+ href: e.any,
787
+ /**
788
+ * The component used to render a link when the `href` prop is provided.
789
+ * @default 'a'
790
+ */
791
+ LinkComponent: e.elementType,
792
+ /**
793
+ * @ignore
794
+ */
795
+ onBlur: e.func,
796
+ /**
797
+ * @ignore
798
+ */
799
+ onClick: e.func,
800
+ /**
801
+ * @ignore
802
+ */
803
+ onContextMenu: e.func,
804
+ /**
805
+ * @ignore
806
+ */
807
+ onDragLeave: e.func,
808
+ /**
809
+ * @ignore
810
+ */
811
+ onFocus: e.func,
812
+ /**
813
+ * Callback fired when the component is focused with a keyboard.
814
+ * We trigger a `onFocus` callback too.
815
+ */
816
+ onFocusVisible: e.func,
817
+ /**
818
+ * @ignore
819
+ */
820
+ onKeyDown: e.func,
821
+ /**
822
+ * @ignore
823
+ */
824
+ onKeyUp: e.func,
825
+ /**
826
+ * @ignore
827
+ */
828
+ onMouseDown: e.func,
829
+ /**
830
+ * @ignore
831
+ */
832
+ onMouseLeave: e.func,
833
+ /**
834
+ * @ignore
835
+ */
836
+ onMouseUp: e.func,
837
+ /**
838
+ * @ignore
839
+ */
840
+ onTouchEnd: e.func,
841
+ /**
842
+ * @ignore
843
+ */
844
+ onTouchMove: e.func,
845
+ /**
846
+ * @ignore
847
+ */
848
+ onTouchStart: e.func,
849
+ /**
850
+ * The system prop that allows defining system overrides as well as additional CSS styles.
851
+ */
852
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
853
+ /**
854
+ * @default 0
855
+ */
856
+ tabIndex: e.number,
857
+ /**
858
+ * Props applied to the `TouchRipple` element.
859
+ */
860
+ TouchRippleProps: e.object,
861
+ /**
862
+ * A ref that points to the `TouchRipple` element.
863
+ */
864
+ touchRippleRef: e.oneOfType([e.func, e.shape({
865
+ current: e.shape({
866
+ pulsate: e.func.isRequired,
867
+ start: e.func.isRequired,
868
+ stop: e.func.isRequired
869
+ })
870
+ })]),
871
+ /**
872
+ * @ignore
873
+ */
874
+ type: e.oneOfType([e.oneOf(["button", "reset", "submit"]), e.string])
875
+ });
876
+ export {
877
+ it as B
878
+ };