@aivenio/aquarium 2.15.0 → 2.17.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 (46) hide show
  1. package/dist/atoms.cjs +1921 -2425
  2. package/dist/atoms.mjs +1138 -1642
  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/molecules/Avatar/Avatar.js +2 -2
  7. package/dist/src/molecules/Badge/Badge.js +2 -2
  8. package/dist/src/molecules/Banner/Banner.js +2 -2
  9. package/dist/src/molecules/Button/Button.d.ts +6 -0
  10. package/dist/src/molecules/Button/Button.js +1 -1
  11. package/dist/src/molecules/Card/Card.js +2 -2
  12. package/dist/src/molecules/Card/Compact.js +2 -2
  13. package/dist/src/molecules/Checkbox/Checkbox.js +2 -2
  14. package/dist/src/molecules/Chip/Chip.js +2 -2
  15. package/dist/src/molecules/Combobox/Combobox.js +2 -2
  16. package/dist/src/molecules/DataList/DataListSkeleton.js +2 -2
  17. package/dist/src/molecules/DatePicker/Button.d.ts +6 -0
  18. package/dist/src/molecules/DatePicker/Button.js +44 -1
  19. package/dist/src/molecules/DatePicker/DatePicker.d.ts +7 -2
  20. package/dist/src/molecules/DatePicker/DatePicker.js +21 -8
  21. package/dist/src/molecules/DatePicker/DateRangePicker.d.ts +3 -2
  22. package/dist/src/molecules/DatePicker/DateRangePicker.js +18 -8
  23. package/dist/src/molecules/Input/Input.js +2 -2
  24. package/dist/src/molecules/Link/Link.d.ts +23 -2
  25. package/dist/src/molecules/Link/Link.js +26 -4
  26. package/dist/src/molecules/MultiInput/MultiInput.js +2 -2
  27. package/dist/src/molecules/MultiSelect/MultiSelect.js +2 -2
  28. package/dist/src/molecules/NativeSelect/NativeSelect.js +2 -2
  29. package/dist/src/molecules/ProgressBar/ProgressBar.js +2 -2
  30. package/dist/src/molecules/RadioButton/RadioButton.js +2 -2
  31. package/dist/src/molecules/Select/Select.js +2 -2
  32. package/dist/src/molecules/Switch/Switch.js +2 -2
  33. package/dist/src/molecules/Textarea/Textarea.js +2 -2
  34. package/dist/src/molecules/Timeline/Timeline.js +2 -2
  35. package/dist/src/molecules/index.d.ts +1 -1
  36. package/dist/src/molecules/index.js +2 -2
  37. package/dist/src/utils/createComponent.d.ts +3 -1
  38. package/dist/src/utils/form/Label/Label.js +2 -2
  39. package/dist/styles.css +6 -0
  40. package/dist/system.cjs +3354 -4166
  41. package/dist/system.mjs +2571 -3383
  42. package/dist/tsconfig.module.tsbuildinfo +1 -1
  43. package/dist/types/tailwindGenerated.d.ts +1 -1
  44. package/package.json +41 -36
  45. package/dist/src/molecules/Skeleton/Skeleton.js +0 -29
  46. /package/dist/src/{molecules → atoms}/Skeleton/Skeleton.d.ts +0 -0
package/dist/charts.cjs CHANGED
@@ -1,39 +1,10 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
6
  var __getProtoOf = Object.getPrototypeOf;
10
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b ||= {})
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
- var __objRest = (source, exclude) => {
26
- var target = {};
27
- for (var prop in source)
28
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
- target[prop] = source[prop];
30
- if (source != null && __getOwnPropSymbols)
31
- for (var prop of __getOwnPropSymbols(source)) {
32
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
- target[prop] = source[prop];
34
- }
35
- return target;
36
- };
37
8
  var __export = (target, all) => {
38
9
  for (var name in all)
39
10
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -47,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
47
18
  return to;
48
19
  };
49
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
50
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
51
26
  mod
52
27
  ));
@@ -197,60 +172,49 @@ var classNames = (...args) => {
197
172
  };
198
173
 
199
174
  // src/charts/Container/Container.tsx
200
- var ResponsiveContainer = (_a) => {
201
- var _b = _a, {
202
- isBusy = false,
203
- busyLabel = "Loading...",
204
- className,
205
- style,
206
- width = "100%",
207
- height = "100%",
208
- minWidth,
209
- minHeight,
210
- maxHeight
211
- } = _b, props = __objRest(_b, [
212
- "isBusy",
213
- "busyLabel",
214
- "className",
215
- "style",
216
- "width",
217
- "height",
218
- "minWidth",
219
- "minHeight",
220
- "maxHeight"
221
- ]);
222
- return /* @__PURE__ */ import_react.default.createElement(
175
+ var ResponsiveContainer = ({
176
+ isBusy = false,
177
+ busyLabel = "Loading...",
178
+ className,
179
+ style,
180
+ width = "100%",
181
+ height = "100%",
182
+ minWidth,
183
+ minHeight,
184
+ maxHeight,
185
+ ...props
186
+ }) => /* @__PURE__ */ import_react.default.createElement(
187
+ "div",
188
+ {
189
+ "aria-busy": isBusy,
190
+ className: classNames(className, tw("relative")),
191
+ style: { ...style, width, height, minWidth, minHeight, maxHeight }
192
+ },
193
+ /* @__PURE__ */ import_react.default.createElement(
223
194
  "div",
224
195
  {
225
- "aria-busy": isBusy,
226
- className: classNames(className, tw("relative")),
227
- style: __spreadProps(__spreadValues({}, style), { width, height, minWidth, minHeight, maxHeight })
196
+ className: classNames(
197
+ tw("absolute inset-0 transition-colors flex items-center justify-center", {
198
+ "delay-300 z-40": isBusy
199
+ // 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
200
+ })
201
+ ),
202
+ style: isBusy ? { backgroundColor: "rgba(255, 255, 255, 0.5)" } : {}
228
203
  },
229
204
  /* @__PURE__ */ import_react.default.createElement(
230
- "div",
205
+ "span",
231
206
  {
232
- className: classNames(
233
- tw("absolute inset-0 transition-colors flex items-center justify-center", {
234
- "delay-300 z-40": isBusy
235
- })
236
- ),
237
- style: isBusy ? { backgroundColor: "rgba(255, 255, 255, 0.5)" } : {}
207
+ "aria-hidden": !isBusy,
208
+ className: tw("rounded-full text-white bg-black typography-caption py-2 px-4 transition-all", {
209
+ "opacity-100 delay-300": isBusy,
210
+ "mb-[-20px] opacity-0": !isBusy
211
+ })
238
212
  },
239
- /* @__PURE__ */ import_react.default.createElement(
240
- "span",
241
- {
242
- "aria-hidden": !isBusy,
243
- className: tw("rounded-full text-white bg-black typography-caption py-2 px-4 transition-all", {
244
- "opacity-100 delay-300": isBusy,
245
- "mb-[-20px] opacity-0": !isBusy
246
- })
247
- },
248
- isBusy && busyLabel
249
- )
250
- ),
251
- /* @__PURE__ */ import_react.default.createElement(import_recharts.ResponsiveContainer, __spreadValues({}, props))
252
- );
253
- };
213
+ isBusy && busyLabel
214
+ )
215
+ ),
216
+ /* @__PURE__ */ import_react.default.createElement(import_recharts.ResponsiveContainer, { ...props })
217
+ );
254
218
 
255
219
  // src/charts/DefaultPalette/DefaultPalette.tsx
256
220
  var import_react2 = __toESM(require("react"));
@@ -1030,7 +994,7 @@ var DefaultPalette = ({ palette = "primary", children }) => {
1030
994
  var import_react3 = __toESM(require("react"));
1031
995
  var import_recharts2 = require("recharts");
1032
996
  var CartesianGrid = Object.assign(
1033
- (props) => /* @__PURE__ */ import_react3.default.createElement(import_recharts2.CartesianGrid, __spreadProps(__spreadValues({ strokeDasharray: "3 3" }, props), { vertical: false })),
997
+ (props) => /* @__PURE__ */ import_react3.default.createElement(import_recharts2.CartesianGrid, { strokeDasharray: "3 3", ...props, vertical: false }),
1034
998
  import_recharts2.CartesianGrid
1035
999
  );
1036
1000
 
@@ -1038,7 +1002,7 @@ var CartesianGrid = Object.assign(
1038
1002
  var import_react4 = __toESM(require("react"));
1039
1003
  var useDefaultColor = (key, color2) => {
1040
1004
  const ctx = import_react4.default.useContext(DefaultPaletteContext);
1041
- return color2 != null ? color2 : ctx.getDefaultColor(key);
1005
+ return color2 ?? ctx.getDefaultColor(key);
1042
1006
  };
1043
1007
 
1044
1008
  // src/charts/lib/utils.tsx
@@ -1068,28 +1032,22 @@ function bisector(f) {
1068
1032
  }
1069
1033
  function left(a, x, lo = 0, hi = a.length) {
1070
1034
  if (lo < hi) {
1071
- if (compare1(x, x) !== 0)
1072
- return hi;
1035
+ if (compare1(x, x) !== 0) return hi;
1073
1036
  do {
1074
1037
  const mid = lo + hi >>> 1;
1075
- if (compare2(a[mid], x) < 0)
1076
- lo = mid + 1;
1077
- else
1078
- hi = mid;
1038
+ if (compare2(a[mid], x) < 0) lo = mid + 1;
1039
+ else hi = mid;
1079
1040
  } while (lo < hi);
1080
1041
  }
1081
1042
  return lo;
1082
1043
  }
1083
1044
  function right(a, x, lo = 0, hi = a.length) {
1084
1045
  if (lo < hi) {
1085
- if (compare1(x, x) !== 0)
1086
- return hi;
1046
+ if (compare1(x, x) !== 0) return hi;
1087
1047
  do {
1088
1048
  const mid = lo + hi >>> 1;
1089
- if (compare2(a[mid], x) <= 0)
1090
- lo = mid + 1;
1091
- else
1092
- hi = mid;
1049
+ if (compare2(a[mid], x) <= 0) lo = mid + 1;
1050
+ else hi = mid;
1093
1051
  } while (lo < hi);
1094
1052
  }
1095
1053
  return lo;
@@ -1124,13 +1082,10 @@ function extent(values, valueof) {
1124
1082
  for (const value of values) {
1125
1083
  if (value != null) {
1126
1084
  if (min === void 0) {
1127
- if (value >= value)
1128
- min = max = value;
1085
+ if (value >= value) min = max = value;
1129
1086
  } else {
1130
- if (min > value)
1131
- min = value;
1132
- if (max < value)
1133
- max = value;
1087
+ if (min > value) min = value;
1088
+ if (max < value) max = value;
1134
1089
  }
1135
1090
  }
1136
1091
  }
@@ -1139,13 +1094,10 @@ function extent(values, valueof) {
1139
1094
  for (let value of values) {
1140
1095
  if ((value = valueof(value, ++index, values)) != null) {
1141
1096
  if (min === void 0) {
1142
- if (value >= value)
1143
- min = max = value;
1097
+ if (value >= value) min = max = value;
1144
1098
  } else {
1145
- if (min > value)
1146
- min = value;
1147
- if (max < value)
1148
- max = value;
1099
+ if (min > value) min = value;
1100
+ if (max < value) max = value;
1149
1101
  }
1150
1102
  }
1151
1103
  }
@@ -1164,22 +1116,17 @@ function tickSpec(start, stop, count) {
1164
1116
  inc = Math.pow(10, -power) / factor;
1165
1117
  i1 = Math.round(start * inc);
1166
1118
  i2 = Math.round(stop * inc);
1167
- if (i1 / inc < start)
1168
- ++i1;
1169
- if (i2 / inc > stop)
1170
- --i2;
1119
+ if (i1 / inc < start) ++i1;
1120
+ if (i2 / inc > stop) --i2;
1171
1121
  inc = -inc;
1172
1122
  } else {
1173
1123
  inc = Math.pow(10, power) * factor;
1174
1124
  i1 = Math.round(start / inc);
1175
1125
  i2 = Math.round(stop / inc);
1176
- if (i1 * inc < start)
1177
- ++i1;
1178
- if (i2 * inc > stop)
1179
- --i2;
1126
+ if (i1 * inc < start) ++i1;
1127
+ if (i2 * inc > stop) --i2;
1180
1128
  }
1181
- if (i2 < i1 && 0.5 <= count && count < 2)
1182
- return tickSpec(start, stop, count * 2);
1129
+ if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);
1183
1130
  return [i1, i2, inc];
1184
1131
  }
1185
1132
  function tickIncrement(start, stop, count) {
@@ -1214,8 +1161,7 @@ function define_default(constructor, factory, prototype) {
1214
1161
  }
1215
1162
  function extend(parent, definition) {
1216
1163
  var prototype = Object.create(parent.prototype);
1217
- for (var key in definition)
1218
- prototype[key] = definition[key];
1164
+ for (var key in definition) prototype[key] = definition[key];
1219
1165
  return prototype;
1220
1166
  }
1221
1167
 
@@ -1392,6 +1338,7 @@ define_default(Color, color, {
1392
1338
  return this.rgb().displayable();
1393
1339
  },
1394
1340
  hex: color_formatHex,
1341
+ // Deprecated! Use color.formatHex.
1395
1342
  formatHex: color_formatHex,
1396
1343
  formatHex8: color_formatHex8,
1397
1344
  formatHsl: color_formatHsl,
@@ -1419,15 +1366,12 @@ function rgbn(n) {
1419
1366
  return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
1420
1367
  }
1421
1368
  function rgba(r, g, b, a) {
1422
- if (a <= 0)
1423
- r = g = b = NaN;
1369
+ if (a <= 0) r = g = b = NaN;
1424
1370
  return new Rgb(r, g, b, a);
1425
1371
  }
1426
1372
  function rgbConvert(o) {
1427
- if (!(o instanceof Color))
1428
- o = color(o);
1429
- if (!o)
1430
- return new Rgb();
1373
+ if (!(o instanceof Color)) o = color(o);
1374
+ if (!o) return new Rgb();
1431
1375
  o = o.rgb();
1432
1376
  return new Rgb(o.r, o.g, o.b, o.opacity);
1433
1377
  }
@@ -1459,6 +1403,7 @@ define_default(Rgb, rgb, extend(Color, {
1459
1403
  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);
1460
1404
  },
1461
1405
  hex: rgb_formatHex,
1406
+ // Deprecated! Use color.formatHex.
1462
1407
  formatHex: rgb_formatHex,
1463
1408
  formatHex8: rgb_formatHex8,
1464
1409
  formatRgb: rgb_formatRgb,
@@ -1485,32 +1430,22 @@ function hex(value) {
1485
1430
  return (value < 16 ? "0" : "") + value.toString(16);
1486
1431
  }
1487
1432
  function hsla(h, s, l, a) {
1488
- if (a <= 0)
1489
- h = s = l = NaN;
1490
- else if (l <= 0 || l >= 1)
1491
- h = s = NaN;
1492
- else if (s <= 0)
1493
- h = NaN;
1433
+ if (a <= 0) h = s = l = NaN;
1434
+ else if (l <= 0 || l >= 1) h = s = NaN;
1435
+ else if (s <= 0) h = NaN;
1494
1436
  return new Hsl(h, s, l, a);
1495
1437
  }
1496
1438
  function hslConvert(o) {
1497
- if (o instanceof Hsl)
1498
- return new Hsl(o.h, o.s, o.l, o.opacity);
1499
- if (!(o instanceof Color))
1500
- o = color(o);
1501
- if (!o)
1502
- return new Hsl();
1503
- if (o instanceof Hsl)
1504
- return o;
1439
+ if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
1440
+ if (!(o instanceof Color)) o = color(o);
1441
+ if (!o) return new Hsl();
1442
+ if (o instanceof Hsl) return o;
1505
1443
  o = o.rgb();
1506
1444
  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;
1507
1445
  if (s) {
1508
- if (r === max)
1509
- h = (g - b) / s + (g < b) * 6;
1510
- else if (g === max)
1511
- h = (b - r) / s + 2;
1512
- else
1513
- h = (r - g) / s + 4;
1446
+ if (r === max) h = (g - b) / s + (g < b) * 6;
1447
+ else if (g === max) h = (b - r) / s + 2;
1448
+ else h = (r - g) / s + 4;
1514
1449
  s /= l < 0.5 ? max + min : 2 - max - min;
1515
1450
  h *= 60;
1516
1451
  } else {
@@ -1655,12 +1590,10 @@ var rgbBasisClosed = rgbSpline(basisClosed_default);
1655
1590
 
1656
1591
  // node_modules/d3-interpolate/src/numberArray.js
1657
1592
  function numberArray_default(a, b) {
1658
- if (!b)
1659
- b = [];
1593
+ if (!b) b = [];
1660
1594
  var n = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i;
1661
1595
  return function(t) {
1662
- for (i = 0; i < n; ++i)
1663
- c[i] = a[i] * (1 - t) + b[i] * t;
1596
+ for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
1664
1597
  return c;
1665
1598
  };
1666
1599
  }
@@ -1671,20 +1604,17 @@ function isNumberArray(x) {
1671
1604
  // node_modules/d3-interpolate/src/array.js
1672
1605
  function genericArray(a, b) {
1673
1606
  var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x = new Array(na), c = new Array(nb), i;
1674
- for (i = 0; i < na; ++i)
1675
- x[i] = value_default(a[i], b[i]);
1676
- for (; i < nb; ++i)
1677
- c[i] = b[i];
1607
+ for (i = 0; i < na; ++i) x[i] = value_default(a[i], b[i]);
1608
+ for (; i < nb; ++i) c[i] = b[i];
1678
1609
  return function(t) {
1679
- for (i = 0; i < na; ++i)
1680
- c[i] = x[i](t);
1610
+ for (i = 0; i < na; ++i) c[i] = x[i](t);
1681
1611
  return c;
1682
1612
  };
1683
1613
  }
1684
1614
 
1685
1615
  // node_modules/d3-interpolate/src/date.js
1686
1616
  function date_default(a, b) {
1687
- var d = new Date();
1617
+ var d = /* @__PURE__ */ new Date();
1688
1618
  return a = +a, b = +b, function(t) {
1689
1619
  return d.setTime(a * (1 - t) + b * t), d;
1690
1620
  };
@@ -1700,10 +1630,8 @@ function number_default(a, b) {
1700
1630
  // node_modules/d3-interpolate/src/object.js
1701
1631
  function object_default(a, b) {
1702
1632
  var i = {}, c = {}, k;
1703
- if (a === null || typeof a !== "object")
1704
- a = {};
1705
- if (b === null || typeof b !== "object")
1706
- b = {};
1633
+ if (a === null || typeof a !== "object") a = {};
1634
+ if (b === null || typeof b !== "object") b = {};
1707
1635
  for (k in b) {
1708
1636
  if (k in a) {
1709
1637
  i[k] = value_default(a[k], b[k]);
@@ -1712,8 +1640,7 @@ function object_default(a, b) {
1712
1640
  }
1713
1641
  }
1714
1642
  return function(t) {
1715
- for (k in i)
1716
- c[k] = i[k](t);
1643
+ for (k in i) c[k] = i[k](t);
1717
1644
  return c;
1718
1645
  };
1719
1646
  }
@@ -1737,16 +1664,12 @@ function string_default(a, b) {
1737
1664
  while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
1738
1665
  if ((bs = bm.index) > bi) {
1739
1666
  bs = b.slice(bi, bs);
1740
- if (s[i])
1741
- s[i] += bs;
1742
- else
1743
- s[++i] = bs;
1667
+ if (s[i]) s[i] += bs;
1668
+ else s[++i] = bs;
1744
1669
  }
1745
1670
  if ((am = am[0]) === (bm = bm[0])) {
1746
- if (s[i])
1747
- s[i] += bm;
1748
- else
1749
- s[++i] = bm;
1671
+ if (s[i]) s[i] += bm;
1672
+ else s[++i] = bm;
1750
1673
  } else {
1751
1674
  s[++i] = null;
1752
1675
  q.push({ i, x: number_default(am, bm) });
@@ -1755,14 +1678,11 @@ function string_default(a, b) {
1755
1678
  }
1756
1679
  if (bi < b.length) {
1757
1680
  bs = b.slice(bi);
1758
- if (s[i])
1759
- s[i] += bs;
1760
- else
1761
- s[++i] = bs;
1681
+ if (s[i]) s[i] += bs;
1682
+ else s[++i] = bs;
1762
1683
  }
1763
1684
  return s.length < 2 ? q[0] ? one(q[0].x) : zero2(b) : (b = q.length, function(t) {
1764
- for (var i2 = 0, o; i2 < b; ++i2)
1765
- s[(o = q[i2]).i] = o.x(t);
1685
+ for (var i2 = 0, o; i2 < b; ++i2) s[(o = q[i2]).i] = o.x(t);
1766
1686
  return s.join("");
1767
1687
  });
1768
1688
  }
@@ -1804,18 +1724,15 @@ function normalize(a, b) {
1804
1724
  }
1805
1725
  function clamper(a, b) {
1806
1726
  var t;
1807
- if (a > b)
1808
- t = a, a = b, b = t;
1727
+ if (a > b) t = a, a = b, b = t;
1809
1728
  return function(x) {
1810
1729
  return Math.max(a, Math.min(b, x));
1811
1730
  };
1812
1731
  }
1813
1732
  function bimap(domain, range, interpolate) {
1814
1733
  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
1815
- if (d1 < d0)
1816
- d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
1817
- else
1818
- d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
1734
+ if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
1735
+ else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
1819
1736
  return function(x) {
1820
1737
  return r0(d0(x));
1821
1738
  };
@@ -1842,8 +1759,7 @@ function transformer() {
1842
1759
  var domain = unit, range = unit, interpolate = value_default, transform, untransform, unknown, clamp = identity, piecewise, output, input;
1843
1760
  function rescale() {
1844
1761
  var n = Math.min(domain.length, range.length);
1845
- if (clamp !== identity)
1846
- clamp = clamper(domain[0], domain[n - 1]);
1762
+ if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);
1847
1763
  piecewise = n > 2 ? polymap : bimap;
1848
1764
  output = input = null;
1849
1765
  return scale;
@@ -1895,14 +1811,14 @@ function nice(domain, interval) {
1895
1811
  }
1896
1812
 
1897
1813
  // node_modules/d3-time/src/interval.js
1898
- var t0 = new Date();
1899
- var t1 = new Date();
1814
+ var t0 = /* @__PURE__ */ new Date();
1815
+ var t1 = /* @__PURE__ */ new Date();
1900
1816
  function timeInterval(floori, offseti, count, field) {
1901
1817
  function interval(date2) {
1902
- return floori(date2 = arguments.length === 0 ? new Date() : new Date(+date2)), date2;
1818
+ return floori(date2 = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+date2)), date2;
1903
1819
  }
1904
1820
  interval.floor = (date2) => {
1905
- return floori(date2 = new Date(+date2)), date2;
1821
+ return floori(date2 = /* @__PURE__ */ new Date(+date2)), date2;
1906
1822
  };
1907
1823
  interval.ceil = (date2) => {
1908
1824
  return floori(date2 = new Date(date2 - 1)), offseti(date2, 1), floori(date2), date2;
@@ -1912,37 +1828,32 @@ function timeInterval(floori, offseti, count, field) {
1912
1828
  return date2 - d0 < d1 - date2 ? d0 : d1;
1913
1829
  };
1914
1830
  interval.offset = (date2, step) => {
1915
- return offseti(date2 = new Date(+date2), step == null ? 1 : Math.floor(step)), date2;
1831
+ return offseti(date2 = /* @__PURE__ */ new Date(+date2), step == null ? 1 : Math.floor(step)), date2;
1916
1832
  };
1917
1833
  interval.range = (start, stop, step) => {
1918
1834
  const range = [];
1919
1835
  start = interval.ceil(start);
1920
1836
  step = step == null ? 1 : Math.floor(step);
1921
- if (!(start < stop) || !(step > 0))
1922
- return range;
1837
+ if (!(start < stop) || !(step > 0)) return range;
1923
1838
  let previous;
1924
1839
  do
1925
- range.push(previous = new Date(+start)), offseti(start, step), floori(start);
1840
+ range.push(previous = /* @__PURE__ */ new Date(+start)), offseti(start, step), floori(start);
1926
1841
  while (previous < start && start < stop);
1927
1842
  return range;
1928
1843
  };
1929
1844
  interval.filter = (test) => {
1930
1845
  return timeInterval((date2) => {
1931
- if (date2 >= date2)
1932
- while (floori(date2), !test(date2))
1933
- date2.setTime(date2 - 1);
1846
+ if (date2 >= date2) while (floori(date2), !test(date2)) date2.setTime(date2 - 1);
1934
1847
  }, (date2, step) => {
1935
1848
  if (date2 >= date2) {
1936
- if (step < 0)
1937
- while (++step <= 0) {
1938
- while (offseti(date2, -1), !test(date2)) {
1939
- }
1849
+ if (step < 0) while (++step <= 0) {
1850
+ while (offseti(date2, -1), !test(date2)) {
1940
1851
  }
1941
- else
1942
- while (--step >= 0) {
1943
- while (offseti(date2, 1), !test(date2)) {
1944
- }
1852
+ }
1853
+ else while (--step >= 0) {
1854
+ while (offseti(date2, 1), !test(date2)) {
1945
1855
  }
1856
+ }
1946
1857
  }
1947
1858
  });
1948
1859
  };
@@ -1969,10 +1880,8 @@ var millisecond = timeInterval(() => {
1969
1880
  });
1970
1881
  millisecond.every = (k) => {
1971
1882
  k = Math.floor(k);
1972
- if (!isFinite(k) || !(k > 0))
1973
- return null;
1974
- if (!(k > 1))
1975
- return millisecond;
1883
+ if (!isFinite(k) || !(k > 0)) return null;
1884
+ if (!(k > 1)) return millisecond;
1976
1885
  return timeInterval((date2) => {
1977
1886
  date2.setTime(Math.floor(date2 / k) * k);
1978
1887
  }, (date2, step) => {
@@ -2217,8 +2126,7 @@ function ticker(year, month, week, day, hour, minute) {
2217
2126
  ];
2218
2127
  function ticks2(start, stop, count) {
2219
2128
  const reverse = stop < start;
2220
- if (reverse)
2221
- [start, stop] = [stop, start];
2129
+ if (reverse) [start, stop] = [stop, start];
2222
2130
  const interval = count && typeof count.range === "function" ? count : tickInterval(start, stop, count);
2223
2131
  const ticks3 = interval ? interval.range(start, +stop + 1) : [];
2224
2132
  return reverse ? ticks3.reverse() : ticks3;
@@ -2226,10 +2134,8 @@ function ticker(year, month, week, day, hour, minute) {
2226
2134
  function tickInterval(start, stop, count) {
2227
2135
  const target = Math.abs(stop - start) / count;
2228
2136
  const i = bisector(([, , step2]) => step2).right(tickIntervals, target);
2229
- if (i === tickIntervals.length)
2230
- return year.every(tickStep(start / durationYear, stop / durationYear, count));
2231
- if (i === 0)
2232
- return millisecond.every(Math.max(tickStep(start, stop, count), 1));
2137
+ if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));
2138
+ if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));
2233
2139
  const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
2234
2140
  return t.every(step);
2235
2141
  }
@@ -2372,17 +2278,13 @@ function formatLocale(locale2) {
2372
2278
  function newFormat(specifier, formats2) {
2373
2279
  return function(date2) {
2374
2280
  var string = [], i = -1, j = 0, n = specifier.length, c, pad2, format;
2375
- if (!(date2 instanceof Date))
2376
- date2 = new Date(+date2);
2281
+ if (!(date2 instanceof Date)) date2 = /* @__PURE__ */ new Date(+date2);
2377
2282
  while (++i < n) {
2378
2283
  if (specifier.charCodeAt(i) === 37) {
2379
2284
  string.push(specifier.slice(j, i));
2380
- if ((pad2 = pads[c = specifier.charAt(++i)]) != null)
2381
- c = specifier.charAt(++i);
2382
- else
2383
- pad2 = c === "e" ? " " : "0";
2384
- if (format = formats2[c])
2385
- c = format(date2, pad2);
2285
+ if ((pad2 = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);
2286
+ else pad2 = c === "e" ? " " : "0";
2287
+ if (format = formats2[c]) c = format(date2, pad2);
2386
2288
  string.push(c);
2387
2289
  j = i + 1;
2388
2290
  }
@@ -2394,23 +2296,15 @@ function formatLocale(locale2) {
2394
2296
  function newParse(specifier, Z) {
2395
2297
  return function(string) {
2396
2298
  var d = newDate(1900, void 0, 1), i = parseSpecifier(d, specifier, string += "", 0), week, day;
2397
- if (i != string.length)
2398
- return null;
2399
- if ("Q" in d)
2400
- return new Date(d.Q);
2401
- if ("s" in d)
2402
- return new Date(d.s * 1e3 + ("L" in d ? d.L : 0));
2403
- if (Z && !("Z" in d))
2404
- d.Z = 0;
2405
- if ("p" in d)
2406
- d.H = d.H % 12 + d.p * 12;
2407
- if (d.m === void 0)
2408
- d.m = "q" in d ? d.q : 0;
2299
+ if (i != string.length) return null;
2300
+ if ("Q" in d) return new Date(d.Q);
2301
+ if ("s" in d) return new Date(d.s * 1e3 + ("L" in d ? d.L : 0));
2302
+ if (Z && !("Z" in d)) d.Z = 0;
2303
+ if ("p" in d) d.H = d.H % 12 + d.p * 12;
2304
+ if (d.m === void 0) d.m = "q" in d ? d.q : 0;
2409
2305
  if ("V" in d) {
2410
- if (d.V < 1 || d.V > 53)
2411
- return null;
2412
- if (!("w" in d))
2413
- d.w = 1;
2306
+ if (d.V < 1 || d.V > 53) return null;
2307
+ if (!("w" in d)) d.w = 1;
2414
2308
  if ("Z" in d) {
2415
2309
  week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();
2416
2310
  week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);
@@ -2427,8 +2321,7 @@ function formatLocale(locale2) {
2427
2321
  d.d = week.getDate() + (d.w + 6) % 7;
2428
2322
  }
2429
2323
  } else if ("W" in d || "U" in d) {
2430
- if (!("w" in d))
2431
- d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
2324
+ if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
2432
2325
  day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();
2433
2326
  d.m = 0;
2434
2327
  d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;
@@ -2444,14 +2337,12 @@ function formatLocale(locale2) {
2444
2337
  function parseSpecifier(d, specifier, string, j) {
2445
2338
  var i = 0, n = specifier.length, m = string.length, c, parse;
2446
2339
  while (i < n) {
2447
- if (j >= m)
2448
- return -1;
2340
+ if (j >= m) return -1;
2449
2341
  c = specifier.charCodeAt(i++);
2450
2342
  if (c === 37) {
2451
2343
  c = specifier.charAt(i++);
2452
2344
  parse = parses[c in pads ? specifier.charAt(i++) : c];
2453
- if (!parse || (j = parse(d, string, j)) < 0)
2454
- return -1;
2345
+ if (!parse || (j = parse(d, string, j)) < 0) return -1;
2455
2346
  } else if (c != string.charCodeAt(j++)) {
2456
2347
  return -1;
2457
2348
  }
@@ -2824,7 +2715,7 @@ function date(t) {
2824
2715
  return new Date(t);
2825
2716
  }
2826
2717
  function number3(t) {
2827
- return t instanceof Date ? +t : +new Date(+t);
2718
+ return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
2828
2719
  }
2829
2720
  function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, second2, format) {
2830
2721
  var scale = continuous(), invert = scale.invert, domain = scale.domain;
@@ -2847,8 +2738,7 @@ function calendar(ticks2, tickInterval, year, month, week, day, hour, minute, se
2847
2738
  };
2848
2739
  scale.nice = function(interval) {
2849
2740
  var d = domain();
2850
- if (!interval || typeof interval.range !== "function")
2851
- interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);
2741
+ if (!interval || typeof interval.range !== "function") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);
2852
2742
  return interval ? domain(nice(d, interval)) : scale;
2853
2743
  };
2854
2744
  scale.copy = function() {
@@ -2876,31 +2766,35 @@ XAxis.Time = XTimeAxis;
2876
2766
  var YAxis = () => null;
2877
2767
  YAxis.displayName = "Axis.YAxis";
2878
2768
  var renderXAxis = (child, chartProps) => {
2879
- const _a = child.props, { tickLine = false, ticks: ticks2, domain } = _a, props = __objRest(_a, ["tickLine", "ticks", "domain"]);
2880
- const xticks = getXAxisTicks(__spreadValues({ domain }, child.props), chartProps);
2881
- return /* @__PURE__ */ import_react5.default.createElement(import_recharts3.XAxis, __spreadValues({ tickLine, ticks: xticks, domain }, props));
2769
+ const { tickLine = false, ticks: ticks2, domain, ...props } = child.props;
2770
+ const xticks = getXAxisTicks({ domain, ...child.props }, chartProps);
2771
+ return /* @__PURE__ */ import_react5.default.createElement(import_recharts3.XAxis, { tickLine, ticks: xticks, domain, ...props });
2882
2772
  };
2883
2773
  var renderXTimeAxis = (child, chartProps) => {
2884
- const _a = child.props, { tickLine = false, ticks: ticks2, domain, utc = true } = _a, props = __objRest(_a, ["tickLine", "ticks", "domain", "utc"]);
2885
- const xticks = getXAxisTicks(__spreadValues({ domain }, child.props), chartProps);
2774
+ const { tickLine = false, ticks: ticks2, domain, utc = true, ...props } = child.props;
2775
+ const xticks = getXAxisTicks({ domain, ...child.props }, chartProps);
2886
2776
  const normalizedDomain = normalizeAxisDomain(domain);
2887
2777
  const [min, max] = getXAxisExtent(chartProps.data, child.props.dataKey);
2888
- const effectiveDomain = normalizedDomain != null ? normalizedDomain : min !== void 0 && max !== void 0 ? [Number(min), Number(max)] : ["auto", "auto"];
2778
+ const effectiveDomain = (
2779
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
2780
+ normalizedDomain ?? (min !== void 0 && max !== void 0 ? [Number(min), Number(max)] : ["auto", "auto"])
2781
+ );
2889
2782
  return /* @__PURE__ */ import_react5.default.createElement(
2890
2783
  import_recharts3.XAxis,
2891
- __spreadValues({
2784
+ {
2892
2785
  scale: utc ? "utc" : "time",
2893
2786
  type: "number",
2894
2787
  allowDataOverflow: true,
2895
2788
  domain: effectiveDomain,
2896
2789
  tickLine,
2897
- ticks: xticks
2898
- }, props)
2790
+ ticks: xticks,
2791
+ ...props
2792
+ }
2899
2793
  );
2900
2794
  };
2901
2795
  var renderYAxis = (child, _props) => {
2902
- const _a = child.props, { axisLine = false, tickLine = false } = _a, props = __objRest(_a, ["axisLine", "tickLine"]);
2903
- return /* @__PURE__ */ import_react5.default.createElement(import_recharts3.YAxis, __spreadValues({ axisLine, tickLine }, props));
2796
+ const { axisLine = false, tickLine = false, ...props } = child.props;
2797
+ return /* @__PURE__ */ import_react5.default.createElement(import_recharts3.YAxis, { axisLine, tickLine, ...props });
2904
2798
  };
2905
2799
  var Axis = {
2906
2800
  XAxis,
@@ -2932,33 +2826,29 @@ Tooltip.defaultProps = Object.assign({}, import_recharts4.Tooltip.defaultProps,
2932
2826
  // src/charts/Tooltip/TooltipContentWrapper.tsx
2933
2827
  var import_react6 = __toESM(require("react"));
2934
2828
  var import_lodash_es = require("lodash-es");
2935
- var TooltipContentWrapper = (_a) => {
2936
- var _b = _a, {
2937
- content,
2938
- tooltipColor = "stroke"
2939
- } = _b, props = __objRest(_b, [
2940
- "content",
2941
- "tooltipColor"
2942
- ]);
2943
- var _a2;
2829
+ var TooltipContentWrapper = ({
2830
+ content,
2831
+ tooltipColor = "stroke",
2832
+ ...props
2833
+ }) => {
2944
2834
  const { getDefaultColor } = import_react6.default.useContext(DefaultPaletteContext);
2945
- const payload = (_a2 = props.payload) == null ? void 0 : _a2.map((entry) => {
2946
- var _a3, _b2, _c, _d, _e, _f;
2947
- const stroke = (_b2 = (_a3 = entry.payload) == null ? void 0 : _a3.stroke) != null ? _b2 : entry.stroke;
2948
- const fill = (_d = (_c = entry.payload) == null ? void 0 : _c.fill) != null ? _d : entry.fill;
2835
+ const payload = props.payload?.map((entry) => {
2836
+ const stroke = entry.payload?.stroke ?? entry.stroke;
2837
+ const fill = entry.payload?.fill ?? entry.fill;
2949
2838
  const color2 = tooltipColor === "stroke" ? stroke : fill;
2950
- return __spreadProps(__spreadValues({}, entry), {
2951
- color: color2 != null ? color2 : getDefaultColor((_f = (_e = entry.dataKey) == null ? void 0 : _e.toString()) != null ? _f : "unknown")
2952
- });
2839
+ return {
2840
+ ...entry,
2841
+ color: color2 ?? getDefaultColor(entry.dataKey?.toString() ?? "unknown")
2842
+ };
2953
2843
  });
2954
- const propsWithPayload = __spreadProps(__spreadValues({}, props), { payload });
2844
+ const propsWithPayload = { ...props, payload };
2955
2845
  if (import_react6.default.isValidElement(content)) {
2956
2846
  return import_react6.default.cloneElement(content, propsWithPayload);
2957
2847
  }
2958
2848
  if ((0, import_lodash_es.isFunction)(content)) {
2959
2849
  return import_react6.default.createElement(content, propsWithPayload);
2960
2850
  }
2961
- return /* @__PURE__ */ import_react6.default.createElement(Tooltip.DefaultContent, __spreadProps(__spreadValues({}, props), { payload }));
2851
+ return /* @__PURE__ */ import_react6.default.createElement(Tooltip.DefaultContent, { ...props, payload });
2962
2852
  };
2963
2853
 
2964
2854
  // src/charts/lib/utils.tsx
@@ -3005,12 +2895,11 @@ var renderChartChildren = (child, chartProps) => {
3005
2895
  }
3006
2896
  };
3007
2897
  var getXAxisTicks = ({ dataKey, ticks: ticks2, domain }, chartProps) => {
3008
- var _a;
3009
2898
  if (!ticks2 || Array.isArray(ticks2)) {
3010
- return ticks2 != null ? ticks2 : void 0;
2899
+ return ticks2 ?? void 0;
3011
2900
  }
3012
2901
  const normalizedDomain = normalizeAxisDomain(domain);
3013
- const [domainMin, domainMax] = (_a = domainExtent(normalizedDomain)) != null ? _a : [];
2902
+ const [domainMin, domainMax] = domainExtent(normalizedDomain) ?? [];
3014
2903
  const [dataMin, dataMax] = getXAxisExtent(chartProps.data, dataKey);
3015
2904
  const min = isNumberOrDate(domainMin) ? Number(domainMin) : dataMin;
3016
2905
  const max = isNumberOrDate(domainMax) ? Number(domainMax) : dataMax;
@@ -3045,18 +2934,13 @@ var domainExtent = (domain) => {
3045
2934
  };
3046
2935
 
3047
2936
  // src/charts/AreaChart/AreaChart.tsx
3048
- var AreaChart = (_a) => {
3049
- var _b = _a, {
3050
- isBusy,
3051
- busyLabel,
3052
- margin = DEFAULT_MARGINS,
3053
- palette
3054
- } = _b, props = __objRest(_b, [
3055
- "isBusy",
3056
- "busyLabel",
3057
- "margin",
3058
- "palette"
3059
- ]);
2937
+ var AreaChart = ({
2938
+ isBusy,
2939
+ busyLabel,
2940
+ margin = DEFAULT_MARGINS,
2941
+ palette,
2942
+ ...props
2943
+ }) => {
3060
2944
  const [tooltip] = extractChildByDisplayName(props.children, Tooltip.displayName);
3061
2945
  return /* @__PURE__ */ import_react8.default.createElement(DefaultPalette, { palette }, /* @__PURE__ */ import_react8.default.createElement(ResponsiveContainer, { width: props.width, height: props.height, isBusy, busyLabel }, /* @__PURE__ */ import_react8.default.createElement(
3062
2946
  import_recharts5.AreaChart,
@@ -3071,21 +2955,20 @@ var AreaChart = (_a) => {
3071
2955
  )));
3072
2956
  };
3073
2957
  var Area = Object.assign((props) => {
3074
- var _a;
3075
2958
  const stroke = useDefaultColor(props.dataKey.toString(), props.stroke);
3076
- const fill = useDefaultColor(props.dataKey.toString(), (_a = props.fill) != null ? _a : stroke);
2959
+ const fill = useDefaultColor(props.dataKey.toString(), props.fill ?? stroke);
3077
2960
  return /* @__PURE__ */ import_react8.default.createElement(
3078
2961
  import_recharts5.Area,
3079
- __spreadProps(__spreadValues({
2962
+ {
3080
2963
  type: "linear",
3081
2964
  strokeWidth: 2,
3082
- dot: false
3083
- }, props), {
2965
+ dot: false,
2966
+ ...props,
3084
2967
  stroke,
3085
2968
  fill,
3086
2969
  fillOpacity: 0.1,
3087
2970
  isAnimationActive: false
3088
- })
2971
+ }
3089
2972
  );
3090
2973
  }, import_recharts5.Area);
3091
2974
  Area.defaultProps = Object.assign({}, import_recharts5.Area.defaultProps, {
@@ -3098,18 +2981,13 @@ AreaChart.Area = Area;
3098
2981
  // src/charts/BarChart/BarChart.tsx
3099
2982
  var import_react9 = __toESM(require("react"));
3100
2983
  var import_recharts6 = require("recharts");
3101
- var BarChart = (_a) => {
3102
- var _b = _a, {
3103
- isBusy,
3104
- busyLabel,
3105
- margin = DEFAULT_MARGINS,
3106
- palette
3107
- } = _b, props = __objRest(_b, [
3108
- "isBusy",
3109
- "busyLabel",
3110
- "margin",
3111
- "palette"
3112
- ]);
2984
+ var BarChart = ({
2985
+ isBusy,
2986
+ busyLabel,
2987
+ margin = DEFAULT_MARGINS,
2988
+ palette,
2989
+ ...props
2990
+ }) => {
3113
2991
  const [activeIndex, setActiveIndex] = import_react9.default.useState(void 0);
3114
2992
  const [tooltip] = extractChildByDisplayName(props.children, Tooltip.displayName);
3115
2993
  const renderChildren = (props2) => {
@@ -3120,16 +2998,22 @@ var BarChart = (_a) => {
3120
2998
  switch (getDisplayName(child.type)) {
3121
2999
  case import_recharts6.Bar.displayName: {
3122
3000
  return import_react9.default.cloneElement(child, {
3123
- shape: (props3) => /* @__PURE__ */ import_react9.default.createElement(import_recharts6.Rectangle, __spreadProps(__spreadValues({}, props3), { className: activeIndex !== void 0 ? "inactive" : void 0 }))
3001
+ /*
3002
+ * Having 'inactive' class on the <Rectangle> element is a hack to make the inactive bars.
3003
+ * Recharts overrides the className for active bars, so we can use this
3004
+ * to make the non-hovered bars look inactive.
3005
+ */
3006
+ shape: (props3) => /* @__PURE__ */ import_react9.default.createElement(import_recharts6.Rectangle, { ...props3, className: activeIndex !== void 0 ? "inactive" : void 0 })
3124
3007
  });
3125
3008
  }
3126
3009
  case Tooltip.displayName: {
3127
3010
  return /* @__PURE__ */ import_react9.default.createElement(
3128
3011
  Tooltip,
3129
- __spreadProps(__spreadValues({}, child.props), {
3012
+ {
3013
+ ...child.props,
3130
3014
  content: /* @__PURE__ */ import_react9.default.createElement(TooltipContentWrapper, { content: child.props.content, tooltipColor: "fill" }),
3131
3015
  cursor: false
3132
- })
3016
+ }
3133
3017
  );
3134
3018
  }
3135
3019
  default: {
@@ -3140,56 +3024,57 @@ var BarChart = (_a) => {
3140
3024
  };
3141
3025
  return /* @__PURE__ */ import_react9.default.createElement(DefaultPalette, { palette }, /* @__PURE__ */ import_react9.default.createElement(ResponsiveContainer, { width: props.width, height: props.height, isBusy, busyLabel }, /* @__PURE__ */ import_react9.default.createElement(
3142
3026
  import_recharts6.BarChart,
3143
- __spreadProps(__spreadValues({}, props), {
3027
+ {
3028
+ ...props,
3144
3029
  accessibilityLayer: tooltip !== void 0,
3145
3030
  barCategoryGap: "5%",
3146
3031
  style: { stroke: "var(--aquarium-background-color-body)", strokeWidth: 1 },
3147
3032
  onMouseMove: (state) => setActiveIndex(state.isTooltipActive ? state.activeTooltipIndex : void 0),
3148
3033
  onMouseLeave: () => setActiveIndex(void 0),
3149
3034
  margin
3150
- }),
3035
+ },
3151
3036
  /* @__PURE__ */ import_react9.default.createElement(CartesianGrid, null),
3152
3037
  renderChildren(props)
3153
3038
  )));
3154
3039
  };
3155
3040
  var Bar = Object.assign((props) => {
3156
3041
  const fill = useDefaultColor(props.dataKey.toString(), props.fill);
3157
- return /* @__PURE__ */ import_react9.default.createElement(import_recharts6.Bar, __spreadProps(__spreadValues({}, props), { fill, isAnimationActive: false }));
3042
+ return /* @__PURE__ */ import_react9.default.createElement(import_recharts6.Bar, { ...props, fill, isAnimationActive: false });
3158
3043
  }, import_recharts6.Bar);
3159
3044
  BarChart.Bar = Bar;
3160
3045
  BarChart.Tooltip = Tooltip;
3161
3046
 
3162
3047
  // src/charts/Cell/Cell.tsx
3163
3048
  var import_recharts7 = require("recharts");
3164
- var import_recharts8 = require("recharts");
3165
3049
 
3166
3050
  // src/charts/Label/Label.tsx
3167
3051
  var import_react10 = __toESM(require("react"));
3168
- var import_recharts9 = require("recharts");
3052
+ var import_recharts8 = require("recharts");
3169
3053
  var XLabel = Object.assign(
3170
- (props) => /* @__PURE__ */ import_react10.default.createElement(import_recharts9.Label, __spreadValues({ position: "insideBottom", offset: CHART_XLABEL_DEFAULT_OFFSET }, props)),
3171
- import_recharts9.Label
3054
+ (props) => /* @__PURE__ */ import_react10.default.createElement(import_recharts8.Label, { position: "insideBottom", offset: CHART_XLABEL_DEFAULT_OFFSET, ...props }),
3055
+ import_recharts8.Label
3172
3056
  );
3173
3057
  var YLabel = Object.assign(
3174
- (props) => /* @__PURE__ */ import_react10.default.createElement(import_recharts9.Label, __spreadValues({ position: "insideLeft", angle: -90, offset: CHART_YLABEL_DEFAULT_OFFSET }, props)),
3175
- import_recharts9.Label
3058
+ (props) => /* @__PURE__ */ import_react10.default.createElement(import_recharts8.Label, { position: "insideLeft", angle: -90, offset: CHART_YLABEL_DEFAULT_OFFSET, ...props }),
3059
+ import_recharts8.Label
3176
3060
  );
3177
3061
  var Label = {
3178
3062
  XLabel,
3179
3063
  YLabel
3180
3064
  };
3181
- var LabelList = import_recharts9.LabelList;
3065
+ var LabelList = import_recharts8.LabelList;
3182
3066
 
3183
3067
  // src/charts/Legend/Legend.tsx
3184
3068
  var import_react11 = __toESM(require("react"));
3185
- var import_recharts10 = require("recharts");
3069
+ var import_recharts9 = require("recharts");
3186
3070
  var Legend = import_react11.default.forwardRef((props, _ref) => {
3187
3071
  return /* @__PURE__ */ import_react11.default.createElement(
3188
- import_recharts10.Legend,
3189
- __spreadProps(__spreadValues({}, props), {
3190
- margin: __spreadProps(__spreadValues({}, props.margin), { top: 0 }),
3072
+ import_recharts9.Legend,
3073
+ {
3074
+ ...props,
3075
+ margin: { ...props.margin, top: 0 },
3191
3076
  content: /* @__PURE__ */ import_react11.default.createElement(LegendContentWrapper, { content: props.content })
3192
- })
3077
+ }
3193
3078
  );
3194
3079
  });
3195
3080
  Legend.displayName = "Legend";
@@ -3201,43 +3086,32 @@ Legend.defaultProps = {
3201
3086
  verticalAlign: "top",
3202
3087
  margin: { top: 0 }
3203
3088
  };
3204
- var LegendContentWrapper = (_a) => {
3205
- var _b = _a, {
3206
- ref,
3207
- content
3208
- } = _b, props = __objRest(_b, [
3209
- "ref",
3210
- "content"
3211
- ]);
3212
- var _a2;
3089
+ var LegendContentWrapper = ({
3090
+ ref,
3091
+ content,
3092
+ ...props
3093
+ }) => {
3213
3094
  const { getDefaultColor } = import_react11.default.useContext(DefaultPaletteContext);
3214
- const payload = (_a2 = props.payload) == null ? void 0 : _a2.map((entry) => {
3215
- var _a3;
3216
- return __spreadProps(__spreadValues({}, entry), {
3217
- color: (_a3 = entry.color) != null ? _a3 : getDefaultColor("dataKey" in entry && typeof entry.dataKey === "string" ? entry.dataKey : "unknown")
3218
- });
3219
- });
3220
- return /* @__PURE__ */ import_react11.default.createElement(import_recharts10.DefaultLegendContent, __spreadProps(__spreadValues({}, props), { payload }));
3095
+ const payload = props.payload?.map((entry) => ({
3096
+ ...entry,
3097
+ color: entry.color ?? getDefaultColor("dataKey" in entry && typeof entry.dataKey === "string" ? entry.dataKey : "unknown")
3098
+ }));
3099
+ return /* @__PURE__ */ import_react11.default.createElement(import_recharts9.DefaultLegendContent, { ...props, payload });
3221
3100
  };
3222
3101
 
3223
3102
  // src/charts/LineChart/LineChart.tsx
3224
3103
  var import_react12 = __toESM(require("react"));
3225
- var import_recharts11 = require("recharts");
3226
- var LineChart = (_a) => {
3227
- var _b = _a, {
3228
- isBusy,
3229
- busyLabel,
3230
- margin = DEFAULT_MARGINS,
3231
- palette
3232
- } = _b, props = __objRest(_b, [
3233
- "isBusy",
3234
- "busyLabel",
3235
- "margin",
3236
- "palette"
3237
- ]);
3238
- const [tooltip] = extractChildByDisplayName(props.children, import_recharts11.Tooltip.displayName);
3104
+ var import_recharts10 = require("recharts");
3105
+ var LineChart = ({
3106
+ isBusy,
3107
+ busyLabel,
3108
+ margin = DEFAULT_MARGINS,
3109
+ palette,
3110
+ ...props
3111
+ }) => {
3112
+ const [tooltip] = extractChildByDisplayName(props.children, import_recharts10.Tooltip.displayName);
3239
3113
  return /* @__PURE__ */ import_react12.default.createElement(DefaultPalette, { palette }, /* @__PURE__ */ import_react12.default.createElement(ResponsiveContainer, { width: props.width, height: props.height, isBusy, busyLabel }, /* @__PURE__ */ import_react12.default.createElement(
3240
- import_recharts11.LineChart,
3114
+ import_recharts10.LineChart,
3241
3115
  {
3242
3116
  data: props.data,
3243
3117
  style: { stroke: "#fff", strokeWidth: 1 },
@@ -3249,17 +3123,16 @@ var LineChart = (_a) => {
3249
3123
  )));
3250
3124
  };
3251
3125
  var Line = Object.assign((props) => {
3252
- var _a, _b;
3253
- const stroke = useDefaultColor((_b = (_a = props.dataKey) == null ? void 0 : _a.toString()) != null ? _b : "unknown", props.stroke);
3254
- return /* @__PURE__ */ import_react12.default.createElement(import_recharts11.Line, __spreadProps(__spreadValues({ type: "linear" }, props), { stroke, strokeWidth: 2, isAnimationActive: false, dot: false }));
3255
- }, import_recharts11.Line);
3256
- Line.defaultProps = Object.assign({}, import_recharts11.Line.defaultProps, { stroke: void 0, fill: void 0 });
3126
+ const stroke = useDefaultColor(props.dataKey?.toString() ?? "unknown", props.stroke);
3127
+ return /* @__PURE__ */ import_react12.default.createElement(import_recharts10.Line, { type: "linear", ...props, stroke, strokeWidth: 2, isAnimationActive: false, dot: false });
3128
+ }, import_recharts10.Line);
3129
+ Line.defaultProps = Object.assign({}, import_recharts10.Line.defaultProps, { stroke: void 0, fill: void 0 });
3257
3130
  LineChart.Line = Line;
3258
3131
 
3259
3132
  // src/charts/PieChart/DoughnutChart.tsx
3260
3133
  var import_react15 = __toESM(require("react"));
3261
3134
  var import_lodash_es3 = require("lodash-es");
3262
- var import_recharts13 = require("recharts");
3135
+ var import_recharts12 = require("recharts");
3263
3136
 
3264
3137
  // src/charts/PieChart/ChartValue.tsx
3265
3138
  var import_react13 = __toESM(require("react"));
@@ -3280,7 +3153,7 @@ var ChartValue = (props) => {
3280
3153
 
3281
3154
  // src/charts/PieChart/renderPieChildren.tsx
3282
3155
  var import_react14 = __toESM(require("react"));
3283
- var import_recharts12 = require("recharts");
3156
+ var import_recharts11 = require("recharts");
3284
3157
  var renderPieChildren = (children, opts = {}) => {
3285
3158
  return import_react14.default.Children.map(children, (child) => {
3286
3159
  if (!child) {
@@ -3293,7 +3166,7 @@ var renderPieChildren = (children, opts = {}) => {
3293
3166
  labelStyle: { paddingBottom: 0 }
3294
3167
  });
3295
3168
  }
3296
- case import_recharts12.Legend.displayName: {
3169
+ case import_recharts11.Legend.displayName: {
3297
3170
  return import_react14.default.cloneElement(child, { verticalAlign: "top", align: "center" });
3298
3171
  }
3299
3172
  default: {
@@ -3305,17 +3178,13 @@ var renderPieChildren = (children, opts = {}) => {
3305
3178
 
3306
3179
  // src/charts/PieChart/DoughnutChart.tsx
3307
3180
  var refSize = 300;
3308
- var DoughnutChart = (_a) => {
3309
- var _b = _a, {
3310
- palette
3311
- } = _b, props = __objRest(_b, [
3312
- "palette"
3313
- ]);
3314
- return /* @__PURE__ */ import_react15.default.createElement(DefaultPalette, { palette }, /* @__PURE__ */ import_react15.default.createElement(DoughnutChartWrapper, __spreadValues({}, props)));
3181
+ var DoughnutChart = ({
3182
+ palette,
3183
+ ...props
3184
+ }) => {
3185
+ return /* @__PURE__ */ import_react15.default.createElement(DefaultPalette, { palette }, /* @__PURE__ */ import_react15.default.createElement(DoughnutChartWrapper, { ...props }));
3315
3186
  };
3316
- var DoughnutChartWrapper = (_a) => {
3317
- var _b = _a, { isBusy, busyLabel } = _b, props = __objRest(_b, ["isBusy", "busyLabel"]);
3318
- var _a2;
3187
+ var DoughnutChartWrapper = ({ isBusy, busyLabel, ...props }) => {
3319
3188
  const [containerWidth, setContainerWidth] = import_react15.default.useState(0);
3320
3189
  const [containerHeight, setContainerHeight] = import_react15.default.useState(0);
3321
3190
  const [activeIndex, setActiveIndex] = import_react15.default.useState(null);
@@ -3328,11 +3197,10 @@ var DoughnutChartWrapper = (_a) => {
3328
3197
  setContainerHeight(h);
3329
3198
  };
3330
3199
  const renderChartValue = ({ formattedGraphicalItems }) => {
3331
- var _a3, _b2, _c;
3332
- const pie = formattedGraphicalItems == null ? void 0 : formattedGraphicalItems[0];
3333
- const props2 = (_a3 = pie == null ? void 0 : pie.props) != null ? _a3 : {};
3334
- const cx = (_b2 = props2.cx) != null ? _b2 : containerWidth / 2;
3335
- const cy = (_c = props2.cy) != null ? _c : containerHeight / 2;
3200
+ const pie = formattedGraphicalItems?.[0];
3201
+ const props2 = pie?.props ?? {};
3202
+ const cx = props2.cx ?? containerWidth / 2;
3203
+ const cy = props2.cy ?? containerHeight / 2;
3336
3204
  if (!containerWidth || !containerHeight || (0, import_lodash_es3.isNil)(chartValue)) {
3337
3205
  return null;
3338
3206
  }
@@ -3354,21 +3222,22 @@ var DoughnutChartWrapper = (_a) => {
3354
3222
  busyLabel,
3355
3223
  onResize
3356
3224
  },
3357
- /* @__PURE__ */ import_react15.default.createElement(import_recharts13.PieChart, null, chartValue && /* @__PURE__ */ import_react15.default.createElement(import_recharts13.Customized, { component: renderChartValue }), doughnut && /* @__PURE__ */ import_react15.default.createElement(
3358
- import_recharts13.Pie,
3359
- __spreadProps(__spreadValues({}, doughnut.props), {
3360
- fill: (_a2 = doughnut.props.fill) != null ? _a2 : getDefaultColor(doughnut.props.dataKey),
3225
+ /* @__PURE__ */ import_react15.default.createElement(import_recharts12.PieChart, null, chartValue && /* @__PURE__ */ import_react15.default.createElement(import_recharts12.Customized, { component: renderChartValue }), doughnut && /* @__PURE__ */ import_react15.default.createElement(
3226
+ import_recharts12.Pie,
3227
+ {
3228
+ ...doughnut.props,
3229
+ fill: doughnut.props.fill ?? getDefaultColor(doughnut.props.dataKey),
3361
3230
  onMouseEnter: (_, index) => setActiveIndex(index),
3362
3231
  onMouseLeave: () => setActiveIndex(null),
3363
3232
  activeIndex,
3364
3233
  inactiveShape: { className: highlightActive ? "inactive" : void 0 },
3365
3234
  activeShape: { className: highlightActive ? "active" : void 0 }
3366
- })
3235
+ }
3367
3236
  ), renderPieChildren(children, { tooltipColor: "fill" }))
3368
3237
  );
3369
3238
  };
3370
- var Doughnut = Object.assign((props) => /* @__PURE__ */ import_react15.default.createElement(import_recharts13.Pie, __spreadValues({}, props)), import_recharts13.Pie);
3371
- Doughnut.defaultProps = Object.assign({}, import_recharts13.Pie.defaultProps, {
3239
+ var Doughnut = Object.assign((props) => /* @__PURE__ */ import_react15.default.createElement(import_recharts12.Pie, { ...props }), import_recharts12.Pie);
3240
+ Doughnut.defaultProps = Object.assign({}, import_recharts12.Pie.defaultProps, {
3372
3241
  fill: void 0,
3373
3242
  stroke: void 0,
3374
3243
  isAnimationActive: false,
@@ -3377,42 +3246,39 @@ Doughnut.defaultProps = Object.assign({}, import_recharts13.Pie.defaultProps, {
3377
3246
  });
3378
3247
  DoughnutChart.Doughnut = Doughnut;
3379
3248
  DoughnutChart.ChartValue = ChartValue;
3380
- DoughnutChart.Cell = import_recharts13.Cell;
3249
+ DoughnutChart.Cell = import_recharts12.Cell;
3381
3250
 
3382
3251
  // src/charts/PieChart/PieChart.tsx
3383
3252
  var import_react16 = __toESM(require("react"));
3384
- var import_recharts14 = require("recharts");
3385
- var PieChart = (_a) => {
3386
- var _b = _a, { palette } = _b, props = __objRest(_b, ["palette"]);
3387
- return /* @__PURE__ */ import_react16.default.createElement(DefaultPalette, { palette }, /* @__PURE__ */ import_react16.default.createElement(PieChartWrapper, __spreadValues({}, props)));
3253
+ var import_recharts13 = require("recharts");
3254
+ var PieChart = ({ palette, ...props }) => {
3255
+ return /* @__PURE__ */ import_react16.default.createElement(DefaultPalette, { palette }, /* @__PURE__ */ import_react16.default.createElement(PieChartWrapper, { ...props }));
3388
3256
  };
3389
- var PieChartWrapper = (_a) => {
3390
- var _b = _a, { isBusy, busyLabel } = _b, props = __objRest(_b, ["isBusy", "busyLabel"]);
3391
- var _a2;
3257
+ var PieChartWrapper = ({ isBusy, busyLabel, ...props }) => {
3392
3258
  const [pie, children] = extractChildByDisplayName(props.children, PieChart.Pie.displayName);
3393
3259
  const { getDefaultColor } = import_react16.default.useContext(DefaultPaletteContext);
3394
- return /* @__PURE__ */ import_react16.default.createElement(ResponsiveContainer, { width: props.width, height: props.height, isBusy, busyLabel }, /* @__PURE__ */ import_react16.default.createElement(import_recharts14.PieChart, { width: 500, height: 500 }, renderPieChildren(children, { tooltipColor: "fill" }), pie && /* @__PURE__ */ import_react16.default.createElement(import_recharts14.Pie, __spreadProps(__spreadValues({}, pie.props), { fill: (_a2 = pie.props.fill) != null ? _a2 : getDefaultColor(pie.props.dataKey) }))));
3260
+ return /* @__PURE__ */ import_react16.default.createElement(ResponsiveContainer, { width: props.width, height: props.height, isBusy, busyLabel }, /* @__PURE__ */ import_react16.default.createElement(import_recharts13.PieChart, { width: 500, height: 500 }, renderPieChildren(children, { tooltipColor: "fill" }), pie && /* @__PURE__ */ import_react16.default.createElement(import_recharts13.Pie, { ...pie.props, fill: pie.props.fill ?? getDefaultColor(pie.props.dataKey) })));
3395
3261
  };
3396
- var Pie = Object.assign((props) => /* @__PURE__ */ import_react16.default.createElement(import_recharts14.Pie, __spreadValues({}, props)), import_recharts14.Pie);
3397
- Pie.defaultProps = Object.assign({}, import_recharts14.Pie.defaultProps, {
3262
+ var Pie = Object.assign((props) => /* @__PURE__ */ import_react16.default.createElement(import_recharts13.Pie, { ...props }), import_recharts13.Pie);
3263
+ Pie.defaultProps = Object.assign({}, import_recharts13.Pie.defaultProps, {
3398
3264
  fill: void 0,
3399
3265
  isAnimationActive: false,
3400
3266
  innerRadius: 0,
3401
3267
  outerRadius: "80%"
3402
3268
  });
3403
3269
  PieChart.Pie = Pie;
3404
- PieChart.Cell = import_recharts14.Cell;
3270
+ PieChart.Cell = import_recharts13.Cell;
3405
3271
 
3406
3272
  // src/charts/Reference/Reference.tsx
3407
3273
  var import_react17 = __toESM(require("react"));
3408
- var import_recharts15 = require("recharts");
3274
+ var import_recharts14 = require("recharts");
3409
3275
  var ReferenceLine = Object.assign(
3410
- (props) => /* @__PURE__ */ import_react17.default.createElement(import_recharts15.ReferenceLine, __spreadProps(__spreadValues({}, props), { strokeDasharray: "9 3", strokeWidth: 2 })),
3411
- import_recharts15.ReferenceLine
3276
+ (props) => /* @__PURE__ */ import_react17.default.createElement(import_recharts14.ReferenceLine, { ...props, strokeDasharray: "9 3", strokeWidth: 2 }),
3277
+ import_recharts14.ReferenceLine
3412
3278
  );
3413
3279
  var ReferenceArea = Object.assign(
3414
- (props) => /* @__PURE__ */ import_react17.default.createElement(import_recharts15.ReferenceArea, __spreadProps(__spreadValues({}, props), { strokeWidth: 0, fillOpacity: 0.1 })),
3415
- import_recharts15.ReferenceLine
3280
+ (props) => /* @__PURE__ */ import_react17.default.createElement(import_recharts14.ReferenceArea, { ...props, strokeWidth: 0, fillOpacity: 0.1 }),
3281
+ import_recharts14.ReferenceLine
3416
3282
  );
3417
3283
  var Reference = {
3418
3284
  Line: ReferenceLine,