@hybridcore/ui 1.6.18 → 1.6.19

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