@sproutsocial/seeds-react-data-viz 0.16.0 → 0.16.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/{axis-PJwu5Xmo.d.ts → axis-BVPkC6iF.d.ts} +1 -1
- package/dist/{axis-DXzufRRj.d.mts → axis-BjucJt39.d.mts} +1 -1
- package/dist/bar/index.d.mts +2 -2
- package/dist/bar/index.d.ts +2 -2
- package/dist/bar/index.js +10 -10
- package/dist/{chunk-XVV7PYQE.js → chunk-EJYDQYLE.js} +14 -14
- package/dist/{chunk-XVV7PYQE.js.map → chunk-EJYDQYLE.js.map} +1 -1
- package/dist/{chunk-EEVKTTT3.js → chunk-WEKDYQ4T.js} +1 -1
- package/dist/chunk-WEKDYQ4T.js.map +1 -0
- package/dist/esm/bar/index.js +2 -2
- package/dist/esm/{chunk-ZXXFRUVF.js → chunk-DKTW56NJ.js} +2 -2
- package/dist/esm/{chunk-ZXXFRUVF.js.map → chunk-DKTW56NJ.js.map} +1 -1
- package/dist/esm/{chunk-LC3HGWDD.js → chunk-Z4LOM4OZ.js} +1 -1
- package/dist/esm/chunk-Z4LOM4OZ.js.map +1 -0
- package/dist/esm/export/index.js.map +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/line-area/index.js +2 -2
- package/dist/export/index.js.map +1 -1
- package/dist/index.d.mts +23 -23
- package/dist/index.d.ts +23 -23
- package/dist/index.js +59 -59
- package/dist/index.js.map +1 -1
- package/dist/line-area/index.d.mts +2 -2
- package/dist/line-area/index.d.ts +2 -2
- package/dist/line-area/index.js +10 -10
- package/dist/{types-B7ILUQ6_.d.mts → types-DxrhdAdn.d.mts} +3 -3
- package/dist/{types-B7ILUQ6_.d.ts → types-DxrhdAdn.d.ts} +3 -3
- package/package.json +3 -2
- package/dist/chunk-EEVKTTT3.js.map +0 -1
- package/dist/esm/chunk-LC3HGWDD.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkWEKDYQ4Tjs = require('./chunk-WEKDYQ4T.js');
|
|
34
34
|
|
|
35
35
|
// src/components/AreaChart/AreaChart.tsx
|
|
36
36
|
var _react = require('react');
|
|
@@ -49,13 +49,13 @@ var getAreaChartLegendLabels = ({
|
|
|
49
49
|
data
|
|
50
50
|
}) => {
|
|
51
51
|
return data.map((series, index) => ({
|
|
52
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
52
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabelContentWithIcon, { icon: series.icon, children: series.name }),
|
|
53
53
|
color: _optionalChain([series, 'access', _2 => _2.styles, 'optionalAccess', _3 => _3.color]) || _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]
|
|
54
54
|
}));
|
|
55
55
|
};
|
|
56
56
|
var AreaChartLegend = _react.memo.call(void 0,
|
|
57
57
|
function AreaChartLegend2({ data }) {
|
|
58
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
58
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegend, { legendLabels: getAreaChartLegendLabels({ data }) });
|
|
59
59
|
}
|
|
60
60
|
);
|
|
61
61
|
|
|
@@ -88,7 +88,7 @@ var AreaChartTooltip = _react.memo.call(void 0,
|
|
|
88
88
|
return {
|
|
89
89
|
cells: [
|
|
90
90
|
{
|
|
91
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
91
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${name}: `, children: name }) }) })
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
content: value === null && invalidNumberLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { children: invalidNumberLabel }) : numberFormat === "duration" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactduration.Duration, { locale: textLocale, milliseconds: value }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -136,16 +136,16 @@ var AreaChartTooltip = _react.memo.call(void 0,
|
|
|
136
136
|
isAppendedRow: true
|
|
137
137
|
}
|
|
138
138
|
] : [];
|
|
139
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
139
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltip, { children: [
|
|
140
140
|
xAnnotationDetails ? xAnnotationDetails() : void 0,
|
|
141
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
141
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
|
|
142
142
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
143
|
-
|
|
143
|
+
_chunkWEKDYQ4Tjs.ChartTooltipTable,
|
|
144
144
|
{
|
|
145
145
|
rows: [...rows, ...appendedRows]
|
|
146
146
|
}
|
|
147
147
|
),
|
|
148
|
-
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
148
|
+
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
|
|
149
149
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
|
|
150
150
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
|
|
151
151
|
] }) : tooltipClickLabel }) : null
|
|
@@ -165,7 +165,7 @@ var ChartXAnnotationMarkerPortal = _react.memo.call(void 0,
|
|
|
165
165
|
chartContainer
|
|
166
166
|
}) {
|
|
167
167
|
const annotationContainers = _react.useRef.call(void 0, {});
|
|
168
|
-
const [
|
|
168
|
+
const [, setRenderCount] = _react.useState.call(void 0, 0);
|
|
169
169
|
const forceRender = () => setRenderCount((prev) => prev + 1);
|
|
170
170
|
_react.useEffect.call(void 0, () => {
|
|
171
171
|
if (annotationContext.labels) {
|
|
@@ -459,7 +459,7 @@ var useTimeSeriesChartOptions = ({
|
|
|
459
459
|
return onClick({ x: _optionalChain([this, 'optionalAccess', _17 => _17.hoverPoint, 'optionalAccess', _18 => _18.x]) });
|
|
460
460
|
} : void 0,
|
|
461
461
|
load: function() {
|
|
462
|
-
const tooltipId =
|
|
462
|
+
const tooltipId = _chunkWEKDYQ4Tjs.generateChartTooltipPortalId.call(void 0, this.index);
|
|
463
463
|
attachTooltipEventListeners(this.series, tooltipId);
|
|
464
464
|
}
|
|
465
465
|
}
|
|
@@ -538,7 +538,7 @@ var useTimeSeriesChartOptions = ({
|
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
},
|
|
541
|
-
series:
|
|
541
|
+
series: _chunkWEKDYQ4Tjs.transformDataToSeries.call(void 0, { data }, seriesType),
|
|
542
542
|
time: { timezone },
|
|
543
543
|
tooltip: {
|
|
544
544
|
enabled: !disableTooltips
|
|
@@ -586,7 +586,7 @@ var useTimeSeriesChartOptions = ({
|
|
|
586
586
|
return yAxisLabelFormatter2 ? yAxisLabelFormatter2({
|
|
587
587
|
y: this.value,
|
|
588
588
|
yValues: this.axis.tickPositions
|
|
589
|
-
}) :
|
|
589
|
+
}) : _chunkWEKDYQ4Tjs.yAxisLabelFormatter.call(void 0, {
|
|
590
590
|
currency,
|
|
591
591
|
numberFormat,
|
|
592
592
|
numberLocale,
|
|
@@ -617,7 +617,7 @@ var useTimeSeriesChartOptions = ({
|
|
|
617
617
|
]);
|
|
618
618
|
return { options, chart, callback };
|
|
619
619
|
};
|
|
620
|
-
var xAxisLabelFormatterDefault =
|
|
620
|
+
var xAxisLabelFormatterDefault = _chunkWEKDYQ4Tjs.xAxisLabelFormatter;
|
|
621
621
|
|
|
622
622
|
// src/components/AreaChart/AreaChart.tsx
|
|
623
623
|
|
|
@@ -625,7 +625,7 @@ var xAxisLabelFormatterDefault = _chunkEEVKTTT3js.xAxisLabelFormatter;
|
|
|
625
625
|
_accessibility2.default.call(void 0, _highcharts2.default);
|
|
626
626
|
_annotations2.default.call(void 0, _highcharts2.default);
|
|
627
627
|
var StyledBox = _styledcomponents2.default.call(void 0, _seedsreactbox.Box)`
|
|
628
|
-
${
|
|
628
|
+
${_chunkWEKDYQ4Tjs.areaChartStyles}
|
|
629
629
|
`;
|
|
630
630
|
var AreaChart = _react.memo.call(void 0, function AreaChart2(props) {
|
|
631
631
|
const { data } = props;
|
|
@@ -668,7 +668,7 @@ var AreaChartWithData = _react.memo.call(void 0, function AreaChartWithData2({
|
|
|
668
668
|
(series, index) => _nullishCoalesce(_optionalChain([series, 'access', _21 => _21.styles, 'optionalAccess', _22 => _22.color]), () => ( _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]))
|
|
669
669
|
);
|
|
670
670
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
671
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
671
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.GlobalChartStyleOverrides, {}),
|
|
672
672
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
673
673
|
StyledBox,
|
|
674
674
|
{
|
|
@@ -693,11 +693,11 @@ var AreaChartWithData = _react.memo.call(void 0, function AreaChartWithData2({
|
|
|
693
693
|
}
|
|
694
694
|
) : null,
|
|
695
695
|
chart && !disableTooltips ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
696
|
-
|
|
696
|
+
_chunkWEKDYQ4Tjs.ChartTooltipPortal,
|
|
697
697
|
{
|
|
698
698
|
chart,
|
|
699
699
|
renderContent: (context) => {
|
|
700
|
-
const tooltipData =
|
|
700
|
+
const tooltipData = _chunkWEKDYQ4Tjs.transformTimeSeriesTooltipData.call(void 0, {
|
|
701
701
|
context,
|
|
702
702
|
data
|
|
703
703
|
});
|
|
@@ -739,8 +739,8 @@ var AreaChartWithData = _react.memo.call(void 0, function AreaChartWithData2({
|
|
|
739
739
|
|
|
740
740
|
|
|
741
741
|
var ChartXAnnotationDetails = _react.memo.call(void 0,
|
|
742
|
-
({ iconName, text })
|
|
743
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
742
|
+
function ChartXAnnotationDetails2({ iconName, text }) {
|
|
743
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltipHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
|
|
744
744
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: iconName, size: "mini", color: "icon.base" }),
|
|
745
745
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.body", fontSize: 200, children: text })
|
|
746
746
|
] }) });
|
|
@@ -753,7 +753,7 @@ var ChartXAnnotationDetails = _react.memo.call(void 0,
|
|
|
753
753
|
|
|
754
754
|
|
|
755
755
|
var ChartXAnnotationMarker = _react.memo.call(void 0,
|
|
756
|
-
({ iconName })
|
|
756
|
+
function ChartXAnnotationMarker2({ iconName }) {
|
|
757
757
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", flexDirection: "column", alignItems: "center", gap: 200, children: [
|
|
758
758
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
759
759
|
_seedsreactbox.Box,
|
|
@@ -789,13 +789,13 @@ var getDonutChartLegendLabels = ({
|
|
|
789
789
|
data
|
|
790
790
|
}) => {
|
|
791
791
|
return data.map((slice, index) => ({
|
|
792
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
792
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabelContentWithIcon, { icon: slice.icon, children: slice.name }),
|
|
793
793
|
color: _optionalChain([slice, 'access', _29 => _29.styles, 'optionalAccess', _30 => _30.color]) || _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]
|
|
794
794
|
}));
|
|
795
795
|
};
|
|
796
796
|
var DonutChartLegend = _react.memo.call(void 0,
|
|
797
797
|
function DonutChartLegend2({ data }) {
|
|
798
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
798
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegend, { legendLabels: getDonutChartLegendLabels({ data }) });
|
|
799
799
|
}
|
|
800
800
|
);
|
|
801
801
|
|
|
@@ -825,7 +825,7 @@ var DonutChartTooltip = _react.memo.call(void 0,
|
|
|
825
825
|
{
|
|
826
826
|
cells: [
|
|
827
827
|
{
|
|
828
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
828
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${name}: `, children: name }) }) })
|
|
829
829
|
},
|
|
830
830
|
{
|
|
831
831
|
content: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "inline-flex", alignItems: "center", gap: 350, children: [
|
|
@@ -854,9 +854,9 @@ var DonutChartTooltip = _react.memo.call(void 0,
|
|
|
854
854
|
]
|
|
855
855
|
}
|
|
856
856
|
];
|
|
857
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
858
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
859
|
-
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
857
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltip, { children: [
|
|
858
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltipTable, { rows }),
|
|
859
|
+
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
|
|
860
860
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
|
|
861
861
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
|
|
862
862
|
] }) : tooltipClickLabel }) : null
|
|
@@ -885,7 +885,7 @@ var transformDonutChartTooltipData = ({
|
|
|
885
885
|
|
|
886
886
|
_accessibility2.default.call(void 0, _highcharts2.default);
|
|
887
887
|
var StyledBox2 = _styledcomponents2.default.call(void 0, _seedsreactbox.Box)`
|
|
888
|
-
${
|
|
888
|
+
${_chunkWEKDYQ4Tjs.donutChartStyles}
|
|
889
889
|
`;
|
|
890
890
|
var DonutChart = _react.memo.call(void 0, function DonutChart2(props) {
|
|
891
891
|
const { data } = props;
|
|
@@ -923,7 +923,7 @@ var DonutChartWithData = _react.memo.call(void 0,
|
|
|
923
923
|
events: {
|
|
924
924
|
render: function() {
|
|
925
925
|
const allSlices = _nullishCoalesce(_optionalChain([this, 'access', _38 => _38.series, 'access', _39 => _39[0], 'optionalAccess', _40 => _40.data]), () => ( []));
|
|
926
|
-
const tooltipId =
|
|
926
|
+
const tooltipId = _chunkWEKDYQ4Tjs.generateChartTooltipPortalId.call(void 0, this.index);
|
|
927
927
|
allSlices.forEach((slice) => {
|
|
928
928
|
const sliceElement = _optionalChain([slice, 'optionalAccess', _41 => _41.graphic, 'optionalAccess', _42 => _42.element]);
|
|
929
929
|
_optionalChain([sliceElement, 'optionalAccess', _43 => _43.setAttribute, 'call', _44 => _44("aria-describedby", tooltipId)]);
|
|
@@ -963,7 +963,7 @@ var DonutChartWithData = _react.memo.call(void 0,
|
|
|
963
963
|
(series, index) => _nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'access', _49 => _49.styles, 'optionalAccess', _50 => _50.color]), () => ( _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index])), () => ( ""))
|
|
964
964
|
);
|
|
965
965
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
966
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
966
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.GlobalChartStyleOverrides, {}),
|
|
967
967
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
968
968
|
StyledBox2,
|
|
969
969
|
{
|
|
@@ -980,7 +980,7 @@ var DonutChartWithData = _react.memo.call(void 0,
|
|
|
980
980
|
}
|
|
981
981
|
),
|
|
982
982
|
chart && !disableTooltips ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
983
|
-
|
|
983
|
+
_chunkWEKDYQ4Tjs.ChartTooltipPortal,
|
|
984
984
|
{
|
|
985
985
|
chart,
|
|
986
986
|
renderContent: (context) => {
|
|
@@ -1040,7 +1040,7 @@ var DonutChartLegendTable = _react.memo.call(void 0,
|
|
|
1040
1040
|
return {
|
|
1041
1041
|
cells: [
|
|
1042
1042
|
{
|
|
1043
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1043
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabelContentWithIcon, { icon, children: name }) })
|
|
1044
1044
|
},
|
|
1045
1045
|
{
|
|
1046
1046
|
content: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "inline-flex", alignItems: "center", gap: 350, children: [
|
|
@@ -1093,7 +1093,7 @@ var DonutChartLegendTable = _react.memo.call(void 0,
|
|
|
1093
1093
|
}
|
|
1094
1094
|
];
|
|
1095
1095
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1096
|
-
|
|
1096
|
+
_chunkWEKDYQ4Tjs.ChartTable,
|
|
1097
1097
|
{
|
|
1098
1098
|
rows: [...rows, ...totalRow]
|
|
1099
1099
|
}
|
|
@@ -1118,13 +1118,13 @@ var getLineChartLegendLabels = ({
|
|
|
1118
1118
|
data
|
|
1119
1119
|
}) => {
|
|
1120
1120
|
return data.map((series, index) => ({
|
|
1121
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1121
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabelContentWithIcon, { icon: series.icon, children: series.name }),
|
|
1122
1122
|
color: _optionalChain([series, 'access', _52 => _52.styles, 'optionalAccess', _53 => _53.color]) || _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]
|
|
1123
1123
|
}));
|
|
1124
1124
|
};
|
|
1125
1125
|
var LineChartLegend = _react.memo.call(void 0,
|
|
1126
1126
|
function LineChartLegend2({ data }) {
|
|
1127
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1127
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegend, { legendLabels: getLineChartLegendLabels({ data }) });
|
|
1128
1128
|
}
|
|
1129
1129
|
);
|
|
1130
1130
|
|
|
@@ -1155,7 +1155,7 @@ var LineChartTooltip = _react.memo.call(void 0,
|
|
|
1155
1155
|
return {
|
|
1156
1156
|
cells: [
|
|
1157
1157
|
{
|
|
1158
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1158
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${name}: `, children: name }) }) })
|
|
1159
1159
|
},
|
|
1160
1160
|
{
|
|
1161
1161
|
content: value === null && invalidNumberLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { children: invalidNumberLabel }) : numberFormat === "duration" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactduration.Duration, { locale: textLocale, milliseconds: value }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1173,11 +1173,11 @@ var LineChartTooltip = _react.memo.call(void 0,
|
|
|
1173
1173
|
]
|
|
1174
1174
|
};
|
|
1175
1175
|
});
|
|
1176
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1176
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltip, { children: [
|
|
1177
1177
|
xAnnotationDetails ? xAnnotationDetails() : void 0,
|
|
1178
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1179
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1180
|
-
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1178
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
|
|
1179
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltipTable, { rows }),
|
|
1180
|
+
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
|
|
1181
1181
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
|
|
1182
1182
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
|
|
1183
1183
|
] }) : tooltipClickLabel }) : null
|
|
@@ -1191,7 +1191,7 @@ var LineChartTooltip = _react.memo.call(void 0,
|
|
|
1191
1191
|
_accessibility2.default.call(void 0, _highcharts2.default);
|
|
1192
1192
|
_annotations2.default.call(void 0, _highcharts2.default);
|
|
1193
1193
|
var StyledBox3 = _styledcomponents2.default.call(void 0, _seedsreactbox.Box)`
|
|
1194
|
-
${
|
|
1194
|
+
${_chunkWEKDYQ4Tjs.lineChartStyles}
|
|
1195
1195
|
`;
|
|
1196
1196
|
var LineChart = _react.memo.call(void 0, function LineChart2(props) {
|
|
1197
1197
|
const { data } = props;
|
|
@@ -1245,7 +1245,7 @@ var LineChartWithData = _react.memo.call(void 0, function LineChartWithData2({
|
|
|
1245
1245
|
}
|
|
1246
1246
|
);
|
|
1247
1247
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1248
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1248
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.GlobalChartStyleOverrides, {}),
|
|
1249
1249
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1250
1250
|
StyledBox3,
|
|
1251
1251
|
{
|
|
@@ -1271,11 +1271,11 @@ var LineChartWithData = _react.memo.call(void 0, function LineChartWithData2({
|
|
|
1271
1271
|
}
|
|
1272
1272
|
) : null,
|
|
1273
1273
|
chart && !disableTooltips ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1274
|
-
|
|
1274
|
+
_chunkWEKDYQ4Tjs.ChartTooltipPortal,
|
|
1275
1275
|
{
|
|
1276
1276
|
chart,
|
|
1277
1277
|
renderContent: (context) => {
|
|
1278
|
-
const tooltipData =
|
|
1278
|
+
const tooltipData = _chunkWEKDYQ4Tjs.transformTimeSeriesTooltipData.call(void 0, {
|
|
1279
1279
|
context,
|
|
1280
1280
|
data
|
|
1281
1281
|
});
|
|
@@ -1324,13 +1324,13 @@ var getVerticalBarChartLegendLabels = ({
|
|
|
1324
1324
|
data
|
|
1325
1325
|
}) => {
|
|
1326
1326
|
return data.map((series, index) => ({
|
|
1327
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1327
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabelContentWithIcon, { icon: series.icon, children: series.name }),
|
|
1328
1328
|
color: _optionalChain([series, 'access', _64 => _64.styles, 'optionalAccess', _65 => _65.color]) || _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]
|
|
1329
1329
|
}));
|
|
1330
1330
|
};
|
|
1331
1331
|
var VerticalBarChartLegend = _react.memo.call(void 0,
|
|
1332
1332
|
function VerticalbarChartLegend({ data }) {
|
|
1333
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1333
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegend, { legendLabels: getVerticalBarChartLegendLabels({ data }) });
|
|
1334
1334
|
}
|
|
1335
1335
|
);
|
|
1336
1336
|
|
|
@@ -1361,7 +1361,7 @@ var VerticalBarChartTooltip = _react.memo.call(void 0,
|
|
|
1361
1361
|
return {
|
|
1362
1362
|
cells: [
|
|
1363
1363
|
{
|
|
1364
|
-
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1364
|
+
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${name}: `, children: name }) }) })
|
|
1365
1365
|
},
|
|
1366
1366
|
{
|
|
1367
1367
|
content: value === null && invalidNumberLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { children: invalidNumberLabel }) : numberFormat === "duration" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactduration.Duration, { locale: textLocale, milliseconds: value }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1379,11 +1379,11 @@ var VerticalBarChartTooltip = _react.memo.call(void 0,
|
|
|
1379
1379
|
]
|
|
1380
1380
|
};
|
|
1381
1381
|
});
|
|
1382
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1382
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltip, { children: [
|
|
1383
1383
|
xAnnotationDetails ? xAnnotationDetails() : void 0,
|
|
1384
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1385
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1386
|
-
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1384
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
|
|
1385
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltipTable, { rows }),
|
|
1386
|
+
onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
|
|
1387
1387
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
|
|
1388
1388
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
|
|
1389
1389
|
] }) : tooltipClickLabel }) : null
|
|
@@ -1397,7 +1397,7 @@ var VerticalBarChartTooltip = _react.memo.call(void 0,
|
|
|
1397
1397
|
// src/components/VerticalBarChart/styles.ts
|
|
1398
1398
|
|
|
1399
1399
|
var verticalBarChartStyles = _styledcomponents.css`
|
|
1400
|
-
${
|
|
1400
|
+
${_chunkWEKDYQ4Tjs.timeSeriesChartStyles}
|
|
1401
1401
|
|
|
1402
1402
|
/*
|
|
1403
1403
|
When the chart container is hovered, reduce the opacity of all columns.
|
|
@@ -1458,7 +1458,7 @@ var VerticalBarChartWithData = _react.memo.call(void 0,
|
|
|
1458
1458
|
xAnnotations,
|
|
1459
1459
|
xAxisLabelFormatter: xAxisLabelFormatter2
|
|
1460
1460
|
}) {
|
|
1461
|
-
const shouldUseTimeFormatter =
|
|
1461
|
+
const shouldUseTimeFormatter = _chunkWEKDYQ4Tjs.isHourlyTimeData.call(void 0, data) || _chunkWEKDYQ4Tjs.isCategoricalHourData.call(void 0, data);
|
|
1462
1462
|
const autoTimeXAxisLabelFormatter = ({
|
|
1463
1463
|
value,
|
|
1464
1464
|
timeFormat: timeFormat2
|
|
@@ -1490,8 +1490,8 @@ var VerticalBarChartWithData = _react.memo.call(void 0,
|
|
|
1490
1490
|
const numValue = typeof value === "string" ? Number(value) : value;
|
|
1491
1491
|
if (isNaN(numValue)) return "";
|
|
1492
1492
|
const date = new Date(numValue);
|
|
1493
|
-
|
|
1494
|
-
|
|
1493
|
+
const hour = date.getUTCHours();
|
|
1494
|
+
const displayHour = hour % 12 === 0 ? 12 : hour % 12;
|
|
1495
1495
|
if (hour === 0) return "<span>12</span><span>AM</span>";
|
|
1496
1496
|
if (hour === 12) return "<span>12</span><span>PM</span>";
|
|
1497
1497
|
return `<span>${displayHour}</span>`;
|
|
@@ -1511,7 +1511,7 @@ var VerticalBarChartWithData = _react.memo.call(void 0,
|
|
|
1511
1511
|
xAnnotations,
|
|
1512
1512
|
xAxisLabelFormatter: resolvedXAxisLabelFormatter
|
|
1513
1513
|
});
|
|
1514
|
-
const { colors
|
|
1514
|
+
const { colors } = data.reduce(
|
|
1515
1515
|
(acc, item, index) => {
|
|
1516
1516
|
acc.colors.push(
|
|
1517
1517
|
_nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'access', _66 => _66.styles, 'optionalAccess', _67 => _67.color]), () => ( _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index])), () => ( ""))
|
|
@@ -1525,7 +1525,7 @@ var VerticalBarChartWithData = _react.memo.call(void 0,
|
|
|
1525
1525
|
}
|
|
1526
1526
|
);
|
|
1527
1527
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1528
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1528
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEKDYQ4Tjs.GlobalChartStyleOverrides, {}),
|
|
1529
1529
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1530
1530
|
StyledBox4,
|
|
1531
1531
|
{
|
|
@@ -1550,11 +1550,11 @@ var VerticalBarChartWithData = _react.memo.call(void 0,
|
|
|
1550
1550
|
}
|
|
1551
1551
|
) : null,
|
|
1552
1552
|
chart ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1553
|
-
|
|
1553
|
+
_chunkWEKDYQ4Tjs.ChartTooltipPortal,
|
|
1554
1554
|
{
|
|
1555
1555
|
chart,
|
|
1556
1556
|
renderContent: (context) => {
|
|
1557
|
-
const tooltipData =
|
|
1557
|
+
const tooltipData = _chunkWEKDYQ4Tjs.transformTimeSeriesTooltipData.call(void 0, {
|
|
1558
1558
|
context,
|
|
1559
1559
|
data
|
|
1560
1560
|
});
|
|
@@ -1635,5 +1635,5 @@ var VerticalBarChartWithData = _react.memo.call(void 0,
|
|
|
1635
1635
|
|
|
1636
1636
|
|
|
1637
1637
|
|
|
1638
|
-
exports.AreaChart = AreaChart; exports.ChartLegend =
|
|
1638
|
+
exports.AreaChart = AreaChart; exports.ChartLegend = _chunkWEKDYQ4Tjs.ChartLegend; exports.ChartLegendLabel = _chunkWEKDYQ4Tjs.ChartLegendLabel; exports.ChartTable = _chunkWEKDYQ4Tjs.ChartTable; exports.ChartTooltip = _chunkWEKDYQ4Tjs.ChartTooltip; exports.ChartTooltipFooter = _chunkWEKDYQ4Tjs.ChartTooltipFooter; exports.ChartTooltipHeader = _chunkWEKDYQ4Tjs.ChartTooltipHeader; exports.ChartTooltipPortal = _chunkWEKDYQ4Tjs.ChartTooltipPortal; exports.ChartTooltipTable = _chunkWEKDYQ4Tjs.ChartTooltipTable; exports.ChartTooltipTitle = _chunkWEKDYQ4Tjs.ChartTooltipTitle; exports.ChartXAnnotationDetails = ChartXAnnotationDetails; exports.ChartXAnnotationMarker = ChartXAnnotationMarker; exports.ColorBox = _chunkWEKDYQ4Tjs.ColorBox; exports.DONUT_CHART_HALO_SIZE = DONUT_CHART_HALO_SIZE; exports.DONUT_CHART_HEIGHT = DONUT_CHART_HEIGHT; exports.DONUT_CHART_WIDTH = DONUT_CHART_WIDTH; exports.DatavizColorBox = _chunkWEKDYQ4Tjs.DatavizColorBox; exports.DonutChart = DonutChart; exports.DonutChartLegendTable = DonutChartLegendTable; exports.GlobalChartStyleOverrides = _chunkWEKDYQ4Tjs.GlobalChartStyleOverrides; exports.LineChart = LineChart; exports.NetworkColorBox = _chunkWEKDYQ4Tjs.NetworkColorBox; exports.TIME_SERIES_CHART_HEIGHT = TIME_SERIES_CHART_HEIGHT; exports.VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT = VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT; exports.VerticalBarChart = VerticalBarChart; exports.areaChartOptions = areaChartOptions; exports.areaChartStyles = _chunkWEKDYQ4Tjs.areaChartStyles; exports.baseChartOptions = baseChartOptions; exports.baseChartStyles = _chunkWEKDYQ4Tjs.baseChartStyles; exports.columnChartOptions = columnChartOptions; exports.donutChartOptions = donutChartOptions; exports.donutChartStyles = _chunkWEKDYQ4Tjs.donutChartStyles; exports.generateChartTooltipPortalId = _chunkWEKDYQ4Tjs.generateChartTooltipPortalId; exports.getDatavizColor = _chunkWEKDYQ4Tjs.getDatavizColor; exports.getDatavizColorWithAlpha = _chunkWEKDYQ4Tjs.getDatavizColorWithAlpha; exports.getDatavizOpacity = _chunkWEKDYQ4Tjs.getDatavizOpacity; exports.getStorybookCategoricalData = _chunkWEKDYQ4Tjs.getStorybookCategoricalData; exports.getStorybookSparseTimelineData = _chunkWEKDYQ4Tjs.getStorybookSparseTimelineData; exports.isCategoricalHourData = _chunkWEKDYQ4Tjs.isCategoricalHourData; exports.isHourlyTimeData = _chunkWEKDYQ4Tjs.isHourlyTimeData; exports.lineChartOptions = lineChartOptions; exports.lineChartStyles = _chunkWEKDYQ4Tjs.lineChartStyles; exports.timeSeriesChartOptions = timeSeriesChartOptions; exports.timeSeriesChartStyles = _chunkWEKDYQ4Tjs.timeSeriesChartStyles; exports.transformDataToSeries = _chunkWEKDYQ4Tjs.transformDataToSeries; exports.transformTimeSeriesTooltipData = _chunkWEKDYQ4Tjs.transformTimeSeriesTooltipData; exports.xAxisLabelFormatter = _chunkWEKDYQ4Tjs.xAxisLabelFormatter; exports.yAxisLabelFormatter = _chunkWEKDYQ4Tjs.yAxisLabelFormatter;
|
|
1639
1639
|
//# sourceMappingURL=index.js.map
|