@sproutsocial/seeds-react-data-viz 0.24.1 → 0.24.3

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 (52) hide show
  1. package/dist/{axis-B61qI-nm.d.mts → axis-3XKa6pW7.d.mts} +1 -1
  2. package/dist/{axis-B78FtYLh.d.ts → axis-BWvZqdQr.d.ts} +1 -1
  3. package/dist/bar/index.d.mts +2 -2
  4. package/dist/bar/index.d.ts +2 -2
  5. package/dist/bar/index.js +11 -11
  6. package/dist/bubble/index.d.mts +1 -1
  7. package/dist/bubble/index.d.ts +1 -1
  8. package/dist/bubble/index.js +5 -5
  9. package/dist/chart-styles.css +10 -1
  10. package/dist/{chartBase-Nl6mcTB7.d.ts → chartBase-BM97OBBE.d.ts} +2 -0
  11. package/dist/{chartBase-CptOt3V0.d.mts → chartBase-D6WI2icR.d.mts} +2 -0
  12. package/dist/charts.css +10 -1
  13. package/dist/{chunk-3P6MPBSZ.js → chunk-5JQXDK23.js} +37 -28
  14. package/dist/chunk-5JQXDK23.js.map +1 -0
  15. package/dist/{chunk-MTGYEUZN.js → chunk-GHZHRFE6.js} +3 -3
  16. package/dist/{chunk-MTGYEUZN.js.map → chunk-GHZHRFE6.js.map} +1 -1
  17. package/dist/{chunk-OP6K5NDR.js → chunk-LKUL4EFZ.js} +8 -4
  18. package/dist/chunk-LKUL4EFZ.js.map +1 -0
  19. package/dist/{chunk-2H2Z7PKZ.js → chunk-W57R2V23.js} +2 -19
  20. package/dist/chunk-W57R2V23.js.map +1 -0
  21. package/dist/donut/index.d.mts +1 -1
  22. package/dist/donut/index.d.ts +1 -1
  23. package/dist/donut/index.js +5 -5
  24. package/dist/esm/bar/index.js +4 -4
  25. package/dist/esm/bubble/index.js +2 -2
  26. package/dist/esm/{chunk-NZX3WPXT.js → chunk-32QLJDP2.js} +1 -18
  27. package/dist/esm/chunk-32QLJDP2.js.map +1 -0
  28. package/dist/esm/{chunk-MQDI7D54.js → chunk-AUU3KROF.js} +2 -2
  29. package/dist/esm/{chunk-Y4RJJBJQ.js → chunk-DF5PVRXT.js} +7 -3
  30. package/dist/esm/{chunk-Y4RJJBJQ.js.map → chunk-DF5PVRXT.js.map} +1 -1
  31. package/dist/esm/{chunk-ISP4A622.js → chunk-EWAD675C.js} +57 -48
  32. package/dist/esm/chunk-EWAD675C.js.map +1 -0
  33. package/dist/esm/donut/index.js +2 -2
  34. package/dist/esm/index.js +105 -90
  35. package/dist/esm/index.js.map +1 -1
  36. package/dist/esm/line-area/index.js +4 -4
  37. package/dist/esm/sparkline/index.js +3 -3
  38. package/dist/index.js +67 -52
  39. package/dist/index.js.map +1 -1
  40. package/dist/line-area/index.d.mts +2 -2
  41. package/dist/line-area/index.d.ts +2 -2
  42. package/dist/line-area/index.js +11 -11
  43. package/dist/sparkline/index.d.mts +3 -3
  44. package/dist/sparkline/index.d.ts +3 -3
  45. package/dist/sparkline/index.js +7 -7
  46. package/package.json +3 -3
  47. package/dist/chunk-2H2Z7PKZ.js.map +0 -1
  48. package/dist/chunk-3P6MPBSZ.js.map +0 -1
  49. package/dist/chunk-OP6K5NDR.js.map +0 -1
  50. package/dist/esm/chunk-ISP4A622.js.map +0 -1
  51. package/dist/esm/chunk-NZX3WPXT.js.map +0 -1
  52. /package/dist/esm/{chunk-MQDI7D54.js.map → chunk-AUU3KROF.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { D as DatetimeTimeFormat } from './chartBase-CptOt3V0.mjs';
1
+ import { D as DatetimeTimeFormat } from './chartBase-D6WI2icR.mjs';
2
2
 
3
3
  /** A datetime data point: `[msSinceEpoch, value]` tuple or `{ x, y }` object. */
4
4
  type DatetimePoint = [number, number | null] | {
@@ -1,4 +1,4 @@
1
- import { D as DatetimeTimeFormat } from './chartBase-Nl6mcTB7.js';
1
+ import { D as DatetimeTimeFormat } from './chartBase-BM97OBBE.js';
2
2
 
3
3
  /** A datetime data point: `[msSinceEpoch, value]` tuple or `{ x, y }` object. */
4
4
  type DatetimePoint = [number, number | null] | {
@@ -1,11 +1,11 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { C as ChartAnnotation } from '../annotations-CjFoRPXf.mjs';
4
- import { V as ValueFormat, C as ChartTooltipProps } from '../chartBase-CptOt3V0.mjs';
4
+ import { V as ValueFormat, C as ChartTooltipProps } from '../chartBase-D6WI2icR.mjs';
5
5
  import { C as ChartColorableEntity, a as ChartIconableEntity, b as ChartClickHandler, c as ChartHoverHandler } from '../interactions-pEXA1XxF.mjs';
6
6
  export { d as ChartHoverSeries } from '../interactions-pEXA1XxF.mjs';
7
7
  import { C as ChartExportHandle } from '../chartExport-CKYpuhik.mjs';
8
- import { C as ChartDataPoint, a as CategoryAxis, D as DatetimeAxis, b as DatetimePoint } from '../axis-B61qI-nm.mjs';
8
+ import { C as ChartDataPoint, a as CategoryAxis, D as DatetimeAxis, b as DatetimePoint } from '../axis-3XKa6pW7.mjs';
9
9
  import '@sproutsocial/seeds-react-icon';
10
10
  import '../types-DxrhdAdn.mjs';
11
11
  import 'highcharts';
@@ -1,11 +1,11 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { C as ChartAnnotation } from '../annotations-CjFoRPXf.js';
4
- import { V as ValueFormat, C as ChartTooltipProps } from '../chartBase-Nl6mcTB7.js';
4
+ import { V as ValueFormat, C as ChartTooltipProps } from '../chartBase-BM97OBBE.js';
5
5
  import { C as ChartColorableEntity, a as ChartIconableEntity, b as ChartClickHandler, c as ChartHoverHandler } from '../interactions-pEXA1XxF.js';
6
6
  export { d as ChartHoverSeries } from '../interactions-pEXA1XxF.js';
7
7
  import { C as ChartExportHandle } from '../chartExport-CKYpuhik.js';
8
- import { C as ChartDataPoint, a as CategoryAxis, D as DatetimeAxis, b as DatetimePoint } from '../axis-B78FtYLh.js';
8
+ import { C as ChartDataPoint, a as CategoryAxis, D as DatetimeAxis, b as DatetimePoint } from '../axis-BWvZqdQr.js';
9
9
  import '@sproutsocial/seeds-react-icon';
10
10
  import '../types-DxrhdAdn.js';
11
11
  import 'highcharts';
package/dist/bar/index.js CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkMTGYEUZNjs = require('../chunk-MTGYEUZN.js');
5
+ var _chunkGHZHRFE6js = require('../chunk-GHZHRFE6.js');
6
6
 
7
7
 
8
8
 
9
- var _chunkOP6K5NDRjs = require('../chunk-OP6K5NDR.js');
9
+ var _chunkLKUL4EFZjs = require('../chunk-LKUL4EFZ.js');
10
10
 
11
11
 
12
12
  var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
@@ -17,8 +17,8 @@ var _chunk33Y5FZTTjs = require('../chunk-33Y5FZTT.js');
17
17
 
18
18
 
19
19
 
20
- var _chunk3P6MPBSZjs = require('../chunk-3P6MPBSZ.js');
21
- require('../chunk-2H2Z7PKZ.js');
20
+ var _chunk5JQXDK23js = require('../chunk-5JQXDK23.js');
21
+ require('../chunk-W57R2V23.js');
22
22
 
23
23
  // src/charts/bar/BarChart.tsx
24
24
  var _react = require('react');
@@ -31,8 +31,8 @@ function buildBarChartOptions(props, direction, series = props.series) {
31
31
  const chartType = highchartsType(direction);
32
32
  const isDatetime = props.xAxis.type === "datetime";
33
33
  const isMultiSeries = series.length > 1;
34
- const tooltipOptions = _chunkOP6K5NDRjs.resolveTooltipOptions.call(void 0, props);
35
- const { annotations, lookup: annotationLookup } = _chunkMTGYEUZNjs.buildAnnotationConfig.call(void 0,
34
+ const tooltipOptions = _chunkLKUL4EFZjs.resolveTooltipOptions.call(void 0, props);
35
+ const { annotations, lookup: annotationLookup } = _chunkGHZHRFE6js.buildAnnotationConfig.call(void 0,
36
36
  props.annotations
37
37
  );
38
38
  const barTypeConfig = {
@@ -92,7 +92,7 @@ function buildBarChartOptions(props, direction, series = props.series) {
92
92
  }
93
93
  }
94
94
  };
95
- const base = _chunk3P6MPBSZjs.buildBaseChartOptions.call(void 0, {
95
+ const base = _chunk5JQXDK23js.buildBaseChartOptions.call(void 0, {
96
96
  type: chartType,
97
97
  description: props.description,
98
98
  reserveTopMargin: Boolean(annotations),
@@ -113,7 +113,7 @@ function buildBarChartOptions(props, direction, series = props.series) {
113
113
  // spacing ([10, 10, 15, 10]) shrinks the plot area.
114
114
  spacing: [5, 1, 0, 2]
115
115
  },
116
- xAxis: _chunkOP6K5NDRjs.buildDimensionalAxis.call(void 0, props.xAxis, _nullishCoalesce(tooltipOptions.timezone, () => ( "UTC"))),
116
+ xAxis: _chunkLKUL4EFZjs.buildDimensionalAxis.call(void 0, props.xAxis, _nullishCoalesce(tooltipOptions.timezone, () => ( "UTC"))),
117
117
  yAxis: {
118
118
  min: _optionalChain([props, 'access', _15 => _15.yAxis, 'optionalAccess', _16 => _16.min]),
119
119
  max: _optionalChain([props, 'access', _17 => _17.yAxis, 'optionalAccess', _18 => _18.max]),
@@ -127,7 +127,7 @@ function buildBarChartOptions(props, direction, series = props.series) {
127
127
  enabled: _optionalChain([props, 'access', _23 => _23.yAxis, 'optionalAccess', _24 => _24.showLabels]) !== false,
128
128
  // A declarative `format` drives ticks through the shared valueFormatter;
129
129
  // absent it, the zero-config decimal default (1.20K / 1.20M / 1.20B).
130
- formatter: _optionalChain([props, 'access', _25 => _25.yAxis, 'optionalAccess', _26 => _26.format]) ? _chunkMTGYEUZNjs.makeValueAxisLabelFormatter.call(void 0, props.yAxis.format) : _chunkMTGYEUZNjs.defaultValueAxisLabelFormatter
130
+ formatter: _optionalChain([props, 'access', _25 => _25.yAxis, 'optionalAccess', _26 => _26.format]) ? _chunkGHZHRFE6js.makeValueAxisLabelFormatter.call(void 0, props.yAxis.format) : _chunkGHZHRFE6js.defaultValueAxisLabelFormatter
131
131
  }
132
132
  },
133
133
  plotOptions: {
@@ -152,7 +152,7 @@ var BAR_CHART_DEFAULT_SERIES_LIMIT = 10;
152
152
  var _jsxruntime = require('react/jsx-runtime');
153
153
  var BarChart = _react.memo.call(void 0, function BarChart2(props) {
154
154
  const seriesLimit = _nullishCoalesce(props.seriesLimit, () => ( BAR_CHART_DEFAULT_SERIES_LIMIT));
155
- const { colors, series } = _chunk3P6MPBSZjs.useSeedsChartSetup.call(void 0, {
155
+ const { colors, series } = _chunk5JQXDK23js.useSeedsChartSetup.call(void 0, {
156
156
  series: props.series,
157
157
  seriesLimit,
158
158
  isSeriesLimitOverridden: props.seriesLimit !== void 0,
@@ -172,7 +172,7 @@ var BarChart = _react.memo.call(void 0, function BarChart2(props) {
172
172
  className: props.className
173
173
  });
174
174
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ...containerProps, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
175
- _chunk3P6MPBSZjs.ChartRenderer,
175
+ _chunk5JQXDK23js.ChartRenderer,
176
176
  {
177
177
  options,
178
178
  series,
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, MouseEventHandler } from 'react';
3
- import { C as ChartTooltipProps, a as ChartTooltipDataRow, V as ValueFormat } from '../chartBase-CptOt3V0.mjs';
3
+ import { C as ChartTooltipProps, a as ChartTooltipDataRow, V as ValueFormat } from '../chartBase-D6WI2icR.mjs';
4
4
  import { C as ChartExportHandle } from '../chartExport-CKYpuhik.mjs';
5
5
  import { C as ChartColorableEntity, a as ChartIconableEntity, c as ChartHoverHandler } from '../interactions-pEXA1XxF.mjs';
6
6
  export { h as defaultBubbleChartWidth } from '../chartOptions-DHzoGRdG.mjs';
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, MouseEventHandler } from 'react';
3
- import { C as ChartTooltipProps, a as ChartTooltipDataRow, V as ValueFormat } from '../chartBase-Nl6mcTB7.js';
3
+ import { C as ChartTooltipProps, a as ChartTooltipDataRow, V as ValueFormat } from '../chartBase-BM97OBBE.js';
4
4
  import { C as ChartExportHandle } from '../chartExport-CKYpuhik.js';
5
5
  import { C as ChartColorableEntity, a as ChartIconableEntity, c as ChartHoverHandler } from '../interactions-pEXA1XxF.js';
6
6
  export { h as defaultBubbleChartWidth } from '../chartOptions-DHzoGRdG.js';
@@ -11,8 +11,8 @@ var _chunk33Y5FZTTjs = require('../chunk-33Y5FZTT.js');
11
11
 
12
12
 
13
13
 
14
- var _chunk3P6MPBSZjs = require('../chunk-3P6MPBSZ.js');
15
- require('../chunk-2H2Z7PKZ.js');
14
+ var _chunk5JQXDK23js = require('../chunk-5JQXDK23.js');
15
+ require('../chunk-W57R2V23.js');
16
16
 
17
17
  // src/charts/bubble/BubbleChart.tsx
18
18
  var _react = require('react');
@@ -107,7 +107,7 @@ function mapBubbleTooltipRow(data) {
107
107
  }
108
108
  function buildBubbleChartOptions(props) {
109
109
  const hasOnClick = Boolean(props.onClick);
110
- const base = _chunk3P6MPBSZjs.buildBaseChartOptions.call(void 0, {
110
+ const base = _chunk5JQXDK23js.buildBaseChartOptions.call(void 0, {
111
111
  type: "packedbubble",
112
112
  description: props.accessibility.description,
113
113
  svgContainerLabel: props.accessibility.svgContainerLabel,
@@ -182,7 +182,7 @@ function buildBubbleChartOptions(props) {
182
182
  // src/charts/bubble/BubbleChart.tsx
183
183
  var _jsxruntime = require('react/jsx-runtime');
184
184
  var BubbleChart = _react.memo.call(void 0, function BubbleChart2(props) {
185
- const { colors } = _chunk3P6MPBSZjs.useSeedsChartSetup.call(void 0, {
185
+ const { colors } = _chunk5JQXDK23js.useSeedsChartSetup.call(void 0, {
186
186
  series: props.data.map((d) => ({ color: d.color }))
187
187
  });
188
188
  const options = _react.useMemo.call(void 0, () => buildBubbleChartOptions(props), [props]);
@@ -206,7 +206,7 @@ var BubbleChart = _react.memo.call(void 0, function BubbleChart2(props) {
206
206
  ...hasOnPlotBackgroundClick ? { "data-has-on-plot-background-click": "" } : {},
207
207
  onClick: props.onPlotBackgroundClick,
208
208
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
209
- _chunk3P6MPBSZjs.ChartRenderer,
209
+ _chunk5JQXDK23js.ChartRenderer,
210
210
  {
211
211
  options,
212
212
  series: props.data.map((d, i) => ({
@@ -92,7 +92,9 @@
92
92
 
93
93
  .seeds-chart div.highcharts-annotation-label {
94
94
  top: 0 !important;
95
- transform: translateX(-50%); /* centers the label on the targeted axis point */
95
+ transform: translateX(
96
+ -50%
97
+ ); /* centers the label on the targeted axis point */
96
98
  pointer-events: none; /* prevents tooltip hover from being interrupted by this element since it renders after on the dom */
97
99
  }
98
100
 
@@ -239,6 +241,13 @@
239
241
  margin-top: var(--space-350);
240
242
  }
241
243
 
244
+ /* icon+label row shared by the v2 tooltip + legend */
245
+ .seeds-chart-label-with-icon {
246
+ display: flex;
247
+ align-items: center;
248
+ gap: var(--space-200); /* 4px */
249
+ }
250
+
242
251
  /* =========================================================================
243
252
  * shared cross-family time-series layer -> .seeds-chart-time-series
244
253
  *
@@ -46,6 +46,8 @@ interface ChartTooltipDataRow {
46
46
  color: TypeChartStyleColor;
47
47
  name: string;
48
48
  value: number | null;
49
+ /** Seeds icon or partner-logo name shown before the row name; `undefined` when the row has none. */
50
+ icon?: TypeIconName;
49
51
  /** Slice percentage — populated by pie/donut tooltips; `undefined` for bar/line-area rows. */
50
52
  percent?: number;
51
53
  /** Outer category index — populated by bubble tooltips only; `undefined` elsewhere. */
@@ -46,6 +46,8 @@ interface ChartTooltipDataRow {
46
46
  color: TypeChartStyleColor;
47
47
  name: string;
48
48
  value: number | null;
49
+ /** Seeds icon or partner-logo name shown before the row name; `undefined` when the row has none. */
50
+ icon?: TypeIconName;
49
51
  /** Slice percentage — populated by pie/donut tooltips; `undefined` for bar/line-area rows. */
50
52
  percent?: number;
51
53
  /** Outer category index — populated by bubble tooltips only; `undefined` elsewhere. */
package/dist/charts.css CHANGED
@@ -104,7 +104,9 @@
104
104
 
105
105
  .seeds-chart div.highcharts-annotation-label {
106
106
  top: 0 !important;
107
- transform: translateX(-50%); /* centers the label on the targeted axis point */
107
+ transform: translateX(
108
+ -50%
109
+ ); /* centers the label on the targeted axis point */
108
110
  pointer-events: none; /* prevents tooltip hover from being interrupted by this element since it renders after on the dom */
109
111
  }
110
112
 
@@ -251,6 +253,13 @@
251
253
  margin-top: var(--space-350);
252
254
  }
253
255
 
256
+ /* icon+label row shared by the v2 tooltip + legend */
257
+ .seeds-chart-label-with-icon {
258
+ display: flex;
259
+ align-items: center;
260
+ gap: var(--space-200); /* 4px */
261
+ }
262
+
254
263
  /* =========================================================================
255
264
  * shared cross-family time-series layer -> .seeds-chart-time-series
256
265
  *
@@ -9,8 +9,7 @@
9
9
 
10
10
 
11
11
 
12
-
13
- var _chunk2H2Z7PKZjs = require('./chunk-2H2Z7PKZ.js');
12
+ var _chunkW57R2V23js = require('./chunk-W57R2V23.js');
14
13
 
15
14
  // src/charts/shared/chartBase.tsx
16
15
  var _highcharts = require('highcharts'); var _highcharts2 = _interopRequireDefault(_highcharts);
@@ -135,6 +134,19 @@ var ChartAnnotationMarkerPortal = _react.memo.call(void 0,
135
134
 
136
135
  var _seedsreacttext = require('@sproutsocial/seeds-react-text');
137
136
 
137
+ // src/charts/shared/ChartLabelWithIcon.tsx
138
+
139
+
140
+
141
+ var ChartLabelWithIcon = _react.memo.call(void 0,
142
+ function ChartLabelWithIcon2({ children, icon }) {
143
+ return icon ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "seeds-chart-label-with-icon", children: [
144
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: icon, fixedWidth: true, "aria-hidden": true }),
145
+ children
146
+ ] }) : children;
147
+ }
148
+ );
149
+
138
150
  // src/charts/shared/formatters/datetimeFormatter.ts
139
151
  var DAY_MS = 864e5;
140
152
  var WEEK_MS = 6048e5;
@@ -368,11 +380,11 @@ function AnnotationHeader({
368
380
  const hasIconOrTitle = Boolean(icon || title);
369
381
  if (!hasIconOrTitle && !description) return null;
370
382
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
371
- hasIconOrTitle ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2H2Z7PKZjs.ChartTooltipHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
383
+ hasIconOrTitle ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkW57R2V23js.ChartTooltipHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
372
384
  icon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: icon, size: "mini", color: "icon.base" }) : null,
373
385
  title ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.body", fontSize: 200, children: title }) : null
374
386
  ] }) }) : null,
375
- description ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2H2Z7PKZjs.ChartTooltipHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { fontSize: 200, color: "text.subtext", children: description }) }) : null
387
+ description ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkW57R2V23js.ChartTooltipHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { fontSize: 200, color: "text.subtext", children: description }) }) : null
376
388
  ] });
377
389
  }
378
390
  function DefaultChartTooltip({
@@ -393,7 +405,7 @@ function DefaultChartTooltip({
393
405
  const rows = data.map((d) => {
394
406
  const formattedValue = d.value == null ? _nullishCoalesce(invalidNumberLabel, () => ( "\u2014")) : valueFormatter({ ...valueFormat, value: d.value, abbreviate: false });
395
407
  const nameCell = {
396
- content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2H2Z7PKZjs.ChartLegendLabel, { color: d.color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${d.name}: `, children: d.name }) })
408
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkW57R2V23js.ChartLegendLabel, { color: d.color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartLabelWithIcon, { icon: d.icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${d.name}: `, children: d.name }) }) })
397
409
  };
398
410
  return {
399
411
  cells: [
@@ -432,7 +444,7 @@ function DefaultChartTooltip({
432
444
  ]
433
445
  }
434
446
  ] : [];
435
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk2H2Z7PKZjs.ChartTooltip, { children: [
447
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkW57R2V23js.ChartTooltip, { children: [
436
448
  annotation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
437
449
  AnnotationHeader,
438
450
  {
@@ -441,7 +453,7 @@ function DefaultChartTooltip({
441
453
  description: annotation.description
442
454
  }
443
455
  ) : null,
444
- hideTitle ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2H2Z7PKZjs.ChartTooltipTitle, { children: formatTitle({
456
+ hideTitle ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkW57R2V23js.ChartTooltipTitle, { children: formatTitle({
445
457
  position,
446
458
  timezone,
447
459
  timeFormat,
@@ -449,12 +461,12 @@ function DefaultChartTooltip({
449
461
  textLocale
450
462
  }) }),
451
463
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
452
- _chunk2H2Z7PKZjs.ChartTooltipTable,
464
+ _chunkW57R2V23js.ChartTooltipTable,
453
465
  {
454
466
  rows: [...rows, ...totalRow]
455
467
  }
456
468
  ),
457
- hasOnClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2H2Z7PKZjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
469
+ hasOnClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkW57R2V23js.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
458
470
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
459
471
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
460
472
  ] }) : tooltipClickLabel }) : null
@@ -469,16 +481,10 @@ var SeriesLegend = _react.memo.call(void 0, function SeriesLegend2({
469
481
  items
470
482
  }) {
471
483
  const labels = items.map((item) => ({
472
- content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
473
- _chunk2H2Z7PKZjs.ChartLegendLabelContentWithIcon,
474
- {
475
- icon: item.icon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: item.icon, fixedWidth: true, "aria-hidden": true }) : void 0,
476
- children: item.name
477
- }
478
- ),
484
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChartLabelWithIcon, { icon: item.icon, children: item.name }),
479
485
  color: item.color
480
486
  }));
481
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2H2Z7PKZjs.ChartLegend, { legendLabels: labels });
487
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkW57R2V23js.ChartLegend, { legendLabels: labels });
482
488
  });
483
489
 
484
490
  // src/charts/shared/chartExport.ts
@@ -764,7 +770,7 @@ function ChartRenderer({
764
770
  const chartWithAnnotations = chart;
765
771
  const hasRenderedAnnotations = !!_optionalChain([chartWithAnnotations, 'optionalAccess', _46 => _46.annotations, 'optionalAccess', _47 => _47.length]) && !!_optionalChain([annotationLookup, 'optionalAccess', _48 => _48.size]) && plotHeight > 0;
766
772
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
767
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2H2Z7PKZjs.GlobalChartStyleOverrides, {}),
773
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkW57R2V23js.GlobalChartStyleOverrides, {}),
768
774
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
769
775
  _highchartsreactofficial.HighchartsReact,
770
776
  {
@@ -783,7 +789,7 @@ function ChartRenderer({
783
789
  }
784
790
  ) : null,
785
791
  chart ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
786
- _chunk2H2Z7PKZjs.ChartTooltipPortal,
792
+ _chunkW57R2V23js.ChartTooltipPortal,
787
793
  {
788
794
  chart,
789
795
  renderContent: (context) => {
@@ -807,27 +813,30 @@ function ChartRenderer({
807
813
  color: ctx.point.color,
808
814
  name: ctx.point.name,
809
815
  value: ctx.point.y,
810
- percent: ctx.point.percentage
816
+ percent: ctx.point.percentage,
817
+ // Icon indexed by the hovered slice — same source the legend reads.
818
+ icon: _optionalChain([series, 'access', _53 => _53[ctx.point.index], 'optionalAccess', _54 => _54.icon])
811
819
  }
812
820
  ] : (
813
- // Drop v1's `readonly` array wrapper and `icon` field at the seam —
814
- // the v2 surface is mutable and doesn't expose row-level icons.
815
- _chunk2H2Z7PKZjs.transformTimeSeriesTooltipData.call(void 0, {
821
+ // Drop v1's `readonly` wrapper (v2 is mutable); icon is forwarded
822
+ // from `series[]` by index below since the helper doesn't carry it.
823
+ _chunkW57R2V23js.transformTimeSeriesTooltipData.call(void 0, {
816
824
  context,
817
825
  data: series.map((s, i) => ({
818
826
  name: s.name,
819
827
  points: [],
820
828
  styles: { color: _nullishCoalesce(_nullishCoalesce(s.color, () => ( colors[i])), () => ( "")) }
821
829
  }))
822
- }).map((row) => ({
830
+ }).map((row, i) => ({
823
831
  color: row.color,
824
832
  name: row.name,
825
- value: row.value
833
+ value: row.value,
834
+ icon: _optionalChain([series, 'access', _55 => _55[i], 'optionalAccess', _56 => _56.icon])
826
835
  }))
827
836
  );
828
837
  const position = isPie || isPackedBubble ? _nullishCoalesce(ctx.key, () => ( ctx.point.name)) : context.x;
829
- const tickPositions = _optionalChain([ctx, 'access', _53 => _53.points, 'optionalAccess', _54 => _54[0], 'optionalAccess', _55 => _55.series, 'optionalAccess', _56 => _56.xAxis, 'optionalAccess', _57 => _57.tickPositions]);
830
- const resolved = _optionalChain([annotationLookup, 'optionalAccess', _58 => _58.get, 'call', _59 => _59(context.point.x)]);
838
+ const tickPositions = _optionalChain([ctx, 'access', _57 => _57.points, 'optionalAccess', _58 => _58[0], 'optionalAccess', _59 => _59.series, 'optionalAccess', _60 => _60.xAxis, 'optionalAccess', _61 => _61.tickPositions]);
839
+ const resolved = _optionalChain([annotationLookup, 'optionalAccess', _62 => _62.get, 'call', _63 => _63(context.point.x)]);
831
840
  const annotation = resolved ? {
832
841
  icon: resolved.icon,
833
842
  color: resolved.color,
@@ -904,4 +913,4 @@ function buildBaseChartOptions({
904
913
 
905
914
 
906
915
  exports.datetimeFormatter = datetimeFormatter; exports.valueFormatter = valueFormatter; exports.useSeedsChartSetup = useSeedsChartSetup; exports.ChartRenderer = ChartRenderer; exports.buildBaseChartOptions = buildBaseChartOptions;
907
- //# sourceMappingURL=chunk-3P6MPBSZ.js.map
916
+ //# sourceMappingURL=chunk-5JQXDK23.js.map