@hybridcore/ui 1.0.2 → 1.1.2

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 (105) hide show
  1. package/dist/ButtonBase-BYmh3G5j.js +967 -0
  2. package/dist/CardContent-C8PxkJz4.js +73 -0
  3. package/dist/Checkbox-DostZSwR.js +673 -0
  4. package/dist/DialogContent-2aPOjKE7.js +2025 -0
  5. package/dist/FormControl-BiAFm76F.js +1491 -0
  6. package/dist/IconButton-CQJ8wZE8.js +183 -0
  7. package/dist/Input-Bf5G3tFN.js +324 -0
  8. package/dist/OutlinedInput-BEVE8VZQ.js +452 -0
  9. package/dist/Paper-CaiWdndQ.js +162 -0
  10. package/dist/Select-DxpxZbJp.js +2526 -0
  11. package/dist/Source-CnCcu5UP.js +4374 -0
  12. package/dist/Text-BT5kPHOo.js +2192 -0
  13. package/dist/Typography-XIiVCSto.js +178 -0
  14. package/dist/assertThisInitialized-BUtkG-md.js +13 -0
  15. package/dist/assets/index.css +1 -0
  16. package/dist/assets/index2.css +1 -0
  17. package/dist/chainPropTypes-DtBfUj5o.js +96 -0
  18. package/dist/components/access/helpers.js +32 -0
  19. package/dist/components/access/index.js +15 -0
  20. package/dist/components/card/index.js +159 -469
  21. package/dist/components/card/styled.js +75 -7
  22. package/dist/components/conditional-wrapper/index.js +9 -0
  23. package/dist/components/confirm/dialog.js +151 -0
  24. package/dist/components/confirm/index.js +23 -0
  25. package/dist/components/container/index.js +270 -0
  26. package/dist/components/context-menu/index.js +973 -0
  27. package/dist/components/data-management/instance-form/components/composite-list/index.js +12 -0
  28. package/dist/components/data-management/instance-form/components/composite-list/styled.js +64 -0
  29. package/dist/components/data-management/instance-form/components/policy-list/index.js +86 -0
  30. package/dist/components/data-management/instance-form/components/variable/index.js +15 -0
  31. package/dist/components/data-management/instance-form/components/variables/index.js +39 -0
  32. package/dist/components/data-management/instance-form/index.js +437 -0
  33. package/dist/components/data-security-selectors/dissemination-list/index.js +3201 -0
  34. package/dist/components/data-security-selectors/security-level/index.js +81 -0
  35. package/dist/components/date-time-picker/index.js +103 -0
  36. package/dist/components/geometry-picker/coordinate/index.js +93 -0
  37. package/dist/components/geometry-picker/edit/index.js +71 -0
  38. package/dist/components/geometry-picker/geometry/index.js +160 -0
  39. package/dist/components/geometry-picker/geometry/map-overlay.js +22 -0
  40. package/dist/components/geometry-picker/index.js +140 -0
  41. package/dist/components/geometry-picker/kml/index.js +62 -0
  42. package/dist/components/geometry-picker/kml/select-input-method.js +75 -0
  43. package/dist/components/geometry-picker/logic.js +69 -0
  44. package/dist/components/geometry-picker/map/index.js +42 -0
  45. package/dist/components/geometry-picker/map/logic.js +2360 -0
  46. package/dist/components/geometry-picker/map/style.js +88 -0
  47. package/dist/components/geometry-picker/parser/coordinate-input/index.js +78 -0
  48. package/dist/components/geometry-picker/parser/coordinate-input/logic.js +1305 -0
  49. package/dist/components/geometry-picker/parser/index.js +179 -0
  50. package/dist/components/geometry-picker/parser/logic.js +84 -0
  51. package/dist/components/geometry-picker/parser/styled.js +25 -0
  52. package/dist/components/geometry-picker/styled.js +48 -0
  53. package/dist/components/geometry-picker/wkt/index.js +59 -0
  54. package/dist/components/geometry-picker/wkt/select-input-method.js +75 -0
  55. package/dist/components/icon-button/index.js +18 -0
  56. package/dist/components/icon-button/styled.js +51 -0
  57. package/dist/components/key-protection/index.js +4 -0
  58. package/dist/components/key-protection/menu.js +85 -0
  59. package/dist/components/key-protection/utils.js +10 -0
  60. package/dist/components/loading/index.js +7 -0
  61. package/dist/components/loading/styled.js +16 -0
  62. package/dist/components/map/helpers/kml.js +45 -0
  63. package/dist/components/map/helpers/mapbox.js +48 -0
  64. package/dist/components/map/helpers/ol.js +25 -0
  65. package/dist/components/map/helpers/wkt.js +29 -0
  66. package/dist/components/map/index.js +8 -0
  67. package/dist/components/map/logic.js +140 -0
  68. package/dist/components/map/styled.js +8 -0
  69. package/dist/components/phone-input/index.js +25 -0
  70. package/dist/components/phone-input/styled.js +26 -0
  71. package/dist/components/search-input/index.js +76 -0
  72. package/dist/components/tree-select/index.js +70 -0
  73. package/dist/components/tree-select/styled.js +64 -0
  74. package/dist/components/treeview-filter/index.js +621 -0
  75. package/dist/components/treeview-filter/item/index.js +7 -0
  76. package/dist/components/treeview-filter/item-label/index.js +44 -0
  77. package/dist/createTheme-agWfFD64.js +2392 -0
  78. package/dist/exactProp-CI8dagM-.js +36 -0
  79. package/dist/extends-C3382pL0.js +22 -0
  80. package/dist/has-9_asnBxn.js +688 -0
  81. package/dist/hooks/useMenuLogic.js +21 -0
  82. package/dist/hooks/useToggle.js +23 -0
  83. package/dist/index-Bw_m9ult.js +1105 -0
  84. package/dist/index-IvOfmM1F.js +34 -0
  85. package/dist/index-wW2D1aTG.js +957 -0
  86. package/dist/isHostComponent-kiaBvYVo.js +6 -0
  87. package/dist/isMuiElement-CxT3_ACP.js +13 -0
  88. package/dist/listItemTextClasses-BvXFz-Oc.js +132 -0
  89. package/dist/main.d.ts +1317 -0
  90. package/dist/main.js +41 -2
  91. package/dist/ol-DXmSLlWv.js +15041 -0
  92. package/dist/ownerDocument-CUrv0DIK.js +6 -0
  93. package/dist/ownerWindow-niciwP7I.js +7 -0
  94. package/dist/styled-C43K9x7T.js +229 -0
  95. package/dist/styled-Iq9jsO4F.js +1033 -0
  96. package/dist/useFormControl-CatNKXAi.js +10 -0
  97. package/dist/useId-BHG98T5I.js +26 -0
  98. package/dist/useTheme-C0Dky5rV.js +17 -0
  99. package/dist/useTheme-CeyGVuQP.js +10 -0
  100. package/dist/useThemeProps-CzAjOL6F.js +26 -0
  101. package/dist/utils/ontology.js +37 -0
  102. package/dist/utils-Bq0ye5vf.js +115 -0
  103. package/dist/utils-DLpkeyhZ.js +365 -0
  104. package/package.json +26 -5
  105. package/dist/styled-BG5UIpPU.js +0 -3459
@@ -0,0 +1,967 @@
1
+ import { a as Y, _ as ae } from "./extends-C3382pL0.js";
2
+ import * as l from "react";
3
+ import X, { Children as We, isValidElement as G, cloneElement as Z } from "react";
4
+ import { P as n } from "./createTheme-agWfFD64.js";
5
+ import { b as He, c as v, g as ve, u as xe, a as Ge } from "./chainPropTypes-DtBfUj5o.js";
6
+ import { s as le, g as Ze } from "./styled-Iq9jsO4F.js";
7
+ import { jsx as $, jsxs as Je } from "react/jsx-runtime";
8
+ import { _ as Qe, a as et } from "./assertThisInitialized-BUtkG-md.js";
9
+ import { keyframes as ce } from "@emotion/react";
10
+ const tt = typeof window < "u" ? l.useLayoutEffect : l.useEffect;
11
+ function nt(e) {
12
+ const {
13
+ prototype: t = {}
14
+ } = e;
15
+ return !!t.isReactComponent;
16
+ }
17
+ function ot(e, t, o, a, r) {
18
+ const i = e[t], s = r || t;
19
+ if (i == null || // When server-side rendering React doesn't warn either.
20
+ // This is not an accurate check for SSR.
21
+ // This is only in place for emotion compat.
22
+ // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
23
+ typeof window > "u")
24
+ return null;
25
+ let c;
26
+ return typeof i == "function" && !nt(i) && (c = "Did you accidentally provide a plain function component instead?"), c !== void 0 ? new Error(`Invalid ${a} \`${s}\` supplied to \`${o}\`. Expected an element type that can hold a ref. ${c} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
27
+ }
28
+ const rt = He(n.elementType, ot), it = n.oneOfType([n.func, n.object]);
29
+ function st(e, t) {
30
+ typeof e == "function" ? e(t) : e && (e.current = t);
31
+ }
32
+ function H(e) {
33
+ const t = l.useRef(e);
34
+ return tt(() => {
35
+ t.current = e;
36
+ }), l.useRef((...o) => (
37
+ // @ts-expect-error hide `this`
38
+ (0, t.current)(...o)
39
+ )).current;
40
+ }
41
+ function ye(...e) {
42
+ return l.useMemo(() => e.every((t) => t == null) ? null : (t) => {
43
+ e.forEach((o) => {
44
+ st(o, t);
45
+ });
46
+ }, e);
47
+ }
48
+ const ge = {};
49
+ function ut(e, t) {
50
+ const o = l.useRef(ge);
51
+ return o.current === ge && (o.current = e(t)), o;
52
+ }
53
+ const at = [];
54
+ function lt(e) {
55
+ l.useEffect(e, at);
56
+ }
57
+ class J {
58
+ constructor() {
59
+ this.currentId = null, this.clear = () => {
60
+ this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
61
+ }, this.disposeEffect = () => this.clear;
62
+ }
63
+ static create() {
64
+ return new J();
65
+ }
66
+ /**
67
+ * Executes `fn` after `delay`, clearing any previously scheduled call.
68
+ */
69
+ start(t, o) {
70
+ this.clear(), this.currentId = setTimeout(() => {
71
+ this.currentId = null, o();
72
+ }, t);
73
+ }
74
+ }
75
+ function ct() {
76
+ const e = ut(J.create).current;
77
+ return lt(e.disposeEffect), e;
78
+ }
79
+ let Q = !0, se = !1;
80
+ const pt = new J(), ft = {
81
+ text: !0,
82
+ search: !0,
83
+ url: !0,
84
+ tel: !0,
85
+ email: !0,
86
+ password: !0,
87
+ number: !0,
88
+ date: !0,
89
+ month: !0,
90
+ week: !0,
91
+ time: !0,
92
+ datetime: !0,
93
+ "datetime-local": !0
94
+ };
95
+ function dt(e) {
96
+ const {
97
+ type: t,
98
+ tagName: o
99
+ } = e;
100
+ return !!(o === "INPUT" && ft[t] && !e.readOnly || o === "TEXTAREA" && !e.readOnly || e.isContentEditable);
101
+ }
102
+ function ht(e) {
103
+ e.metaKey || e.altKey || e.ctrlKey || (Q = !0);
104
+ }
105
+ function ie() {
106
+ Q = !1;
107
+ }
108
+ function mt() {
109
+ this.visibilityState === "hidden" && se && (Q = !0);
110
+ }
111
+ function bt(e) {
112
+ e.addEventListener("keydown", ht, !0), e.addEventListener("mousedown", ie, !0), e.addEventListener("pointerdown", ie, !0), e.addEventListener("touchstart", ie, !0), e.addEventListener("visibilitychange", mt, !0);
113
+ }
114
+ function yt(e) {
115
+ const {
116
+ target: t
117
+ } = e;
118
+ try {
119
+ return t.matches(":focus-visible");
120
+ } catch {
121
+ }
122
+ return Q || dt(t);
123
+ }
124
+ function gt() {
125
+ const e = l.useCallback((r) => {
126
+ r != null && bt(r.ownerDocument);
127
+ }, []), t = l.useRef(!1);
128
+ function o() {
129
+ return t.current ? (se = !0, pt.start(100, () => {
130
+ se = !1;
131
+ }), t.current = !1, !0) : !1;
132
+ }
133
+ function a(r) {
134
+ return yt(r) ? (t.current = !0, !0) : !1;
135
+ }
136
+ return {
137
+ isFocusVisibleRef: t,
138
+ onFocus: a,
139
+ onBlur: o,
140
+ ref: e
141
+ };
142
+ }
143
+ function Rt(e, t) {
144
+ e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Qe(e, t);
145
+ }
146
+ const Re = X.createContext(null);
147
+ function pe(e, t) {
148
+ var o = function(i) {
149
+ return t && G(i) ? t(i) : i;
150
+ }, a = /* @__PURE__ */ Object.create(null);
151
+ return e && We.map(e, function(r) {
152
+ return r;
153
+ }).forEach(function(r) {
154
+ a[r.key] = o(r);
155
+ }), a;
156
+ }
157
+ function Tt(e, t) {
158
+ e = e || {}, t = t || {};
159
+ function o(h) {
160
+ return h in t ? t[h] : e[h];
161
+ }
162
+ var a = /* @__PURE__ */ Object.create(null), r = [];
163
+ for (var i in e)
164
+ i in t ? r.length && (a[i] = r, r = []) : r.push(i);
165
+ var s, c = {};
166
+ for (var p in t) {
167
+ if (a[p])
168
+ for (s = 0; s < a[p].length; s++) {
169
+ var f = a[p][s];
170
+ c[a[p][s]] = o(f);
171
+ }
172
+ c[p] = o(p);
173
+ }
174
+ for (s = 0; s < r.length; s++)
175
+ c[r[s]] = o(r[s]);
176
+ return c;
177
+ }
178
+ function k(e, t, o) {
179
+ return o[t] != null ? o[t] : e.props[t];
180
+ }
181
+ function Et(e, t) {
182
+ return pe(e.children, function(o) {
183
+ return Z(o, {
184
+ onExited: t.bind(null, o),
185
+ in: !0,
186
+ appear: k(o, "appear", e),
187
+ enter: k(o, "enter", e),
188
+ exit: k(o, "exit", e)
189
+ });
190
+ });
191
+ }
192
+ function Mt(e, t, o) {
193
+ var a = pe(e.children), r = Tt(t, a);
194
+ return Object.keys(r).forEach(function(i) {
195
+ var s = r[i];
196
+ if (G(s)) {
197
+ var c = i in t, p = i in a, f = t[i], h = G(f) && !f.props.in;
198
+ p && (!c || h) ? r[i] = Z(s, {
199
+ onExited: o.bind(null, s),
200
+ in: !0,
201
+ exit: k(s, "exit", e),
202
+ enter: k(s, "enter", e)
203
+ }) : !p && c && !h ? r[i] = Z(s, {
204
+ in: !1
205
+ }) : p && c && G(f) && (r[i] = Z(s, {
206
+ onExited: o.bind(null, s),
207
+ in: f.props.in,
208
+ exit: k(s, "exit", e),
209
+ enter: k(s, "enter", e)
210
+ }));
211
+ }
212
+ }), r;
213
+ }
214
+ var Ct = Object.values || function(e) {
215
+ return Object.keys(e).map(function(t) {
216
+ return e[t];
217
+ });
218
+ }, vt = {
219
+ component: "div",
220
+ childFactory: function(t) {
221
+ return t;
222
+ }
223
+ }, fe = /* @__PURE__ */ function(e) {
224
+ Rt(t, e);
225
+ function t(a, r) {
226
+ var i;
227
+ i = e.call(this, a, r) || this;
228
+ var s = i.handleExited.bind(et(i));
229
+ return i.state = {
230
+ contextValue: {
231
+ isMounting: !0
232
+ },
233
+ handleExited: s,
234
+ firstRender: !0
235
+ }, i;
236
+ }
237
+ var o = t.prototype;
238
+ return o.componentDidMount = function() {
239
+ this.mounted = !0, this.setState({
240
+ contextValue: {
241
+ isMounting: !1
242
+ }
243
+ });
244
+ }, o.componentWillUnmount = function() {
245
+ this.mounted = !1;
246
+ }, t.getDerivedStateFromProps = function(r, i) {
247
+ var s = i.children, c = i.handleExited, p = i.firstRender;
248
+ return {
249
+ children: p ? Et(r, c) : Mt(r, s, c),
250
+ firstRender: !1
251
+ };
252
+ }, o.handleExited = function(r, i) {
253
+ var s = pe(this.props.children);
254
+ r.key in s || (r.props.onExited && r.props.onExited(i), this.mounted && this.setState(function(c) {
255
+ var p = Y({}, c.children);
256
+ return delete p[r.key], {
257
+ children: p
258
+ };
259
+ }));
260
+ }, o.render = function() {
261
+ var r = this.props, i = r.component, s = r.childFactory, c = ae(r, ["component", "childFactory"]), p = this.state.contextValue, f = Ct(this.state.children).map(s);
262
+ return delete c.appear, delete c.enter, delete c.exit, i === null ? /* @__PURE__ */ X.createElement(Re.Provider, {
263
+ value: p
264
+ }, f) : /* @__PURE__ */ X.createElement(Re.Provider, {
265
+ value: p
266
+ }, /* @__PURE__ */ X.createElement(i, c, f));
267
+ }, t;
268
+ }(X.Component);
269
+ fe.propTypes = process.env.NODE_ENV !== "production" ? {
270
+ /**
271
+ * `<TransitionGroup>` renders a `<div>` by default. You can change this
272
+ * behavior by providing a `component` prop.
273
+ * If you use React v16+ and would like to avoid a wrapping `<div>` element
274
+ * you can pass in `component={null}`. This is useful if the wrapping div
275
+ * borks your css styles.
276
+ */
277
+ component: n.any,
278
+ /**
279
+ * A set of `<Transition>` components, that are toggled `in` and out as they
280
+ * leave. the `<TransitionGroup>` will inject specific transition props, so
281
+ * remember to spread them through if you are wrapping the `<Transition>` as
282
+ * with our `<Fade>` example.
283
+ *
284
+ * While this component is meant for multiple `Transition` or `CSSTransition`
285
+ * children, sometimes you may want to have a single transition child with
286
+ * content that you want to be transitioned out and in when you change it
287
+ * (e.g. routes, images etc.) In that case you can change the `key` prop of
288
+ * the transition child as you change its content, this will cause
289
+ * `TransitionGroup` to transition the child out and back in.
290
+ */
291
+ children: n.node,
292
+ /**
293
+ * A convenience prop that enables or disables appear animations
294
+ * for all children. Note that specifying this will override any defaults set
295
+ * on individual children Transitions.
296
+ */
297
+ appear: n.bool,
298
+ /**
299
+ * A convenience prop that enables or disables enter animations
300
+ * for all children. Note that specifying this will override any defaults set
301
+ * on individual children Transitions.
302
+ */
303
+ enter: n.bool,
304
+ /**
305
+ * A convenience prop that enables or disables exit animations
306
+ * for all children. Note that specifying this will override any defaults set
307
+ * on individual children Transitions.
308
+ */
309
+ exit: n.bool,
310
+ /**
311
+ * You may need to apply reactive updates to a child as it is exiting.
312
+ * This is generally done by using `cloneElement` however in the case of an exiting
313
+ * child the element has already been removed and not accessible to the consumer.
314
+ *
315
+ * If you do need to update a child as it leaves you can provide a `childFactory`
316
+ * to wrap every child, even the ones that are leaving.
317
+ *
318
+ * @type Function(child: ReactElement) -> ReactElement
319
+ */
320
+ childFactory: n.func
321
+ } : {};
322
+ fe.defaultProps = vt;
323
+ function Ve(e) {
324
+ const {
325
+ className: t,
326
+ classes: o,
327
+ pulsate: a = !1,
328
+ rippleX: r,
329
+ rippleY: i,
330
+ rippleSize: s,
331
+ in: c,
332
+ onExited: p,
333
+ timeout: f
334
+ } = e, [h, R] = l.useState(!1), y = v(t, o.ripple, o.rippleVisible, a && o.ripplePulsate), x = {
335
+ width: s,
336
+ height: s,
337
+ top: -(s / 2) + i,
338
+ left: -(s / 2) + r
339
+ }, m = v(o.child, h && o.childLeaving, a && o.childPulsate);
340
+ return !c && !h && R(!0), l.useEffect(() => {
341
+ if (!c && p != null) {
342
+ const T = setTimeout(p, f);
343
+ return () => {
344
+ clearTimeout(T);
345
+ };
346
+ }
347
+ }, [p, c, f]), /* @__PURE__ */ $("span", {
348
+ className: y,
349
+ style: x,
350
+ children: /* @__PURE__ */ $("span", {
351
+ className: m
352
+ })
353
+ });
354
+ }
355
+ process.env.NODE_ENV !== "production" && (Ve.propTypes = {
356
+ /**
357
+ * Override or extend the styles applied to the component.
358
+ */
359
+ classes: n.object.isRequired,
360
+ className: n.string,
361
+ /**
362
+ * @ignore - injected from TransitionGroup
363
+ */
364
+ in: n.bool,
365
+ /**
366
+ * @ignore - injected from TransitionGroup
367
+ */
368
+ onExited: n.func,
369
+ /**
370
+ * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
371
+ */
372
+ pulsate: n.bool,
373
+ /**
374
+ * Diameter of the ripple.
375
+ */
376
+ rippleSize: n.number,
377
+ /**
378
+ * Horizontal position of the ripple center.
379
+ */
380
+ rippleX: n.number,
381
+ /**
382
+ * Vertical position of the ripple center.
383
+ */
384
+ rippleY: n.number,
385
+ /**
386
+ * exit delay
387
+ */
388
+ timeout: n.number.isRequired
389
+ });
390
+ const b = ve("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), xt = ["center", "classes", "className"];
391
+ let ee = (e) => e, Te, Ee, Me, Ce;
392
+ const ue = 550, Vt = 80, wt = ce(Te || (Te = ee`
393
+ 0% {
394
+ transform: scale(0);
395
+ opacity: 0.1;
396
+ }
397
+
398
+ 100% {
399
+ transform: scale(1);
400
+ opacity: 0.3;
401
+ }
402
+ `)), Pt = ce(Ee || (Ee = ee`
403
+ 0% {
404
+ opacity: 1;
405
+ }
406
+
407
+ 100% {
408
+ opacity: 0;
409
+ }
410
+ `)), Dt = ce(Me || (Me = ee`
411
+ 0% {
412
+ transform: scale(1);
413
+ }
414
+
415
+ 50% {
416
+ transform: scale(0.92);
417
+ }
418
+
419
+ 100% {
420
+ transform: scale(1);
421
+ }
422
+ `)), Nt = le("span", {
423
+ name: "MuiTouchRipple",
424
+ slot: "Root"
425
+ })({
426
+ overflow: "hidden",
427
+ pointerEvents: "none",
428
+ position: "absolute",
429
+ zIndex: 0,
430
+ top: 0,
431
+ right: 0,
432
+ bottom: 0,
433
+ left: 0,
434
+ borderRadius: "inherit"
435
+ }), Lt = le(Ve, {
436
+ name: "MuiTouchRipple",
437
+ slot: "Ripple"
438
+ })(Ce || (Ce = ee`
439
+ opacity: 0;
440
+ position: absolute;
441
+
442
+ &.${0} {
443
+ opacity: 0.3;
444
+ transform: scale(1);
445
+ animation-name: ${0};
446
+ animation-duration: ${0}ms;
447
+ animation-timing-function: ${0};
448
+ }
449
+
450
+ &.${0} {
451
+ animation-duration: ${0}ms;
452
+ }
453
+
454
+ & .${0} {
455
+ opacity: 1;
456
+ display: block;
457
+ width: 100%;
458
+ height: 100%;
459
+ border-radius: 50%;
460
+ background-color: currentColor;
461
+ }
462
+
463
+ & .${0} {
464
+ opacity: 0;
465
+ animation-name: ${0};
466
+ animation-duration: ${0}ms;
467
+ animation-timing-function: ${0};
468
+ }
469
+
470
+ & .${0} {
471
+ position: absolute;
472
+ /* @noflip */
473
+ left: 0px;
474
+ top: 0;
475
+ animation-name: ${0};
476
+ animation-duration: 2500ms;
477
+ animation-timing-function: ${0};
478
+ animation-iteration-count: infinite;
479
+ animation-delay: 200ms;
480
+ }
481
+ `), b.rippleVisible, wt, ue, ({
482
+ theme: e
483
+ }) => e.transitions.easing.easeInOut, b.ripplePulsate, ({
484
+ theme: e
485
+ }) => e.transitions.duration.shorter, b.child, b.childLeaving, Pt, ue, ({
486
+ theme: e
487
+ }) => e.transitions.easing.easeInOut, b.childPulsate, Dt, ({
488
+ theme: e
489
+ }) => e.transitions.easing.easeInOut), we = /* @__PURE__ */ l.forwardRef(function(t, o) {
490
+ const a = xe({
491
+ props: t,
492
+ name: "MuiTouchRipple"
493
+ }), {
494
+ center: r = !1,
495
+ classes: i = {},
496
+ className: s
497
+ } = a, c = ae(a, xt), [p, f] = l.useState([]), h = l.useRef(0), R = l.useRef(null);
498
+ l.useEffect(() => {
499
+ R.current && (R.current(), R.current = null);
500
+ }, [p]);
501
+ const y = l.useRef(!1), x = ct(), m = l.useRef(null), T = l.useRef(null), U = l.useCallback((d) => {
502
+ const {
503
+ pulsate: E,
504
+ rippleX: M,
505
+ rippleY: B,
506
+ rippleSize: _,
507
+ cb: K
508
+ } = d;
509
+ f((C) => [...C, /* @__PURE__ */ $(Lt, {
510
+ classes: {
511
+ ripple: v(i.ripple, b.ripple),
512
+ rippleVisible: v(i.rippleVisible, b.rippleVisible),
513
+ ripplePulsate: v(i.ripplePulsate, b.ripplePulsate),
514
+ child: v(i.child, b.child),
515
+ childLeaving: v(i.childLeaving, b.childLeaving),
516
+ childPulsate: v(i.childPulsate, b.childPulsate)
517
+ },
518
+ timeout: ue,
519
+ pulsate: E,
520
+ rippleX: M,
521
+ rippleY: B,
522
+ rippleSize: _
523
+ }, h.current)]), h.current += 1, R.current = K;
524
+ }, [i]), S = l.useCallback((d = {}, E = {}, M = () => {
525
+ }) => {
526
+ const {
527
+ pulsate: B = !1,
528
+ center: _ = r || E.pulsate,
529
+ fakeElement: K = !1
530
+ // For test purposes
531
+ } = E;
532
+ if ((d == null ? void 0 : d.type) === "mousedown" && y.current) {
533
+ y.current = !1;
534
+ return;
535
+ }
536
+ (d == null ? void 0 : d.type) === "touchstart" && (y.current = !0);
537
+ const C = K ? null : T.current, D = C ? C.getBoundingClientRect() : {
538
+ width: 0,
539
+ height: 0,
540
+ left: 0,
541
+ top: 0
542
+ };
543
+ let V, N, L;
544
+ if (_ || d === void 0 || d.clientX === 0 && d.clientY === 0 || !d.clientX && !d.touches)
545
+ V = Math.round(D.width / 2), N = Math.round(D.height / 2);
546
+ else {
547
+ const {
548
+ clientX: I,
549
+ clientY: w
550
+ } = d.touches && d.touches.length > 0 ? d.touches[0] : d;
551
+ V = Math.round(I - D.left), N = Math.round(w - D.top);
552
+ }
553
+ if (_)
554
+ L = Math.sqrt((2 * D.width ** 2 + D.height ** 2) / 3), L % 2 === 0 && (L += 1);
555
+ else {
556
+ const I = Math.max(Math.abs((C ? C.clientWidth : 0) - V), V) * 2 + 2, w = Math.max(Math.abs((C ? C.clientHeight : 0) - N), N) * 2 + 2;
557
+ L = Math.sqrt(I ** 2 + w ** 2);
558
+ }
559
+ d != null && d.touches ? m.current === null && (m.current = () => {
560
+ U({
561
+ pulsate: B,
562
+ rippleX: V,
563
+ rippleY: N,
564
+ rippleSize: L,
565
+ cb: M
566
+ });
567
+ }, x.start(Vt, () => {
568
+ m.current && (m.current(), m.current = null);
569
+ })) : U({
570
+ pulsate: B,
571
+ rippleX: V,
572
+ rippleY: N,
573
+ rippleSize: L,
574
+ cb: M
575
+ });
576
+ }, [r, U, x]), j = l.useCallback(() => {
577
+ S({}, {
578
+ pulsate: !0
579
+ });
580
+ }, [S]), O = l.useCallback((d, E) => {
581
+ if (x.clear(), (d == null ? void 0 : d.type) === "touchend" && m.current) {
582
+ m.current(), m.current = null, x.start(0, () => {
583
+ O(d, E);
584
+ });
585
+ return;
586
+ }
587
+ m.current = null, f((M) => M.length > 0 ? M.slice(1) : M), R.current = E;
588
+ }, [x]);
589
+ return l.useImperativeHandle(o, () => ({
590
+ pulsate: j,
591
+ start: S,
592
+ stop: O
593
+ }), [j, S, O]), /* @__PURE__ */ $(Nt, Y({
594
+ className: v(b.root, i.root, s),
595
+ ref: T
596
+ }, c, {
597
+ children: /* @__PURE__ */ $(fe, {
598
+ component: null,
599
+ exit: !0,
600
+ children: p
601
+ })
602
+ }));
603
+ });
604
+ process.env.NODE_ENV !== "production" && (we.propTypes = {
605
+ /**
606
+ * If `true`, the ripple starts at the center of the component
607
+ * rather than at the point of interaction.
608
+ */
609
+ center: n.bool,
610
+ /**
611
+ * Override or extend the styles applied to the component.
612
+ */
613
+ classes: n.object,
614
+ /**
615
+ * @ignore
616
+ */
617
+ className: n.string
618
+ });
619
+ function Bt(e) {
620
+ return Ze("MuiButtonBase", e);
621
+ }
622
+ const It = ve("MuiButtonBase", ["root", "disabled", "focusVisible"]), Ft = ["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"], kt = (e) => {
623
+ const {
624
+ disabled: t,
625
+ focusVisible: o,
626
+ focusVisibleClassName: a,
627
+ classes: r
628
+ } = e, s = Ge({
629
+ root: ["root", t && "disabled", o && "focusVisible"]
630
+ }, Bt, r);
631
+ return o && a && (s.root += ` ${a}`), s;
632
+ }, St = le("button", {
633
+ name: "MuiButtonBase",
634
+ slot: "Root",
635
+ overridesResolver: (e, t) => t.root
636
+ })({
637
+ display: "inline-flex",
638
+ alignItems: "center",
639
+ justifyContent: "center",
640
+ position: "relative",
641
+ boxSizing: "border-box",
642
+ WebkitTapHighlightColor: "transparent",
643
+ backgroundColor: "transparent",
644
+ // Reset default value
645
+ // We disable the focus ring for mouse, touch and keyboard users.
646
+ outline: 0,
647
+ border: 0,
648
+ margin: 0,
649
+ // Remove the margin in Safari
650
+ borderRadius: 0,
651
+ padding: 0,
652
+ // Remove the padding in Firefox
653
+ cursor: "pointer",
654
+ userSelect: "none",
655
+ verticalAlign: "middle",
656
+ MozAppearance: "none",
657
+ // Reset
658
+ WebkitAppearance: "none",
659
+ // Reset
660
+ textDecoration: "none",
661
+ // So we take precedent over the style of a native <a /> element.
662
+ color: "inherit",
663
+ "&::-moz-focus-inner": {
664
+ borderStyle: "none"
665
+ // Remove Firefox dotted outline.
666
+ },
667
+ [`&.${It.disabled}`]: {
668
+ pointerEvents: "none",
669
+ // Disable link interactions
670
+ cursor: "default"
671
+ },
672
+ "@media print": {
673
+ colorAdjust: "exact"
674
+ }
675
+ }), Ot = /* @__PURE__ */ l.forwardRef(function(t, o) {
676
+ const a = xe({
677
+ props: t,
678
+ name: "MuiButtonBase"
679
+ }), {
680
+ action: r,
681
+ centerRipple: i = !1,
682
+ children: s,
683
+ className: c,
684
+ component: p = "button",
685
+ disabled: f = !1,
686
+ disableRipple: h = !1,
687
+ disableTouchRipple: R = !1,
688
+ focusRipple: y = !1,
689
+ LinkComponent: x = "a",
690
+ onBlur: m,
691
+ onClick: T,
692
+ onContextMenu: U,
693
+ onDragLeave: S,
694
+ onFocus: j,
695
+ onFocusVisible: O,
696
+ onKeyDown: d,
697
+ onKeyUp: E,
698
+ onMouseDown: M,
699
+ onMouseLeave: B,
700
+ onMouseUp: _,
701
+ onTouchEnd: K,
702
+ onTouchMove: C,
703
+ onTouchStart: D,
704
+ tabIndex: V = 0,
705
+ TouchRippleProps: N,
706
+ touchRippleRef: L,
707
+ type: I
708
+ } = a, w = ae(a, Ft), z = l.useRef(null), g = l.useRef(null), Pe = ye(g, L), {
709
+ isFocusVisibleRef: de,
710
+ onFocus: De,
711
+ onBlur: Ne,
712
+ ref: Le
713
+ } = gt(), [F, q] = l.useState(!1);
714
+ f && F && q(!1), l.useImperativeHandle(r, () => ({
715
+ focusVisible: () => {
716
+ q(!0), z.current.focus();
717
+ }
718
+ }), []);
719
+ const [te, Be] = l.useState(!1);
720
+ l.useEffect(() => {
721
+ Be(!0);
722
+ }, []);
723
+ const ne = te && !h && !f;
724
+ l.useEffect(() => {
725
+ F && y && !h && te && g.current.pulsate();
726
+ }, [h, y, F, te]);
727
+ function P(u, me, qe = R) {
728
+ return H((be) => (me && me(be), !qe && g.current && g.current[u](be), !0));
729
+ }
730
+ const Ie = P("start", M), Fe = P("stop", U), ke = P("stop", S), Se = P("stop", _), Oe = P("stop", (u) => {
731
+ F && u.preventDefault(), B && B(u);
732
+ }), _e = P("start", D), $e = P("stop", K), Ue = P("stop", C), je = P("stop", (u) => {
733
+ Ne(u), de.current === !1 && q(!1), m && m(u);
734
+ }, !1), Ke = H((u) => {
735
+ z.current || (z.current = u.currentTarget), De(u), de.current === !0 && (q(!0), O && O(u)), j && j(u);
736
+ }), oe = () => {
737
+ const u = z.current;
738
+ return p && p !== "button" && !(u.tagName === "A" && u.href);
739
+ }, re = l.useRef(!1), ze = H((u) => {
740
+ y && !re.current && F && g.current && u.key === " " && (re.current = !0, g.current.stop(u, () => {
741
+ g.current.start(u);
742
+ })), u.target === u.currentTarget && oe() && u.key === " " && u.preventDefault(), d && d(u), u.target === u.currentTarget && oe() && u.key === "Enter" && !f && (u.preventDefault(), T && T(u));
743
+ }), Ae = H((u) => {
744
+ y && u.key === " " && g.current && F && !u.defaultPrevented && (re.current = !1, g.current.stop(u, () => {
745
+ g.current.pulsate(u);
746
+ })), E && E(u), T && u.target === u.currentTarget && oe() && u.key === " " && !u.defaultPrevented && T(u);
747
+ });
748
+ let W = p;
749
+ W === "button" && (w.href || w.to) && (W = x);
750
+ const A = {};
751
+ W === "button" ? (A.type = I === void 0 ? "button" : I, A.disabled = f) : (!w.href && !w.to && (A.role = "button"), f && (A["aria-disabled"] = f));
752
+ const Xe = ye(o, Le, z);
753
+ process.env.NODE_ENV !== "production" && l.useEffect(() => {
754
+ ne && !g.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(`
755
+ `));
756
+ }, [ne]);
757
+ const he = Y({}, a, {
758
+ centerRipple: i,
759
+ component: p,
760
+ disabled: f,
761
+ disableRipple: h,
762
+ disableTouchRipple: R,
763
+ focusRipple: y,
764
+ tabIndex: V,
765
+ focusVisible: F
766
+ }), Ye = kt(he);
767
+ return /* @__PURE__ */ Je(St, Y({
768
+ as: W,
769
+ className: v(Ye.root, c),
770
+ ownerState: he,
771
+ onBlur: je,
772
+ onClick: T,
773
+ onContextMenu: Fe,
774
+ onFocus: Ke,
775
+ onKeyDown: ze,
776
+ onKeyUp: Ae,
777
+ onMouseDown: Ie,
778
+ onMouseLeave: Oe,
779
+ onMouseUp: Se,
780
+ onDragLeave: ke,
781
+ onTouchEnd: $e,
782
+ onTouchMove: Ue,
783
+ onTouchStart: _e,
784
+ ref: Xe,
785
+ tabIndex: f ? -1 : V,
786
+ type: I
787
+ }, A, w, {
788
+ children: [s, ne ? (
789
+ /* TouchRipple is only needed client-side, x2 boost on the server. */
790
+ /* @__PURE__ */ $(we, Y({
791
+ ref: Pe,
792
+ center: i
793
+ }, N))
794
+ ) : null]
795
+ }));
796
+ });
797
+ process.env.NODE_ENV !== "production" && (Ot.propTypes = {
798
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
799
+ // │ These PropTypes are generated from the TypeScript type definitions. │
800
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
801
+ // └─────────────────────────────────────────────────────────────────────┘
802
+ /**
803
+ * A ref for imperative actions.
804
+ * It currently only supports `focusVisible()` action.
805
+ */
806
+ action: it,
807
+ /**
808
+ * If `true`, the ripples are centered.
809
+ * They won't start at the cursor interaction position.
810
+ * @default false
811
+ */
812
+ centerRipple: n.bool,
813
+ /**
814
+ * The content of the component.
815
+ */
816
+ children: n.node,
817
+ /**
818
+ * Override or extend the styles applied to the component.
819
+ */
820
+ classes: n.object,
821
+ /**
822
+ * @ignore
823
+ */
824
+ className: n.string,
825
+ /**
826
+ * The component used for the root node.
827
+ * Either a string to use a HTML element or a component.
828
+ */
829
+ component: rt,
830
+ /**
831
+ * If `true`, the component is disabled.
832
+ * @default false
833
+ */
834
+ disabled: n.bool,
835
+ /**
836
+ * If `true`, the ripple effect is disabled.
837
+ *
838
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
839
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
840
+ * @default false
841
+ */
842
+ disableRipple: n.bool,
843
+ /**
844
+ * If `true`, the touch ripple effect is disabled.
845
+ * @default false
846
+ */
847
+ disableTouchRipple: n.bool,
848
+ /**
849
+ * If `true`, the base button will have a keyboard focus ripple.
850
+ * @default false
851
+ */
852
+ focusRipple: n.bool,
853
+ /**
854
+ * This prop can help identify which element has keyboard focus.
855
+ * The class name will be applied when the element gains the focus through keyboard interaction.
856
+ * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
857
+ * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
858
+ * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
859
+ * if needed.
860
+ */
861
+ focusVisibleClassName: n.string,
862
+ /**
863
+ * @ignore
864
+ */
865
+ href: n.any,
866
+ /**
867
+ * The component used to render a link when the `href` prop is provided.
868
+ * @default 'a'
869
+ */
870
+ LinkComponent: n.elementType,
871
+ /**
872
+ * @ignore
873
+ */
874
+ onBlur: n.func,
875
+ /**
876
+ * @ignore
877
+ */
878
+ onClick: n.func,
879
+ /**
880
+ * @ignore
881
+ */
882
+ onContextMenu: n.func,
883
+ /**
884
+ * @ignore
885
+ */
886
+ onDragLeave: n.func,
887
+ /**
888
+ * @ignore
889
+ */
890
+ onFocus: n.func,
891
+ /**
892
+ * Callback fired when the component is focused with a keyboard.
893
+ * We trigger a `onFocus` callback too.
894
+ */
895
+ onFocusVisible: n.func,
896
+ /**
897
+ * @ignore
898
+ */
899
+ onKeyDown: n.func,
900
+ /**
901
+ * @ignore
902
+ */
903
+ onKeyUp: n.func,
904
+ /**
905
+ * @ignore
906
+ */
907
+ onMouseDown: n.func,
908
+ /**
909
+ * @ignore
910
+ */
911
+ onMouseLeave: n.func,
912
+ /**
913
+ * @ignore
914
+ */
915
+ onMouseUp: n.func,
916
+ /**
917
+ * @ignore
918
+ */
919
+ onTouchEnd: n.func,
920
+ /**
921
+ * @ignore
922
+ */
923
+ onTouchMove: n.func,
924
+ /**
925
+ * @ignore
926
+ */
927
+ onTouchStart: n.func,
928
+ /**
929
+ * The system prop that allows defining system overrides as well as additional CSS styles.
930
+ */
931
+ sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
932
+ /**
933
+ * @default 0
934
+ */
935
+ tabIndex: n.number,
936
+ /**
937
+ * Props applied to the `TouchRipple` element.
938
+ */
939
+ TouchRippleProps: n.object,
940
+ /**
941
+ * A ref that points to the `TouchRipple` element.
942
+ */
943
+ touchRippleRef: n.oneOfType([n.func, n.shape({
944
+ current: n.shape({
945
+ pulsate: n.func.isRequired,
946
+ start: n.func.isRequired,
947
+ stop: n.func.isRequired
948
+ })
949
+ })]),
950
+ /**
951
+ * @ignore
952
+ */
953
+ type: n.oneOfType([n.oneOf(["button", "reset", "submit"]), n.string])
954
+ });
955
+ export {
956
+ Ot as B,
957
+ Re as T,
958
+ Rt as _,
959
+ ye as a,
960
+ H as b,
961
+ gt as c,
962
+ ct as d,
963
+ rt as e,
964
+ it as r,
965
+ st as s,
966
+ tt as u
967
+ };