@adecore/charts 0.53.3 → 0.54.1
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.
- package/dist/Heatmap.js +6 -5
- package/dist/Root.js +275 -251
- package/dist/SeriesLegend.js +2 -2
- package/dist/Sparkline.js +2 -2
- package/dist/ValuesBox.d.ts +6 -0
- package/dist/ValuesBox.js +43 -0
- package/dist/annotations.js +1 -1
- package/dist/axes.js +3 -3
- package/dist/overlays.js +121 -115
- package/dist/series.d.ts +1 -1
- package/dist/series.js +1 -1
- package/dist/timeline.js +3 -3
- package/dist/values-table.d.ts +1 -4
- package/dist/values-table.js +1 -4
- package/package.json +3 -3
- package/src/Heatmap.tsx +6 -5
- package/src/Root.tsx +98 -88
- package/src/SeriesLegend.tsx +2 -2
- package/src/Sparkline.tsx +3 -3
- package/src/ValuesBox.tsx +19 -0
- package/src/annotations.tsx +1 -1
- package/src/axes.tsx +3 -3
- package/src/overlays.tsx +5 -4
- package/src/scatter.tsx +1 -1
- package/src/series.tsx +2 -2
- package/src/timeline.tsx +3 -3
- package/src/values-table.ts +1 -2
package/dist/SeriesLegend.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Button, Input, Tooltip } from '@adecore/ui';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { Check, Search } from 'lucide-react';
|
|
5
|
+
import { useId, useState } from 'react';
|
|
5
6
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { Button, Input, Tooltip } from '@adecore/ui';
|
|
7
7
|
import { matchingItems, toggleGroup } from './legend.js';
|
|
8
8
|
/*
|
|
9
9
|
* A legend of many series beside a chart: a search, groups that turn on or off as a whole, a toggle per series and a
|
package/dist/Sparkline.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { Tooltip } from '@adecore/ui';
|
|
3
|
+
import { formatNumber } from '@adecore/ui/format';
|
|
2
4
|
import clsx from 'clsx';
|
|
3
5
|
import { line } from 'd3-shape';
|
|
4
6
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { Tooltip } from '@adecore/ui';
|
|
6
|
-
import { formatNumber } from '@adecore/ui/format';
|
|
7
7
|
import { colorOf } from './color.js';
|
|
8
8
|
import { sparkColumns } from './spark.js';
|
|
9
9
|
/* A small chart without axes, for a row or a tile. Its total is in a tooltip. */
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { ScrollArea } from '@adecore/ui';
|
|
3
|
+
/* The box around a table of values: a frame that scrolls while it is shown, out of sight but still read while it is not. */
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
export function ValuesBox(t0) {
|
|
6
|
+
const $ = _c(6);
|
|
7
|
+
const {
|
|
8
|
+
id,
|
|
9
|
+
shown,
|
|
10
|
+
children
|
|
11
|
+
} = t0;
|
|
12
|
+
if (!shown) {
|
|
13
|
+
let t1;
|
|
14
|
+
if ($[0] !== children || $[1] !== id) {
|
|
15
|
+
t1 = /*#__PURE__*/_jsx("div", {
|
|
16
|
+
id: id,
|
|
17
|
+
className: "sr-only",
|
|
18
|
+
children: children
|
|
19
|
+
});
|
|
20
|
+
$[0] = children;
|
|
21
|
+
$[1] = id;
|
|
22
|
+
$[2] = t1;
|
|
23
|
+
} else {
|
|
24
|
+
t1 = $[2];
|
|
25
|
+
}
|
|
26
|
+
return t1;
|
|
27
|
+
}
|
|
28
|
+
let t1;
|
|
29
|
+
if ($[3] !== children || $[4] !== id) {
|
|
30
|
+
t1 = /*#__PURE__*/_jsx(ScrollArea, {
|
|
31
|
+
axis: "both",
|
|
32
|
+
id: id,
|
|
33
|
+
className: "max-h-80 w-full rounded-md border border-border-soft",
|
|
34
|
+
children: children
|
|
35
|
+
});
|
|
36
|
+
$[3] = children;
|
|
37
|
+
$[4] = id;
|
|
38
|
+
$[5] = t1;
|
|
39
|
+
} else {
|
|
40
|
+
t1 = $[5];
|
|
41
|
+
}
|
|
42
|
+
return t1;
|
|
43
|
+
}
|
package/dist/annotations.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
2
3
|
import { useId } from 'react';
|
|
3
4
|
import { createPortal } from 'react-dom';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
5
|
import { xOf } from './access.js';
|
|
6
6
|
import { colorOf } from './color.js';
|
|
7
7
|
import { useChartContext } from './context.js';
|
package/dist/axes.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { formatRounded } from '@adecore/ui/format';
|
|
3
|
+
import clsx from 'clsx';
|
|
2
4
|
import { useEffect, useId, useRef, useState, useSyncExternalStore } from 'react';
|
|
3
5
|
import { createPortal } from 'react-dom';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
6
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { formatRounded } from '@adecore/ui/format';
|
|
7
7
|
import { useChartContext } from './context.js';
|
|
8
|
-
import { decimalsOf, tickCount } from './scale.js';
|
|
9
8
|
import { useBeforePaint } from './register.js';
|
|
9
|
+
import { decimalsOf, tickCount } from './scale.js';
|
|
10
10
|
import { formatTime, timeLabelOf } from './time-format.js';
|
|
11
11
|
/* Between the end of a label and the plot, and between two labels on the x axis. */
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
package/dist/overlays.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { Button, Icon, Surface, useContentSize } from '@adecore/ui';
|
|
3
|
+
import clsx from 'clsx';
|
|
2
4
|
import { useId, useState } from 'react';
|
|
3
5
|
import { createPortal } from 'react-dom';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
6
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { Button, Icon, Surface, useContentSize } from '@adecore/ui';
|
|
7
7
|
import { useChartContext } from './context.js';
|
|
8
8
|
import { tableClasses } from './values-table.js';
|
|
9
|
+
import { ValuesBox } from "./ValuesBox.js";
|
|
9
10
|
/* Between the cursor and the card, and the least room the card keeps to the edge of the chart. */
|
|
10
11
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
12
|
const OFFSET = 12;
|
|
@@ -589,7 +590,7 @@ export function ChartLegend(t0) {
|
|
|
589
590
|
}
|
|
590
591
|
/* A toggle that shows every value as a table. Hidden, the table is still there for a screen reader. */
|
|
591
592
|
export function ChartTable(t0) {
|
|
592
|
-
const $ = _c(
|
|
593
|
+
const $ = _c(87);
|
|
593
594
|
const {
|
|
594
595
|
toggle: t1,
|
|
595
596
|
open,
|
|
@@ -640,6 +641,7 @@ export function ChartTable(t0) {
|
|
|
640
641
|
t4 = $[7];
|
|
641
642
|
}
|
|
642
643
|
const columns = t4;
|
|
644
|
+
let T0;
|
|
643
645
|
let t10;
|
|
644
646
|
let t11;
|
|
645
647
|
let t12;
|
|
@@ -662,24 +664,24 @@ export function ChartTable(t0) {
|
|
|
662
664
|
})]
|
|
663
665
|
}]);
|
|
664
666
|
let t16;
|
|
665
|
-
if ($[
|
|
667
|
+
if ($[31] !== shown) {
|
|
666
668
|
t16 = tableClasses(shown);
|
|
667
|
-
$[
|
|
668
|
-
$[
|
|
669
|
+
$[31] = shown;
|
|
670
|
+
$[32] = t16;
|
|
669
671
|
} else {
|
|
670
|
-
t16 = $[
|
|
672
|
+
t16 = $[32];
|
|
671
673
|
}
|
|
672
674
|
const classes = t16;
|
|
673
675
|
t14 = createPortal;
|
|
674
676
|
t11 = ref;
|
|
675
|
-
if ($[
|
|
677
|
+
if ($[33] !== className) {
|
|
676
678
|
t12 = clsx("flex flex-col items-start gap-2", className);
|
|
677
|
-
$[
|
|
678
|
-
$[
|
|
679
|
+
$[33] = className;
|
|
680
|
+
$[34] = t12;
|
|
679
681
|
} else {
|
|
680
|
-
t12 = $[
|
|
682
|
+
t12 = $[34];
|
|
681
683
|
}
|
|
682
|
-
if ($[
|
|
684
|
+
if ($[35] !== id || $[36] !== setShown || $[37] !== shown || $[38] !== t || $[39] !== toggle) {
|
|
683
685
|
t13 = toggle && /*#__PURE__*/_jsx(Button, {
|
|
684
686
|
size: "sm",
|
|
685
687
|
"aria-expanded": shown,
|
|
@@ -687,100 +689,101 @@ export function ChartTable(t0) {
|
|
|
687
689
|
onClick: () => setShown(!shown),
|
|
688
690
|
children: shown ? t("values.hide") : t("values.show")
|
|
689
691
|
});
|
|
690
|
-
$[
|
|
691
|
-
$[
|
|
692
|
-
$[
|
|
693
|
-
$[
|
|
694
|
-
$[
|
|
695
|
-
$[
|
|
692
|
+
$[35] = id;
|
|
693
|
+
$[36] = setShown;
|
|
694
|
+
$[37] = shown;
|
|
695
|
+
$[38] = t;
|
|
696
|
+
$[39] = toggle;
|
|
697
|
+
$[40] = t13;
|
|
696
698
|
} else {
|
|
697
|
-
t13 = $[
|
|
699
|
+
t13 = $[40];
|
|
698
700
|
}
|
|
701
|
+
T0 = ValuesBox;
|
|
699
702
|
t9 = id;
|
|
700
|
-
t10 =
|
|
703
|
+
t10 = shown;
|
|
701
704
|
t6 = classes.table;
|
|
702
705
|
let t17;
|
|
703
|
-
if ($[
|
|
706
|
+
if ($[41] !== chart.label || $[42] !== t) {
|
|
704
707
|
t17 = t("values.caption", {
|
|
705
708
|
label: chart.label
|
|
706
709
|
});
|
|
707
|
-
$[
|
|
708
|
-
$[
|
|
709
|
-
$[
|
|
710
|
+
$[41] = chart.label;
|
|
711
|
+
$[42] = t;
|
|
712
|
+
$[43] = t17;
|
|
710
713
|
} else {
|
|
711
|
-
t17 = $[
|
|
714
|
+
t17 = $[43];
|
|
712
715
|
}
|
|
713
|
-
if ($[
|
|
716
|
+
if ($[44] !== t17) {
|
|
714
717
|
t7 = /*#__PURE__*/_jsx("caption", {
|
|
715
718
|
className: "sr-only",
|
|
716
719
|
children: t17
|
|
717
720
|
});
|
|
718
|
-
$[
|
|
719
|
-
$[
|
|
721
|
+
$[44] = t17;
|
|
722
|
+
$[45] = t7;
|
|
720
723
|
} else {
|
|
721
|
-
t7 = $[
|
|
724
|
+
t7 = $[45];
|
|
722
725
|
}
|
|
723
726
|
const t18 = classes.head;
|
|
724
727
|
let t19;
|
|
725
|
-
if ($[
|
|
728
|
+
if ($[46] !== grouped) {
|
|
726
729
|
t19 = grouped && /*#__PURE__*/_jsx("td", {});
|
|
727
|
-
$[
|
|
728
|
-
$[
|
|
730
|
+
$[46] = grouped;
|
|
731
|
+
$[47] = t19;
|
|
729
732
|
} else {
|
|
730
|
-
t19 = $[
|
|
733
|
+
t19 = $[47];
|
|
731
734
|
}
|
|
732
735
|
let t20;
|
|
733
|
-
if ($[
|
|
736
|
+
if ($[48] === Symbol.for("react.memo_cache_sentinel")) {
|
|
734
737
|
t20 = /*#__PURE__*/_jsx("td", {});
|
|
735
|
-
$[
|
|
738
|
+
$[48] = t20;
|
|
736
739
|
} else {
|
|
737
|
-
t20 = $[
|
|
740
|
+
t20 = $[48];
|
|
738
741
|
}
|
|
739
742
|
let t21;
|
|
740
|
-
if ($[
|
|
743
|
+
if ($[49] !== classes.column || $[50] !== columns) {
|
|
741
744
|
let t22;
|
|
742
|
-
if ($[
|
|
745
|
+
if ($[52] !== classes.column) {
|
|
743
746
|
t22 = (column, index_0) => /*#__PURE__*/_jsx("th", {
|
|
744
747
|
scope: "col",
|
|
745
748
|
className: classes.column,
|
|
746
749
|
children: column
|
|
747
750
|
}, index_0);
|
|
748
|
-
$[
|
|
749
|
-
$[
|
|
751
|
+
$[52] = classes.column;
|
|
752
|
+
$[53] = t22;
|
|
750
753
|
} else {
|
|
751
|
-
t22 = $[
|
|
754
|
+
t22 = $[53];
|
|
752
755
|
}
|
|
753
756
|
t21 = columns.map(t22);
|
|
754
|
-
$[
|
|
755
|
-
$[
|
|
756
|
-
$[
|
|
757
|
+
$[49] = classes.column;
|
|
758
|
+
$[50] = columns;
|
|
759
|
+
$[51] = t21;
|
|
757
760
|
} else {
|
|
758
|
-
t21 = $[
|
|
761
|
+
t21 = $[51];
|
|
759
762
|
}
|
|
760
763
|
let t22;
|
|
761
|
-
if ($[
|
|
764
|
+
if ($[54] !== t19 || $[55] !== t21) {
|
|
762
765
|
t22 = /*#__PURE__*/_jsxs("tr", {
|
|
763
766
|
children: [t19, t20, t21]
|
|
764
767
|
});
|
|
765
|
-
$[
|
|
766
|
-
$[
|
|
767
|
-
$[
|
|
768
|
+
$[54] = t19;
|
|
769
|
+
$[55] = t21;
|
|
770
|
+
$[56] = t22;
|
|
768
771
|
} else {
|
|
769
|
-
t22 = $[
|
|
772
|
+
t22 = $[56];
|
|
770
773
|
}
|
|
771
|
-
if ($[
|
|
774
|
+
if ($[57] !== classes.head || $[58] !== t22) {
|
|
772
775
|
t8 = /*#__PURE__*/_jsx("thead", {
|
|
773
776
|
className: t18,
|
|
774
777
|
children: t22
|
|
775
778
|
});
|
|
776
|
-
$[
|
|
777
|
-
$[
|
|
778
|
-
$[
|
|
779
|
+
$[57] = classes.head;
|
|
780
|
+
$[58] = t22;
|
|
781
|
+
$[59] = t8;
|
|
779
782
|
} else {
|
|
780
|
-
t8 = $[
|
|
783
|
+
t8 = $[59];
|
|
781
784
|
}
|
|
782
785
|
let t23;
|
|
783
|
-
if ($[
|
|
786
|
+
if ($[60] !== classes.cell || $[61] !== classes.row || $[62] !== classes.rowHeading || $[63] !== grouped || $[64] !== shown) {
|
|
784
787
|
t23 = row_0 => /*#__PURE__*/_jsxs("tr", {
|
|
785
788
|
className: classes.row,
|
|
786
789
|
children: [grouped && /*#__PURE__*/_jsx("td", {
|
|
@@ -795,14 +798,14 @@ export function ChartTable(t0) {
|
|
|
795
798
|
children: value_0
|
|
796
799
|
}, index_1))]
|
|
797
800
|
}, row_0.key);
|
|
798
|
-
$[
|
|
799
|
-
$[
|
|
800
|
-
$[
|
|
801
|
-
$[
|
|
802
|
-
$[
|
|
803
|
-
$[
|
|
801
|
+
$[60] = classes.cell;
|
|
802
|
+
$[61] = classes.row;
|
|
803
|
+
$[62] = classes.rowHeading;
|
|
804
|
+
$[63] = grouped;
|
|
805
|
+
$[64] = shown;
|
|
806
|
+
$[65] = t23;
|
|
804
807
|
} else {
|
|
805
|
-
t23 = $[
|
|
808
|
+
t23 = $[65];
|
|
806
809
|
}
|
|
807
810
|
t5 = rows.map(t23);
|
|
808
811
|
$[8] = chart;
|
|
@@ -817,90 +820,93 @@ export function ChartTable(t0) {
|
|
|
817
820
|
$[17] = t;
|
|
818
821
|
$[18] = toggle;
|
|
819
822
|
$[19] = xColumn;
|
|
820
|
-
$[20] =
|
|
821
|
-
$[21] =
|
|
822
|
-
$[22] =
|
|
823
|
-
$[23] =
|
|
824
|
-
$[24] =
|
|
825
|
-
$[25] =
|
|
826
|
-
$[26] =
|
|
827
|
-
$[27] =
|
|
828
|
-
$[28] =
|
|
829
|
-
$[29] =
|
|
823
|
+
$[20] = T0;
|
|
824
|
+
$[21] = t10;
|
|
825
|
+
$[22] = t11;
|
|
826
|
+
$[23] = t12;
|
|
827
|
+
$[24] = t13;
|
|
828
|
+
$[25] = t14;
|
|
829
|
+
$[26] = t5;
|
|
830
|
+
$[27] = t6;
|
|
831
|
+
$[28] = t7;
|
|
832
|
+
$[29] = t8;
|
|
833
|
+
$[30] = t9;
|
|
830
834
|
} else {
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
835
|
+
T0 = $[20];
|
|
836
|
+
t10 = $[21];
|
|
837
|
+
t11 = $[22];
|
|
838
|
+
t12 = $[23];
|
|
839
|
+
t13 = $[24];
|
|
840
|
+
t14 = $[25];
|
|
841
|
+
t5 = $[26];
|
|
842
|
+
t6 = $[27];
|
|
843
|
+
t7 = $[28];
|
|
844
|
+
t8 = $[29];
|
|
845
|
+
t9 = $[30];
|
|
841
846
|
}
|
|
842
847
|
let t15;
|
|
843
|
-
if ($[
|
|
848
|
+
if ($[66] !== t5) {
|
|
844
849
|
t15 = /*#__PURE__*/_jsx("tbody", {
|
|
845
850
|
children: t5
|
|
846
851
|
});
|
|
847
|
-
$[
|
|
848
|
-
$[
|
|
852
|
+
$[66] = t5;
|
|
853
|
+
$[67] = t15;
|
|
849
854
|
} else {
|
|
850
|
-
t15 = $[
|
|
855
|
+
t15 = $[67];
|
|
851
856
|
}
|
|
852
857
|
let t16;
|
|
853
|
-
if ($[
|
|
858
|
+
if ($[68] !== t15 || $[69] !== t6 || $[70] !== t7 || $[71] !== t8) {
|
|
854
859
|
t16 = /*#__PURE__*/_jsxs("table", {
|
|
855
860
|
className: t6,
|
|
856
861
|
children: [t7, t8, t15]
|
|
857
862
|
});
|
|
858
|
-
$[
|
|
859
|
-
$[
|
|
860
|
-
$[
|
|
861
|
-
$[
|
|
862
|
-
$[
|
|
863
|
+
$[68] = t15;
|
|
864
|
+
$[69] = t6;
|
|
865
|
+
$[70] = t7;
|
|
866
|
+
$[71] = t8;
|
|
867
|
+
$[72] = t16;
|
|
863
868
|
} else {
|
|
864
|
-
t16 = $[
|
|
869
|
+
t16 = $[72];
|
|
865
870
|
}
|
|
866
871
|
let t17;
|
|
867
|
-
if ($[
|
|
868
|
-
t17 = /*#__PURE__*/_jsx(
|
|
872
|
+
if ($[73] !== T0 || $[74] !== t10 || $[75] !== t16 || $[76] !== t9) {
|
|
873
|
+
t17 = /*#__PURE__*/_jsx(T0, {
|
|
869
874
|
id: t9,
|
|
870
|
-
|
|
875
|
+
shown: t10,
|
|
871
876
|
children: t16
|
|
872
877
|
});
|
|
873
|
-
$[
|
|
874
|
-
$[
|
|
875
|
-
$[
|
|
876
|
-
$[
|
|
878
|
+
$[73] = T0;
|
|
879
|
+
$[74] = t10;
|
|
880
|
+
$[75] = t16;
|
|
881
|
+
$[76] = t9;
|
|
882
|
+
$[77] = t17;
|
|
877
883
|
} else {
|
|
878
|
-
t17 = $[
|
|
884
|
+
t17 = $[77];
|
|
879
885
|
}
|
|
880
886
|
let t18;
|
|
881
|
-
if ($[
|
|
887
|
+
if ($[78] !== t11 || $[79] !== t12 || $[80] !== t13 || $[81] !== t17) {
|
|
882
888
|
t18 = /*#__PURE__*/_jsxs("div", {
|
|
883
889
|
ref: t11,
|
|
884
890
|
className: t12,
|
|
885
891
|
children: [t13, t17]
|
|
886
892
|
});
|
|
887
|
-
$[
|
|
888
|
-
$[
|
|
889
|
-
$[
|
|
890
|
-
$[
|
|
891
|
-
$[
|
|
893
|
+
$[78] = t11;
|
|
894
|
+
$[79] = t12;
|
|
895
|
+
$[80] = t13;
|
|
896
|
+
$[81] = t17;
|
|
897
|
+
$[82] = t18;
|
|
892
898
|
} else {
|
|
893
|
-
t18 = $[
|
|
899
|
+
t18 = $[82];
|
|
894
900
|
}
|
|
895
901
|
let t19;
|
|
896
|
-
if ($[
|
|
902
|
+
if ($[83] !== chart.elements.table || $[84] !== t14 || $[85] !== t18) {
|
|
897
903
|
t19 = t14(t18, chart.elements.table);
|
|
898
|
-
$[
|
|
899
|
-
$[
|
|
900
|
-
$[
|
|
901
|
-
$[
|
|
904
|
+
$[83] = chart.elements.table;
|
|
905
|
+
$[84] = t14;
|
|
906
|
+
$[85] = t18;
|
|
907
|
+
$[86] = t19;
|
|
902
908
|
} else {
|
|
903
|
-
t19 = $[
|
|
909
|
+
t19 = $[86];
|
|
904
910
|
}
|
|
905
911
|
return t19;
|
|
906
912
|
}
|
package/dist/series.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ReactNode, type Ref } from 'react';
|
|
2
1
|
import type { IconProps } from '@adecore/ui';
|
|
2
|
+
import { type ReactNode, type Ref } from 'react';
|
|
3
3
|
import type { ChartAccessor, ChartColor, ChartCurve } from './types.ts';
|
|
4
4
|
export interface ChartLineProps<Row> {
|
|
5
5
|
readonly value: ChartAccessor<Row, number | null | undefined>;
|
package/dist/series.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { useContext, useEffect, useId, useRef, useState } from 'react';
|
|
3
2
|
import clsx from 'clsx';
|
|
4
3
|
import { area, curveLinear, curveMonotoneX, curveStepAfter, line } from 'd3-shape';
|
|
4
|
+
import { useContext, useEffect, useId, useRef, useState } from 'react';
|
|
5
5
|
import { numberOf, readValue, warnOnce } from './access.js';
|
|
6
6
|
import { columnsIn, endRoundedBar, endRoundedColumn, guessLabelWidth, LABEL_INSET, LABEL_LIFT, placeValueLabels, segmentOf } from './band.js';
|
|
7
7
|
import { colorOf, seriesColor } from './color.js';
|
package/dist/timeline.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { createContext, useContext, useId, useState } from 'react';
|
|
3
|
-
import clsx from 'clsx';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
2
|
import { Tooltip, Tree } from '@adecore/ui';
|
|
6
3
|
import { formatNumber, formatPreciseDuration } from '@adecore/ui/format';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { createContext, useContext, useId, useState } from 'react';
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { colorOf, seriesColor } from './color.js';
|
|
8
8
|
import { barOf, durationTicks, kindTimes, parentIds, percentOf, timelineExtent, timelineMove, timelineTree, visibleRows } from './timeline-layout.js';
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
package/dist/values-table.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
declare const TABLE_CLASSES: {
|
|
2
|
-
box: string;
|
|
3
2
|
table: string;
|
|
4
3
|
head: string;
|
|
5
4
|
column: string;
|
|
@@ -7,7 +6,5 @@ declare const TABLE_CLASSES: {
|
|
|
7
6
|
rowHeading: string;
|
|
8
7
|
cell: string;
|
|
9
8
|
};
|
|
10
|
-
export declare const tableClasses: (shown: boolean) => Partial<typeof TABLE_CLASSES
|
|
11
|
-
box: string;
|
|
12
|
-
};
|
|
9
|
+
export declare const tableClasses: (shown: boolean) => Partial<typeof TABLE_CLASSES>;
|
|
13
10
|
export {};
|
package/dist/values-table.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* A table of values as it is shown; hidden, it stays for a screen reader without any of these. */
|
|
2
2
|
const TABLE_CLASSES = {
|
|
3
|
-
box: 'max-h-80 w-full overflow-auto rounded-md border border-border-soft',
|
|
4
3
|
table: 'w-full border-collapse text-xs tabular-nums',
|
|
5
4
|
head: 'sticky top-0 bg-surface-hover',
|
|
6
5
|
column: 'h-8 px-2 text-right font-medium whitespace-nowrap text-text-muted',
|
|
@@ -8,6 +7,4 @@ const TABLE_CLASSES = {
|
|
|
8
7
|
rowHeading: 'h-8 px-2 text-left font-normal whitespace-nowrap text-text-muted',
|
|
9
8
|
cell: 'h-8 px-2 text-right whitespace-nowrap text-text'
|
|
10
9
|
};
|
|
11
|
-
export const tableClasses = shown => shown ? TABLE_CLASSES : {
|
|
12
|
-
box: 'sr-only'
|
|
13
|
-
};
|
|
10
|
+
export const tableClasses = shown => shown ? TABLE_CLASSES : {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/charts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.1",
|
|
4
4
|
"description": "Series charts, scatters, heatmaps, trace timelines and sparklines in the theme of @adecore/ui, readable by keyboard and screen reader.",
|
|
5
5
|
"license": "FSL-1.1-MIT",
|
|
6
6
|
"author": "Bas Milius",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"lucide-react": "^1.65.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@adecore/ui": "^0.
|
|
46
|
+
"@adecore/ui": "^0.54.1",
|
|
47
47
|
"i18next": "^26.4.2",
|
|
48
48
|
"react": "^19.3.0",
|
|
49
49
|
"react-dom": "^19.3.0",
|
|
50
50
|
"react-i18next": "^17.0.15"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@adecore/ui": "0.
|
|
53
|
+
"@adecore/ui": "0.54.1",
|
|
54
54
|
"@types/bun": "^1.4.4",
|
|
55
55
|
"@types/react": "^19.3.0",
|
|
56
56
|
"@types/react-dom": "^19.3.0",
|
package/src/Heatmap.tsx
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { useId, useState, useSyncExternalStore, type CSSProperties, type KeyboardEvent, type Ref } from 'react';
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
1
|
import { Button, Surface } from '@adecore/ui';
|
|
5
2
|
import { formatNumber } from '@adecore/ui/format';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useId, useState, useSyncExternalStore, type CSSProperties, type KeyboardEvent, type Ref } from 'react';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import { colorOf } from './color.ts';
|
|
7
7
|
import { createHeatmapCursor, type HeatmapCursor } from './heat-cursor.ts';
|
|
8
8
|
import { FLOOR, heatMix, heatShare, moveCell, type HeatCell } from './heat.ts';
|
|
9
9
|
import type { ChartColor } from './types.ts';
|
|
10
10
|
import { tableClasses } from './values-table.ts';
|
|
11
|
+
import { ValuesBox } from './ValuesBox.tsx';
|
|
11
12
|
|
|
12
13
|
export type HeatmapCell = HeatCell;
|
|
13
14
|
|
|
@@ -305,7 +306,7 @@ export function Heatmap({
|
|
|
305
306
|
{shown ? t('values.hide') : t('values.show')}
|
|
306
307
|
</Button>
|
|
307
308
|
)}
|
|
308
|
-
<
|
|
309
|
+
<ValuesBox id={`${id}-table`} shown={table && shown}>
|
|
309
310
|
<table className={classes.table}>
|
|
310
311
|
<caption className="sr-only">{t('values.caption', { label })}</caption>
|
|
311
312
|
<thead className={classes.head}>
|
|
@@ -337,7 +338,7 @@ export function Heatmap({
|
|
|
337
338
|
))}
|
|
338
339
|
</tbody>
|
|
339
340
|
</table>
|
|
340
|
-
</
|
|
341
|
+
</ValuesBox>
|
|
341
342
|
</div>
|
|
342
343
|
)}
|
|
343
344
|
<p id={`${id}-hint`} className="sr-only">
|