@sproutsocial/seeds-react-data-viz 0.26.1 → 0.27.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.
- package/dist/{axis-BWvZqdQr.d.ts → axis-DQXvjzBs.d.ts} +1 -1
- package/dist/{axis-3XKa6pW7.d.mts → axis-DVx6Mn1k.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 +12 -12
- package/dist/bubble/index.d.mts +1 -1
- package/dist/bubble/index.d.ts +1 -1
- package/dist/bubble/index.js +9 -9
- package/dist/chart-styles.css +41 -0
- package/dist/{chartBase-BM97OBBE.d.ts → chartBase-BYipK7MZ.d.ts} +5 -1
- package/dist/{chartBase-D6WI2icR.d.mts → chartBase-Cd405GIA.d.mts} +5 -1
- package/dist/charts.css +41 -0
- package/dist/{chunk-LWDHU4QK.js → chunk-34OKRQET.js} +8 -49
- package/dist/chunk-34OKRQET.js.map +1 -0
- package/dist/{chunk-NU2RCATK.js → chunk-5TWNMPQU.js} +94 -31
- package/dist/chunk-5TWNMPQU.js.map +1 -0
- package/dist/{chunk-BRIU5SPJ.js → chunk-CV45MD47.js} +3 -3
- package/dist/{chunk-BRIU5SPJ.js.map → chunk-CV45MD47.js.map} +1 -1
- package/dist/{chunk-PIZ4MT2B.js → chunk-WMKO3RGT.js} +3 -3
- package/dist/{chunk-PIZ4MT2B.js.map → chunk-WMKO3RGT.js.map} +1 -1
- package/dist/donut/index.d.mts +1 -1
- package/dist/donut/index.d.ts +1 -1
- package/dist/donut/index.js +6 -6
- package/dist/esm/bar/index.js +4 -4
- package/dist/esm/bubble/index.js +2 -2
- package/dist/esm/{chunk-VCTZWYEM.js → chunk-332X77M5.js} +11 -52
- package/dist/esm/chunk-332X77M5.js.map +1 -0
- package/dist/esm/{chunk-OZ7SPMTQ.js → chunk-AL3OTBTT.js} +2 -2
- package/dist/esm/{chunk-XEFCGFCF.js → chunk-CYCKJ5ML.js} +81 -18
- package/dist/esm/chunk-CYCKJ5ML.js.map +1 -0
- package/dist/esm/{chunk-GHP4TT7H.js → chunk-MVNO5UV6.js} +2 -2
- package/dist/esm/donut/index.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/line-area/index.js +4 -4
- package/dist/esm/sparkline/index.js +3 -3
- package/dist/esm/wordcloud/index.js +2 -2
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +53 -53
- package/dist/line-area/index.d.mts +2 -2
- package/dist/line-area/index.d.ts +2 -2
- package/dist/line-area/index.js +12 -12
- package/dist/sparkline/index.d.mts +3 -3
- package/dist/sparkline/index.d.ts +3 -3
- package/dist/sparkline/index.js +7 -7
- package/dist/wordcloud/index.js +8 -8
- package/package.json +1 -1
- package/dist/chunk-LWDHU4QK.js.map +0 -1
- package/dist/chunk-NU2RCATK.js.map +0 -1
- package/dist/esm/chunk-VCTZWYEM.js.map +0 -1
- package/dist/esm/chunk-XEFCGFCF.js.map +0 -1
- /package/dist/esm/{chunk-OZ7SPMTQ.js.map → chunk-AL3OTBTT.js.map} +0 -0
- /package/dist/esm/{chunk-GHP4TT7H.js.map → chunk-MVNO5UV6.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DatetimeTimeFormat } from './chartBase-
|
|
1
|
+
import { D as DatetimeTimeFormat } from './chartBase-BYipK7MZ.js';
|
|
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-
|
|
1
|
+
import { D as DatetimeTimeFormat } from './chartBase-Cd405GIA.mjs';
|
|
2
2
|
|
|
3
3
|
/** A datetime data point: `[msSinceEpoch, value]` tuple or `{ x, y }` object. */
|
|
4
4
|
type DatetimePoint = [number, number | null] | {
|
package/dist/bar/index.d.mts
CHANGED
|
@@ -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-
|
|
4
|
+
import { V as ValueFormat, C as ChartTooltipProps } from '../chartBase-Cd405GIA.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-
|
|
8
|
+
import { C as ChartDataPoint, a as CategoryAxis, D as DatetimeAxis, b as DatetimePoint } from '../axis-DVx6Mn1k.mjs';
|
|
9
9
|
import '@sproutsocial/seeds-react-icon';
|
|
10
10
|
import '../types-DxrhdAdn.mjs';
|
|
11
11
|
import 'highcharts';
|
package/dist/bar/index.d.ts
CHANGED
|
@@ -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-
|
|
4
|
+
import { V as ValueFormat, C as ChartTooltipProps } from '../chartBase-BYipK7MZ.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-
|
|
8
|
+
import { C as ChartDataPoint, a as CategoryAxis, D as DatetimeAxis, b as DatetimePoint } from '../axis-DQXvjzBs.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
|
|
5
|
+
var _chunkWMKO3RGTjs = require('../chunk-WMKO3RGT.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkCV45MD47js = require('../chunk-CV45MD47.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
|
|
@@ -14,10 +14,10 @@ var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunk5TWNMPQUjs = require('../chunk-5TWNMPQU.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunk34OKRQETjs = require('../chunk-34OKRQET.js');
|
|
21
21
|
|
|
22
22
|
// src/charts/bar/BarChart.tsx
|
|
23
23
|
var _react = require('react');
|
|
@@ -30,8 +30,8 @@ function buildBarChartOptions(props, direction, series = props.series) {
|
|
|
30
30
|
const chartType = highchartsType(direction);
|
|
31
31
|
const isDatetime = props.xAxis.type === "datetime";
|
|
32
32
|
const isMultiSeries = series.length > 1;
|
|
33
|
-
const tooltipOptions =
|
|
34
|
-
const { annotations, lookup: annotationLookup } =
|
|
33
|
+
const tooltipOptions = _chunkCV45MD47js.resolveTooltipOptions.call(void 0, props);
|
|
34
|
+
const { annotations, lookup: annotationLookup } = _chunkWMKO3RGTjs.buildAnnotationConfig.call(void 0,
|
|
35
35
|
props.annotations
|
|
36
36
|
);
|
|
37
37
|
const barTypeConfig = {
|
|
@@ -91,7 +91,7 @@ function buildBarChartOptions(props, direction, series = props.series) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
-
const base =
|
|
94
|
+
const base = _chunk5TWNMPQUjs.buildBaseChartOptions.call(void 0, {
|
|
95
95
|
type: chartType,
|
|
96
96
|
description: props.description,
|
|
97
97
|
reserveTopMargin: Boolean(annotations),
|
|
@@ -106,13 +106,13 @@ function buildBarChartOptions(props, direction, series = props.series) {
|
|
|
106
106
|
// Re-assert the definite `type` so spreading the optionally-typed
|
|
107
107
|
// `base.chart` doesn't widen the required `type` field to optional.
|
|
108
108
|
type: chartType,
|
|
109
|
-
height: _nullishCoalesce(props.height, () => (
|
|
109
|
+
height: _nullishCoalesce(props.height, () => ( _chunk34OKRQETjs.TIME_SERIES_CHART_HEIGHT)),
|
|
110
110
|
// Tight time-series spacing (from constants/chartOptions.ts) so the plot
|
|
111
111
|
// area fills the 275px container; without it Highcharts' larger default
|
|
112
112
|
// spacing ([10, 10, 15, 10]) shrinks the plot area.
|
|
113
113
|
spacing: [5, 1, 0, 2]
|
|
114
114
|
},
|
|
115
|
-
xAxis:
|
|
115
|
+
xAxis: _chunkCV45MD47js.buildDimensionalAxis.call(void 0, props.xAxis, _nullishCoalesce(tooltipOptions.timezone, () => ( "UTC"))),
|
|
116
116
|
yAxis: {
|
|
117
117
|
min: _optionalChain([props, 'access', _15 => _15.yAxis, 'optionalAccess', _16 => _16.min]),
|
|
118
118
|
max: _optionalChain([props, 'access', _17 => _17.yAxis, 'optionalAccess', _18 => _18.max]),
|
|
@@ -126,7 +126,7 @@ function buildBarChartOptions(props, direction, series = props.series) {
|
|
|
126
126
|
enabled: _optionalChain([props, 'access', _23 => _23.yAxis, 'optionalAccess', _24 => _24.showLabels]) !== false,
|
|
127
127
|
// A declarative `format` drives ticks through the shared valueFormatter;
|
|
128
128
|
// absent it, the zero-config decimal default (1.20K / 1.20M / 1.20B).
|
|
129
|
-
formatter: _optionalChain([props, 'access', _25 => _25.yAxis, 'optionalAccess', _26 => _26.format]) ?
|
|
129
|
+
formatter: _optionalChain([props, 'access', _25 => _25.yAxis, 'optionalAccess', _26 => _26.format]) ? _chunkWMKO3RGTjs.makeValueAxisLabelFormatter.call(void 0, props.yAxis.format) : _chunkWMKO3RGTjs.defaultValueAxisLabelFormatter
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
plotOptions: {
|
|
@@ -151,7 +151,7 @@ var BAR_CHART_DEFAULT_SERIES_LIMIT = 10;
|
|
|
151
151
|
var _jsxruntime = require('react/jsx-runtime');
|
|
152
152
|
var BarChart = _react.memo.call(void 0, function BarChart2(props) {
|
|
153
153
|
const seriesLimit = _nullishCoalesce(props.seriesLimit, () => ( BAR_CHART_DEFAULT_SERIES_LIMIT));
|
|
154
|
-
const { colors, series } =
|
|
154
|
+
const { colors, series } = _chunk5TWNMPQUjs.useSeedsChartSetup.call(void 0, {
|
|
155
155
|
series: props.series,
|
|
156
156
|
seriesLimit,
|
|
157
157
|
isSeriesLimitOverridden: props.seriesLimit !== void 0,
|
|
@@ -171,7 +171,7 @@ var BarChart = _react.memo.call(void 0, function BarChart2(props) {
|
|
|
171
171
|
className: props.className
|
|
172
172
|
});
|
|
173
173
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ...containerProps, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
174
|
-
|
|
174
|
+
_chunk5TWNMPQUjs.ChartRenderer,
|
|
175
175
|
{
|
|
176
176
|
options,
|
|
177
177
|
series,
|
package/dist/bubble/index.d.mts
CHANGED
|
@@ -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-
|
|
3
|
+
import { C as ChartTooltipProps, a as ChartTooltipDataRow, V as ValueFormat } from '../chartBase-Cd405GIA.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-D6MzNjbB.mjs';
|
package/dist/bubble/index.d.ts
CHANGED
|
@@ -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-
|
|
3
|
+
import { C as ChartTooltipProps, a as ChartTooltipDataRow, V as ValueFormat } from '../chartBase-BYipK7MZ.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-D6MzNjbB.js';
|
package/dist/bubble/index.js
CHANGED
|
@@ -5,13 +5,13 @@ var _chunk6EIJCJCNjs = require('../chunk-6EIJCJCN.js');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk5TWNMPQUjs = require('../chunk-5TWNMPQU.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk34OKRQETjs = require('../chunk-34OKRQET.js');
|
|
15
15
|
|
|
16
16
|
// src/charts/bubble/BubbleChart.tsx
|
|
17
17
|
var _react = require('react');
|
|
@@ -106,7 +106,7 @@ function mapBubbleTooltipRow(data) {
|
|
|
106
106
|
}
|
|
107
107
|
function buildBubbleChartOptions(props) {
|
|
108
108
|
const hasOnClick = Boolean(props.onClick);
|
|
109
|
-
const base =
|
|
109
|
+
const base = _chunk5TWNMPQUjs.buildBaseChartOptions.call(void 0, {
|
|
110
110
|
type: "packedbubble",
|
|
111
111
|
description: props.accessibility.description,
|
|
112
112
|
svgContainerLabel: props.accessibility.svgContainerLabel,
|
|
@@ -121,12 +121,12 @@ function buildBubbleChartOptions(props) {
|
|
|
121
121
|
chart: {
|
|
122
122
|
...base.chart,
|
|
123
123
|
type: "packedbubble",
|
|
124
|
-
height: _nullishCoalesce(props.height, () => (
|
|
124
|
+
height: _nullishCoalesce(props.height, () => ( _chunk34OKRQETjs.BUBBLE_CHART_HEIGHT))
|
|
125
125
|
},
|
|
126
126
|
plotOptions: {
|
|
127
127
|
packedbubble: {
|
|
128
128
|
minSize: "30%",
|
|
129
|
-
maxSize: _nullishCoalesce(props.maxBubbleSize, () => (
|
|
129
|
+
maxSize: _nullishCoalesce(props.maxBubbleSize, () => ( _chunk34OKRQETjs.BUBBLE_CHART_DEFAULT_MAX_SIZE)),
|
|
130
130
|
draggable: false,
|
|
131
131
|
states: { hover: { enabled: false } },
|
|
132
132
|
layoutAlgorithm: {
|
|
@@ -134,7 +134,7 @@ function buildBubbleChartOptions(props) {
|
|
|
134
134
|
seriesInteraction: true,
|
|
135
135
|
parentNodeLimit: true,
|
|
136
136
|
enableSimulation: false,
|
|
137
|
-
bubblePadding: _nullishCoalesce(props.bubblePadding, () => (
|
|
137
|
+
bubblePadding: _nullishCoalesce(props.bubblePadding, () => ( _chunk34OKRQETjs.BUBBLE_CHART_DEFAULT_PADDING)),
|
|
138
138
|
splitSeries: _nullishCoalesce(props.splitSeries, () => ( false))
|
|
139
139
|
},
|
|
140
140
|
dataLabels: {
|
|
@@ -181,7 +181,7 @@ function buildBubbleChartOptions(props) {
|
|
|
181
181
|
// src/charts/bubble/BubbleChart.tsx
|
|
182
182
|
var _jsxruntime = require('react/jsx-runtime');
|
|
183
183
|
var BubbleChart = _react.memo.call(void 0, function BubbleChart2(props) {
|
|
184
|
-
const { colors } =
|
|
184
|
+
const { colors } = _chunk5TWNMPQUjs.useSeedsChartSetup.call(void 0, {
|
|
185
185
|
series: props.data.map((d) => ({ color: d.color }))
|
|
186
186
|
});
|
|
187
187
|
const options = _react.useMemo.call(void 0, () => buildBubbleChartOptions(props), [props]);
|
|
@@ -205,7 +205,7 @@ var BubbleChart = _react.memo.call(void 0, function BubbleChart2(props) {
|
|
|
205
205
|
...hasOnPlotBackgroundClick ? { "data-has-on-plot-background-click": "" } : {},
|
|
206
206
|
onClick: props.onPlotBackgroundClick,
|
|
207
207
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
208
|
-
|
|
208
|
+
_chunk5TWNMPQUjs.ChartRenderer,
|
|
209
209
|
{
|
|
210
210
|
options,
|
|
211
211
|
series: props.data.map((d, i) => ({
|
|
@@ -230,5 +230,5 @@ var BubbleChart = _react.memo.call(void 0, function BubbleChart2(props) {
|
|
|
230
230
|
|
|
231
231
|
|
|
232
232
|
|
|
233
|
-
exports.BubbleChart = BubbleChart; exports.defaultBubbleChartWidth =
|
|
233
|
+
exports.BubbleChart = BubbleChart; exports.defaultBubbleChartWidth = _chunk34OKRQETjs.defaultBubbleChartWidth;
|
|
234
234
|
//# sourceMappingURL=index.js.map
|
package/dist/chart-styles.css
CHANGED
|
@@ -248,6 +248,47 @@
|
|
|
248
248
|
gap: var(--space-200); /* 4px */
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
+
/* =========================================================================
|
|
252
|
+
* ChartTooltip primitive -> .seeds-chart-tooltip{,-header,-footer}
|
|
253
|
+
*
|
|
254
|
+
* Portaled into the Highcharts tooltip container, so these are global (not
|
|
255
|
+
* scoped under .seeds-chart), matching the highcharts-tooltip overrides above.
|
|
256
|
+
* The header/footer bleed to the container edges with negative margins that
|
|
257
|
+
* cancel the .seeds-chart-tooltip padding, so their dividers span the full
|
|
258
|
+
* width. The .Icon/.logo rule stops icon/logo glyphs inheriting a stroke.
|
|
259
|
+
* ========================================================================= */
|
|
260
|
+
|
|
261
|
+
.seeds-chart-tooltip {
|
|
262
|
+
display: flex;
|
|
263
|
+
flex-direction: column;
|
|
264
|
+
gap: var(--space-350); /* 12px */
|
|
265
|
+
min-width: 285px;
|
|
266
|
+
padding: var(--space-400); /* 16px */
|
|
267
|
+
background-color: var(--color-container-bg-base);
|
|
268
|
+
border: 1px solid var(--color-container-border-base);
|
|
269
|
+
border-radius: var(--radius-500); /* 6px */
|
|
270
|
+
box-shadow: var(--shadow-medium);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.seeds-chart-tooltip .Icon,
|
|
274
|
+
.seeds-chart-tooltip .logo {
|
|
275
|
+
stroke: none;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* top edge: bleed left/right + up past the container padding, divider below */
|
|
279
|
+
.seeds-chart-tooltip-header {
|
|
280
|
+
margin: calc(-1 * var(--space-200)) calc(-1 * var(--space-400)) 0;
|
|
281
|
+
padding: 0 var(--space-400) var(--space-350);
|
|
282
|
+
border-bottom: 1px solid var(--color-container-border-base);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/* bottom edge: bleed left/right + down past the container padding, divider above */
|
|
286
|
+
.seeds-chart-tooltip-footer {
|
|
287
|
+
margin: 0 calc(-1 * var(--space-400)) calc(-1 * var(--space-200));
|
|
288
|
+
padding: var(--space-350) var(--space-400) 0;
|
|
289
|
+
border-top: 1px solid var(--color-container-border-base);
|
|
290
|
+
}
|
|
291
|
+
|
|
251
292
|
/* =========================================================================
|
|
252
293
|
* shared cross-family time-series layer -> .seeds-chart-time-series
|
|
253
294
|
*
|
|
@@ -48,7 +48,11 @@ interface ChartTooltipDataRow {
|
|
|
48
48
|
value: number | null;
|
|
49
49
|
/** Seeds icon or partner-logo name shown before the row name; `undefined` when the row has none. */
|
|
50
50
|
icon?: TypeIconName;
|
|
51
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Percentage of the whole — populated by pie/donut tooltips (slice percent)
|
|
53
|
+
* and by percent-stacked multi-series bar/line-area tooltips (per-series
|
|
54
|
+
* percent-of-stack at the hovered x); `undefined` for all other rows.
|
|
55
|
+
*/
|
|
52
56
|
percent?: number;
|
|
53
57
|
/** Outer category index — populated by bubble tooltips only; `undefined` elsewhere. */
|
|
54
58
|
seriesIndex?: number;
|
|
@@ -48,7 +48,11 @@ interface ChartTooltipDataRow {
|
|
|
48
48
|
value: number | null;
|
|
49
49
|
/** Seeds icon or partner-logo name shown before the row name; `undefined` when the row has none. */
|
|
50
50
|
icon?: TypeIconName;
|
|
51
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* Percentage of the whole — populated by pie/donut tooltips (slice percent)
|
|
53
|
+
* and by percent-stacked multi-series bar/line-area tooltips (per-series
|
|
54
|
+
* percent-of-stack at the hovered x); `undefined` for all other rows.
|
|
55
|
+
*/
|
|
52
56
|
percent?: number;
|
|
53
57
|
/** Outer category index — populated by bubble tooltips only; `undefined` elsewhere. */
|
|
54
58
|
seriesIndex?: number;
|
package/dist/charts.css
CHANGED
|
@@ -260,6 +260,47 @@
|
|
|
260
260
|
gap: var(--space-200); /* 4px */
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
+
/* =========================================================================
|
|
264
|
+
* ChartTooltip primitive -> .seeds-chart-tooltip{,-header,-footer}
|
|
265
|
+
*
|
|
266
|
+
* Portaled into the Highcharts tooltip container, so these are global (not
|
|
267
|
+
* scoped under .seeds-chart), matching the highcharts-tooltip overrides above.
|
|
268
|
+
* The header/footer bleed to the container edges with negative margins that
|
|
269
|
+
* cancel the .seeds-chart-tooltip padding, so their dividers span the full
|
|
270
|
+
* width. The .Icon/.logo rule stops icon/logo glyphs inheriting a stroke.
|
|
271
|
+
* ========================================================================= */
|
|
272
|
+
|
|
273
|
+
.seeds-chart-tooltip {
|
|
274
|
+
display: flex;
|
|
275
|
+
flex-direction: column;
|
|
276
|
+
gap: var(--space-350); /* 12px */
|
|
277
|
+
min-width: 285px;
|
|
278
|
+
padding: var(--space-400); /* 16px */
|
|
279
|
+
background-color: var(--color-container-bg-base);
|
|
280
|
+
border: 1px solid var(--color-container-border-base);
|
|
281
|
+
border-radius: var(--radius-500); /* 6px */
|
|
282
|
+
box-shadow: var(--shadow-medium);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.seeds-chart-tooltip .Icon,
|
|
286
|
+
.seeds-chart-tooltip .logo {
|
|
287
|
+
stroke: none;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* top edge: bleed left/right + up past the container padding, divider below */
|
|
291
|
+
.seeds-chart-tooltip-header {
|
|
292
|
+
margin: calc(-1 * var(--space-200)) calc(-1 * var(--space-400)) 0;
|
|
293
|
+
padding: 0 var(--space-400) var(--space-350);
|
|
294
|
+
border-bottom: 1px solid var(--color-container-border-base);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/* bottom edge: bleed left/right + down past the container padding, divider above */
|
|
298
|
+
.seeds-chart-tooltip-footer {
|
|
299
|
+
margin: 0 calc(-1 * var(--space-400)) calc(-1 * var(--space-200));
|
|
300
|
+
padding: var(--space-350) var(--space-400) 0;
|
|
301
|
+
border-top: 1px solid var(--color-container-border-base);
|
|
302
|
+
}
|
|
303
|
+
|
|
263
304
|
/* =========================================================================
|
|
264
305
|
* shared cross-family time-series layer -> .seeds-chart-time-series
|
|
265
306
|
*
|
|
@@ -100,71 +100,27 @@ var ChartLegend = _react.memo.call(void 0, function ChartLegend2({
|
|
|
100
100
|
// src/components/ChartTooltip/ChartTooltip.tsx
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
var StyledBox2 = _styledcomponents2.default.call(void 0, _seedsreactbox.Box)`
|
|
106
|
-
.Icon,
|
|
107
|
-
.logo {
|
|
108
|
-
stroke: none;
|
|
109
|
-
}
|
|
110
|
-
`;
|
|
111
103
|
var ChartTooltip = _react.memo.call(void 0, function ChartTooltip2({
|
|
112
104
|
children
|
|
113
105
|
}) {
|
|
114
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
115
|
-
StyledBox2,
|
|
116
|
-
{
|
|
117
|
-
bg: "container.background.base",
|
|
118
|
-
boxShadow: "medium",
|
|
119
|
-
border: 500,
|
|
120
|
-
borderColor: "container.border.base",
|
|
121
|
-
borderRadius: 500,
|
|
122
|
-
p: 400,
|
|
123
|
-
minWidth: 285,
|
|
124
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactbox.Box, { display: "flex", flexDirection: "column", gap: 350, children })
|
|
125
|
-
}
|
|
126
|
-
);
|
|
106
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "seeds-chart-tooltip", children });
|
|
127
107
|
});
|
|
128
108
|
|
|
129
109
|
// src/components/ChartTooltip/components/ChartTooltipFooter.tsx
|
|
130
110
|
|
|
131
111
|
|
|
132
|
-
|
|
133
112
|
var ChartTooltipFooter = _react.memo.call(void 0,
|
|
134
113
|
function ChartTooltipFooter2({ children }) {
|
|
135
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
136
|
-
_seedsreactbox.Box,
|
|
137
|
-
{
|
|
138
|
-
borderTop: 500,
|
|
139
|
-
borderColor: "container.border.base",
|
|
140
|
-
mx: -400,
|
|
141
|
-
mb: -200,
|
|
142
|
-
px: 400,
|
|
143
|
-
pt: 350,
|
|
144
|
-
children
|
|
145
|
-
}
|
|
146
|
-
);
|
|
114
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "seeds-chart-tooltip-footer", children });
|
|
147
115
|
}
|
|
148
116
|
);
|
|
149
117
|
|
|
150
118
|
// src/components/ChartTooltip/components/ChartTooltipHeader.tsx
|
|
151
119
|
|
|
152
120
|
|
|
153
|
-
|
|
154
121
|
var ChartTooltipHeader = _react.memo.call(void 0,
|
|
155
122
|
function ChartTooltipHeader2({ children }) {
|
|
156
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
157
|
-
_seedsreactbox.Box,
|
|
158
|
-
{
|
|
159
|
-
borderBottom: 500,
|
|
160
|
-
borderColor: "container.border.base",
|
|
161
|
-
mx: -400,
|
|
162
|
-
mt: -200,
|
|
163
|
-
px: 400,
|
|
164
|
-
pb: 350,
|
|
165
|
-
children
|
|
166
|
-
}
|
|
167
|
-
);
|
|
123
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "seeds-chart-tooltip-header", children });
|
|
168
124
|
}
|
|
169
125
|
);
|
|
170
126
|
|
|
@@ -254,7 +210,7 @@ var ChartTable = _react.memo.call(void 0, function ChartTable2({
|
|
|
254
210
|
{
|
|
255
211
|
$isAppendedRow: isAppendedRow,
|
|
256
212
|
children: cells.map(
|
|
257
|
-
({ content, align = "left", colSpan = 1 }, cellIndex) => {
|
|
213
|
+
({ content, align = "left", colSpan = 1, pl, pr, style }, cellIndex) => {
|
|
258
214
|
const uniqueIdentifier = `chart-tooltip-table-cell-${cellIndex}`;
|
|
259
215
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
260
216
|
_seedsreacttable.Table.Cell,
|
|
@@ -264,6 +220,9 @@ var ChartTable = _react.memo.call(void 0, function ChartTable2({
|
|
|
264
220
|
align,
|
|
265
221
|
colSpan,
|
|
266
222
|
py: 200,
|
|
223
|
+
pl,
|
|
224
|
+
pr,
|
|
225
|
+
style,
|
|
267
226
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text.SmallBodyCopy, { as: "div", children: content })
|
|
268
227
|
},
|
|
269
228
|
uniqueIdentifier
|
|
@@ -687,4 +646,4 @@ var donutChartStyles = _styledcomponents.css`
|
|
|
687
646
|
|
|
688
647
|
|
|
689
648
|
exports.ColorBox = ColorBox; exports.ChartLegendLabel = ChartLegendLabel; exports.ChartLegend = ChartLegend; exports.ChartTooltip = ChartTooltip; exports.ChartTooltipFooter = ChartTooltipFooter; exports.ChartTooltipHeader = ChartTooltipHeader; exports.generateChartTooltipPortalId = generateChartTooltipPortalId; exports.ChartTooltipPortal = ChartTooltipPortal; exports.ChartTable = ChartTable; exports.ChartTooltipTable = ChartTooltipTable; exports.ChartTooltipTitle = ChartTooltipTitle; exports.transformTimeSeriesTooltipData = transformTimeSeriesTooltipData; exports.baseChartOptions = baseChartOptions; exports.TIME_SERIES_CHART_HEIGHT = TIME_SERIES_CHART_HEIGHT; exports.timeSeriesChartOptions = timeSeriesChartOptions; exports.lineChartOptions = lineChartOptions; exports.areaChartOptions = areaChartOptions; exports.columnChartOptions = columnChartOptions; exports.VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT = VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT; exports.DONUT_CHART_HALO_SIZE = DONUT_CHART_HALO_SIZE; exports.DONUT_CHART_HEIGHT = DONUT_CHART_HEIGHT; exports.DONUT_CHART_WIDTH = DONUT_CHART_WIDTH; exports.donutChartOptions = donutChartOptions; exports.BUBBLE_CHART_HEIGHT = BUBBLE_CHART_HEIGHT; exports.defaultBubbleChartWidth = defaultBubbleChartWidth; exports.BUBBLE_CHART_DEFAULT_PADDING = BUBBLE_CHART_DEFAULT_PADDING; exports.BUBBLE_CHART_DEFAULT_MAX_SIZE = BUBBLE_CHART_DEFAULT_MAX_SIZE; exports.WORD_CLOUD_CHART_HEIGHT = WORD_CLOUD_CHART_HEIGHT; exports.GlobalChartStyleOverrides = GlobalChartStyleOverrides; exports.baseChartStyles = baseChartStyles; exports.timeSeriesChartStyles = timeSeriesChartStyles; exports.lineChartStyles = lineChartStyles; exports.areaChartStyles = areaChartStyles; exports.donutChartStyles = donutChartStyles;
|
|
690
|
-
//# sourceMappingURL=chunk-
|
|
649
|
+
//# sourceMappingURL=chunk-34OKRQET.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/chunk-34OKRQET.js","../src/components/ColorBox/ColorBox.tsx","../../seeds-react-theme-provider/src/index.tsx","../src/components/ChartLegend/components/ChartLegendLabel.tsx","../src/components/ChartLegend/ChartLegend.tsx","../src/components/ChartTooltip/ChartTooltip.tsx","../src/components/ChartTooltip/components/ChartTooltipFooter.tsx","../src/components/ChartTooltip/components/ChartTooltipHeader.tsx","../src/components/ChartTooltip/components/ChartTooltipPortal.tsx","../src/components/ChartTable/ChartTable.tsx","../src/components/ChartTooltip/components/ChartTooltipTable.tsx","../src/components/ChartTooltip/components/ChartTooltipTitle.tsx","../src/helpers/transformTimeSeriesTooltipData.ts","../src/constants/chartOptions.ts","../src/styles/chartStyles.ts"],"names":["jsx","props","theme","ChartLegendLabel","memo","ChartLegend","Box"],"mappings":"AAAA;ACAA,yHAAkC;AAClC,8DAAuC;ADEvC;AACA;AEJA,8BAAuB;AACvB;AACA,kEAAsB;AAepB,+CAAA;AFRF;AACA;ACPA;AAgBI;AATG,IAAM,SAAA,EAAW,CAAC;AAAA,EACvB,QAAA,EAAU,cAAA;AAAA,EACV,OAAA,EAAS,MAAA;AAAA,EACT,MAAA,EAAQ,MAAA;AAAA,EACR,SAAA,EAAW,KAAA;AAAA,EACX,aAAA,EAAe,KAAA;AAAA,EACf,GAAG;AACL,CAAA,EAAA,GAAyB;AACvB,EAAA,uBACEA,6BAAAA;AAAA,IAAC,kBAAA;AAAA,IAAA;AAAA,MACE,GAAG,KAAA;AAAA,MACJ,OAAA;AAAA,MACA,MAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,GAAA,EACE,qBAAA,CAAA;AAAA,kBAAA,EACY,CACRC,MAAAA,EAAAA,mBAGIA,MAAAA,6BAAO,UAAA,EAAU,UAAA,EAAY,SAAU,CAAA;AAAA,QAAA;AAAA,IAAA;AAAA,EAGnD,CAAA;AAEJ,CAAA;ADDA;AACA;AGrCA;AACA;AACA;AACA,gEAAqB;AA2Bf;AArBN,IAAM,UAAA,EAAY,wCAAA,kBAAU,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA,OAAA,EAInB,CAAC,EAAE,KAAA,EAAAC,O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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/_work/seeds/seeds/seeds-react/seeds-react-data-viz/dist/chunk-34OKRQET.js","sourcesContent":[null,"import { css, type CSSProp } from \"styled-components\";\nimport { Box, type TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\nimport ThemeProvider from \"@sproutsocial/seeds-react-theme-provider\";\nimport { type TypeSproutTheme } from \"@sproutsocial/seeds-react-theme\";\n\nexport type TypeColorBoxProps = TypeBoxProps;\n\n/**\n * ColorBox extends Box to apply basic styles.\n */\nexport const ColorBox = ({\n display = \"inline-block\",\n height = \"16px\",\n width = \"16px\",\n minWidth = width,\n borderRadius = \"400\",\n ...props\n}: TypeColorBoxProps) => {\n return (\n <Box\n {...props}\n display={display}\n height={height}\n width={width}\n minWidth={minWidth}\n borderRadius={borderRadius}\n css={\n css`\n cursor: ${(\n props: typeof ThemeProvider & {\n onClick: ((e: React.MouseEvent<HTMLElement>) => void) | void;\n }\n ) => (props?.onClick ? \"pointer\" : \"default\")};\n ` as CSSProp<TypeSproutTheme>\n }\n />\n );\n};\n","import * as React from \"react\";\nimport { ThemeProvider as BaseThemeProvider } from \"styled-components\";\nimport { theme } from \"@sproutsocial/seeds-react-theme\";\nimport type {\n TypeSproutTheme,\n TypeTheme,\n} from \"@sproutsocial/seeds-react-theme\";\n\n// We can append additional themes types here\ntype TypeAllThemes = TypeTheme | TypeSproutTheme;\n\ntype TypeProps = {\n readonly theme?: TypeAllThemes;\n readonly children?: React.ReactNode;\n};\n\nconst ThemeProvider = (props: TypeProps) => (\n <BaseThemeProvider {...props} theme={props.theme || theme}>\n {props.children}\n </BaseThemeProvider>\n);\n\nexport default ThemeProvider;\n","import styled from \"styled-components\";\nimport { memo } from \"react\";\nimport { Box, type TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\nimport { Text } from \"@sproutsocial/seeds-react-text\";\n\nimport type { TypeLegendLabel } from \"../ChartLegend\";\n\nimport { ColorBox } from \"../../ColorBox\";\n\nconst StyledBox = styled(Box)<TypeBoxProps>`\n list-style: none;\n display: flex;\n align-items: center;\n gap: ${({ theme }) => theme.space[300]};\n`;\n\nexport type TypeChartLegendLabelProps = Readonly<{\n children: TypeLegendLabel[\"content\"];\n color: TypeLegendLabel[\"color\"];\n // optional\n containerBoxProps?: TypeBoxProps;\n}>;\n\nexport const ChartLegendLabel = memo<TypeChartLegendLabelProps>(\n function ChartLegendLabel({\n children,\n color = \"#CCC\",\n containerBoxProps = {},\n }: TypeChartLegendLabelProps) {\n return (\n <StyledBox {...containerBoxProps}>\n <ColorBox bg={color} />\n <Text as=\"div\" fontSize={200} color=\"text.subtext\">\n {children}\n </Text>\n </StyledBox>\n );\n }\n);\n","import { memo } from \"react\";\nimport { Box, type TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\nimport { theme } from \"@sproutsocial/seeds-react-theme\";\n\nimport { ChartLegendLabel } from \"./components/ChartLegendLabel\";\n\nexport type TypeLegendLabel = Readonly<{\n content: React.ReactNode;\n color?: string;\n}>;\n\nexport type TypeChartLegendProps = Readonly<{\n legendLabels: ReadonlyArray<TypeLegendLabel>;\n // optional\n containerBoxProps?: TypeBoxProps;\n stacked?: boolean;\n}>;\n\nexport const ChartLegend = memo<TypeChartLegendProps>(function ChartLegend({\n legendLabels,\n containerBoxProps = {},\n stacked = false,\n}: TypeChartLegendProps) {\n return (\n <Box\n as=\"ul\"\n aria-hidden=\"true\"\n display=\"flex\"\n justifyContent=\"center\"\n flexDirection={stacked ? \"column\" : \"row\"}\n flexWrap=\"wrap\"\n columnGap={450}\n rowGap={200}\n m={0}\n p={0}\n {...containerBoxProps}\n >\n {legendLabels.map(({ color, content }, index) => (\n <ChartLegendLabel\n key={`chart-legend-label-${index}`}\n color={color || theme.colors.DATAVIZ_COLORS_LIST[index]}\n containerBoxProps={{ as: \"li\" }}\n >\n {content}\n </ChartLegendLabel>\n ))}\n </Box>\n );\n});\n","import { memo } from \"react\";\n\n// Chart Tooltip\ntype TypeChartTooltipProps = Readonly<{\n children: React.ReactNode;\n}>;\n\n// Consumes the .seeds-chart-tooltip class from chart-styles.css (the shared\n// foundation every v2 chart already imports): the padded/bordered/shadowed\n// container plus the flex-column gap between rows.\nexport const ChartTooltip = memo<TypeChartTooltipProps>(function ChartTooltip({\n children,\n}: TypeChartTooltipProps) {\n return <div className=\"seeds-chart-tooltip\">{children}</div>;\n});\n","import { memo } from \"react\";\n\ntype TypeChartTooltipFooterProps = {\n children: React.ReactNode;\n};\n\nexport const ChartTooltipFooter = memo<TypeChartTooltipFooterProps>(\n function ChartTooltipFooter({ children }: TypeChartTooltipFooterProps) {\n return <div className=\"seeds-chart-tooltip-footer\">{children}</div>;\n }\n);\n","import { memo } from \"react\";\n\ntype TypeChartTooltipHeaderProps = {\n children: React.ReactNode;\n};\n\nexport const ChartTooltipHeader = memo<TypeChartTooltipHeaderProps>(\n function ChartTooltipHeader({ children }: TypeChartTooltipHeaderProps) {\n return <div className=\"seeds-chart-tooltip-header\">{children}</div>;\n }\n);\n","import { memo, useState, useRef, useEffect, type ReactNode } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport type {\n Tooltip,\n Chart,\n TooltipFormatterContextObject,\n TooltipFormatterCallbackFunction,\n} from \"highcharts\";\n\ninterface ExtendedHighchartsTooltip extends Tooltip {\n label: {\n box: { attr({ height, width }: { height: number; width: number }): void };\n text: { element: HTMLElement };\n };\n}\n\nexport const generateChartTooltipPortalId = (chartId: number) =>\n `highcharts-custom-tooltip-${chartId}`;\n\ntype ChartTooltipPortalProps = Readonly<{\n chart: Chart;\n renderContent: (_context: TooltipFormatterContextObject) => ReactNode;\n}>;\n\nexport const ChartTooltipPortal = memo<ChartTooltipPortalProps>(\n function ChartTooltipPortal({\n chart,\n renderContent,\n }: ChartTooltipPortalProps) {\n const isInitialized = useRef<boolean>(false);\n const [node, setNode] = useState<HTMLElement | null>(null);\n const [context, setContext] =\n useState<TooltipFormatterContextObject | null>(null);\n\n useEffect(() => {\n const formatter: TooltipFormatterCallbackFunction = function () {\n // Ensures that tooltip DOM container is rendered before React portal is created.\n if (!isInitialized.current) {\n isInitialized.current = true;\n chart.tooltip.refresh.apply(chart.tooltip, [this.point]);\n chart.tooltip.hide(0);\n }\n\n setContext(this);\n\n return `<div id=\"${generateChartTooltipPortalId(\n chart.index\n )}\" role='tooltip'></div>`;\n };\n\n chart.update({ tooltip: { formatter } });\n }, [chart]);\n\n useEffect(() => {\n // In some cases tooltip is not available on the chart yet\n if (context?.series?.chart?.tooltip) {\n const tooltip = context.series.chart\n .tooltip as ExtendedHighchartsTooltip;\n const textElement = tooltip.label.text.element;\n\n tooltip.label.box.attr({\n height: textElement.offsetHeight,\n width: textElement.offsetWidth,\n });\n\n setNode(\n document.getElementById(generateChartTooltipPortalId(chart.index))\n );\n }\n }, [context, chart.index]);\n\n return node && context ? createPortal(renderContent(context), node) : null;\n }\n);\n","import { memo } from \"react\";\nimport styled from \"styled-components\";\nimport { Text } from \"@sproutsocial/seeds-react-text\";\nimport { Table as SeedsTable } from \"@sproutsocial/seeds-react-table\";\n\nconst StyledSeedsTable = styled<typeof SeedsTable>(SeedsTable)`\n tbody tr:last-child {\n border-bottom: none;\n }\n tr:last-child td,\n tr:last-child th {\n padding-bottom: 0;\n }\n tr:first-child td,\n tr:first-child th {\n padding-top: 0;\n }\n tr th {\n padding-left: 0;\n }\n tr td:last-child {\n padding-right: 0;\n }\n`;\n\nconst StyledSeedsTableRow = styled(SeedsTable.TableRow)<{\n $isAppendedRow?: boolean;\n}>`\n ${({ $isAppendedRow, theme }) =>\n $isAppendedRow\n ? `border-top: 2px solid ${theme.colors.container.border.base}`\n : \"\"}\n`;\n\nexport type TypeChartTableProps = Readonly<{\n rows: ReadonlyArray<{\n cells: ReadonlyArray<{\n content: React.ReactNode;\n align?: React.ComponentProps<typeof SeedsTable.Cell>[\"align\"];\n colSpan?: React.ComponentProps<typeof SeedsTable.Cell>[\"colSpan\"];\n pl?: React.ComponentProps<typeof SeedsTable.Cell>[\"pl\"];\n pr?: React.ComponentProps<typeof SeedsTable.Cell>[\"pr\"];\n style?: React.ComponentProps<typeof SeedsTable.Cell>[\"style\"];\n }>;\n isAppendedRow?: boolean;\n }>;\n}>;\n\nexport const ChartTable = memo<TypeChartTableProps>(function ChartTable({\n rows,\n}: TypeChartTableProps) {\n if (!rows || rows.length === 0) {\n return null;\n }\n\n return (\n <StyledSeedsTable>\n <SeedsTable.TableBody>\n {rows.map(({ cells, isAppendedRow }, rowIndex) => {\n if (!cells || cells.length === 0) {\n return null;\n }\n\n return (\n <StyledSeedsTableRow\n key={`chart-tooltip-table-row-${rowIndex}`}\n $isAppendedRow={isAppendedRow}\n >\n {cells.map(\n (\n { content, align = \"left\", colSpan = 1, pl, pr, style },\n cellIndex\n ) => {\n const uniqueIdentifier = `chart-tooltip-table-cell-${cellIndex}`;\n return (\n <SeedsTable.Cell\n key={uniqueIdentifier}\n id={uniqueIdentifier}\n scope={cellIndex === 0 ? \"row\" : undefined}\n align={align}\n colSpan={colSpan}\n py={200}\n pl={pl}\n pr={pr}\n style={style}\n >\n <Text.SmallBodyCopy as=\"div\">\n {content}\n </Text.SmallBodyCopy>\n </SeedsTable.Cell>\n );\n }\n )}\n </StyledSeedsTableRow>\n );\n })}\n </SeedsTable.TableBody>\n </StyledSeedsTable>\n );\n});\n","import { memo } from \"react\";\n\nimport { ChartTable, type TypeChartTableProps } from \"../../ChartTable\";\n\nexport type TypeChartTooltipTableProps = {\n rows: TypeChartTableProps[\"rows\"];\n};\n\nexport const ChartTooltipTable = memo<TypeChartTooltipTableProps>(\n function ChartTooltipTable({ rows }: TypeChartTooltipTableProps) {\n return <ChartTable rows={rows} />;\n }\n);\n","import { memo } from \"react\";\nimport { Text } from \"@sproutsocial/seeds-react-text\";\n\ntype TypeChartTooltipTitleProps = {\n children: React.ReactNode;\n};\n\nexport const ChartTooltipTitle = memo<TypeChartTooltipTitleProps>(\n function ChartTooltipTitle({ children }: TypeChartTooltipTitleProps) {\n return <Text.SmallSubHeadline as=\"p\">{children}</Text.SmallSubHeadline>;\n }\n);\n","import type { TooltipFormatterContextObject } from \"highcharts\";\nimport { theme } from \"@sproutsocial/seeds-react-theme\";\n\nimport type { TypeAreaChartProps } from \"../components/AreaChart\";\nimport type { TypeLineChartProps } from \"../components/LineChart\";\nimport type { TypeChartTooltipProps } from \"../types\";\n\ntype TypeTransformTimeSeriesTooltipDataProps = Readonly<{\n context: TooltipFormatterContextObject;\n data: TypeAreaChartProps[\"data\"] | TypeLineChartProps[\"data\"];\n}>;\ntype TypeTransformTimeSeriesTooltipDataReturn = TypeChartTooltipProps[\"data\"];\n\nexport const transformTimeSeriesTooltipData = ({\n context,\n data,\n}: TypeTransformTimeSeriesTooltipDataProps): TypeTransformTimeSeriesTooltipDataReturn => {\n // @ts-expect-error - Highcharts tooltip context series typing does not expose chart.series here\n return (context.series.chart.series || []).map((series, index) => {\n const pointIndex = context.point.index;\n const y = series?.points?.[pointIndex]?.y;\n\n return {\n color:\n data[index]?.styles?.color || theme.colors.DATAVIZ_COLORS_LIST[index],\n ...(data[index]?.icon ? { icon: data[index]?.icon } : {}),\n name: series.name,\n value: typeof y === \"number\" ? y : null,\n };\n });\n};\n","import type { Options } from \"highcharts\";\nimport _ from \"lodash\";\n\n// options that should apply to all charts\n// this is being exported because it's needed for the listening bubble chart component.\n// when that components gets moved into the data-viz package, we can remove the export here\nexport const baseChartOptions: Options = {\n chart: {\n animation: false,\n styledMode: true,\n },\n credits: {\n enabled: false,\n },\n exporting: {\n enabled: false,\n fallbackToExportServer: false,\n },\n legend: {\n enabled: false,\n },\n title: {\n text: undefined,\n },\n tooltip: {\n hideDelay: 0,\n outside: true,\n padding: 0,\n shape: \"rect\",\n shared: true,\n useHTML: true,\n },\n};\n\n// options that should apply to time series charts\nexport const TIME_SERIES_CHART_HEIGHT = 275;\nexport const timeSeriesChartOptions: Options = _.merge({}, baseChartOptions, {\n annotations: [\n {\n draggable: \"\",\n labelOptions: {\n useHTML: true,\n padding: 0, // removes \"left\" property padding created by highcharts so that label is centered\n },\n },\n ],\n chart: {\n // events.click is set at the component level because of the optional onClick prop\n height: TIME_SERIES_CHART_HEIGHT,\n spacing: [5, 1, 0, 2],\n },\n plotOptions: {\n series: {\n animation: false,\n clip: false,\n marker: {\n enabled: false,\n states: {\n hover: {\n enabled: false,\n },\n },\n },\n },\n },\n xAxis: {\n crosshair: {\n zIndex: 3,\n },\n minPadding: 0, // must be handled dynamically instead of css\n maxPadding: 0, // must be handled dynamically instead of css\n type: \"datetime\",\n labels: {\n useHTML: true,\n // formatter is set at the component level because of the required text locale prop\n },\n },\n yAxis: {\n labels: {\n useHTML: true,\n // formatter is set at the component level because of the optional yAxisLabelFormatter prop\n },\n softMax: 0,\n softMin: 0,\n title: {\n text: undefined,\n },\n plotLines: [\n /* Adds a custom plotLine at y=0 to represent the chart baseline.\n This approach allows full control over the line's appearance (e.g., color, z-index),\n unlike relying on the default xAxis line, which always renders at the bottom of the chart\n even when y=0 appears elsewhere (e.g., with negative values).\n */\n {\n className: \"y-axis-zero-line\",\n value: 0,\n zIndex: 3, // ensures the line appears over the default y=0 line, which we can't seleect as specifically\n },\n ],\n },\n});\n\n// options that should apply to LineChart\nexport const lineChartOptions: Options = _.merge({}, timeSeriesChartOptions, {\n // plotOptions.spline.events.click is set at the component level because of the optional onClick prop\n});\n\n// options that should apply to AreaChart\nexport const areaChartOptions: Options = _.merge({}, timeSeriesChartOptions, {\n plotOptions: {\n areaspline: {\n // events.click is set at the component level because of the optional onClick prop\n stacking: \"normal\",\n },\n },\n});\n\nexport const columnChartOptions: Options = _.merge({}, timeSeriesChartOptions, {\n plotOptions: {\n column: {\n stacking: \"normal\",\n pointPadding: 0.25,\n groupPadding: 0.25,\n borderRadius: 4,\n },\n },\n xAxis: {\n crosshair: false,\n },\n yAxis: {\n plotLines: [\n {\n // For stacked column charts with visible borders (e.g., white for contrast),\n // we raise the zIndex of the y=0 plotLine to ensure it remains visible\n // and isn't visually covered by overlapping column borders.\n zIndex: 5,\n },\n ],\n },\n});\n\n/**\n * The default series limit for VerticalBarChart.\n * This limit is recommended to maintain chart readability and accessibility.\n * @see {VerticalBarChart}\n */\nexport const VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT = 10;\n\n// options that should apply to DonutChart\nexport const DONUT_CHART_HALO_SIZE = 10; // 10 is the default from highcharts\nexport const DONUT_CHART_HEIGHT = 250 + DONUT_CHART_HALO_SIZE * 2;\nexport const DONUT_CHART_WIDTH = DONUT_CHART_HEIGHT;\nexport const donutChartOptions: Options = _.merge({}, baseChartOptions, {\n chart: {\n height: DONUT_CHART_HEIGHT,\n spacing: [0, 0, 0, 0],\n },\n plotOptions: {\n pie: {\n animation: false,\n borderRadius: 0, // must be handled here instead of css because of path rendering\n dataLabels: {\n enabled: false,\n },\n innerSize: \"50%\",\n },\n },\n});\n\n// options that should apply to BubbleChart (v2 packedbubble)\nexport const BUBBLE_CHART_HEIGHT = 600;\n// Preserved verbatim from v1 (consumed by web-app-core's `Overlays.tsx` as a\n// Box width) — re-exported from `/bubble` for the future consumer-migration\n// ticket. Not wired into the v2 chart's own options: packedbubble is\n// fluid-width like every other v2 family, matching the container's own\n// responsive sizing rather than v1's fixed `chart.width`.\nexport const defaultBubbleChartWidth = 600;\nexport const BUBBLE_CHART_DEFAULT_PADDING = 16;\nexport const BUBBLE_CHART_DEFAULT_MAX_SIZE = \"100%\";\n\n// options that should apply to WordCloud\n/** Also sets the cloud's aspect ratio — a wider/shorter box biases the silhouette wide, a narrower/taller one biases it tall. */\nexport const WORD_CLOUD_CHART_HEIGHT = 400;\n","import { css, createGlobalStyle } from \"styled-components\";\nimport { theme } from \"@sproutsocial/seeds-react-theme\";\nimport {\n type TypeChartStyleColor,\n type TypeChartStyleHasOnClick,\n type TypeChartStylePattern,\n} from \"../types\";\nimport \"highcharts/css/highcharts.css\";\n\nexport const GlobalChartStyleOverrides = createGlobalStyle`\n // USAGE NOTE:\n // Put general styles in baseChartStyles instead when possible to avoid excessive global styling.\n // This global component is only for styles that can't override highcharts defaults when scoped.\n\n .highcharts-tooltip-container {\n z-index: 7 !important;\n }\n .highcharts-tooltip-box {\n fill: transparent !important;\n }\n`;\n\n// options that should apply to all charts\nexport const baseChartStyles = css<\n Readonly<{ $colors: ReadonlyArray<TypeChartStyleColor> }>\n>`\n --highcharts-background-color: ${({ theme }) =>\n theme.colors.container.background.base};\n\n // set color variables and map to each series\n ${({ $colors }) =>\n $colors\n .map((color, index) => {\n const chartColor = color || theme.colors.DATAVIZ_COLORS_LIST[index];\n return `\n\t\t\t\t// map colors to custom assigned colors or fallback to default data viz color rotation\n\t\t\t\t--highcharts-color-${index}: ${chartColor};\n\n\t\t\t\t// highcharts already accounts for 10 series, but if we have more, we need to add them\n\t\t\t\t.highcharts-color-${index} {\n\t\t\t\t\tcolor: var(--highcharts-color-${index});\n\t\t\t\t\tstroke: var(--highcharts-color-${index});\n\t\t\t\t\tfill: var(--highcharts-color-${index});\n\t\t\t\t}`;\n })\n .join(\"\\n\")}\n\n // set overall chart background color\n .highcharts-background {\n fill: ${({ theme }) => theme.colors.container.background.base};\n }\n\n g.highcharts-annotation-label {\n display: none;\n }\n\n div.highcharts-annotation-label {\n top: 0 !important;\n transform: translateX(-50%); // centers the label on the targeted axis point\n pointer-events: none; // prevents tooltip hover from being interrupted by this element since it renders after on the dom\n }\n`;\n\n// options that should apply to time series charts\nexport const timeSeriesChartStyles = css<\n Readonly<{\n $colors: ReadonlyArray<TypeChartStyleColor>;\n $hasOnClick: TypeChartStyleHasOnClick;\n }>\n>`\n ${baseChartStyles}\n\n // vertical crosshair styles\n\t.highcharts-crosshair {\n stroke: ${({ theme }) => theme.colors.container.border.decorative.neutral};\n stroke-width: 1;\n }\n\n // axis and gridline styles\n .highcharts-grid-line {\n stroke: ${({ theme }) => theme.colors.container.border.base};\n }\n\n .highcharts-axis-line {\n stroke: ${({ theme }) => theme.colors.container.border.base};\n }\n\n .highcharts-tick {\n stroke: none;\n }\n .highcharts-xaxis-labels,\n .highcharts-yaxis-labels {\n // v1 HTML labels (useHTML: true). v2 SVG label styles live in\n // charts/shared/styles.ts (axisLabelV2Styles) — don't add v2 rules here.\n > span {\n font-family: ${({ theme }) => theme.fontFamily};\n ${({ theme }) => theme.typography[100]};\n font-weight: ${({ theme }) => theme.fontWeights.normal};\n color: ${({ theme }) => theme.colors.text.subtext};\n }\n }\n .highcharts-xaxis-labels {\n // v1 HTML stacked labels (useHTML: true). v2 SVG stacked-label styles live\n // in charts/shared/styles.ts (axisLabelV2Styles).\n > span {\n display: flex;\n flex-direction: column;\n align-items: center;\n > span:nth-of-type(2) {\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n }\n }\n }\n\n // we don't want to drop the opacity when another item is hovered\n .highcharts-series-inactive {\n opacity: 1;\n }\n\n // apply cursor pointer when click functionality is turned on\n ${({ $hasOnClick }) =>\n $hasOnClick &&\n `\n \t\t\t.highcharts-series,\n \t\t\t.highcharts-point {\n \t\t\t\tcursor: pointer;\n \t\t\t}\n \t\t\t.highcharts-plot-background,\n \t\t\t.highcharts-crosshair,\n \t\t\t.highcharts-grid-line {\n \t\t\t\tfill: transparent;\n \t\t\t\tcursor: pointer;\n \t\t}`}\n\n path.highcharts-plot-line.y-axis-zero-line {\n stroke: ${({ theme }) => theme.colors.container.border.decorative.neutral};\n }\n`;\n\n// options that should apply to line charts\nexport const lineChartStyles = css<\n Readonly<{\n $colors: ReadonlyArray<TypeChartStyleColor>;\n $patterns: ReadonlyArray<TypeChartStylePattern>;\n $hasOnClick: TypeChartStyleHasOnClick;\n }>\n>`\n ${timeSeriesChartStyles}\n\n // set the line stroke\n\t.highcharts-graph {\n stroke-width: 3;\n }\n\n // dashed line styles\n ${({ $patterns }) =>\n $patterns.map((pattern, index) => {\n return pattern === \"dashed\"\n ? `\n \t\t\t\t\t// highcharts already accounts for 10 series, but if we have more, we need to add them\n \t\t\t\t\t.highcharts-series-${index} {\n \t\t\t\t\t\tstroke-dasharray: 2, 8;\n \t\t\t\t\t}`\n : \"\";\n })}\n`;\n\n// options that should apply to area charts\nexport const areaChartStyles = css`\n ${timeSeriesChartStyles}\n\n // don't need to show a stroke for the line part of each area\n\t.highcharts-graph {\n stroke-width: 0;\n }\n\n // fill areas to full opacity\n .highcharts-area {\n fill-opacity: 1;\n }\n`;\n\n// options that should apply to donut charts\nexport const donutChartStyles = css<\n Readonly<{\n $colors: ReadonlyArray<TypeChartStyleColor>;\n $hasOnClick: TypeChartStyleHasOnClick;\n }>\n>`\n ${baseChartStyles}\n\n // remove 250ms fade in/out when hovering over different donut chart slices\n\t.highcharts-point {\n transition: opacity 0s;\n }\n\n // remove stroke on donut slices\n .highcharts-pie-series .highcharts-point {\n stroke: none;\n }\n\n // don't reduce opacity when hovering\n .highcharts-point-hover {\n fill-opacity: none;\n }\n\n // apply cursor pointer when click functionality is turned on\n ${({ $hasOnClick }) =>\n $hasOnClick &&\n `\n \t\t\t.highcharts-series,\n \t\t\t.highcharts-point {\n \t\t\t\tcursor: pointer;\n \t\t\t}\n \t\t\t.highcharts-plot-background,\n \t\t\t.highcharts-crosshair,\n \t\t\t.highcharts-grid-line {\n \t\t\t\tfill: transparent;\n \t\t\t\tcursor: pointer;\n \t\t}`}\n`;\n"]}
|