@carto/ps-react-ui 1.3.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/index.cjs +27 -0
  2. package/dist/index.js +878 -0
  3. package/dist/types/components/index.d.ts +4 -23
  4. package/dist/types/components/list-data/index.d.ts +2 -0
  5. package/dist/types/components/{list/list.component.d.ts → list-data/list-data.component.d.ts} +7 -6
  6. package/dist/types/components/list-data/list-data.stories.d.ts +53 -0
  7. package/dist/types/components/list-data/list-data.styles.d.ts +6 -0
  8. package/dist/types/components/{list → list-data}/types.d.ts +7 -7
  9. package/dist/types/components/map/components/deckgl-map/deckgl-maps.component.d.ts +2 -0
  10. package/dist/types/components/map/components/deckgl-map/deckgl-maps.stories.d.ts +83 -0
  11. package/dist/types/components/map/components/google-maps/google-maps.component.d.ts +2 -0
  12. package/dist/types/components/map/components/google-maps/google-maps.stories.d.ts +85 -0
  13. package/dist/types/components/map/index.d.ts +4 -0
  14. package/dist/types/components/map/map.component.d.ts +2 -0
  15. package/dist/types/components/map/map.stories.d.ts +92 -0
  16. package/dist/types/components/map/types.d.ts +67 -0
  17. package/dist/types/components/scroll-to-anchor/index.d.ts +2 -0
  18. package/dist/types/components/scroll-to-anchor/scroll-to-anchor.component.d.ts +34 -0
  19. package/dist/types/components/scroll-to-anchor/scroll-to-anchor.stories.d.ts +42 -0
  20. package/dist/types/components/scroll-to-anchor/scroll-to-anchor.styles.d.ts +13 -0
  21. package/dist/types/components/scroll-to-anchor/types.d.ts +10 -0
  22. package/dist/types/components/section-container/index.d.ts +2 -0
  23. package/dist/types/components/section-container/section-container.component.d.ts +1 -0
  24. package/dist/types/components/section-container/section-container.stories.d.ts +5 -0
  25. package/dist/types/components/section-container/section-container.styles.d.ts +32 -0
  26. package/dist/types/components/section-container/types.d.ts +2 -1
  27. package/dist/types/components/tabs-to-anchor/index.d.ts +2 -0
  28. package/dist/types/components/tabs-to-anchor/tabs-to-anchor.component.d.ts +1 -1
  29. package/dist/types/components/tabs-to-anchor/tabs-to-anchor.stories.d.ts +30 -0
  30. package/dist/types/components/tabs-to-anchor/tabs-to-anchor.styles.d.ts +23 -0
  31. package/dist/types/components/tabs-to-anchor/types.d.ts +2 -1
  32. package/dist/types/index.d.ts +1 -1
  33. package/dist/types/utils/create-select-options-from-array.utils.d.ts +5 -0
  34. package/dist/types/utils/index.d.ts +1 -0
  35. package/package.json +49 -36
  36. package/dist/ps-react-ui.js +0 -21289
  37. package/dist/types/components/button-warning/button-warning.component.d.ts +0 -31
  38. package/dist/types/components/button-warning/icon-button-warning.d.ts +0 -31
  39. package/dist/types/components/button-warning/styles.d.ts +0 -29
  40. package/dist/types/components/button-warning/types.d.ts +0 -16
  41. package/dist/types/components/grouped-chips/grouped-chips.component.d.ts +0 -30
  42. package/dist/types/components/grouped-chips/types.d.ts +0 -13
  43. package/dist/types/components/input-file/input-file.component.d.ts +0 -45
  44. package/dist/types/components/input-file/types.d.ts +0 -17
  45. package/dist/types/components/selects/autocomplete/autocomplete-select/autocomplete-select.component.d.ts +0 -39
  46. package/dist/types/components/selects/autocomplete/autocomplete-select-simple/autocomplete-select-simple.component.d.ts +0 -35
  47. package/dist/types/components/selects/autocomplete/commons/autocomplete-select-option.component.d.ts +0 -2
  48. package/dist/types/components/selects/autocomplete/commons/listbox-select.component.d.ts +0 -19
  49. package/dist/types/components/selects/simple-select/create-options-from-array.utils.d.ts +0 -2
  50. package/dist/types/components/selects/simple-select/simple-select.component.d.ts +0 -25
  51. package/dist/types/components/selects/types.d.ts +0 -36
  52. package/dist/types/components/table/components/table-body.component.d.ts +0 -32
  53. package/dist/types/components/table/components/table-cell.component.d.ts +0 -31
  54. package/dist/types/components/table/components/table-header.component.d.ts +0 -27
  55. package/dist/types/components/table/table.component.d.ts +0 -39
  56. package/dist/types/components/table/types.d.ts +0 -90
  57. package/dist/types/components/table/utils.d.ts +0 -4
  58. package/dist/types/styling/index.d.ts +0 -1
  59. package/dist/types/styling/types.d.ts +0 -4
package/dist/index.js ADDED
@@ -0,0 +1,878 @@
1
+ import Fe, { useState as pr, useMemo as hr, useRef as z, useEffect as je, useCallback as Oe } from "react";
2
+ import { Box as D, Typography as ne, List as gr, ListItemButton as yr, ListItemText as mr, Button as br, styled as De, Tabs as Er } from "@mui/material";
3
+ var te = { exports: {} }, L = {};
4
+ /**
5
+ * @license React
6
+ * react-jsx-runtime.production.min.js
7
+ *
8
+ * Copyright (c) Facebook, Inc. and its affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */
13
+ var Pe;
14
+ function Rr() {
15
+ if (Pe)
16
+ return L;
17
+ Pe = 1;
18
+ var n = Fe, o = Symbol.for("react.element"), f = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, x = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, T = { key: !0, ref: !0, __self: !0, __source: !0 };
19
+ function C(b, d, m) {
20
+ var g, S = {}, h = null, _ = null;
21
+ m !== void 0 && (h = "" + m), d.key !== void 0 && (h = "" + d.key), d.ref !== void 0 && (_ = d.ref);
22
+ for (g in d)
23
+ u.call(d, g) && !T.hasOwnProperty(g) && (S[g] = d[g]);
24
+ if (b && b.defaultProps)
25
+ for (g in d = b.defaultProps, d)
26
+ S[g] === void 0 && (S[g] = d[g]);
27
+ return { $$typeof: o, type: b, key: h, ref: _, props: S, _owner: x.current };
28
+ }
29
+ return L.Fragment = f, L.jsx = C, L.jsxs = C, L;
30
+ }
31
+ var Y = {};
32
+ /**
33
+ * @license React
34
+ * react-jsx-runtime.development.js
35
+ *
36
+ * Copyright (c) Facebook, Inc. and its affiliates.
37
+ *
38
+ * This source code is licensed under the MIT license found in the
39
+ * LICENSE file in the root directory of this source tree.
40
+ */
41
+ var ke;
42
+ function _r() {
43
+ return ke || (ke = 1, process.env.NODE_ENV !== "production" && function() {
44
+ var n = Fe, o = Symbol.for("react.element"), f = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), C = Symbol.for("react.provider"), b = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), O = Symbol.iterator, w = "@@iterator";
45
+ function J(e) {
46
+ if (e === null || typeof e != "object")
47
+ return null;
48
+ var r = O && e[O] || e[w];
49
+ return typeof r == "function" ? r : null;
50
+ }
51
+ var A = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
52
+ function E(e) {
53
+ {
54
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
55
+ t[a - 1] = arguments[a];
56
+ Ie("error", e, t);
57
+ }
58
+ }
59
+ function Ie(e, r, t) {
60
+ {
61
+ var a = A.ReactDebugCurrentFrame, l = a.getStackAddendum();
62
+ l !== "" && (r += "%s", t = t.concat([l]));
63
+ var c = t.map(function(s) {
64
+ return String(s);
65
+ });
66
+ c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
67
+ }
68
+ }
69
+ var $e = !1, We = !1, Me = !1, Le = !1, Ye = !1, ae;
70
+ ae = Symbol.for("react.module.reference");
71
+ function Ve(e) {
72
+ return !!(typeof e == "string" || typeof e == "function" || e === u || e === T || Ye || e === x || e === m || e === g || Le || e === _ || $e || We || Me || typeof e == "object" && e !== null && (e.$$typeof === h || e.$$typeof === S || e.$$typeof === C || e.$$typeof === b || e.$$typeof === d || // This needs to include all possible module reference object
73
+ // types supported by any Flight configuration anywhere since
74
+ // we don't know which Flight build this will end up being used
75
+ // with.
76
+ e.$$typeof === ae || e.getModuleId !== void 0));
77
+ }
78
+ function Ne(e, r, t) {
79
+ var a = e.displayName;
80
+ if (a)
81
+ return a;
82
+ var l = r.displayName || r.name || "";
83
+ return l !== "" ? t + "(" + l + ")" : t;
84
+ }
85
+ function oe(e) {
86
+ return e.displayName || "Context";
87
+ }
88
+ function P(e) {
89
+ if (e == null)
90
+ return null;
91
+ if (typeof e.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
92
+ return e.displayName || e.name || null;
93
+ if (typeof e == "string")
94
+ return e;
95
+ switch (e) {
96
+ case u:
97
+ return "Fragment";
98
+ case f:
99
+ return "Portal";
100
+ case T:
101
+ return "Profiler";
102
+ case x:
103
+ return "StrictMode";
104
+ case m:
105
+ return "Suspense";
106
+ case g:
107
+ return "SuspenseList";
108
+ }
109
+ if (typeof e == "object")
110
+ switch (e.$$typeof) {
111
+ case b:
112
+ var r = e;
113
+ return oe(r) + ".Consumer";
114
+ case C:
115
+ var t = e;
116
+ return oe(t._context) + ".Provider";
117
+ case d:
118
+ return Ne(e, e.render, "ForwardRef");
119
+ case S:
120
+ var a = e.displayName || null;
121
+ return a !== null ? a : P(e.type) || "Memo";
122
+ case h: {
123
+ var l = e, c = l._payload, s = l._init;
124
+ try {
125
+ return P(s(c));
126
+ } catch {
127
+ return null;
128
+ }
129
+ }
130
+ }
131
+ return null;
132
+ }
133
+ var F = Object.assign, W = 0, ie, se, ue, le, ce, fe, de;
134
+ function ve() {
135
+ }
136
+ ve.__reactDisabledLog = !0;
137
+ function Be() {
138
+ {
139
+ if (W === 0) {
140
+ ie = console.log, se = console.info, ue = console.warn, le = console.error, ce = console.group, fe = console.groupCollapsed, de = console.groupEnd;
141
+ var e = {
142
+ configurable: !0,
143
+ enumerable: !0,
144
+ value: ve,
145
+ writable: !0
146
+ };
147
+ Object.defineProperties(console, {
148
+ info: e,
149
+ log: e,
150
+ warn: e,
151
+ error: e,
152
+ group: e,
153
+ groupCollapsed: e,
154
+ groupEnd: e
155
+ });
156
+ }
157
+ W++;
158
+ }
159
+ }
160
+ function Ue() {
161
+ {
162
+ if (W--, W === 0) {
163
+ var e = {
164
+ configurable: !0,
165
+ enumerable: !0,
166
+ writable: !0
167
+ };
168
+ Object.defineProperties(console, {
169
+ log: F({}, e, {
170
+ value: ie
171
+ }),
172
+ info: F({}, e, {
173
+ value: se
174
+ }),
175
+ warn: F({}, e, {
176
+ value: ue
177
+ }),
178
+ error: F({}, e, {
179
+ value: le
180
+ }),
181
+ group: F({}, e, {
182
+ value: ce
183
+ }),
184
+ groupCollapsed: F({}, e, {
185
+ value: fe
186
+ }),
187
+ groupEnd: F({}, e, {
188
+ value: de
189
+ })
190
+ });
191
+ }
192
+ W < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
193
+ }
194
+ }
195
+ var G = A.ReactCurrentDispatcher, K;
196
+ function V(e, r, t) {
197
+ {
198
+ if (K === void 0)
199
+ try {
200
+ throw Error();
201
+ } catch (l) {
202
+ var a = l.stack.trim().match(/\n( *(at )?)/);
203
+ K = a && a[1] || "";
204
+ }
205
+ return `
206
+ ` + K + e;
207
+ }
208
+ }
209
+ var X = !1, N;
210
+ {
211
+ var qe = typeof WeakMap == "function" ? WeakMap : Map;
212
+ N = new qe();
213
+ }
214
+ function pe(e, r) {
215
+ if (!e || X)
216
+ return "";
217
+ {
218
+ var t = N.get(e);
219
+ if (t !== void 0)
220
+ return t;
221
+ }
222
+ var a;
223
+ X = !0;
224
+ var l = Error.prepareStackTrace;
225
+ Error.prepareStackTrace = void 0;
226
+ var c;
227
+ c = G.current, G.current = null, Be();
228
+ try {
229
+ if (r) {
230
+ var s = function() {
231
+ throw Error();
232
+ };
233
+ if (Object.defineProperty(s.prototype, "props", {
234
+ set: function() {
235
+ throw Error();
236
+ }
237
+ }), typeof Reflect == "object" && Reflect.construct) {
238
+ try {
239
+ Reflect.construct(s, []);
240
+ } catch (k) {
241
+ a = k;
242
+ }
243
+ Reflect.construct(e, [], s);
244
+ } else {
245
+ try {
246
+ s.call();
247
+ } catch (k) {
248
+ a = k;
249
+ }
250
+ e.call(s.prototype);
251
+ }
252
+ } else {
253
+ try {
254
+ throw Error();
255
+ } catch (k) {
256
+ a = k;
257
+ }
258
+ e();
259
+ }
260
+ } catch (k) {
261
+ if (k && a && typeof k.stack == "string") {
262
+ for (var i = k.stack.split(`
263
+ `), R = a.stack.split(`
264
+ `), v = i.length - 1, p = R.length - 1; v >= 1 && p >= 0 && i[v] !== R[p]; )
265
+ p--;
266
+ for (; v >= 1 && p >= 0; v--, p--)
267
+ if (i[v] !== R[p]) {
268
+ if (v !== 1 || p !== 1)
269
+ do
270
+ if (v--, p--, p < 0 || i[v] !== R[p]) {
271
+ var j = `
272
+ ` + i[v].replace(" at new ", " at ");
273
+ return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && N.set(e, j), j;
274
+ }
275
+ while (v >= 1 && p >= 0);
276
+ break;
277
+ }
278
+ }
279
+ } finally {
280
+ X = !1, G.current = c, Ue(), Error.prepareStackTrace = l;
281
+ }
282
+ var $ = e ? e.displayName || e.name : "", we = $ ? V($) : "";
283
+ return typeof e == "function" && N.set(e, we), we;
284
+ }
285
+ function ze(e, r, t) {
286
+ return pe(e, !1);
287
+ }
288
+ function Je(e) {
289
+ var r = e.prototype;
290
+ return !!(r && r.isReactComponent);
291
+ }
292
+ function B(e, r, t) {
293
+ if (e == null)
294
+ return "";
295
+ if (typeof e == "function")
296
+ return pe(e, Je(e));
297
+ if (typeof e == "string")
298
+ return V(e);
299
+ switch (e) {
300
+ case m:
301
+ return V("Suspense");
302
+ case g:
303
+ return V("SuspenseList");
304
+ }
305
+ if (typeof e == "object")
306
+ switch (e.$$typeof) {
307
+ case d:
308
+ return ze(e.render);
309
+ case S:
310
+ return B(e.type, r, t);
311
+ case h: {
312
+ var a = e, l = a._payload, c = a._init;
313
+ try {
314
+ return B(c(l), r, t);
315
+ } catch {
316
+ }
317
+ }
318
+ }
319
+ return "";
320
+ }
321
+ var U = Object.prototype.hasOwnProperty, he = {}, ge = A.ReactDebugCurrentFrame;
322
+ function q(e) {
323
+ if (e) {
324
+ var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
325
+ ge.setExtraStackFrame(t);
326
+ } else
327
+ ge.setExtraStackFrame(null);
328
+ }
329
+ function Ge(e, r, t, a, l) {
330
+ {
331
+ var c = Function.call.bind(U);
332
+ for (var s in e)
333
+ if (c(e, s)) {
334
+ var i = void 0;
335
+ try {
336
+ if (typeof e[s] != "function") {
337
+ var R = Error((a || "React class") + ": " + t + " type `" + s + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[s] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
338
+ throw R.name = "Invariant Violation", R;
339
+ }
340
+ i = e[s](r, s, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
341
+ } catch (v) {
342
+ i = v;
343
+ }
344
+ i && !(i instanceof Error) && (q(l), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", t, s, typeof i), q(null)), i instanceof Error && !(i.message in he) && (he[i.message] = !0, q(l), E("Failed %s type: %s", t, i.message), q(null));
345
+ }
346
+ }
347
+ }
348
+ var Ke = Array.isArray;
349
+ function H(e) {
350
+ return Ke(e);
351
+ }
352
+ function Xe(e) {
353
+ {
354
+ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
355
+ return t;
356
+ }
357
+ }
358
+ function He(e) {
359
+ try {
360
+ return ye(e), !1;
361
+ } catch {
362
+ return !0;
363
+ }
364
+ }
365
+ function ye(e) {
366
+ return "" + e;
367
+ }
368
+ function me(e) {
369
+ if (He(e))
370
+ return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xe(e)), ye(e);
371
+ }
372
+ var M = A.ReactCurrentOwner, Ze = {
373
+ key: !0,
374
+ ref: !0,
375
+ __self: !0,
376
+ __source: !0
377
+ }, be, Ee, Z;
378
+ Z = {};
379
+ function Qe(e) {
380
+ if (U.call(e, "ref")) {
381
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
382
+ if (r && r.isReactWarning)
383
+ return !1;
384
+ }
385
+ return e.ref !== void 0;
386
+ }
387
+ function er(e) {
388
+ if (U.call(e, "key")) {
389
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
390
+ if (r && r.isReactWarning)
391
+ return !1;
392
+ }
393
+ return e.key !== void 0;
394
+ }
395
+ function rr(e, r) {
396
+ if (typeof e.ref == "string" && M.current && r && M.current.stateNode !== r) {
397
+ var t = P(M.current.type);
398
+ Z[t] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', P(M.current.type), e.ref), Z[t] = !0);
399
+ }
400
+ }
401
+ function tr(e, r) {
402
+ {
403
+ var t = function() {
404
+ be || (be = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
405
+ };
406
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
407
+ get: t,
408
+ configurable: !0
409
+ });
410
+ }
411
+ }
412
+ function nr(e, r) {
413
+ {
414
+ var t = function() {
415
+ Ee || (Ee = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
416
+ };
417
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
418
+ get: t,
419
+ configurable: !0
420
+ });
421
+ }
422
+ }
423
+ var ar = function(e, r, t, a, l, c, s) {
424
+ var i = {
425
+ // This tag allows us to uniquely identify this as a React Element
426
+ $$typeof: o,
427
+ // Built-in properties that belong on the element
428
+ type: e,
429
+ key: r,
430
+ ref: t,
431
+ props: s,
432
+ // Record the component responsible for creating this element.
433
+ _owner: c
434
+ };
435
+ return i._store = {}, Object.defineProperty(i._store, "validated", {
436
+ configurable: !1,
437
+ enumerable: !1,
438
+ writable: !0,
439
+ value: !1
440
+ }), Object.defineProperty(i, "_self", {
441
+ configurable: !1,
442
+ enumerable: !1,
443
+ writable: !1,
444
+ value: a
445
+ }), Object.defineProperty(i, "_source", {
446
+ configurable: !1,
447
+ enumerable: !1,
448
+ writable: !1,
449
+ value: l
450
+ }), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
451
+ };
452
+ function or(e, r, t, a, l) {
453
+ {
454
+ var c, s = {}, i = null, R = null;
455
+ t !== void 0 && (me(t), i = "" + t), er(r) && (me(r.key), i = "" + r.key), Qe(r) && (R = r.ref, rr(r, l));
456
+ for (c in r)
457
+ U.call(r, c) && !Ze.hasOwnProperty(c) && (s[c] = r[c]);
458
+ if (e && e.defaultProps) {
459
+ var v = e.defaultProps;
460
+ for (c in v)
461
+ s[c] === void 0 && (s[c] = v[c]);
462
+ }
463
+ if (i || R) {
464
+ var p = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
465
+ i && tr(s, p), R && nr(s, p);
466
+ }
467
+ return ar(e, i, R, l, a, M.current, s);
468
+ }
469
+ }
470
+ var Q = A.ReactCurrentOwner, Re = A.ReactDebugCurrentFrame;
471
+ function I(e) {
472
+ if (e) {
473
+ var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
474
+ Re.setExtraStackFrame(t);
475
+ } else
476
+ Re.setExtraStackFrame(null);
477
+ }
478
+ var ee;
479
+ ee = !1;
480
+ function re(e) {
481
+ return typeof e == "object" && e !== null && e.$$typeof === o;
482
+ }
483
+ function _e() {
484
+ {
485
+ if (Q.current) {
486
+ var e = P(Q.current.type);
487
+ if (e)
488
+ return `
489
+
490
+ Check the render method of \`` + e + "`.";
491
+ }
492
+ return "";
493
+ }
494
+ }
495
+ function ir(e) {
496
+ {
497
+ if (e !== void 0) {
498
+ var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
499
+ return `
500
+
501
+ Check your code at ` + r + ":" + t + ".";
502
+ }
503
+ return "";
504
+ }
505
+ }
506
+ var xe = {};
507
+ function sr(e) {
508
+ {
509
+ var r = _e();
510
+ if (!r) {
511
+ var t = typeof e == "string" ? e : e.displayName || e.name;
512
+ t && (r = `
513
+
514
+ Check the top-level render call using <` + t + ">.");
515
+ }
516
+ return r;
517
+ }
518
+ }
519
+ function Te(e, r) {
520
+ {
521
+ if (!e._store || e._store.validated || e.key != null)
522
+ return;
523
+ e._store.validated = !0;
524
+ var t = sr(r);
525
+ if (xe[t])
526
+ return;
527
+ xe[t] = !0;
528
+ var a = "";
529
+ e && e._owner && e._owner !== Q.current && (a = " It was passed a child from " + P(e._owner.type) + "."), I(e), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), I(null);
530
+ }
531
+ }
532
+ function Ce(e, r) {
533
+ {
534
+ if (typeof e != "object")
535
+ return;
536
+ if (H(e))
537
+ for (var t = 0; t < e.length; t++) {
538
+ var a = e[t];
539
+ re(a) && Te(a, r);
540
+ }
541
+ else if (re(e))
542
+ e._store && (e._store.validated = !0);
543
+ else if (e) {
544
+ var l = J(e);
545
+ if (typeof l == "function" && l !== e.entries)
546
+ for (var c = l.call(e), s; !(s = c.next()).done; )
547
+ re(s.value) && Te(s.value, r);
548
+ }
549
+ }
550
+ }
551
+ function ur(e) {
552
+ {
553
+ var r = e.type;
554
+ if (r == null || typeof r == "string")
555
+ return;
556
+ var t;
557
+ if (typeof r == "function")
558
+ t = r.propTypes;
559
+ else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
560
+ // Inner props are checked in the reconciler.
561
+ r.$$typeof === S))
562
+ t = r.propTypes;
563
+ else
564
+ return;
565
+ if (t) {
566
+ var a = P(r);
567
+ Ge(t, e.props, "prop", a, e);
568
+ } else if (r.PropTypes !== void 0 && !ee) {
569
+ ee = !0;
570
+ var l = P(r);
571
+ E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", l || "Unknown");
572
+ }
573
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
574
+ }
575
+ }
576
+ function lr(e) {
577
+ {
578
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
579
+ var a = r[t];
580
+ if (a !== "children" && a !== "key") {
581
+ I(e), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), I(null);
582
+ break;
583
+ }
584
+ }
585
+ e.ref !== null && (I(e), E("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
586
+ }
587
+ }
588
+ function Se(e, r, t, a, l, c) {
589
+ {
590
+ var s = Ve(e);
591
+ if (!s) {
592
+ var i = "";
593
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
594
+ var R = ir(l);
595
+ R ? i += R : i += _e();
596
+ var v;
597
+ e === null ? v = "null" : H(e) ? v = "array" : e !== void 0 && e.$$typeof === o ? (v = "<" + (P(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : v = typeof e, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", v, i);
598
+ }
599
+ var p = or(e, r, t, l, c);
600
+ if (p == null)
601
+ return p;
602
+ if (s) {
603
+ var j = r.children;
604
+ if (j !== void 0)
605
+ if (a)
606
+ if (H(j)) {
607
+ for (var $ = 0; $ < j.length; $++)
608
+ Ce(j[$], e);
609
+ Object.freeze && Object.freeze(j);
610
+ } else
611
+ E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
612
+ else
613
+ Ce(j, e);
614
+ }
615
+ return e === u ? lr(p) : ur(p), p;
616
+ }
617
+ }
618
+ function cr(e, r, t) {
619
+ return Se(e, r, t, !0);
620
+ }
621
+ function fr(e, r, t) {
622
+ return Se(e, r, t, !1);
623
+ }
624
+ var dr = fr, vr = cr;
625
+ Y.Fragment = u, Y.jsx = dr, Y.jsxs = vr;
626
+ }()), Y;
627
+ }
628
+ process.env.NODE_ENV === "production" ? te.exports = Rr() : te.exports = _r();
629
+ var y = te.exports;
630
+ const xr = {
631
+ box: {
632
+ marginLeft: ({ spacing: n }) => n(1)
633
+ }
634
+ };
635
+ function Dr({
636
+ items: n,
637
+ itemsToShow: o = 10,
638
+ label: f,
639
+ ListProps: u,
640
+ texts: { showMore: x = "View all", showLess: T = "Collapse list" } = {},
641
+ unit: C,
642
+ formatter: b,
643
+ onRowClick: d
644
+ }) {
645
+ const [m, g] = pr(!0), S = () => {
646
+ g(!m);
647
+ }, h = (w) => b ? b(w) : w, _ = hr(() => {
648
+ const w = m ? o : n.length;
649
+ return n.slice(0, w);
650
+ }, [n, o, m]), O = n.length > o;
651
+ return /* @__PURE__ */ y.jsxs(D, { width: "100%", height: "auto", children: [
652
+ f && /* @__PURE__ */ y.jsx(ne, { variant: "caption", color: "textSecondary", gutterBottom: !0, children: f }),
653
+ /* @__PURE__ */ y.jsx(gr, { ...u, component: "ul", children: _.map((w) => /* @__PURE__ */ y.jsxs(
654
+ yr,
655
+ {
656
+ divider: !0,
657
+ onClick: (J) => d?.(J, w),
658
+ children: [
659
+ /* @__PURE__ */ y.jsx(mr, { primary: w.name }),
660
+ /* @__PURE__ */ y.jsx(Tr, { value: h(w.value), unit: C })
661
+ ]
662
+ },
663
+ w.id
664
+ )) }),
665
+ O && /* @__PURE__ */ y.jsx(
666
+ br,
667
+ {
668
+ variant: "text",
669
+ color: "primary",
670
+ size: "small",
671
+ onClick: S,
672
+ children: m ? x : T
673
+ }
674
+ )
675
+ ] });
676
+ }
677
+ function Tr({
678
+ value: n,
679
+ unit: o
680
+ }) {
681
+ return /* @__PURE__ */ y.jsx(D, { sx: xr.box, children: /* @__PURE__ */ y.jsxs(ne, { variant: "body2", align: "right", noWrap: !0, children: [
682
+ o,
683
+ " ",
684
+ n
685
+ ] }) });
686
+ }
687
+ const Cr = {
688
+ contentBox: {
689
+ paddingBottom: 2,
690
+ paddingX: 2
691
+ }
692
+ }, Sr = De(D, {
693
+ shouldForwardProp: (n) => n !== "scrollMarginTop"
694
+ })(({ scrollMarginTop: n }) => ({
695
+ height: "auto",
696
+ scrollMarginTop: n,
697
+ width: "100%"
698
+ })), wr = De(D, {
699
+ shouldForwardProp: (n) => n !== "scrollMarginTop"
700
+ })(({ scrollMarginTop: n, theme: { spacing: o, palette: f } }) => ({
701
+ alignItems: "center",
702
+ backgroundColor: f.grey[100],
703
+ display: "flex",
704
+ height: o(3),
705
+ justifyContent: "center",
706
+ position: "sticky",
707
+ top: n,
708
+ width: "100%",
709
+ zIndex: 1
710
+ }));
711
+ function Ar({
712
+ title: n,
713
+ id: o,
714
+ anchor: f = !1,
715
+ scrollMarginTop: u = 0,
716
+ children: x,
717
+ BoxProps: T
718
+ }) {
719
+ return /* @__PURE__ */ y.jsxs(
720
+ Sr,
721
+ {
722
+ scrollMarginTop: u,
723
+ id: o,
724
+ "data-anchor": f,
725
+ ...T,
726
+ children: [
727
+ /* @__PURE__ */ y.jsx(wr, { scrollMarginTop: u, children: /* @__PURE__ */ y.jsx(ne, { variant: "caption", children: n }) }),
728
+ /* @__PURE__ */ y.jsx(D, { sx: Cr.contentBox, children: /* @__PURE__ */ y.jsx(y.Fragment, { children: x }) })
729
+ ]
730
+ }
731
+ );
732
+ }
733
+ const jr = {
734
+ tabsWrapper: {
735
+ backgroundColor: ({ palette: n }) => n.background.paper,
736
+ left: 0,
737
+ position: "sticky",
738
+ top: 0,
739
+ width: "100%",
740
+ zIndex: 2,
741
+ "& .MuiTab-root:last-of-type": {
742
+ marginRight: 0
743
+ },
744
+ "& .MuiTab-textColorPrimary": {
745
+ color: ({ palette: n }) => n.text.primary,
746
+ "&.Mui-selected": {
747
+ color: ({ palette: n }) => n.primary.main
748
+ }
749
+ },
750
+ "& .MuiTabs-indicator.colorPrimary": {
751
+ backgroundColor: ({ palette: n }) => n.primary.main
752
+ }
753
+ }
754
+ };
755
+ function Ir({
756
+ children: n,
757
+ anchor: o,
758
+ TabsProps: f,
759
+ variant: u = "standard",
760
+ onChange: x
761
+ }) {
762
+ const T = (C, b) => {
763
+ C.preventDefault(), x?.(b);
764
+ };
765
+ return /* @__PURE__ */ y.jsx(D, { sx: jr.tabsWrapper, children: /* @__PURE__ */ y.jsx(
766
+ Er,
767
+ {
768
+ indicatorColor: "primary",
769
+ textColor: "primary",
770
+ "aria-label": "Explore sections",
771
+ ...f,
772
+ value: o,
773
+ variant: u,
774
+ onChange: T,
775
+ children: n
776
+ }
777
+ ) });
778
+ }
779
+ function Ae(n) {
780
+ var o, f, u = "";
781
+ if (typeof n == "string" || typeof n == "number")
782
+ u += n;
783
+ else if (typeof n == "object")
784
+ if (Array.isArray(n))
785
+ for (o = 0; o < n.length; o++)
786
+ n[o] && (f = Ae(n[o])) && (u && (u += " "), u += f);
787
+ else
788
+ for (o in n)
789
+ n[o] && (u && (u += " "), u += o);
790
+ return u;
791
+ }
792
+ function Or() {
793
+ for (var n, o, f = 0, u = ""; f < arguments.length; )
794
+ (n = arguments[f++]) && (o = Ae(n)) && (u && (u += " "), u += o);
795
+ return u;
796
+ }
797
+ const Pr = {
798
+ box: {
799
+ borderRadius: ({ spacing: n }) => `0 0 ${n(0.5)} ${n(0.5)}`,
800
+ flex: 1,
801
+ height: "100%",
802
+ margin: "0 auto",
803
+ maxWidth: ({ breakpoints: n }) => n.values.lg,
804
+ overflow: "auto",
805
+ position: "relative",
806
+ width: "100%"
807
+ }
808
+ };
809
+ function $r({
810
+ children: n,
811
+ currentAnchor: o,
812
+ BoxProps: f,
813
+ className: u,
814
+ timeout: x = 50,
815
+ onChange: T
816
+ }) {
817
+ const C = z(null), b = z([]), d = z(0), m = z(o);
818
+ je(() => {
819
+ const h = Array.from(
820
+ C.current?.querySelectorAll('[data-anchor="true"]') || []
821
+ );
822
+ if (b.current = [...h].reverse(), !b.current.length)
823
+ throw new Error(
824
+ 'initialization of ScrollToAnchor: Missing sections with data-anchor="true" attribute.'
825
+ );
826
+ }, []), je(() => {
827
+ const h = (_) => {
828
+ const O = C.current?.querySelector(`#${_}`);
829
+ if (!O) {
830
+ console.warn(
831
+ `Warning: navigation of ScrollToAnchor: the section you want to navigate to does not exist. To create it add the #${_} id property to an element.`
832
+ );
833
+ return;
834
+ }
835
+ if (O) {
836
+ O.scrollIntoView({ behavior: "smooth" });
837
+ const w = setInterval(() => {
838
+ O.offsetTop === d.current && (m.current = _, clearInterval(w));
839
+ }, x);
840
+ }
841
+ };
842
+ o !== m.current && h(o);
843
+ }, [o, x]);
844
+ const g = Oe(() => {
845
+ const _ = b.current.find((O) => d.current >= O.offsetTop)?.id || "";
846
+ m.current !== _ && (m.current = _, T(_));
847
+ }, [T]), S = Oe(
848
+ (h) => {
849
+ h.stopPropagation(), d.current = h.currentTarget.scrollTop, o === m.current && requestAnimationFrame(() => g());
850
+ },
851
+ [o, g]
852
+ );
853
+ return /* @__PURE__ */ y.jsx(
854
+ D,
855
+ {
856
+ ref: C,
857
+ sx: Pr.box,
858
+ ...f,
859
+ className: Or(u),
860
+ "data-scroller": !0,
861
+ onScroll: (h) => S(h),
862
+ children: n
863
+ }
864
+ );
865
+ }
866
+ function Wr(n) {
867
+ return n.map((o) => {
868
+ const f = o, u = String(o);
869
+ return { value: f, label: u };
870
+ });
871
+ }
872
+ export {
873
+ Dr as ListData,
874
+ $r as ScrollToAnchor,
875
+ Ar as SectionContainer,
876
+ Ir as TabsToAnchor,
877
+ Wr as createSelectOptionsFromArray
878
+ };