@aivenio/aquarium 2.16.0 → 2.18.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 (55) hide show
  1. package/dist/atoms.cjs +1965 -2435
  2. package/dist/atoms.mjs +1179 -1649
  3. package/dist/charts.cjs +266 -400
  4. package/dist/charts.mjs +238 -379
  5. package/dist/src/atoms/Skeleton/Skeleton.js +48 -0
  6. package/dist/src/icons/collapsePanel.d.ts +9 -0
  7. package/dist/src/icons/collapsePanel.js +11 -0
  8. package/dist/src/icons/expandPanel.d.ts +9 -0
  9. package/dist/src/icons/expandPanel.js +11 -0
  10. package/dist/src/icons/index.d.ts +2 -0
  11. package/dist/src/icons/index.js +3 -1
  12. package/dist/src/molecules/Avatar/Avatar.js +2 -2
  13. package/dist/src/molecules/Badge/Badge.js +2 -2
  14. package/dist/src/molecules/Banner/Banner.js +2 -2
  15. package/dist/src/molecules/Card/Card.js +2 -2
  16. package/dist/src/molecules/Card/Compact.js +2 -2
  17. package/dist/src/molecules/Checkbox/Checkbox.js +2 -2
  18. package/dist/src/molecules/Chip/Chip.js +2 -2
  19. package/dist/src/molecules/Combobox/Combobox.js +2 -2
  20. package/dist/src/molecules/DataList/DataList.js +3 -2
  21. package/dist/src/molecules/DataList/DataListComponents.js +3 -2
  22. package/dist/src/molecules/DataList/DataListGroup.js +7 -4
  23. package/dist/src/molecules/DataList/DataListSkeleton.js +2 -2
  24. package/dist/src/molecules/DataTable/DataTable.js +6 -4
  25. package/dist/src/molecules/DatePicker/Button.d.ts +6 -0
  26. package/dist/src/molecules/DatePicker/Button.js +44 -1
  27. package/dist/src/molecules/DatePicker/DatePicker.d.ts +7 -2
  28. package/dist/src/molecules/DatePicker/DatePicker.js +21 -8
  29. package/dist/src/molecules/DatePicker/DateRangePicker.d.ts +3 -2
  30. package/dist/src/molecules/DatePicker/DateRangePicker.js +18 -8
  31. package/dist/src/molecules/Input/Input.js +2 -2
  32. package/dist/src/molecules/ItemList/ItemList.js +11 -7
  33. package/dist/src/molecules/MultiInput/MultiInput.js +2 -2
  34. package/dist/src/molecules/MultiSelect/MultiSelect.js +2 -2
  35. package/dist/src/molecules/NativeSelect/NativeSelect.js +2 -2
  36. package/dist/src/molecules/ProgressBar/ProgressBar.js +2 -2
  37. package/dist/src/molecules/RadioButton/RadioButton.js +2 -2
  38. package/dist/src/molecules/Select/Select.js +2 -2
  39. package/dist/src/molecules/Switch/Switch.js +2 -2
  40. package/dist/src/molecules/Textarea/Textarea.js +2 -2
  41. package/dist/src/molecules/Timeline/Timeline.js +2 -2
  42. package/dist/src/molecules/index.d.ts +1 -1
  43. package/dist/src/molecules/index.js +2 -2
  44. package/dist/src/utils/createComponent.d.ts +3 -1
  45. package/dist/src/utils/form/Label/Label.js +2 -2
  46. package/dist/src/utils/table/types.d.ts +0 -1
  47. package/dist/src/utils/table/types.js +1 -3
  48. package/dist/styles.css +6 -0
  49. package/dist/system.cjs +3412 -4195
  50. package/dist/system.mjs +2629 -3412
  51. package/dist/tsconfig.module.tsbuildinfo +1 -1
  52. package/dist/types/tailwindGenerated.d.ts +1 -1
  53. package/package.json +48 -45
  54. package/dist/src/molecules/Skeleton/Skeleton.js +0 -29
  55. /package/dist/src/{molecules → atoms}/Skeleton/Skeleton.d.ts +0 -0
package/dist/charts.mjs CHANGED
@@ -1,35 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b ||= {})
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
-
33
1
  // src/charts/AreaChart/AreaChart.tsx
34
2
  import React8 from "react";
35
3
  import { Area as _Area, AreaChart as _AreaChart } from "recharts";
@@ -65,60 +33,49 @@ var classNames = (...args) => {
65
33
  };
66
34
 
67
35
  // src/charts/Container/Container.tsx
68
- var ResponsiveContainer = (_a) => {
69
- var _b = _a, {
70
- isBusy = false,
71
- busyLabel = "Loading...",
72
- className,
73
- style,
74
- width = "100%",
75
- height = "100%",
76
- minWidth,
77
- minHeight,
78
- maxHeight
79
- } = _b, props = __objRest(_b, [
80
- "isBusy",
81
- "busyLabel",
82
- "className",
83
- "style",
84
- "width",
85
- "height",
86
- "minWidth",
87
- "minHeight",
88
- "maxHeight"
89
- ]);
90
- return /* @__PURE__ */ React.createElement(
36
+ var ResponsiveContainer = ({
37
+ isBusy = false,
38
+ busyLabel = "Loading...",
39
+ className,
40
+ style,
41
+ width = "100%",
42
+ height = "100%",
43
+ minWidth,
44
+ minHeight,
45
+ maxHeight,
46
+ ...props
47
+ }) => /* @__PURE__ */ React.createElement(
48
+ "div",
49
+ {
50
+ "aria-busy": isBusy,
51
+ className: classNames(className, tw("relative")),
52
+ style: { ...style, width, height, minWidth, minHeight, maxHeight }
53
+ },
54
+ /* @__PURE__ */ React.createElement(
91
55
  "div",
92
56
  {
93
- "aria-busy": isBusy,
94
- className: classNames(className, tw("relative")),
95
- style: __spreadProps(__spreadValues({}, style), { width, height, minWidth, minHeight, maxHeight })
57
+ className: classNames(
58
+ tw("absolute inset-0 transition-colors flex items-center justify-center", {
59
+ "delay-300 z-40": isBusy
60
+ // z-40 is to make sure the loading element is on top of the chart because by default the chart is at higher stack level as mentioned in the comment below
61
+ })
62
+ ),
63
+ style: isBusy ? { backgroundColor: "rgba(255, 255, 255, 0.5)" } : {}
96
64
  },
97
65
  /* @__PURE__ */ React.createElement(
98
- "div",
66
+ "span",
99
67
  {
100
- className: classNames(
101
- tw("absolute inset-0 transition-colors flex items-center justify-center", {
102
- "delay-300 z-40": isBusy
103
- })
104
- ),
105
- style: isBusy ? { backgroundColor: "rgba(255, 255, 255, 0.5)" } : {}
68
+ "aria-hidden": !isBusy,
69
+ className: tw("rounded-full text-white bg-black typography-caption py-2 px-4 transition-all", {
70
+ "opacity-100 delay-300": isBusy,
71
+ "mb-[-20px] opacity-0": !isBusy
72
+ })
106
73
  },
107
- /* @__PURE__ */ React.createElement(
108
- "span",
109
- {
110
- "aria-hidden": !isBusy,
111
- className: tw("rounded-full text-white bg-black typography-caption py-2 px-4 transition-all", {
112
- "opacity-100 delay-300": isBusy,
113
- "mb-[-20px] opacity-0": !isBusy
114
- })
115
- },
116
- isBusy && busyLabel
117
- )
118
- ),
119
- /* @__PURE__ */ React.createElement(_ResponsiveContainer, __spreadValues({}, props))
120
- );
121
- };
74
+ isBusy && busyLabel
75
+ )
76
+ ),
77
+ /* @__PURE__ */ React.createElement(_ResponsiveContainer, { ...props })
78
+ );
122
79
 
123
80
  // src/charts/DefaultPalette/DefaultPalette.tsx
124
81
  import React2 from "react";
@@ -898,7 +855,7 @@ var DefaultPalette = ({ palette = "primary", children }) => {
898
855
  import React3 from "react";
899
856
  import { CartesianGrid as _CartesianGrid } from "recharts";
900
857
  var CartesianGrid = Object.assign(
901
- (props) => /* @__PURE__ */ React3.createElement(_CartesianGrid, __spreadProps(__spreadValues({ strokeDasharray: "3 3" }, props), { vertical: false })),
858
+ (props) => /* @__PURE__ */ React3.createElement(_CartesianGrid, { strokeDasharray: "3 3", ...props, vertical: false }),
902
859
  _CartesianGrid
903
860
  );
904
861
 
@@ -906,7 +863,7 @@ var CartesianGrid = Object.assign(
906
863
  import React4 from "react";
907
864
  var useDefaultColor = (key, color2) => {
908
865
  const ctx = React4.useContext(DefaultPaletteContext);
909
- return color2 != null ? color2 : ctx.getDefaultColor(key);
866
+ return color2 ?? ctx.getDefaultColor(key);
910
867
  };
911
868
 
912
869
  // src/charts/lib/utils.tsx
@@ -936,28 +893,22 @@ function bisector(f) {
936
893
  }
937
894
  function left(a, x, lo = 0, hi = a.length) {
938
895
  if (lo < hi) {
939
- if (compare1(x, x) !== 0)
940
- return hi;
896
+ if (compare1(x, x) !== 0) return hi;
941
897
  do {
942
898
  const mid = lo + hi >>> 1;
943
- if (compare2(a[mid], x) < 0)
944
- lo = mid + 1;
945
- else
946
- hi = mid;
899
+ if (compare2(a[mid], x) < 0) lo = mid + 1;
900
+ else hi = mid;
947
901
  } while (lo < hi);
948
902
  }
949
903
  return lo;
950
904
  }
951
905
  function right(a, x, lo = 0, hi = a.length) {
952
906
  if (lo < hi) {
953
- if (compare1(x, x) !== 0)
954
- return hi;
907
+ if (compare1(x, x) !== 0) return hi;
955
908
  do {
956
909
  const mid = lo + hi >>> 1;
957
- if (compare2(a[mid], x) <= 0)
958
- lo = mid + 1;
959
- else
960
- hi = mid;
910
+ if (compare2(a[mid], x) <= 0) lo = mid + 1;
911
+ else hi = mid;
961
912
  } while (lo < hi);
962
913
  }
963
914
  return lo;
@@ -992,13 +943,10 @@ function extent(values, valueof) {
992
943
  for (const value of values) {
993
944
  if (value != null) {
994
945
  if (min === void 0) {
995
- if (value >= value)
996
- min = max = value;
946
+ if (value >= value) min = max = value;
997
947
  } else {
998
- if (min > value)
999
- min = value;
1000
- if (max < value)
1001
- max = value;
948
+ if (min > value) min = value;
949
+ if (max < value) max = value;
1002
950
  }
1003
951
  }
1004
952
  }
@@ -1007,13 +955,10 @@ function extent(values, valueof) {
1007
955
  for (let value of values) {
1008
956
  if ((value = valueof(value, ++index, values)) != null) {
1009
957
  if (min === void 0) {
1010
- if (value >= value)
1011
- min = max = value;
958
+ if (value >= value) min = max = value;
1012
959
  } else {
1013
- if (min > value)
1014
- min = value;
1015
- if (max < value)
1016
- max = value;
960
+ if (min > value) min = value;
961
+ if (max < value) max = value;
1017
962
  }
1018
963
  }
1019
964
  }
@@ -1032,22 +977,17 @@ function tickSpec(start, stop, count) {
1032
977
  inc = Math.pow(10, -power) / factor;
1033
978
  i1 = Math.round(start * inc);
1034
979
  i2 = Math.round(stop * inc);
1035
- if (i1 / inc < start)
1036
- ++i1;
1037
- if (i2 / inc > stop)
1038
- --i2;
980
+ if (i1 / inc < start) ++i1;
981
+ if (i2 / inc > stop) --i2;
1039
982
  inc = -inc;
1040
983
  } else {
1041
984
  inc = Math.pow(10, power) * factor;
1042
985
  i1 = Math.round(start / inc);
1043
986
  i2 = Math.round(stop / inc);
1044
- if (i1 * inc < start)
1045
- ++i1;
1046
- if (i2 * inc > stop)
1047
- --i2;
987
+ if (i1 * inc < start) ++i1;
988
+ if (i2 * inc > stop) --i2;
1048
989
  }
1049
- if (i2 < i1 && 0.5 <= count && count < 2)
1050
- return tickSpec(start, stop, count * 2);
990
+ if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);
1051
991
  return [i1, i2, inc];
1052
992
  }
1053
993
  function tickIncrement(start, stop, count) {
@@ -1082,8 +1022,7 @@ function define_default(constructor, factory, prototype) {
1082
1022
  }
1083
1023
  function extend(parent, definition) {
1084
1024
  var prototype = Object.create(parent.prototype);
1085
- for (var key in definition)
1086
- prototype[key] = definition[key];
1025
+ for (var key in definition) prototype[key] = definition[key];
1087
1026
  return prototype;
1088
1027
  }
1089
1028
 
@@ -1260,6 +1199,7 @@ define_default(Color, color, {
1260
1199
  return this.rgb().displayable();
1261
1200
  },
1262
1201
  hex: color_formatHex,
1202
+ // Deprecated! Use color.formatHex.
1263
1203
  formatHex: color_formatHex,
1264
1204
  formatHex8: color_formatHex8,
1265
1205
  formatHsl: color_formatHsl,
@@ -1287,15 +1227,12 @@ function rgbn(n) {
1287
1227
  return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
1288
1228
  }
1289
1229
  function rgba(r, g, b, a) {
1290
- if (a <= 0)
1291
- r = g = b = NaN;
1230
+ if (a <= 0) r = g = b = NaN;
1292
1231
  return new Rgb(r, g, b, a);
1293
1232
  }
1294
1233
  function rgbConvert(o) {
1295
- if (!(o instanceof Color))
1296
- o = color(o);
1297
- if (!o)
1298
- return new Rgb();
1234
+ if (!(o instanceof Color)) o = color(o);
1235
+ if (!o) return new Rgb();
1299
1236
  o = o.rgb();
1300
1237
  return new Rgb(o.r, o.g, o.b, o.opacity);
1301
1238
  }
@@ -1327,6 +1264,7 @@ define_default(Rgb, rgb, extend(Color, {
1327
1264
  return -0.5 <= this.r && this.r < 255.5 && (-0.5 <= this.g && this.g < 255.5) && (-0.5 <= this.b && this.b < 255.5) && (0 <= this.opacity && this.opacity <= 1);
1328
1265
  },
1329
1266
  hex: rgb_formatHex,
1267
+ // Deprecated! Use color.formatHex.
1330
1268
  formatHex: rgb_formatHex,
1331
1269
  formatHex8: rgb_formatHex8,
1332
1270
  formatRgb: rgb_formatRgb,
@@ -1353,32 +1291,22 @@ function hex(value) {
1353
1291
  return (value < 16 ? "0" : "") + value.toString(16);
1354
1292
  }
1355
1293
  function hsla(h, s, l, a) {
1356
- if (a <= 0)
1357
- h = s = l = NaN;
1358
- else if (l <= 0 || l >= 1)
1359
- h = s = NaN;
1360
- else if (s <= 0)
1361
- h = NaN;
1294
+ if (a <= 0) h = s = l = NaN;
1295
+ else if (l <= 0 || l >= 1) h = s = NaN;
1296
+ else if (s <= 0) h = NaN;
1362
1297
  return new Hsl(h, s, l, a);
1363
1298
  }
1364
1299
  function hslConvert(o) {
1365
- if (o instanceof Hsl)
1366
- return new Hsl(o.h, o.s, o.l, o.opacity);
1367
- if (!(o instanceof Color))
1368
- o = color(o);
1369
- if (!o)
1370
- return new Hsl();
1371
- if (o instanceof Hsl)
1372
- return o;
1300
+ if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
1301
+ if (!(o instanceof Color)) o = color(o);
1302
+ if (!o) return new Hsl();
1303
+ if (o instanceof Hsl) return o;
1373
1304
  o = o.rgb();
1374
1305
  var r = o.r / 255, g = o.g / 255, b = o.b / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), h = NaN, s = max - min, l = (max + min) / 2;
1375
1306
  if (s) {
1376
- if (r === max)
1377
- h = (g - b) / s + (g < b) * 6;
1378
- else if (g === max)
1379
- h = (b - r) / s + 2;
1380
- else
1381
- h = (r - g) / s + 4;
1307
+ if (r === max) h = (g - b) / s + (g < b) * 6;
1308
+ else if (g === max) h = (b - r) / s + 2;
1309
+ else h = (r - g) / s + 4;
1382
1310
  s /= l < 0.5 ? max + min : 2 - max - min;
1383
1311
  h *= 60;
1384
1312
  } else {
@@ -1523,12 +1451,10 @@ var rgbBasisClosed = rgbSpline(basisClosed_default);
1523
1451
 
1524
1452
  // node_modules/d3-interpolate/src/numberArray.js
1525
1453
  function numberArray_default(a, b) {
1526
- if (!b)
1527
- b = [];
1454
+ if (!b) b = [];
1528
1455
  var n = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i;
1529
1456
  return function(t) {
1530
- for (i = 0; i < n; ++i)
1531
- c[i] = a[i] * (1 - t) + b[i] * t;
1457
+ for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
1532
1458
  return c;
1533
1459
  };
1534
1460
  }
@@ -1539,20 +1465,17 @@ function isNumberArray(x) {
1539
1465
  // node_modules/d3-interpolate/src/array.js
1540
1466
  function genericArray(a, b) {
1541
1467
  var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x = new Array(na), c = new Array(nb), i;
1542
- for (i = 0; i < na; ++i)
1543
- x[i] = value_default(a[i], b[i]);
1544
- for (; i < nb; ++i)
1545
- c[i] = b[i];
1468
+ for (i = 0; i < na; ++i) x[i] = value_default(a[i], b[i]);
1469
+ for (; i < nb; ++i) c[i] = b[i];
1546
1470
  return function(t) {
1547
- for (i = 0; i < na; ++i)
1548
- c[i] = x[i](t);
1471
+ for (i = 0; i < na; ++i) c[i] = x[i](t);
1549
1472
  return c;
1550
1473
  };
1551
1474
  }
1552
1475
 
1553
1476
  // node_modules/d3-interpolate/src/date.js
1554
1477
  function date_default(a, b) {
1555
- var d = new Date();
1478
+ var d = /* @__PURE__ */ new Date();
1556
1479
  return a = +a, b = +b, function(t) {
1557
1480
  return d.setTime(a * (1 - t) + b * t), d;
1558
1481
  };
@@ -1568,10 +1491,8 @@ function number_default(a, b) {
1568
1491
  // node_modules/d3-interpolate/src/object.js
1569
1492
  function object_default(a, b) {
1570
1493
  var i = {}, c = {}, k;
1571
- if (a === null || typeof a !== "object")
1572
- a = {};
1573
- if (b === null || typeof b !== "object")
1574
- b = {};
1494
+ if (a === null || typeof a !== "object") a = {};
1495
+ if (b === null || typeof b !== "object") b = {};
1575
1496
  for (k in b) {
1576
1497
  if (k in a) {
1577
1498
  i[k] = value_default(a[k], b[k]);
@@ -1580,8 +1501,7 @@ function object_default(a, b) {
1580
1501
  }
1581
1502
  }
1582
1503
  return function(t) {
1583
- for (k in i)
1584
- c[k] = i[k](t);
1504
+ for (k in i) c[k] = i[k](t);
1585
1505
  return c;
1586
1506
  };
1587
1507
  }
@@ -1605,16 +1525,12 @@ function string_default(a, b) {
1605
1525
  while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
1606
1526
  if ((bs = bm.index) > bi) {
1607
1527
  bs = b.slice(bi, bs);
1608
- if (s[i])
1609
- s[i] += bs;
1610
- else
1611
- s[++i] = bs;
1528
+ if (s[i]) s[i] += bs;
1529
+ else s[++i] = bs;
1612
1530
  }
1613
1531
  if ((am = am[0]) === (bm = bm[0])) {
1614
- if (s[i])
1615
- s[i] += bm;
1616
- else
1617
- s[++i] = bm;
1532
+ if (s[i]) s[i] += bm;
1533
+ else s[++i] = bm;
1618
1534
  } else {
1619
1535
  s[++i] = null;
1620
1536
  q.push({ i, x: number_default(am, bm) });
@@ -1623,14 +1539,11 @@ function string_default(a, b) {
1623
1539
  }
1624
1540
  if (bi < b.length) {
1625
1541
  bs = b.slice(bi);
1626
- if (s[i])
1627
- s[i] += bs;
1628
- else
1629
- s[++i] = bs;
1542
+ if (s[i]) s[i] += bs;
1543
+ else s[++i] = bs;
1630
1544
  }
1631
1545
  return s.length < 2 ? q[0] ? one(q[0].x) : zero2(b) : (b = q.length, function(t) {
1632
- for (var i2 = 0, o; i2 < b; ++i2)
1633
- s[(o = q[i2]).i] = o.x(t);
1546
+ for (var i2 = 0, o; i2 < b; ++i2) s[(o = q[i2]).i] = o.x(t);
1634
1547
  return s.join("");
1635
1548
  });
1636
1549
  }
@@ -1672,18 +1585,15 @@ function normalize(a, b) {
1672
1585
  }
1673
1586
  function clamper(a, b) {
1674
1587
  var t;
1675
- if (a > b)
1676
- t = a, a = b, b = t;
1588
+ if (a > b) t = a, a = b, b = t;
1677
1589
  return function(x) {
1678
1590
  return Math.max(a, Math.min(b, x));
1679
1591
  };
1680
1592
  }
1681
1593
  function bimap(domain, range, interpolate) {
1682
1594
  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
1683
- if (d1 < d0)
1684
- d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
1685
- else
1686
- d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
1595
+ if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
1596
+ else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
1687
1597
  return function(x) {
1688
1598
  return r0(d0(x));
1689
1599
  };
@@ -1710,8 +1620,7 @@ function transformer() {
1710
1620
  var domain = unit, range = unit, interpolate = value_default, transform, untransform, unknown, clamp = identity, piecewise, output, input;
1711
1621
  function rescale() {
1712
1622
  var n = Math.min(domain.length, range.length);
1713
- if (clamp !== identity)
1714
- clamp = clamper(domain[0], domain[n - 1]);
1623
+ if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);
1715
1624
  piecewise = n > 2 ? polymap : bimap;
1716
1625
  output = input = null;
1717
1626
  return scale;
@@ -1763,14 +1672,14 @@ function nice(domain, interval) {
1763
1672
  }
1764
1673
 
1765
1674
  // node_modules/d3-time/src/interval.js
1766
- var t0 = new Date();
1767
- var t1 = new Date();
1675
+ var t0 = /* @__PURE__ */ new Date();
1676
+ var t1 = /* @__PURE__ */ new Date();
1768
1677
  function timeInterval(floori, offseti, count, field) {
1769
1678
  function interval(date2) {
1770
- return floori(date2 = arguments.length === 0 ? new Date() : new Date(+date2)), date2;
1679
+ return floori(date2 = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+date2)), date2;
1771
1680
  }
1772
1681
  interval.floor = (date2) => {
1773
- return floori(date2 = new Date(+date2)), date2;
1682
+ return floori(date2 = /* @__PURE__ */ new Date(+date2)), date2;
1774
1683
  };
1775
1684
  interval.ceil = (date2) => {
1776
1685
  return floori(date2 = new Date(date2 - 1)), offseti(date2, 1), floori(date2), date2;
@@ -1780,37 +1689,32 @@ function timeInterval(floori, offseti, count, field) {
1780
1689
  return date2 - d0 < d1 - date2 ? d0 : d1;
1781
1690
  };
1782
1691
  interval.offset = (date2, step) => {
1783
- return offseti(date2 = new Date(+date2), step == null ? 1 : Math.floor(step)), date2;
1692
+ return offseti(date2 = /* @__PURE__ */ new Date(+date2), step == null ? 1 : Math.floor(step)), date2;
1784
1693
  };
1785
1694
  interval.range = (start, stop, step) => {
1786
1695
  const range = [];
1787
1696
  start = interval.ceil(start);
1788
1697
  step = step == null ? 1 : Math.floor(step);
1789
- if (!(start < stop) || !(step > 0))
1790
- return range;
1698
+ if (!(start < stop) || !(step > 0)) return range;
1791
1699
  let previous;
1792
1700
  do
1793
- range.push(previous = new Date(+start)), offseti(start, step), floori(start);
1701
+ range.push(previous = /* @__PURE__ */ new Date(+start)), offseti(start, step), floori(start);
1794
1702
  while (previous < start && start < stop);
1795
1703
  return range;
1796
1704
  };
1797
1705
  interval.filter = (test) => {
1798
1706
  return timeInterval((date2) => {
1799
- if (date2 >= date2)
1800
- while (floori(date2), !test(date2))
1801
- date2.setTime(date2 - 1);
1707
+ if (date2 >= date2) while (floori(date2), !test(date2)) date2.setTime(date2 - 1);
1802
1708
  }, (date2, step) => {
1803
1709
  if (date2 >= date2) {
1804
- if (step < 0)
1805
- while (++step <= 0) {
1806
- while (offseti(date2, -1), !test(date2)) {
1807
- }
1710
+ if (step < 0) while (++step <= 0) {
1711
+ while (offseti(date2, -1), !test(date2)) {
1808
1712
  }
1809
- else
1810
- while (--step >= 0) {
1811
- while (offseti(date2, 1), !test(date2)) {
1812
- }
1713
+ }
1714
+ else while (--step >= 0) {
1715
+ while (offseti(date2, 1), !test(date2)) {
1813
1716
  }
1717
+ }
1814
1718
  }
1815
1719
  });
1816
1720
  };
@@ -1837,10 +1741,8 @@ var millisecond = timeInterval(() => {
1837
1741
  });
1838
1742
  millisecond.every = (k) => {
1839
1743
  k = Math.floor(k);
1840
- if (!isFinite(k) || !(k > 0))
1841
- return null;
1842
- if (!(k > 1))
1843
- return millisecond;
1744
+ if (!isFinite(k) || !(k > 0)) return null;
1745
+ if (!(k > 1)) return millisecond;
1844
1746
  return timeInterval((date2) => {
1845
1747
  date2.setTime(Math.floor(date2 / k) * k);
1846
1748
  }, (date2, step) => {
@@ -2085,8 +1987,7 @@ function ticker(year, month, week, day, hour, minute) {
2085
1987
  ];
2086
1988
  function ticks2(start, stop, count) {
2087
1989
  const reverse = stop < start;
2088
- if (reverse)
2089
- [start, stop] = [stop, start];
1990
+ if (reverse) [start, stop] = [stop, start];
2090
1991
  const interval = count && typeof count.range === "function" ? count : tickInterval(start, stop, count);
2091
1992
  const ticks3 = interval ? interval.range(start, +stop + 1) : [];
2092
1993
  return reverse ? ticks3.reverse() : ticks3;
@@ -2094,10 +1995,8 @@ function ticker(year, month, week, day, hour, minute) {
2094
1995
  function tickInterval(start, stop, count) {
2095
1996
  const target = Math.abs(stop - start) / count;
2096
1997
  const i = bisector(([, , step2]) => step2).right(tickIntervals, target);
2097
- if (i === tickIntervals.length)
2098
- return year.every(tickStep(start / durationYear, stop / durationYear, count));
2099
- if (i === 0)
2100
- return millisecond.every(Math.max(tickStep(start, stop, count), 1));
1998
+ if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));
1999
+ if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));
2101
2000
  const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
2102
2001
  return t.every(step);
2103
2002
  }
@@ -2240,17 +2139,13 @@ function formatLocale(locale2) {
2240
2139
  function newFormat(specifier, formats2) {
2241
2140
  return function(date2) {
2242
2141
  var string = [], i = -1, j = 0, n = specifier.length, c, pad2, format;
2243
- if (!(date2 instanceof Date))
2244
- date2 = new Date(+date2);
2142
+ if (!(date2 instanceof Date)) date2 = /* @__PURE__ */ new Date(+date2);
2245
2143
  while (++i < n) {
2246
2144
  if (specifier.charCodeAt(i) === 37) {
2247
2145
  string.push(specifier.slice(j, i));
2248
- if ((pad2 = pads[c = specifier.charAt(++i)]) != null)
2249
- c = specifier.charAt(++i);
2250
- else
2251
- pad2 = c === "e" ? " " : "0";
2252
- if (format = formats2[c])
2253
- c = format(date2, pad2);
2146
+ if ((pad2 = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);
2147
+ else pad2 = c === "e" ? " " : "0";
2148
+ if (format = formats2[c]) c = format(date2, pad2);
2254
2149
  string.push(c);
2255
2150
  j = i + 1;
2256
2151
  }
@@ -2262,23 +2157,15 @@ function formatLocale(locale2) {
2262
2157
  function newParse(specifier, Z) {
2263
2158
  return function(string) {
2264
2159
  var d = newDate(1900, void 0, 1), i = parseSpecifier(d, specifier, string += "", 0), week, day;
2265
- if (i != string.length)
2266
- return null;
2267
- if ("Q" in d)
2268
- return new Date(d.Q);
2269
- if ("s" in d)
2270
- return new Date(d.s * 1e3 + ("L" in d ? d.L : 0));
2271
- if (Z && !("Z" in d))
2272
- d.Z = 0;
2273
- if ("p" in d)
2274
- d.H = d.H % 12 + d.p * 12;
2275
- if (d.m === void 0)
2276
- d.m = "q" in d ? d.q : 0;
2160
+ if (i != string.length) return null;
2161
+ if ("Q" in d) return new Date(d.Q);
2162
+ if ("s" in d) return new Date(d.s * 1e3 + ("L" in d ? d.L : 0));
2163
+ if (Z && !("Z" in d)) d.Z = 0;
2164
+ if ("p" in d) d.H = d.H % 12 + d.p * 12;
2165
+ if (d.m === void 0) d.m = "q" in d ? d.q : 0;
2277
2166
  if ("V" in d) {
2278
- if (d.V < 1 || d.V > 53)
2279
- return null;
2280
- if (!("w" in d))
2281
- d.w = 1;
2167
+ if (d.V < 1 || d.V > 53) return null;
2168
+ if (!("w" in d)) d.w = 1;
2282
2169
  if ("Z" in d) {
2283
2170
  week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();
2284
2171
  week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);
@@ -2295,8 +2182,7 @@ function formatLocale(locale2) {
2295
2182
  d.d = week.getDate() + (d.w + 6) % 7;
2296
2183
  }
2297
2184
  } else if ("W" in d || "U" in d) {
2298
- if (!("w" in d))
2299
- d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
2185
+ if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
2300
2186
  day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();
2301
2187
  d.m = 0;
2302
2188
  d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;
@@ -2312,14 +2198,12 @@ function formatLocale(locale2) {
2312
2198
  function parseSpecifier(d, specifier, string, j) {
2313
2199
  var i = 0, n = specifier.length, m = string.length, c, parse;
2314
2200
  while (i < n) {
2315
- if (j >= m)
2316
- return -1;
2201
+ if (j >= m) return -1;
2317
2202
  c = specifier.charCodeAt(i++);
2318
2203
  if (c === 37) {
2319
2204
  c = specifier.charAt(i++);
2320
2205
  parse = parses[c in pads ? specifier.charAt(i++) : c];
2321
- if (!parse || (j = parse(d, string, j)) < 0)
2322
- return -1;
2206
+ if (!parse || (j = parse(d, string, j)) < 0) return -1;
2323
2207
  } else if (c != string.charCodeAt(j++)) {
2324
2208
  return -1;
2325
2209
  }
@@ -2692,7 +2576,7 @@ function date(t) {
2692
2576
  return new Date(t);
2693
2577
  }
2694
2578
  function number3(t) {
2695
- return t instanceof Date ? +t : +new Date(+t);
2579
+ return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
2696
2580
  }
2697
2581
  function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format) {
2698
2582
  var scale = continuous(), invert = scale.invert, domain = scale.domain;
@@ -2715,8 +2599,7 @@ function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, se
2715
2599
  };
2716
2600
  scale.nice = function(interval) {
2717
2601
  var d = domain();
2718
- if (!interval || typeof interval.range !== "function")
2719
- interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);
2602
+ if (!interval || typeof interval.range !== "function") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);
2720
2603
  return interval ? domain(nice(d, interval)) : scale;
2721
2604
  };
2722
2605
  scale.copy = function() {
@@ -2744,31 +2627,35 @@ XAxis.Time = XTimeAxis;
2744
2627
  var YAxis = () => null;
2745
2628
  YAxis.displayName = "Axis.YAxis";
2746
2629
  var renderXAxis = (child, chartProps) => {
2747
- const _a = child.props, { tickLine = false, ticks: ticks2, domain } = _a, props = __objRest(_a, ["tickLine", "ticks", "domain"]);
2748
- const xticks = getXAxisTicks(__spreadValues({ domain }, child.props), chartProps);
2749
- return /* @__PURE__ */ React5.createElement(_XAxis, __spreadValues({ tickLine, ticks: xticks, domain }, props));
2630
+ const { tickLine = false, ticks: ticks2, domain, ...props } = child.props;
2631
+ const xticks = getXAxisTicks({ domain, ...child.props }, chartProps);
2632
+ return /* @__PURE__ */ React5.createElement(_XAxis, { tickLine, ticks: xticks, domain, ...props });
2750
2633
  };
2751
2634
  var renderXTimeAxis = (child, chartProps) => {
2752
- const _a = child.props, { tickLine = false, ticks: ticks2, domain, utc = true } = _a, props = __objRest(_a, ["tickLine", "ticks", "domain", "utc"]);
2753
- const xticks = getXAxisTicks(__spreadValues({ domain }, child.props), chartProps);
2635
+ const { tickLine = false, ticks: ticks2, domain, utc = true, ...props } = child.props;
2636
+ const xticks = getXAxisTicks({ domain, ...child.props }, chartProps);
2754
2637
  const normalizedDomain = normalizeAxisDomain(domain);
2755
2638
  const [min, max] = getXAxisExtent(chartProps.data, child.props.dataKey);
2756
- const effectiveDomain = normalizedDomain != null ? normalizedDomain : min !== void 0 && max !== void 0 ? [Number(min), Number(max)] : ["auto", "auto"];
2639
+ const effectiveDomain = (
2640
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
2641
+ normalizedDomain ?? (min !== void 0 && max !== void 0 ? [Number(min), Number(max)] : ["auto", "auto"])
2642
+ );
2757
2643
  return /* @__PURE__ */ React5.createElement(
2758
2644
  _XAxis,
2759
- __spreadValues({
2645
+ {
2760
2646
  scale: utc ? "utc" : "time",
2761
2647
  type: "number",
2762
2648
  allowDataOverflow: true,
2763
2649
  domain: effectiveDomain,
2764
2650
  tickLine,
2765
- ticks: xticks
2766
- }, props)
2651
+ ticks: xticks,
2652
+ ...props
2653
+ }
2767
2654
  );
2768
2655
  };
2769
2656
  var renderYAxis = (child, _props) => {
2770
- const _a = child.props, { axisLine = false, tickLine = false } = _a, props = __objRest(_a, ["axisLine", "tickLine"]);
2771
- return /* @__PURE__ */ React5.createElement(_YAxis, __spreadValues({ axisLine, tickLine }, props));
2657
+ const { axisLine = false, tickLine = false, ...props } = child.props;
2658
+ return /* @__PURE__ */ React5.createElement(_YAxis, { axisLine, tickLine, ...props });
2772
2659
  };
2773
2660
  var Axis = {
2774
2661
  XAxis,
@@ -2800,33 +2687,29 @@ Tooltip.defaultProps = Object.assign({}, _Tooltip.defaultProps, {
2800
2687
  // src/charts/Tooltip/TooltipContentWrapper.tsx
2801
2688
  import React6 from "react";
2802
2689
  import { isFunction } from "lodash-es";
2803
- var TooltipContentWrapper = (_a) => {
2804
- var _b = _a, {
2805
- content,
2806
- tooltipColor = "stroke"
2807
- } = _b, props = __objRest(_b, [
2808
- "content",
2809
- "tooltipColor"
2810
- ]);
2811
- var _a2;
2690
+ var TooltipContentWrapper = ({
2691
+ content,
2692
+ tooltipColor = "stroke",
2693
+ ...props
2694
+ }) => {
2812
2695
  const { getDefaultColor } = React6.useContext(DefaultPaletteContext);
2813
- const payload = (_a2 = props.payload) == null ? void 0 : _a2.map((entry) => {
2814
- var _a3, _b2, _c, _d, _e, _f;
2815
- const stroke = (_b2 = (_a3 = entry.payload) == null ? void 0 : _a3.stroke) != null ? _b2 : entry.stroke;
2816
- const fill = (_d = (_c = entry.payload) == null ? void 0 : _c.fill) != null ? _d : entry.fill;
2696
+ const payload = props.payload?.map((entry) => {
2697
+ const stroke = entry.payload?.stroke ?? entry.stroke;
2698
+ const fill = entry.payload?.fill ?? entry.fill;
2817
2699
  const color2 = tooltipColor === "stroke" ? stroke : fill;
2818
- return __spreadProps(__spreadValues({}, entry), {
2819
- color: color2 != null ? color2 : getDefaultColor((_f = (_e = entry.dataKey) == null ? void 0 : _e.toString()) != null ? _f : "unknown")
2820
- });
2700
+ return {
2701
+ ...entry,
2702
+ color: color2 ?? getDefaultColor(entry.dataKey?.toString() ?? "unknown")
2703
+ };
2821
2704
  });
2822
- const propsWithPayload = __spreadProps(__spreadValues({}, props), { payload });
2705
+ const propsWithPayload = { ...props, payload };
2823
2706
  if (React6.isValidElement(content)) {
2824
2707
  return React6.cloneElement(content, propsWithPayload);
2825
2708
  }
2826
2709
  if (isFunction(content)) {
2827
2710
  return React6.createElement(content, propsWithPayload);
2828
2711
  }
2829
- return /* @__PURE__ */ React6.createElement(Tooltip.DefaultContent, __spreadProps(__spreadValues({}, props), { payload }));
2712
+ return /* @__PURE__ */ React6.createElement(Tooltip.DefaultContent, { ...props, payload });
2830
2713
  };
2831
2714
 
2832
2715
  // src/charts/lib/utils.tsx
@@ -2873,12 +2756,11 @@ var renderChartChildren = (child, chartProps) => {
2873
2756
  }
2874
2757
  };
2875
2758
  var getXAxisTicks = ({ dataKey, ticks: ticks2, domain }, chartProps) => {
2876
- var _a;
2877
2759
  if (!ticks2 || Array.isArray(ticks2)) {
2878
- return ticks2 != null ? ticks2 : void 0;
2760
+ return ticks2 ?? void 0;
2879
2761
  }
2880
2762
  const normalizedDomain = normalizeAxisDomain(domain);
2881
- const [domainMin, domainMax] = (_a = domainExtent(normalizedDomain)) != null ? _a : [];
2763
+ const [domainMin, domainMax] = domainExtent(normalizedDomain) ?? [];
2882
2764
  const [dataMin, dataMax] = getXAxisExtent(chartProps.data, dataKey);
2883
2765
  const min = isNumberOrDate(domainMin) ? Number(domainMin) : dataMin;
2884
2766
  const max = isNumberOrDate(domainMax) ? Number(domainMax) : dataMax;
@@ -2913,18 +2795,13 @@ var domainExtent = (domain) => {
2913
2795
  };
2914
2796
 
2915
2797
  // src/charts/AreaChart/AreaChart.tsx
2916
- var AreaChart = (_a) => {
2917
- var _b = _a, {
2918
- isBusy,
2919
- busyLabel,
2920
- margin = DEFAULT_MARGINS,
2921
- palette
2922
- } = _b, props = __objRest(_b, [
2923
- "isBusy",
2924
- "busyLabel",
2925
- "margin",
2926
- "palette"
2927
- ]);
2798
+ var AreaChart = ({
2799
+ isBusy,
2800
+ busyLabel,
2801
+ margin = DEFAULT_MARGINS,
2802
+ palette,
2803
+ ...props
2804
+ }) => {
2928
2805
  const [tooltip] = extractChildByDisplayName(props.children, Tooltip.displayName);
2929
2806
  return /* @__PURE__ */ React8.createElement(DefaultPalette, { palette }, /* @__PURE__ */ React8.createElement(ResponsiveContainer, { width: props.width, height: props.height, isBusy, busyLabel }, /* @__PURE__ */ React8.createElement(
2930
2807
  _AreaChart,
@@ -2939,21 +2816,20 @@ var AreaChart = (_a) => {
2939
2816
  )));
2940
2817
  };
2941
2818
  var Area = Object.assign((props) => {
2942
- var _a;
2943
2819
  const stroke = useDefaultColor(props.dataKey.toString(), props.stroke);
2944
- const fill = useDefaultColor(props.dataKey.toString(), (_a = props.fill) != null ? _a : stroke);
2820
+ const fill = useDefaultColor(props.dataKey.toString(), props.fill ?? stroke);
2945
2821
  return /* @__PURE__ */ React8.createElement(
2946
2822
  _Area,
2947
- __spreadProps(__spreadValues({
2823
+ {
2948
2824
  type: "linear",
2949
2825
  strokeWidth: 2,
2950
- dot: false
2951
- }, props), {
2826
+ dot: false,
2827
+ ...props,
2952
2828
  stroke,
2953
2829
  fill,
2954
2830
  fillOpacity: 0.1,
2955
2831
  isAnimationActive: false
2956
- })
2832
+ }
2957
2833
  );
2958
2834
  }, _Area);
2959
2835
  Area.defaultProps = Object.assign({}, _Area.defaultProps, {
@@ -2966,18 +2842,13 @@ AreaChart.Area = Area;
2966
2842
  // src/charts/BarChart/BarChart.tsx
2967
2843
  import React9 from "react";
2968
2844
  import { Bar as _Bar, BarChart as _BarChart, Rectangle } from "recharts";
2969
- var BarChart = (_a) => {
2970
- var _b = _a, {
2971
- isBusy,
2972
- busyLabel,
2973
- margin = DEFAULT_MARGINS,
2974
- palette
2975
- } = _b, props = __objRest(_b, [
2976
- "isBusy",
2977
- "busyLabel",
2978
- "margin",
2979
- "palette"
2980
- ]);
2845
+ var BarChart = ({
2846
+ isBusy,
2847
+ busyLabel,
2848
+ margin = DEFAULT_MARGINS,
2849
+ palette,
2850
+ ...props
2851
+ }) => {
2981
2852
  const [activeIndex, setActiveIndex] = React9.useState(void 0);
2982
2853
  const [tooltip] = extractChildByDisplayName(props.children, Tooltip.displayName);
2983
2854
  const renderChildren = (props2) => {
@@ -2988,16 +2859,22 @@ var BarChart = (_a) => {
2988
2859
  switch (getDisplayName(child.type)) {
2989
2860
  case _Bar.displayName: {
2990
2861
  return React9.cloneElement(child, {
2991
- shape: (props3) => /* @__PURE__ */ React9.createElement(Rectangle, __spreadProps(__spreadValues({}, props3), { className: activeIndex !== void 0 ? "inactive" : void 0 }))
2862
+ /*
2863
+ * Having 'inactive' class on the <Rectangle> element is a hack to make the inactive bars.
2864
+ * Recharts overrides the className for active bars, so we can use this
2865
+ * to make the non-hovered bars look inactive.
2866
+ */
2867
+ shape: (props3) => /* @__PURE__ */ React9.createElement(Rectangle, { ...props3, className: activeIndex !== void 0 ? "inactive" : void 0 })
2992
2868
  });
2993
2869
  }
2994
2870
  case Tooltip.displayName: {
2995
2871
  return /* @__PURE__ */ React9.createElement(
2996
2872
  Tooltip,
2997
- __spreadProps(__spreadValues({}, child.props), {
2873
+ {
2874
+ ...child.props,
2998
2875
  content: /* @__PURE__ */ React9.createElement(TooltipContentWrapper, { content: child.props.content, tooltipColor: "fill" }),
2999
2876
  cursor: false
3000
- })
2877
+ }
3001
2878
  );
3002
2879
  }
3003
2880
  default: {
@@ -3008,38 +2885,38 @@ var BarChart = (_a) => {
3008
2885
  };
3009
2886
  return /* @__PURE__ */ React9.createElement(DefaultPalette, { palette }, /* @__PURE__ */ React9.createElement(ResponsiveContainer, { width: props.width, height: props.height, isBusy, busyLabel }, /* @__PURE__ */ React9.createElement(
3010
2887
  _BarChart,
3011
- __spreadProps(__spreadValues({}, props), {
2888
+ {
2889
+ ...props,
3012
2890
  accessibilityLayer: tooltip !== void 0,
3013
2891
  barCategoryGap: "5%",
3014
2892
  style: { stroke: "var(--aquarium-background-color-body)", strokeWidth: 1 },
3015
2893
  onMouseMove: (state) => setActiveIndex(state.isTooltipActive ? state.activeTooltipIndex : void 0),
3016
2894
  onMouseLeave: () => setActiveIndex(void 0),
3017
2895
  margin
3018
- }),
2896
+ },
3019
2897
  /* @__PURE__ */ React9.createElement(CartesianGrid, null),
3020
2898
  renderChildren(props)
3021
2899
  )));
3022
2900
  };
3023
2901
  var Bar = Object.assign((props) => {
3024
2902
  const fill = useDefaultColor(props.dataKey.toString(), props.fill);
3025
- return /* @__PURE__ */ React9.createElement(_Bar, __spreadProps(__spreadValues({}, props), { fill, isAnimationActive: false }));
2903
+ return /* @__PURE__ */ React9.createElement(_Bar, { ...props, fill, isAnimationActive: false });
3026
2904
  }, _Bar);
3027
2905
  BarChart.Bar = Bar;
3028
2906
  BarChart.Tooltip = Tooltip;
3029
2907
 
3030
2908
  // src/charts/Cell/Cell.tsx
3031
2909
  import { Cell } from "recharts";
3032
- import {} from "recharts";
3033
2910
 
3034
2911
  // src/charts/Label/Label.tsx
3035
2912
  import React10 from "react";
3036
2913
  import { Label as _Label, LabelList as _LabelList } from "recharts";
3037
2914
  var XLabel = Object.assign(
3038
- (props) => /* @__PURE__ */ React10.createElement(_Label, __spreadValues({ position: "insideBottom", offset: CHART_XLABEL_DEFAULT_OFFSET }, props)),
2915
+ (props) => /* @__PURE__ */ React10.createElement(_Label, { position: "insideBottom", offset: CHART_XLABEL_DEFAULT_OFFSET, ...props }),
3039
2916
  _Label
3040
2917
  );
3041
2918
  var YLabel = Object.assign(
3042
- (props) => /* @__PURE__ */ React10.createElement(_Label, __spreadValues({ position: "insideLeft", angle: -90, offset: CHART_YLABEL_DEFAULT_OFFSET }, props)),
2919
+ (props) => /* @__PURE__ */ React10.createElement(_Label, { position: "insideLeft", angle: -90, offset: CHART_YLABEL_DEFAULT_OFFSET, ...props }),
3043
2920
  _Label
3044
2921
  );
3045
2922
  var Label = {
@@ -3057,10 +2934,11 @@ import {
3057
2934
  var Legend = React11.forwardRef((props, _ref) => {
3058
2935
  return /* @__PURE__ */ React11.createElement(
3059
2936
  _Legend,
3060
- __spreadProps(__spreadValues({}, props), {
3061
- margin: __spreadProps(__spreadValues({}, props.margin), { top: 0 }),
2937
+ {
2938
+ ...props,
2939
+ margin: { ...props.margin, top: 0 },
3062
2940
  content: /* @__PURE__ */ React11.createElement(LegendContentWrapper, { content: props.content })
3063
- })
2941
+ }
3064
2942
  );
3065
2943
  });
3066
2944
  Legend.displayName = "Legend";
@@ -3072,40 +2950,29 @@ Legend.defaultProps = {
3072
2950
  verticalAlign: "top",
3073
2951
  margin: { top: 0 }
3074
2952
  };
3075
- var LegendContentWrapper = (_a) => {
3076
- var _b = _a, {
3077
- ref,
3078
- content
3079
- } = _b, props = __objRest(_b, [
3080
- "ref",
3081
- "content"
3082
- ]);
3083
- var _a2;
2953
+ var LegendContentWrapper = ({
2954
+ ref,
2955
+ content,
2956
+ ...props
2957
+ }) => {
3084
2958
  const { getDefaultColor } = React11.useContext(DefaultPaletteContext);
3085
- const payload = (_a2 = props.payload) == null ? void 0 : _a2.map((entry) => {
3086
- var _a3;
3087
- return __spreadProps(__spreadValues({}, entry), {
3088
- color: (_a3 = entry.color) != null ? _a3 : getDefaultColor("dataKey" in entry && typeof entry.dataKey === "string" ? entry.dataKey : "unknown")
3089
- });
3090
- });
3091
- return /* @__PURE__ */ React11.createElement(DefaultLegendContent, __spreadProps(__spreadValues({}, props), { payload }));
2959
+ const payload = props.payload?.map((entry) => ({
2960
+ ...entry,
2961
+ color: entry.color ?? getDefaultColor("dataKey" in entry && typeof entry.dataKey === "string" ? entry.dataKey : "unknown")
2962
+ }));
2963
+ return /* @__PURE__ */ React11.createElement(DefaultLegendContent, { ...props, payload });
3092
2964
  };
3093
2965
 
3094
2966
  // src/charts/LineChart/LineChart.tsx
3095
2967
  import React12 from "react";
3096
2968
  import { Line as _Line, LineChart as _LineChart, Tooltip as Tooltip2 } from "recharts";
3097
- var LineChart = (_a) => {
3098
- var _b = _a, {
3099
- isBusy,
3100
- busyLabel,
3101
- margin = DEFAULT_MARGINS,
3102
- palette
3103
- } = _b, props = __objRest(_b, [
3104
- "isBusy",
3105
- "busyLabel",
3106
- "margin",
3107
- "palette"
3108
- ]);
2969
+ var LineChart = ({
2970
+ isBusy,
2971
+ busyLabel,
2972
+ margin = DEFAULT_MARGINS,
2973
+ palette,
2974
+ ...props
2975
+ }) => {
3109
2976
  const [tooltip] = extractChildByDisplayName(props.children, Tooltip2.displayName);
3110
2977
  return /* @__PURE__ */ React12.createElement(DefaultPalette, { palette }, /* @__PURE__ */ React12.createElement(ResponsiveContainer, { width: props.width, height: props.height, isBusy, busyLabel }, /* @__PURE__ */ React12.createElement(
3111
2978
  _LineChart,
@@ -3120,9 +2987,8 @@ var LineChart = (_a) => {
3120
2987
  )));
3121
2988
  };
3122
2989
  var Line = Object.assign((props) => {
3123
- var _a, _b;
3124
- const stroke = useDefaultColor((_b = (_a = props.dataKey) == null ? void 0 : _a.toString()) != null ? _b : "unknown", props.stroke);
3125
- return /* @__PURE__ */ React12.createElement(_Line, __spreadProps(__spreadValues({ type: "linear" }, props), { stroke, strokeWidth: 2, isAnimationActive: false, dot: false }));
2990
+ const stroke = useDefaultColor(props.dataKey?.toString() ?? "unknown", props.stroke);
2991
+ return /* @__PURE__ */ React12.createElement(_Line, { type: "linear", ...props, stroke, strokeWidth: 2, isAnimationActive: false, dot: false });
3126
2992
  }, _Line);
3127
2993
  Line.defaultProps = Object.assign({}, _Line.defaultProps, { stroke: void 0, fill: void 0 });
3128
2994
  LineChart.Line = Line;
@@ -3176,17 +3042,13 @@ var renderPieChildren = (children, opts = {}) => {
3176
3042
 
3177
3043
  // src/charts/PieChart/DoughnutChart.tsx
3178
3044
  var refSize = 300;
3179
- var DoughnutChart = (_a) => {
3180
- var _b = _a, {
3181
- palette
3182
- } = _b, props = __objRest(_b, [
3183
- "palette"
3184
- ]);
3185
- return /* @__PURE__ */ React15.createElement(DefaultPalette, { palette }, /* @__PURE__ */ React15.createElement(DoughnutChartWrapper, __spreadValues({}, props)));
3045
+ var DoughnutChart = ({
3046
+ palette,
3047
+ ...props
3048
+ }) => {
3049
+ return /* @__PURE__ */ React15.createElement(DefaultPalette, { palette }, /* @__PURE__ */ React15.createElement(DoughnutChartWrapper, { ...props }));
3186
3050
  };
3187
- var DoughnutChartWrapper = (_a) => {
3188
- var _b = _a, { isBusy, busyLabel } = _b, props = __objRest(_b, ["isBusy", "busyLabel"]);
3189
- var _a2;
3051
+ var DoughnutChartWrapper = ({ isBusy, busyLabel, ...props }) => {
3190
3052
  const [containerWidth, setContainerWidth] = React15.useState(0);
3191
3053
  const [containerHeight, setContainerHeight] = React15.useState(0);
3192
3054
  const [activeIndex, setActiveIndex] = React15.useState(null);
@@ -3199,11 +3061,10 @@ var DoughnutChartWrapper = (_a) => {
3199
3061
  setContainerHeight(h);
3200
3062
  };
3201
3063
  const renderChartValue = ({ formattedGraphicalItems }) => {
3202
- var _a3, _b2, _c;
3203
- const pie = formattedGraphicalItems == null ? void 0 : formattedGraphicalItems[0];
3204
- const props2 = (_a3 = pie == null ? void 0 : pie.props) != null ? _a3 : {};
3205
- const cx = (_b2 = props2.cx) != null ? _b2 : containerWidth / 2;
3206
- const cy = (_c = props2.cy) != null ? _c : containerHeight / 2;
3064
+ const pie = formattedGraphicalItems?.[0];
3065
+ const props2 = pie?.props ?? {};
3066
+ const cx = props2.cx ?? containerWidth / 2;
3067
+ const cy = props2.cy ?? containerHeight / 2;
3207
3068
  if (!containerWidth || !containerHeight || isNil(chartValue)) {
3208
3069
  return null;
3209
3070
  }
@@ -3227,18 +3088,19 @@ var DoughnutChartWrapper = (_a) => {
3227
3088
  },
3228
3089
  /* @__PURE__ */ React15.createElement(_PieChart, null, chartValue && /* @__PURE__ */ React15.createElement(Customized, { component: renderChartValue }), doughnut && /* @__PURE__ */ React15.createElement(
3229
3090
  _Pie,
3230
- __spreadProps(__spreadValues({}, doughnut.props), {
3231
- fill: (_a2 = doughnut.props.fill) != null ? _a2 : getDefaultColor(doughnut.props.dataKey),
3091
+ {
3092
+ ...doughnut.props,
3093
+ fill: doughnut.props.fill ?? getDefaultColor(doughnut.props.dataKey),
3232
3094
  onMouseEnter: (_, index) => setActiveIndex(index),
3233
3095
  onMouseLeave: () => setActiveIndex(null),
3234
3096
  activeIndex,
3235
3097
  inactiveShape: { className: highlightActive ? "inactive" : void 0 },
3236
3098
  activeShape: { className: highlightActive ? "active" : void 0 }
3237
- })
3099
+ }
3238
3100
  ), renderPieChildren(children, { tooltipColor: "fill" }))
3239
3101
  );
3240
3102
  };
3241
- var Doughnut = Object.assign((props) => /* @__PURE__ */ React15.createElement(_Pie, __spreadValues({}, props)), _Pie);
3103
+ var Doughnut = Object.assign((props) => /* @__PURE__ */ React15.createElement(_Pie, { ...props }), _Pie);
3242
3104
  Doughnut.defaultProps = Object.assign({}, _Pie.defaultProps, {
3243
3105
  fill: void 0,
3244
3106
  stroke: void 0,
@@ -3253,18 +3115,15 @@ DoughnutChart.Cell = Cell2;
3253
3115
  // src/charts/PieChart/PieChart.tsx
3254
3116
  import React16 from "react";
3255
3117
  import { Cell as Cell3, Pie as _Pie2, PieChart as _PieChart2 } from "recharts";
3256
- var PieChart = (_a) => {
3257
- var _b = _a, { palette } = _b, props = __objRest(_b, ["palette"]);
3258
- return /* @__PURE__ */ React16.createElement(DefaultPalette, { palette }, /* @__PURE__ */ React16.createElement(PieChartWrapper, __spreadValues({}, props)));
3118
+ var PieChart = ({ palette, ...props }) => {
3119
+ return /* @__PURE__ */ React16.createElement(DefaultPalette, { palette }, /* @__PURE__ */ React16.createElement(PieChartWrapper, { ...props }));
3259
3120
  };
3260
- var PieChartWrapper = (_a) => {
3261
- var _b = _a, { isBusy, busyLabel } = _b, props = __objRest(_b, ["isBusy", "busyLabel"]);
3262
- var _a2;
3121
+ var PieChartWrapper = ({ isBusy, busyLabel, ...props }) => {
3263
3122
  const [pie, children] = extractChildByDisplayName(props.children, PieChart.Pie.displayName);
3264
3123
  const { getDefaultColor } = React16.useContext(DefaultPaletteContext);
3265
- return /* @__PURE__ */ React16.createElement(ResponsiveContainer, { width: props.width, height: props.height, isBusy, busyLabel }, /* @__PURE__ */ React16.createElement(_PieChart2, { width: 500, height: 500 }, renderPieChildren(children, { tooltipColor: "fill" }), pie && /* @__PURE__ */ React16.createElement(_Pie2, __spreadProps(__spreadValues({}, pie.props), { fill: (_a2 = pie.props.fill) != null ? _a2 : getDefaultColor(pie.props.dataKey) }))));
3124
+ return /* @__PURE__ */ React16.createElement(ResponsiveContainer, { width: props.width, height: props.height, isBusy, busyLabel }, /* @__PURE__ */ React16.createElement(_PieChart2, { width: 500, height: 500 }, renderPieChildren(children, { tooltipColor: "fill" }), pie && /* @__PURE__ */ React16.createElement(_Pie2, { ...pie.props, fill: pie.props.fill ?? getDefaultColor(pie.props.dataKey) })));
3266
3125
  };
3267
- var Pie = Object.assign((props) => /* @__PURE__ */ React16.createElement(_Pie2, __spreadValues({}, props)), _Pie2);
3126
+ var Pie = Object.assign((props) => /* @__PURE__ */ React16.createElement(_Pie2, { ...props }), _Pie2);
3268
3127
  Pie.defaultProps = Object.assign({}, _Pie2.defaultProps, {
3269
3128
  fill: void 0,
3270
3129
  isAnimationActive: false,
@@ -3281,11 +3140,11 @@ import {
3281
3140
  ReferenceLine as _ReferenceLine
3282
3141
  } from "recharts";
3283
3142
  var ReferenceLine = Object.assign(
3284
- (props) => /* @__PURE__ */ React17.createElement(_ReferenceLine, __spreadProps(__spreadValues({}, props), { strokeDasharray: "9 3", strokeWidth: 2 })),
3143
+ (props) => /* @__PURE__ */ React17.createElement(_ReferenceLine, { ...props, strokeDasharray: "9 3", strokeWidth: 2 }),
3285
3144
  _ReferenceLine
3286
3145
  );
3287
3146
  var ReferenceArea = Object.assign(
3288
- (props) => /* @__PURE__ */ React17.createElement(_ReferenceArea, __spreadProps(__spreadValues({}, props), { strokeWidth: 0, fillOpacity: 0.1 })),
3147
+ (props) => /* @__PURE__ */ React17.createElement(_ReferenceArea, { ...props, strokeWidth: 0, fillOpacity: 0.1 }),
3289
3148
  _ReferenceLine
3290
3149
  );
3291
3150
  var Reference = {