@sproutsocial/seeds-react-data-viz 0.7.31 → 0.14.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/index.js CHANGED
@@ -1,481 +1,85 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/index.ts
31
- var index_exports = {};
32
- __export(index_exports, {
33
- AreaChart: () => AreaChart,
34
- ChartLegend: () => ChartLegend,
35
- ChartLegendLabel: () => ChartLegendLabel,
36
- ChartTable: () => ChartTable,
37
- ChartTooltip: () => ChartTooltip,
38
- ChartTooltipFooter: () => ChartTooltipFooter,
39
- ChartTooltipHeader: () => ChartTooltipHeader,
40
- ChartTooltipPortal: () => ChartTooltipPortal,
41
- ChartTooltipTable: () => ChartTooltipTable,
42
- ChartTooltipTitle: () => ChartTooltipTitle,
43
- ChartXAnnotationDetails: () => ChartXAnnotationDetails,
44
- ChartXAnnotationMarker: () => ChartXAnnotationMarker,
45
- ColorBox: () => ColorBox,
46
- DONUT_CHART_HALO_SIZE: () => DONUT_CHART_HALO_SIZE,
47
- DONUT_CHART_HEIGHT: () => DONUT_CHART_HEIGHT,
48
- DONUT_CHART_WIDTH: () => DONUT_CHART_WIDTH,
49
- DatavizColorBox: () => DatavizColorBox,
50
- DonutChart: () => DonutChart,
51
- DonutChartLegendTable: () => DonutChartLegendTable,
52
- GlobalChartStyleOverrides: () => GlobalChartStyleOverrides,
53
- LineChart: () => LineChart,
54
- NetworkColorBox: () => NetworkColorBox,
55
- TIME_SERIES_CHART_HEIGHT: () => TIME_SERIES_CHART_HEIGHT,
56
- VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT: () => VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT,
57
- VerticalBarChart: () => VerticalBarChart,
58
- areaChartOptions: () => areaChartOptions,
59
- areaChartStyles: () => areaChartStyles,
60
- baseChartOptions: () => baseChartOptions,
61
- baseChartStyles: () => baseChartStyles,
62
- columnChartOptions: () => columnChartOptions,
63
- donutChartOptions: () => donutChartOptions,
64
- donutChartStyles: () => donutChartStyles,
65
- generateChartTooltipPortalId: () => generateChartTooltipPortalId,
66
- getDatavizColor: () => getDatavizColor,
67
- getDatavizColorWithAlpha: () => getDatavizColorWithAlpha,
68
- getDatavizOpacity: () => getDatavizOpacity,
69
- getStorybookCategoricalData: () => getStorybookCategoricalData,
70
- getStorybookSparseTimelineData: () => getStorybookSparseTimelineData,
71
- isCategoricalHourData: () => isCategoricalHourData,
72
- isHourlyTimeData: () => isHourlyTimeData,
73
- lineChartOptions: () => lineChartOptions,
74
- lineChartStyles: () => lineChartStyles,
75
- timeSeriesChartOptions: () => timeSeriesChartOptions,
76
- timeSeriesChartStyles: () => timeSeriesChartStyles,
77
- transformDataToSeries: () => transformDataToSeries,
78
- transformTimeSeriesTooltipData: () => transformTimeSeriesTooltipData,
79
- xAxisLabelFormatter: () => xAxisLabelFormatter,
80
- yAxisLabelFormatter: () => yAxisLabelFormatter
81
- });
82
- module.exports = __toCommonJS(index_exports);
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
83
21
 
84
- // src/components/AreaChart/AreaChart.tsx
85
- var import_react16 = require("react");
86
- var import_highcharts3 = __toESM(require("highcharts"));
87
- var import_highcharts_react_official = require("highcharts-react-official");
88
- var import_accessibility = __toESM(require("highcharts/modules/accessibility"));
89
- var import_annotations = __toESM(require("highcharts/modules/annotations"));
90
- var import_styled_components8 = __toESM(require("styled-components"));
91
- var import_seeds_react_box9 = require("@sproutsocial/seeds-react-box");
92
22
 
93
- // src/components/AreaChart/components/AreaChartLegend.tsx
94
- var import_react5 = require("react");
95
- var import_seeds_react_theme5 = require("@sproutsocial/seeds-react-theme");
96
-
97
- // src/components/ChartLegend/ChartLegend.tsx
98
- var import_react3 = require("react");
99
- var import_seeds_react_box3 = require("@sproutsocial/seeds-react-box");
100
- var import_seeds_react_theme4 = require("@sproutsocial/seeds-react-theme");
101
-
102
- // src/components/ChartLegend/components/ChartLegendLabel.tsx
103
- var import_styled_components4 = __toESM(require("styled-components"));
104
- var import_react2 = require("react");
105
- var import_seeds_react_box2 = require("@sproutsocial/seeds-react-box");
106
- var import_seeds_react_text = require("@sproutsocial/seeds-react-text");
107
-
108
- // src/components/ColorBox/ColorBox.tsx
109
- var import_styled_components2 = require("styled-components");
110
- var import_seeds_react_box = require("@sproutsocial/seeds-react-box");
111
-
112
- // ../seeds-react-theme-provider/dist/index.mjs
113
- var import_react = require("react");
114
- var import_styled_components = require("styled-components");
115
- var import_seeds_react_theme = require("@sproutsocial/seeds-react-theme");
116
- var import_jsx_runtime = require("react/jsx-runtime");
117
-
118
- // src/components/ColorBox/ColorBox.tsx
119
- var import_seeds_react_theme2 = require("@sproutsocial/seeds-react-theme");
120
- var import_jsx_runtime2 = require("react/jsx-runtime");
121
- var ColorBox = ({
122
- display = "inline-block",
123
- height = "16px",
124
- width = "16px",
125
- minWidth = width,
126
- borderRadius = "400",
127
- ...props
128
- }) => {
129
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
130
- import_seeds_react_box.Box,
131
- {
132
- ...props,
133
- display,
134
- height,
135
- width,
136
- minWidth,
137
- borderRadius,
138
- css: import_styled_components2.css`
139
- cursor: ${(props2) => props2?.onClick ? "pointer" : "default"};
140
- `
141
- }
142
- );
143
- };
144
23
 
145
- // src/components/ColorBox/DatavizColorBox.tsx
146
- var import_styled_components3 = __toESM(require("styled-components"));
147
- var import_seeds_react_theme3 = require("@sproutsocial/seeds-react-theme");
148
- var DatavizColorBox = (0, import_styled_components3.default)(ColorBox).attrs(
149
- ({ colorIndex }) => ({
150
- style: {
151
- background: getDatavizColor(colorIndex),
152
- opacity: getDatavizOpacity(colorIndex)
153
- }
154
- })
155
- )``;
156
- var getDatavizColor = (colorIndex) => import_seeds_react_theme3.theme.colors.DATAVIZ_COLORS_LIST[colorIndex % import_seeds_react_theme3.theme.colors.DATAVIZ_COLORS_LIST.length] || "";
157
- var getDatavizOpacity = (colorIndex) => {
158
- const opacitySteps = [1, 0.6, 0.4, 0.2];
159
- const opacityStep = Math.floor(colorIndex / import_seeds_react_theme3.theme.colors.DATAVIZ_COLORS_LIST.length) % opacitySteps.length;
160
- return opacitySteps[opacityStep];
161
- };
162
- var getDatavizColorWithAlpha = (colorIndex) => {
163
- const color = getDatavizColor(colorIndex);
164
- const opacity = getDatavizOpacity(colorIndex);
165
- if (opacity < 0 || opacity > 1) {
166
- return color;
167
- }
168
- return `${color}${Math.floor(opacity * 255).toString(16).padStart(2, "0")}`;
169
- };
170
24
 
171
- // src/components/ColorBox/NetworkColorBox.tsx
172
- var import_seeds_networkcolor = __toESM(require("@sproutsocial/seeds-networkcolor"));
173
- var import_jsx_runtime3 = require("react/jsx-runtime");
174
- var NetworkColorBox = ({
175
- networkColor,
176
- ...props
177
- }) => {
178
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ColorBox, { ...props, bg: import_seeds_networkcolor.default[networkColor] });
179
- };
180
25
 
181
- // src/components/ChartLegend/components/ChartLegendLabel.tsx
182
- var import_jsx_runtime4 = require("react/jsx-runtime");
183
- var StyledBox = (0, import_styled_components4.default)(import_seeds_react_box2.Box)`
184
- list-style: none;
185
- display: flex;
186
- align-items: center;
187
- gap: ${({ theme: theme16 }) => theme16.space[300]};
188
- `;
189
- var ChartLegendLabel = (0, import_react2.memo)(
190
- function ChartLegendLabel2({
191
- children,
192
- color = "#CCC",
193
- containerBoxProps = {}
194
- }) {
195
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(StyledBox, { ...containerBoxProps, children: [
196
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ColorBox, { bg: color }),
197
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_seeds_react_text.Text, { as: "div", fontSize: 200, color: "text.subtext", children })
198
- ] });
199
- }
200
- );
201
26
 
202
- // src/components/ChartLegend/ChartLegend.tsx
203
- var import_jsx_runtime5 = require("react/jsx-runtime");
204
- var ChartLegend = (0, import_react3.memo)(function ChartLegend2({
205
- legendLabels,
206
- containerBoxProps = {},
207
- stacked = false
208
- }) {
209
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
210
- import_seeds_react_box3.Box,
211
- {
212
- as: "ul",
213
- "aria-hidden": "true",
214
- display: "flex",
215
- justifyContent: "center",
216
- flexDirection: stacked ? "column" : "row",
217
- flexWrap: "wrap",
218
- columnGap: 450,
219
- rowGap: 200,
220
- m: 0,
221
- p: 0,
222
- ...containerBoxProps,
223
- children: legendLabels.map(({ color, content }, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
224
- ChartLegendLabel,
225
- {
226
- color: color || import_seeds_react_theme4.theme.colors.DATAVIZ_COLORS_LIST[index],
227
- containerBoxProps: { as: "li" },
228
- children: content
229
- },
230
- `chart-legend-label-${index}`
231
- ))
232
- }
233
- );
234
- });
235
27
 
236
- // src/components/ChartLegend/components/ChartLegendLabelContentWithIcon.tsx
237
- var import_react4 = require("react");
238
- var import_seeds_react_box4 = require("@sproutsocial/seeds-react-box");
239
- var import_jsx_runtime6 = require("react/jsx-runtime");
240
- var ChartLegendLabelContentWithIcon = (0, import_react4.memo)(
241
- function ChartLegendLabelContentWithIcon2({
242
- children,
243
- icon
244
- }) {
245
- return icon ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_seeds_react_box4.Box, { display: "flex", alignItems: "center", gap: 200, children: [
246
- icon,
247
- children
248
- ] }) : children;
249
- }
250
- );
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+ var _chunkVFBZ7FNKjs = require('./chunk-VFBZ7FNK.js');
46
+
47
+ // src/components/AreaChart/AreaChart.tsx
48
+ var _react = require('react');
49
+ var _highcharts = require('highcharts'); var _highcharts2 = _interopRequireDefault(_highcharts);
50
+ var _highchartsreactofficial = require('highcharts-react-official');
51
+ var _accessibility = require('highcharts/modules/accessibility'); var _accessibility2 = _interopRequireDefault(_accessibility);
52
+ var _annotations = require('highcharts/modules/annotations'); var _annotations2 = _interopRequireDefault(_annotations);
53
+ var _styledcomponents = require('styled-components'); var _styledcomponents2 = _interopRequireDefault(_styledcomponents);
54
+ var _seedsreactbox = require('@sproutsocial/seeds-react-box');
251
55
 
252
56
  // src/components/AreaChart/components/AreaChartLegend.tsx
253
- var import_jsx_runtime7 = require("react/jsx-runtime");
57
+
58
+ var _seedsreacttheme = require('@sproutsocial/seeds-react-theme');
59
+ var _jsxruntime = require('react/jsx-runtime');
254
60
  var getAreaChartLegendLabels = ({
255
61
  data
256
62
  }) => {
257
63
  return data.map((series, index) => ({
258
- content: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChartLegendLabelContentWithIcon, { icon: series.icon, children: series.name }),
259
- color: series.styles?.color || import_seeds_react_theme5.theme.colors.DATAVIZ_COLORS_LIST[index]
64
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabelContentWithIcon, { icon: series.icon, children: series.name }),
65
+ color: _optionalChain([series, 'access', _ => _.styles, 'optionalAccess', _2 => _2.color]) || _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]
260
66
  }));
261
67
  };
262
- var AreaChartLegend = (0, import_react5.memo)(
68
+ var AreaChartLegend = _react.memo.call(void 0,
263
69
  function AreaChartLegend2({ data }) {
264
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChartLegend, { legendLabels: getAreaChartLegendLabels({ data }) });
70
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegend, { legendLabels: getAreaChartLegendLabels({ data }) });
265
71
  }
266
72
  );
267
73
 
268
74
  // src/components/AreaChart/components/AreaChartTooltip.tsx
269
- var import_react13 = require("react");
270
- var import_seeds_react_box8 = require("@sproutsocial/seeds-react-box");
271
- var import_seeds_react_duration = require("@sproutsocial/seeds-react-duration");
272
- var import_seeds_react_icon = require("@sproutsocial/seeds-react-icon");
273
- var import_seeds_react_numeral = require("@sproutsocial/seeds-react-numeral");
274
- var import_seeds_react_text4 = require("@sproutsocial/seeds-react-text");
275
-
276
- // src/components/ChartTooltip/ChartTooltip.tsx
277
- var import_react6 = require("react");
278
- var import_styled_components5 = __toESM(require("styled-components"));
279
- var import_seeds_react_box5 = require("@sproutsocial/seeds-react-box");
280
- var import_jsx_runtime8 = require("react/jsx-runtime");
281
- var StyledBox2 = (0, import_styled_components5.default)(import_seeds_react_box5.Box)`
282
- .Icon,
283
- .logo {
284
- stroke: none;
285
- }
286
- `;
287
- var ChartTooltip = (0, import_react6.memo)(function ChartTooltip2({
288
- children
289
- }) {
290
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
291
- StyledBox2,
292
- {
293
- bg: "container.background.base",
294
- boxShadow: "medium",
295
- border: 500,
296
- borderColor: "container.border.base",
297
- borderRadius: 500,
298
- p: 400,
299
- minWidth: 285,
300
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_seeds_react_box5.Box, { display: "flex", flexDirection: "column", gap: 350, children })
301
- }
302
- );
303
- });
304
75
 
305
- // src/components/ChartTooltip/components/ChartTooltipFooter.tsx
306
- var import_react7 = require("react");
307
- var import_seeds_react_box6 = require("@sproutsocial/seeds-react-box");
308
- var import_jsx_runtime9 = require("react/jsx-runtime");
309
- var ChartTooltipFooter = (0, import_react7.memo)(
310
- function ChartTooltipFooter2({ children }) {
311
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
312
- import_seeds_react_box6.Box,
313
- {
314
- borderTop: 500,
315
- borderColor: "container.border.base",
316
- mx: -400,
317
- mb: -200,
318
- px: 400,
319
- pt: 350,
320
- children
321
- }
322
- );
323
- }
324
- );
325
76
 
326
- // src/components/ChartTooltip/components/ChartTooltipHeader.tsx
327
- var import_react8 = require("react");
328
- var import_seeds_react_box7 = require("@sproutsocial/seeds-react-box");
329
- var import_jsx_runtime10 = require("react/jsx-runtime");
330
- var ChartTooltipHeader = (0, import_react8.memo)(
331
- function ChartTooltipHeader2({ children }) {
332
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
333
- import_seeds_react_box7.Box,
334
- {
335
- borderBottom: 500,
336
- borderColor: "container.border.base",
337
- mx: -400,
338
- mt: -200,
339
- px: 400,
340
- pb: 350,
341
- children
342
- }
343
- );
344
- }
345
- );
77
+ var _seedsreactduration = require('@sproutsocial/seeds-react-duration');
78
+ var _seedsreacticon = require('@sproutsocial/seeds-react-icon');
79
+ var _seedsreactnumeral = require('@sproutsocial/seeds-react-numeral');
80
+ var _seedsreacttext = require('@sproutsocial/seeds-react-text');
346
81
 
347
- // src/components/ChartTooltip/components/ChartTooltipPortal.tsx
348
- var import_react9 = require("react");
349
- var import_react_dom = require("react-dom");
350
- var generateChartTooltipPortalId = (chartId) => `highcharts-custom-tooltip-${chartId}`;
351
- var ChartTooltipPortal = (0, import_react9.memo)(
352
- function ChartTooltipPortal2({
353
- chart,
354
- renderContent
355
- }) {
356
- const isInitialized = (0, import_react9.useRef)(false);
357
- const [node, setNode] = (0, import_react9.useState)(null);
358
- const [context, setContext] = (0, import_react9.useState)(null);
359
- (0, import_react9.useEffect)(() => {
360
- const formatter = function() {
361
- if (!isInitialized.current) {
362
- isInitialized.current = true;
363
- chart.tooltip.refresh.apply(chart.tooltip, [this.point]);
364
- chart.tooltip.hide(0);
365
- }
366
- setContext(this);
367
- return `<div id="${generateChartTooltipPortalId(
368
- chart.index
369
- )}" role='tooltip'></div>`;
370
- };
371
- chart.update({ tooltip: { formatter } });
372
- }, [chart]);
373
- (0, import_react9.useEffect)(() => {
374
- if (context?.series?.chart?.tooltip) {
375
- const tooltip = context.series.chart.tooltip;
376
- const textElement = tooltip.label.text.element;
377
- tooltip.label.box.attr({
378
- height: textElement.offsetHeight,
379
- width: textElement.offsetWidth
380
- });
381
- setNode(
382
- document.getElementById(generateChartTooltipPortalId(chart.index))
383
- );
384
- }
385
- }, [context, chart.index]);
386
- return node && context ? (0, import_react_dom.createPortal)(renderContent(context), node) : null;
387
- }
388
- );
389
-
390
- // src/components/ChartTooltip/components/ChartTooltipTable.tsx
391
- var import_react11 = require("react");
392
-
393
- // src/components/ChartTable/ChartTable.tsx
394
- var import_react10 = require("react");
395
- var import_styled_components6 = __toESM(require("styled-components"));
396
- var import_seeds_react_text2 = require("@sproutsocial/seeds-react-text");
397
- var import_seeds_react_table = require("@sproutsocial/seeds-react-table");
398
- var import_jsx_runtime11 = require("react/jsx-runtime");
399
- var StyledSeedsTable = (0, import_styled_components6.default)(import_seeds_react_table.Table)`
400
- tbody tr:last-child {
401
- border-bottom: none;
402
- }
403
- tr:last-child td,
404
- tr:last-child th {
405
- padding-bottom: 0;
406
- }
407
- tr:first-child td,
408
- tr:first-child th {
409
- padding-top: 0;
410
- }
411
- tr th {
412
- padding-left: 0;
413
- }
414
- tr td:last-child {
415
- padding-right: 0;
416
- }
417
- `;
418
- var StyledSeedsTableRow = (0, import_styled_components6.default)(import_seeds_react_table.Table.TableRow)`
419
- ${({ $isAppendedRow, theme: theme16 }) => $isAppendedRow ? `border-top: 2px solid ${theme16.colors.container.border.base}` : ""}
420
- `;
421
- var ChartTable = (0, import_react10.memo)(function ChartTable2({
422
- rows
423
- }) {
424
- if (!rows || rows.length === 0) {
425
- return null;
426
- }
427
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(StyledSeedsTable, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_seeds_react_table.Table.TableBody, { children: rows.map(({ cells, isAppendedRow }, rowIndex) => {
428
- if (!cells || cells.length === 0) {
429
- return null;
430
- }
431
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
432
- StyledSeedsTableRow,
433
- {
434
- $isAppendedRow: isAppendedRow,
435
- children: cells.map(
436
- ({ content, align = "left", colSpan = 1 }, cellIndex) => {
437
- const uniqueIdentifier = `chart-tooltip-table-cell-${cellIndex}`;
438
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
439
- import_seeds_react_table.Table.Cell,
440
- {
441
- id: uniqueIdentifier,
442
- scope: cellIndex === 0 ? "row" : void 0,
443
- align,
444
- colSpan,
445
- py: 200,
446
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_seeds_react_text2.Text.SmallBodyCopy, { as: "div", children: content })
447
- },
448
- uniqueIdentifier
449
- );
450
- }
451
- )
452
- },
453
- `chart-tooltip-table-row-${rowIndex}`
454
- );
455
- }) }) });
456
- });
457
-
458
- // src/components/ChartTooltip/components/ChartTooltipTable.tsx
459
- var import_jsx_runtime12 = require("react/jsx-runtime");
460
- var ChartTooltipTable = (0, import_react11.memo)(
461
- function ChartTooltipTable2({ rows }) {
462
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ChartTable, { rows });
463
- }
464
- );
465
-
466
- // src/components/ChartTooltip/components/ChartTooltipTitle.tsx
467
- var import_react12 = require("react");
468
- var import_seeds_react_text3 = require("@sproutsocial/seeds-react-text");
469
- var import_jsx_runtime13 = require("react/jsx-runtime");
470
- var ChartTooltipTitle = (0, import_react12.memo)(
471
- function ChartTooltipTitle2({ children }) {
472
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_seeds_react_text3.Text.SmallSubHeadline, { as: "p", children });
473
- }
474
- );
475
-
476
- // src/components/AreaChart/components/AreaChartTooltip.tsx
477
- var import_jsx_runtime14 = require("react/jsx-runtime");
478
- var AreaChartTooltip = (0, import_react13.memo)(
82
+ var AreaChartTooltip = _react.memo.call(void 0,
479
83
  function AreaChartTooltip2({
480
84
  data,
481
85
  invalidNumberLabel,
@@ -496,11 +100,11 @@ var AreaChartTooltip = (0, import_react13.memo)(
496
100
  return {
497
101
  cells: [
498
102
  {
499
- content: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChartLegendLabel, { color, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_seeds_react_text4.Text, { "aria-label": `${name}: `, children: name }) }) })
103
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${name}: `, children: name }) }) })
500
104
  },
501
105
  {
502
- content: value === null && invalidNumberLabel ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_seeds_react_text4.Text, { children: invalidNumberLabel }) : numberFormat === "duration" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_seeds_react_duration.Duration, { locale: textLocale, milliseconds: value }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
503
- import_seeds_react_numeral.Numeral,
106
+ 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,
107
+ _seedsreactnumeral.Numeral,
504
108
  {
505
109
  abbreviate: false,
506
110
  currency,
@@ -518,8 +122,8 @@ var AreaChartTooltip = (0, import_react13.memo)(
518
122
  {
519
123
  cells: [
520
124
  {
521
- content: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
522
- import_seeds_react_text4.Text,
125
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
126
+ _seedsreacttext.Text,
523
127
  {
524
128
  fontWeight: "semibold",
525
129
  "aria-label": `${tooltipTotalLabel}: `,
@@ -528,8 +132,8 @@ var AreaChartTooltip = (0, import_react13.memo)(
528
132
  )
529
133
  },
530
134
  {
531
- content: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_seeds_react_text4.Text, { fontWeight: "bold", children: total === null && invalidNumberLabel ? invalidNumberLabel : numberFormat === "duration" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_seeds_react_duration.Duration, { locale: textLocale, milliseconds: total }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
532
- import_seeds_react_numeral.Numeral,
135
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { fontWeight: "bold", children: total === null && invalidNumberLabel ? invalidNumberLabel : numberFormat === "duration" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactduration.Duration, { locale: textLocale, milliseconds: total }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
136
+ _seedsreactnumeral.Numeral,
533
137
  {
534
138
  abbreviate: false,
535
139
  currency,
@@ -544,60 +148,61 @@ var AreaChartTooltip = (0, import_react13.memo)(
544
148
  isAppendedRow: true
545
149
  }
546
150
  ] : [];
547
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(ChartTooltip, { children: [
151
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkVFBZ7FNKjs.ChartTooltip, { children: [
548
152
  xAnnotationDetails ? xAnnotationDetails() : void 0,
549
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
550
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
551
- ChartTooltipTable,
153
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
154
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
155
+ _chunkVFBZ7FNKjs.ChartTooltipTable,
552
156
  {
553
157
  rows: [...rows, ...appendedRows]
554
158
  }
555
159
  ),
556
- onClick && tooltipClickLabel ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_seeds_react_box8.Box, { display: "flex", alignItems: "center", gap: 300, children: [
557
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_seeds_react_icon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
558
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_seeds_react_text4.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
160
+ onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
161
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
162
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
559
163
  ] }) : tooltipClickLabel }) : null
560
164
  ] });
561
165
  }
562
166
  );
563
167
 
564
168
  // src/components/ChartXAnnotationMarker/components/ChartXAnnotationMarkerPortal.tsx
565
- var import_react14 = require("react");
566
- var import_react_dom2 = require("react-dom");
567
- var import_highcharts = require("highcharts");
568
- var import_jsx_runtime15 = require("react/jsx-runtime");
569
- var ChartXAnnotationMarkerPortal = (0, import_react14.memo)(
169
+
170
+ var _reactdom = require('react-dom');
171
+
172
+
173
+ var ChartXAnnotationMarkerPortal = _react.memo.call(void 0,
570
174
  function ChartXAnnotationMarkerPortal2({
571
175
  xAnnotations,
572
- annotationContext
176
+ annotationContext,
177
+ chartContainer
573
178
  }) {
574
- const annotationContainers = (0, import_react14.useRef)({});
575
- const [renderCount, setRenderCount] = (0, import_react14.useState)(0);
179
+ const annotationContainers = _react.useRef.call(void 0, {});
180
+ const [renderCount, setRenderCount] = _react.useState.call(void 0, 0);
576
181
  const forceRender = () => setRenderCount((prev) => prev + 1);
577
- (0, import_react14.useEffect)(() => {
182
+ _react.useEffect.call(void 0, () => {
578
183
  if (annotationContext.labels) {
579
184
  const newContainers = {};
580
- const existingAnnotationContainers = document.querySelectorAll(
185
+ const existingAnnotationContainers = chartContainer.querySelectorAll(
581
186
  "div[data-annotation-marker='true']"
582
187
  );
583
188
  existingAnnotationContainers.forEach(
584
189
  (annotation) => annotation.setAttribute("data-annotation-marker", "false")
585
190
  );
586
191
  annotationContext.labels.forEach((label) => {
587
- const labelElement = label.graphic?.div;
192
+ const labelElement = _optionalChain([label, 'access', _3 => _3.graphic, 'optionalAccess', _4 => _4.div]);
588
193
  if (labelElement) {
589
194
  labelElement.querySelectorAll("div[data-annotation-marker]").forEach((component) => component.remove());
590
195
  const annotationDiv = document.createElement("div");
591
196
  annotationDiv.setAttribute("data-annotation-marker", "true");
592
197
  labelElement.appendChild(annotationDiv);
593
- const xValue = label.options?.point?.x;
198
+ const xValue = _optionalChain([label, 'access', _5 => _5.options, 'optionalAccess', _6 => _6.point, 'optionalAccess', _7 => _7.x]);
594
199
  newContainers[xValue] = annotationDiv;
595
200
  }
596
201
  });
597
202
  annotationContainers.current = newContainers;
598
203
  forceRender();
599
204
  requestAnimationFrame(() => {
600
- document.querySelectorAll("div.highcharts-annotation").forEach((annotationDiv) => {
205
+ chartContainer.querySelectorAll("div.highcharts-annotation").forEach((annotationDiv) => {
601
206
  const reactAnnotations = annotationDiv.querySelectorAll(
602
207
  "div[data-annotation-marker]"
603
208
  );
@@ -610,570 +215,19 @@ var ChartXAnnotationMarkerPortal = (0, import_react14.memo)(
610
215
  });
611
216
  });
612
217
  }
613
- }, [annotationContext.labels, xAnnotations]);
614
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: Object.entries(annotationContainers.current).map(
218
+ }, [annotationContext.labels, xAnnotations, chartContainer]);
219
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: Object.entries(annotationContainers.current).map(
615
220
  ([xValue, container]) => {
616
- const annotationComponent = xAnnotations?.[Number(xValue)]?.marker;
617
- return annotationComponent ? (0, import_react_dom2.createPortal)(annotationComponent(), container) : null;
221
+ const annotationComponent = _optionalChain([xAnnotations, 'optionalAccess', _8 => _8[Number(xValue)], 'optionalAccess', _9 => _9.marker]);
222
+ return annotationComponent ? _reactdom.createPortal.call(void 0, annotationComponent(), container) : null;
618
223
  }
619
224
  ) });
620
225
  }
621
226
  );
622
227
 
623
- // src/helpers/transformDataToSeries.ts
624
- var transformDataToSeries = ({
625
- data
626
- }, type) => {
627
- const hasCategoricalData = data.some(
628
- (series) => series.points.some((point) => typeof point.x === "string")
629
- );
630
- return data.map((dataItem, dataIndex) => {
631
- const points = dataItem.points || [];
632
- const dataPoints = points.map((point, pointsIndex) => {
633
- let enableMarker = false;
634
- const isFirstPoint = pointsIndex === 0;
635
- const isLastPoint = pointsIndex === points.length - 1;
636
- const previousY = isFirstPoint ? null : points[pointsIndex - 1].y;
637
- const nextY = isLastPoint ? null : points[pointsIndex + 1].y;
638
- if (isFirstPoint && nextY === null) {
639
- enableMarker = true;
640
- } else if (isLastPoint && previousY === null) {
641
- enableMarker = true;
642
- } else if (previousY === null && nextY === null) {
643
- enableMarker = true;
644
- }
645
- return {
646
- x: hasCategoricalData ? pointsIndex : point.x,
647
- y: point.y,
648
- marker: {
649
- enabled: enableMarker ? enableMarker : void 0,
650
- symbol: enableMarker ? "circle" : void 0
651
- },
652
- // For categorical data, store the original category name
653
- ...hasCategoricalData && { name: point.x }
654
- };
655
- });
656
- return {
657
- colorIndex: dataIndex,
658
- data: dataPoints,
659
- name: dataItem.name,
660
- type
661
- };
662
- });
663
- };
664
-
665
- // src/helpers/transformTimeSeriesTooltipData.ts
666
- var import_seeds_react_theme6 = require("@sproutsocial/seeds-react-theme");
667
- var transformTimeSeriesTooltipData = ({
668
- context,
669
- data
670
- }) => {
671
- return (context.series.chart.series || []).map((series, index) => {
672
- const pointIndex = context.point.index;
673
- const y = series?.points?.[pointIndex]?.y;
674
- return {
675
- color: data[index]?.styles?.color || import_seeds_react_theme6.theme.colors.DATAVIZ_COLORS_LIST[index],
676
- ...data[index]?.icon ? { icon: data[index]?.icon } : {},
677
- name: series.name,
678
- value: typeof y === "number" ? y : null
679
- };
680
- });
681
- };
682
-
683
- // src/helpers/yAxisLabelFormatter.ts
684
- var import_seeds_react_duration2 = require("@sproutsocial/seeds-react-duration");
685
- var import_seeds_react_numeral2 = require("@sproutsocial/seeds-react-numeral");
686
- var yAxisLabelFormatter = ({
687
- numberLocale,
688
- textLocale,
689
- tickPositions,
690
- value,
691
- currency = "USD",
692
- numberFormat = "decimal"
693
- }) => {
694
- const numberValue = Number(value);
695
- if (numberValue === 0) {
696
- return (0, import_seeds_react_numeral2.formatNumeral)({
697
- locale: numberLocale,
698
- number: numberValue
699
- });
700
- }
701
- if (numberFormat === "duration") {
702
- return (0, import_seeds_react_duration2.formatDuration)({
703
- display: "narrow",
704
- locale: textLocale,
705
- milliseconds: numberValue
706
- });
707
- }
708
- const maxValue = tickPositions && tickPositions.length > 0 ? tickPositions[tickPositions.length - 1] : void 0;
709
- const abbreviate = typeof maxValue === "number" && maxValue > 9999 ? 1e3 : true;
710
- return (0, import_seeds_react_numeral2.formatNumeral)({
711
- abbreviate,
712
- currency,
713
- format: numberFormat,
714
- locale: numberLocale,
715
- number: numberValue
716
- });
717
- };
718
-
719
- // src/helpers/xAxisLabelFormatter.ts
720
- var getDatePartsInTimezone = (date, timezone) => {
721
- const formatter = new Intl.DateTimeFormat("en-US", {
722
- year: "numeric",
723
- month: "numeric",
724
- day: "numeric",
725
- timeZone: timezone
726
- });
727
- const parts = formatter.formatToParts(date);
728
- return {
729
- day: parseInt(parts.find((p) => p.type === "day")?.value ?? "0", 10),
730
- month: parseInt(parts.find((p) => p.type === "month")?.value ?? "0", 10),
731
- year: parseInt(parts.find((p) => p.type === "year")?.value ?? "0", 10)
732
- };
733
- };
734
- var xAxisLabelFormatter = ({
735
- textLocale,
736
- tickPositions = [],
737
- unitName,
738
- value,
739
- // optional
740
- timeFormat = "12",
741
- timezone = "UTC"
742
- }) => {
743
- if (typeof value === "string") {
744
- return `<span>${value}</span>`;
745
- }
746
- const tickIndex = tickPositions.indexOf(value);
747
- const isFirst = tickIndex === 0;
748
- const previousValue = tickPositions[tickIndex - 1];
749
- const valueDate = new Date(value);
750
- const valueParts = getDatePartsInTimezone(valueDate, timezone);
751
- const previousValueDate = previousValue ? new Date(previousValue) : void 0;
752
- const previousValueParts = previousValueDate ? getDatePartsInTimezone(previousValueDate, timezone) : void 0;
753
- let firstPartOptions = {};
754
- let secondPartOptions = {};
755
- switch (unitName) {
756
- case "hour":
757
- firstPartOptions = timeFormat === "24" ? { hour: "numeric", minute: "numeric", hour12: false } : { hour: "numeric" };
758
- if (isFirst || valueParts.day !== previousValueParts?.day) {
759
- secondPartOptions = { day: "numeric", month: "short" };
760
- }
761
- break;
762
- case "day":
763
- case "week":
764
- firstPartOptions = { day: "numeric" };
765
- if (isFirst || valueParts.month !== previousValueParts?.month) {
766
- secondPartOptions = { month: "short" };
767
- }
768
- break;
769
- case "month":
770
- firstPartOptions = { month: "short" };
771
- if (isFirst || valueParts.year !== previousValueParts?.year) {
772
- secondPartOptions = { year: "numeric" };
773
- }
774
- break;
775
- case "year":
776
- firstPartOptions = { year: "numeric" };
777
- break;
778
- default:
779
- firstPartOptions = {};
780
- break;
781
- }
782
- const firstPart = new Intl.DateTimeFormat(textLocale, {
783
- ...firstPartOptions,
784
- timeZone: timezone
785
- }).format(valueDate);
786
- const secondPart = Object.keys(secondPartOptions).length > 0 ? new Intl.DateTimeFormat(textLocale, {
787
- ...secondPartOptions,
788
- timeZone: timezone
789
- }).format(valueDate) : void 0;
790
- return `<span>${firstPart}</span>${secondPart ? `<span>${secondPart}</span>` : ""}`;
791
- };
792
-
793
- // src/helpers/isHourlyTimeData.ts
794
- function isHourlyTimeData(data) {
795
- if (!data.length) return false;
796
- const xVals = data.flatMap((series) => series.points.map((p) => p.x));
797
- if (!xVals.length) return false;
798
- if (xVals.some((x) => typeof x === "string")) return false;
799
- const dates = xVals.map((x) => {
800
- const d = new Date(x);
801
- return `${d.getUTCFullYear()}-${d.getUTCMonth()}-${d.getUTCDate()}`;
802
- });
803
- const uniqueDates = new Set(dates);
804
- if (uniqueDates.size !== 1) return false;
805
- return xVals.every((x) => {
806
- const d = new Date(x);
807
- const hour = d.getUTCHours();
808
- const minutes = d.getUTCMinutes();
809
- const seconds = d.getUTCSeconds();
810
- return hour >= 0 && hour <= 23 && minutes === 0 && seconds === 0;
811
- });
812
- }
813
-
814
- // src/helpers/isCategoricalHourData.ts
815
- function isCategoricalHourData(data) {
816
- if (!data.length) return false;
817
- const xVals = data.flatMap((series) => series.points.map((p) => p.x));
818
- if (!xVals.length) return false;
819
- if (xVals.some((x) => typeof x !== "string")) return false;
820
- const hour12Pattern = /^\d{1,2} (AM|PM)$/;
821
- const hour24Pattern = /^([01]?\d|2[0-3]):([0-5]\d)$/;
822
- const stringValues = xVals;
823
- const allMatch12Hour = stringValues.every((x) => hour12Pattern.test(x));
824
- const allMatch24Hour = stringValues.every((x) => hour24Pattern.test(x));
825
- return allMatch12Hour || allMatch24Hour;
826
- }
827
-
828
- // src/helpers/getStorybookRandomColor.ts
829
- var getStorybookRandomColor = () => {
830
- const letters = "0123456789ABCDEF";
831
- let color = "#";
832
- for (let i = 0; i < 6; i++) {
833
- color += letters[Math.floor(Math.random() * 16)];
834
- }
835
- return color;
836
- };
837
-
838
- // src/helpers/getStorybookCategoricalData.ts
839
- var getStorybookCategoricalData = ({
840
- showNulls,
841
- showNegativeValues,
842
- numberOfSeries,
843
- yAxisMax,
844
- showCustomColors,
845
- showDashedLines,
846
- categoryType
847
- }) => {
848
- const categoryOptions = {
849
- hours: [
850
- "12 AM",
851
- "1 AM",
852
- "2 AM",
853
- "3 AM",
854
- "4 AM",
855
- "5 AM",
856
- "6 AM",
857
- "7 AM",
858
- "8 AM",
859
- "9 AM",
860
- "10 AM",
861
- "11 AM",
862
- "12 PM",
863
- "1 PM",
864
- "2 PM",
865
- "3 PM",
866
- "4 PM",
867
- "5 PM",
868
- "6 PM",
869
- "7 PM",
870
- "8 PM",
871
- "9 PM",
872
- "10 PM",
873
- "11 PM"
874
- ],
875
- hours24: [
876
- "00:00",
877
- "01:00",
878
- "02:00",
879
- "03:00",
880
- "04:00",
881
- "05:00",
882
- "06:00",
883
- "07:00",
884
- "08:00",
885
- "09:00",
886
- "10:00",
887
- "11:00",
888
- "12:00",
889
- "13:00",
890
- "14:00",
891
- "15:00",
892
- "16:00",
893
- "17:00",
894
- "18:00",
895
- "19:00",
896
- "20:00",
897
- "21:00",
898
- "22:00",
899
- "23:00"
900
- ],
901
- days: [
902
- "Monday",
903
- "Tuesday",
904
- "Wednesday",
905
- "Thursday",
906
- "Friday",
907
- "Saturday",
908
- "Sunday"
909
- ],
910
- months: [
911
- "January",
912
- "February",
913
- "March",
914
- "April",
915
- "May",
916
- "June",
917
- "July",
918
- "August",
919
- "September",
920
- "October",
921
- "November",
922
- "December"
923
- ],
924
- custom: [
925
- "Category A",
926
- "Category B",
927
- "Category C",
928
- "Category D",
929
- "Category E"
930
- ]
931
- };
932
- const categories = categoryOptions[categoryType];
933
- const numberOfPoints = categories.length;
934
- return [...Array(numberOfSeries).keys()].map((seriesIndex) => {
935
- let nullsArray = [];
936
- if (showNulls) {
937
- const nullsArrayLength = Math.floor(numberOfPoints / 5);
938
- nullsArray = [...Array(nullsArrayLength)].map(
939
- () => Math.floor(Math.random() * numberOfPoints)
940
- );
941
- }
942
- return {
943
- points: categories.map((category, pointIndex) => {
944
- const showNull = nullsArray && nullsArray.length > 0 ? nullsArray.includes(pointIndex) : false;
945
- const randomValue = Math.random();
946
- const positiveOrNegativeYAxisMax = showNegativeValues ? randomValue < 0.5 ? -yAxisMax : yAxisMax : yAxisMax;
947
- return {
948
- x: category,
949
- y: showNull ? null : Math.floor(randomValue * positiveOrNegativeYAxisMax)
950
- };
951
- }),
952
- name: `Series ${seriesIndex + 1}`,
953
- styles: {
954
- color: showCustomColors ? getStorybookRandomColor() : void 0,
955
- pattern: showDashedLines ? "dashed" : "solid"
956
- }
957
- };
958
- });
959
- };
960
-
961
- // src/helpers/getStorybookSparseTimelineData.ts
962
- var getStorybookSparseTimelineData = ({
963
- showNulls,
964
- showNegativeValues,
965
- numberOfSeries,
966
- yAxisMax,
967
- showCustomColors,
968
- showDashedLines,
969
- numberOfPoints = 5,
970
- timeSpanHours = 24
971
- }) => {
972
- const seriesNames = [
973
- "Posts Published",
974
- "Comments",
975
- "Likes",
976
- "Shares",
977
- "Clicks",
978
- "Views",
979
- "Saves",
980
- "Reposts",
981
- "Mentions",
982
- "Reactions"
983
- ];
984
- const baseDate = /* @__PURE__ */ new Date("2024-01-01T00:00:00Z");
985
- const timeSpanMs = timeSpanHours * 60 * 60 * 1e3;
986
- return [...Array(numberOfSeries).keys()].map((seriesIndex) => {
987
- let nullsArray = [];
988
- if (showNulls) {
989
- const nullsArrayLength = Math.floor(numberOfPoints / 5);
990
- nullsArray = [...Array(nullsArrayLength)].map(
991
- () => Math.floor(Math.random() * numberOfPoints)
992
- );
993
- }
994
- const timestamps = [...Array(numberOfPoints)].map(() => {
995
- const randomOffset = Math.random() * timeSpanMs;
996
- return baseDate.getTime() + randomOffset;
997
- }).sort((a, b) => a - b);
998
- return {
999
- points: timestamps.map((timestamp, pointIndex) => {
1000
- const showNull = nullsArray && nullsArray.length > 0 ? nullsArray.includes(pointIndex) : false;
1001
- const randomValue = Math.random();
1002
- const positiveOrNegativeYAxisMax = showNegativeValues ? randomValue < 0.5 ? -yAxisMax : yAxisMax : yAxisMax;
1003
- return {
1004
- x: timestamp,
1005
- y: showNull ? null : Math.floor(randomValue * positiveOrNegativeYAxisMax)
1006
- };
1007
- }),
1008
- name: seriesNames[seriesIndex] || `Series ${seriesIndex + 1}`,
1009
- styles: {
1010
- color: showCustomColors ? getStorybookRandomColor() : void 0,
1011
- pattern: showDashedLines ? "dashed" : "solid"
1012
- }
1013
- };
1014
- });
1015
- };
1016
-
1017
228
  // src/hooks/useTimeSeriesChartOptions.ts
1018
- var import_react15 = require("react");
1019
-
1020
- // src/constants/chartOptions.ts
1021
- var import_lodash = __toESM(require("lodash"));
1022
- var baseChartOptions = {
1023
- chart: {
1024
- animation: false,
1025
- styledMode: true
1026
- },
1027
- credits: {
1028
- enabled: false
1029
- },
1030
- exporting: {
1031
- enabled: false,
1032
- fallbackToExportServer: false
1033
- },
1034
- legend: {
1035
- enabled: false
1036
- },
1037
- title: {
1038
- text: void 0
1039
- },
1040
- tooltip: {
1041
- hideDelay: 0,
1042
- outside: true,
1043
- padding: 0,
1044
- shape: "rect",
1045
- shared: true,
1046
- useHTML: true
1047
- }
1048
- };
1049
- var TIME_SERIES_CHART_HEIGHT = 275;
1050
- var timeSeriesChartOptions = import_lodash.default.merge({}, baseChartOptions, {
1051
- annotations: [
1052
- {
1053
- draggable: "",
1054
- labelOptions: {
1055
- useHTML: true,
1056
- padding: 0
1057
- // removes "left" property padding created by highcharts so that label is centered
1058
- }
1059
- }
1060
- ],
1061
- chart: {
1062
- // events.click is set at the component level because of the optional onClick prop
1063
- height: TIME_SERIES_CHART_HEIGHT,
1064
- spacing: [5, 1, 0, 2]
1065
- },
1066
- plotOptions: {
1067
- series: {
1068
- animation: false,
1069
- clip: false,
1070
- marker: {
1071
- enabled: false,
1072
- states: {
1073
- hover: {
1074
- enabled: false
1075
- }
1076
- }
1077
- }
1078
- }
1079
- },
1080
- xAxis: {
1081
- crosshair: {
1082
- zIndex: 3
1083
- },
1084
- minPadding: 0,
1085
- // must be handled dynamically instead of css
1086
- maxPadding: 0,
1087
- // must be handled dynamically instead of css
1088
- type: "datetime",
1089
- labels: {
1090
- useHTML: true
1091
- // formatter is set at the component level because of the required text locale prop
1092
- }
1093
- },
1094
- yAxis: {
1095
- labels: {
1096
- useHTML: true
1097
- // formatter is set at the component level because of the optional yAxisLabelFormatter prop
1098
- },
1099
- softMax: 0,
1100
- softMin: 0,
1101
- title: {
1102
- text: void 0
1103
- },
1104
- plotLines: [
1105
- /* Adds a custom plotLine at y=0 to represent the chart baseline.
1106
- This approach allows full control over the line's appearance (e.g., color, z-index),
1107
- unlike relying on the default xAxis line, which always renders at the bottom of the chart
1108
- even when y=0 appears elsewhere (e.g., with negative values).
1109
- */
1110
- {
1111
- className: "y-axis-zero-line",
1112
- value: 0,
1113
- zIndex: 3
1114
- // ensures the line appears over the default y=0 line, which we can't seleect as specifically
1115
- }
1116
- ]
1117
- }
1118
- });
1119
- var lineChartOptions = import_lodash.default.merge({}, timeSeriesChartOptions, {
1120
- // plotOptions.spline.events.click is set at the component level because of the optional onClick prop
1121
- });
1122
- var areaChartOptions = import_lodash.default.merge({}, timeSeriesChartOptions, {
1123
- plotOptions: {
1124
- areaspline: {
1125
- // events.click is set at the component level because of the optional onClick prop
1126
- stacking: "normal"
1127
- }
1128
- }
1129
- });
1130
- var columnChartOptions = import_lodash.default.merge({}, timeSeriesChartOptions, {
1131
- plotOptions: {
1132
- column: {
1133
- stacking: "normal",
1134
- pointPadding: 0.25,
1135
- groupPadding: 0.25,
1136
- borderRadius: 4
1137
- }
1138
- },
1139
- xAxis: {
1140
- crosshair: false
1141
- },
1142
- yAxis: {
1143
- plotLines: [
1144
- {
1145
- // For stacked column charts with visible borders (e.g., white for contrast),
1146
- // we raise the zIndex of the y=0 plotLine to ensure it remains visible
1147
- // and isn't visually covered by overlapping column borders.
1148
- zIndex: 5
1149
- }
1150
- ]
1151
- }
1152
- });
1153
- var VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT = 10;
1154
- var DONUT_CHART_HALO_SIZE = 10;
1155
- var DONUT_CHART_HEIGHT = 250 + DONUT_CHART_HALO_SIZE * 2;
1156
- var DONUT_CHART_WIDTH = DONUT_CHART_HEIGHT;
1157
- var donutChartOptions = import_lodash.default.merge({}, baseChartOptions, {
1158
- chart: {
1159
- height: DONUT_CHART_HEIGHT,
1160
- spacing: [0, 0, 0, 0]
1161
- },
1162
- plotOptions: {
1163
- pie: {
1164
- animation: false,
1165
- borderRadius: 0,
1166
- // must be handled here instead of css because of path rendering
1167
- dataLabels: {
1168
- enabled: false
1169
- },
1170
- innerSize: "50%"
1171
- }
1172
- }
1173
- });
1174
229
 
1175
- // src/hooks/useTimeSeriesChartOptions.ts
1176
- var import_lodash2 = require("lodash");
230
+ var _lodash = require('lodash');
1177
231
  var useTimeSeriesChartOptions = ({
1178
232
  xAnnotations,
1179
233
  data,
@@ -1189,15 +243,15 @@ var useTimeSeriesChartOptions = ({
1189
243
  timezone = "UTC",
1190
244
  xAxisLabelFormatter: xAxisLabelFormatter2
1191
245
  }) => {
1192
- const [chart, setChart] = (0, import_react15.useState)(null);
1193
- const callback = (0, import_react15.useCallback)((chartInstance) => {
246
+ const [chart, setChart] = _react.useState.call(void 0, null);
247
+ const callback = _react.useCallback.call(void 0, (chartInstance) => {
1194
248
  setChart(chartInstance);
1195
249
  }, []);
1196
250
  function attachTooltipEventListeners(series, tooltipId) {
1197
251
  const handleFocus = (point) => point.series.chart.tooltip.refresh(point);
1198
252
  const handleBlur = (point) => point.series.chart.tooltip.hide(0);
1199
253
  series.flatMap((item) => item.data).forEach((point) => {
1200
- const pointElement = point?.graphic?.element;
254
+ const pointElement = _optionalChain([point, 'optionalAccess', _10 => _10.graphic, 'optionalAccess', _11 => _11.element]);
1201
255
  if (pointElement) {
1202
256
  pointElement.setAttribute("aria-describedby", tooltipId);
1203
257
  pointElement.addEventListener("focus", () => handleFocus(point));
@@ -1224,23 +278,23 @@ var useTimeSeriesChartOptions = ({
1224
278
  const getBaseChartOptions = (type) => {
1225
279
  switch (type) {
1226
280
  case "areaspline":
1227
- return areaChartOptions;
281
+ return _chunkVFBZ7FNKjs.areaChartOptions;
1228
282
  case "spline":
1229
- return lineChartOptions;
283
+ return _chunkVFBZ7FNKjs.lineChartOptions;
1230
284
  case "column":
1231
- return columnChartOptions;
285
+ return _chunkVFBZ7FNKjs.columnChartOptions;
1232
286
  default:
1233
- return lineChartOptions;
287
+ return _chunkVFBZ7FNKjs.lineChartOptions;
1234
288
  }
1235
289
  };
1236
290
  const baseChartOptions2 = getBaseChartOptions(seriesType);
1237
291
  const hasCategoricalData = data.some(
1238
292
  (series) => series.points.some((point) => typeof point.x === "string")
1239
293
  );
1240
- const categories = hasCategoricalData ? data[0]?.points.map((point) => point.x) || [] : [];
294
+ const categories = hasCategoricalData ? _optionalChain([data, 'access', _12 => _12[0], 'optionalAccess', _13 => _13.points, 'access', _14 => _14.map, 'call', _15 => _15((point) => point.x)]) || [] : [];
1241
295
  const hasSparseTimelineData = !hasCategoricalData && seriesType === "column";
1242
- const options = (0, import_react15.useMemo)(() => {
1243
- return (0, import_lodash2.merge)({}, baseChartOptions2, {
296
+ const options = _react.useMemo.call(void 0, () => {
297
+ return _lodash.merge.call(void 0, {}, baseChartOptions2, {
1244
298
  accessibility: {
1245
299
  point: {
1246
300
  descriptionFormatter: function() {
@@ -1257,10 +311,10 @@ var useTimeSeriesChartOptions = ({
1257
311
  marginTop: chartMarginTop,
1258
312
  events: {
1259
313
  click: onClick ? function() {
1260
- return onClick({ x: this?.hoverPoint?.x });
314
+ return onClick({ x: _optionalChain([this, 'optionalAccess', _16 => _16.hoverPoint, 'optionalAccess', _17 => _17.x]) });
1261
315
  } : void 0,
1262
316
  load: function() {
1263
- const tooltipId = generateChartTooltipPortalId(this.index);
317
+ const tooltipId = _chunkVFBZ7FNKjs.generateChartTooltipPortalId.call(void 0, this.index);
1264
318
  attachTooltipEventListeners(this.series, tooltipId);
1265
319
  }
1266
320
  }
@@ -1339,7 +393,7 @@ var useTimeSeriesChartOptions = ({
1339
393
  }
1340
394
  }
1341
395
  },
1342
- series: transformDataToSeries({ data }, seriesType),
396
+ series: _chunkVFBZ7FNKjs.transformDataToSeries.call(void 0, { data }, seriesType),
1343
397
  time: { timezone },
1344
398
  tooltip: {
1345
399
  enabled: !disableTooltips
@@ -1351,7 +405,7 @@ var useTimeSeriesChartOptions = ({
1351
405
  Number
1352
406
  );
1353
407
  const value = this.value;
1354
- const unitName = this.tickPositionInfo?.unitName;
408
+ const unitName = _optionalChain([this, 'access', _18 => _18.tickPositionInfo, 'optionalAccess', _19 => _19.unitName]);
1355
409
  if (typeof xAxisLabelFormatter2 === "function") {
1356
410
  return xAxisLabelFormatter2({
1357
411
  textLocale,
@@ -1387,7 +441,7 @@ var useTimeSeriesChartOptions = ({
1387
441
  return yAxisLabelFormatter2 ? yAxisLabelFormatter2({
1388
442
  y: this.value,
1389
443
  yValues: this.axis.tickPositions
1390
- }) : yAxisLabelFormatter({
444
+ }) : _chunkVFBZ7FNKjs.yAxisLabelFormatter.call(void 0, {
1391
445
  currency,
1392
446
  numberFormat,
1393
447
  numberLocale,
@@ -1418,195 +472,21 @@ var useTimeSeriesChartOptions = ({
1418
472
  ]);
1419
473
  return { options, chart, callback };
1420
474
  };
1421
- var xAxisLabelFormatterDefault = xAxisLabelFormatter;
1422
-
1423
- // src/styles/chartStyles.ts
1424
- var import_styled_components7 = require("styled-components");
1425
- var import_seeds_react_theme7 = require("@sproutsocial/seeds-react-theme");
1426
- var import_highcharts2 = require("highcharts/css/highcharts.css");
1427
- var GlobalChartStyleOverrides = import_styled_components7.createGlobalStyle`
1428
- // USAGE NOTE:
1429
- // Put general styles in baseChartStyles instead when possible to avoid excessive global styling.
1430
- // This global component is only for styles that can't override highcharts defaults when scoped.
1431
-
1432
- .highcharts-tooltip-container {
1433
- z-index: 7 !important;
1434
- }
1435
- .highcharts-tooltip-box {
1436
- fill: transparent !important;
1437
- }
1438
- `;
1439
- var baseChartStyles = import_styled_components7.css`
1440
- --highcharts-background-color: ${({ theme: theme16 }) => theme16.colors.container.background.base};
1441
-
1442
- // set color variables and map to each series
1443
- ${({ $colors }) => $colors.map((color, index) => {
1444
- const chartColor = color || import_seeds_react_theme7.theme.colors.DATAVIZ_COLORS_LIST[index];
1445
- return `
1446
- // map colors to custom assigned colors or fallback to default data viz color rotation
1447
- --highcharts-color-${index}: ${chartColor};
1448
-
1449
- // highcharts already accounts for 10 series, but if we have more, we need to add them
1450
- .highcharts-color-${index} {
1451
- color: var(--highcharts-color-${index});
1452
- stroke: var(--highcharts-color-${index});
1453
- fill: var(--highcharts-color-${index});
1454
- }`;
1455
- }).join("\n")}
1456
-
1457
- // set overall chart background color
1458
- .highcharts-background {
1459
- fill: ${({ theme: theme16 }) => theme16.colors.container.background.base};
1460
- }
1461
-
1462
- g.highcharts-annotation-label {
1463
- display: none;
1464
- }
1465
-
1466
- div.highcharts-annotation-label {
1467
- top: 0 !important;
1468
- transform: translateX(-50%); // centers the label on the targeted axis point
1469
- pointer-events: none; // prevents tooltip hover from being interrupted by this element since it renders after on the dom
1470
- }
1471
- `;
1472
- var timeSeriesChartStyles = import_styled_components7.css`
1473
- ${baseChartStyles}
1474
-
1475
- // vertical crosshair styles
1476
- .highcharts-crosshair {
1477
- stroke: ${({ theme: theme16 }) => theme16.colors.container.border.decorative.neutral};
1478
- stroke-width: 1;
1479
- }
1480
-
1481
- // axis and gridline styles
1482
- .highcharts-grid-line {
1483
- stroke: ${({ theme: theme16 }) => theme16.colors.container.border.base};
1484
- }
475
+ var xAxisLabelFormatterDefault = _chunkVFBZ7FNKjs.xAxisLabelFormatter;
1485
476
 
1486
- .highcharts-axis-line {
1487
- stroke: ${({ theme: theme16 }) => theme16.colors.container.border.base};
1488
- }
1489
-
1490
- .highcharts-tick {
1491
- stroke: none;
1492
- }
1493
- .highcharts-xaxis-labels,
1494
- .highcharts-yaxis-labels {
1495
- > span {
1496
- font-family: ${({ theme: theme16 }) => theme16.fontFamily};
1497
- ${({ theme: theme16 }) => theme16.typography[100]};
1498
- font-weight: ${({ theme: theme16 }) => theme16.fontWeights.normal};
1499
- color: ${({ theme: theme16 }) => theme16.colors.text.subtext};
1500
- }
1501
- }
1502
- .highcharts-xaxis-labels {
1503
- > span {
1504
- display: flex;
1505
- flex-direction: column;
1506
- align-items: center;
1507
- > span:nth-of-type(2) {
1508
- font-weight: ${({ theme: theme16 }) => theme16.fontWeights.semibold};
1509
- }
1510
- }
1511
- }
1512
-
1513
- // we don't want to drop the opacity when another item is hovered
1514
- .highcharts-series-inactive {
1515
- opacity: 1;
1516
- }
1517
-
1518
- // apply cursor pointer when click functionality is turned on
1519
- ${({ $hasOnClick }) => $hasOnClick && `
1520
- .highcharts-series,
1521
- .highcharts-point {
1522
- cursor: pointer;
1523
- }
1524
- .highcharts-plot-background,
1525
- .highcharts-crosshair,
1526
- .highcharts-grid-line {
1527
- fill: transparent;
1528
- cursor: pointer;
1529
- }`}
1530
-
1531
- path.highcharts-plot-line.y-axis-zero-line {
1532
- stroke: ${({ theme: theme16 }) => theme16.colors.container.border.decorative.neutral};
1533
- }
1534
- `;
1535
- var lineChartStyles = import_styled_components7.css`
1536
- ${timeSeriesChartStyles}
1537
-
1538
- // set the line stroke
1539
- .highcharts-graph {
1540
- stroke-width: 3;
1541
- }
1542
-
1543
- // dashed line styles
1544
- ${({ $patterns }) => $patterns.map((pattern, index) => {
1545
- return pattern === "dashed" ? `
1546
- // highcharts already accounts for 10 series, but if we have more, we need to add them
1547
- .highcharts-series-${index} {
1548
- stroke-dasharray: 2, 8;
1549
- }` : "";
1550
- })}
1551
- `;
1552
- var areaChartStyles = import_styled_components7.css`
1553
- ${timeSeriesChartStyles}
1554
-
1555
- // don't need to show a stroke for the line part of each area
1556
- .highcharts-graph {
1557
- stroke-width: 0;
1558
- }
1559
-
1560
- // fill areas to full opacity
1561
- .highcharts-area {
1562
- fill-opacity: 1;
1563
- }
1564
- `;
1565
- var donutChartStyles = import_styled_components7.css`
1566
- ${baseChartStyles}
1567
-
1568
- // remove 250ms fade in/out when hovering over different donut chart slices
1569
- .highcharts-point {
1570
- transition: opacity 0s;
1571
- }
1572
-
1573
- // remove stroke on donut slices
1574
- .highcharts-pie-series .highcharts-point {
1575
- stroke: none;
1576
- }
1577
-
1578
- // don't reduce opacity when hovering
1579
- .highcharts-point-hover {
1580
- fill-opacity: none;
1581
- }
477
+ // src/components/AreaChart/AreaChart.tsx
1582
478
 
1583
- // apply cursor pointer when click functionality is turned on
1584
- ${({ $hasOnClick }) => $hasOnClick && `
1585
- .highcharts-series,
1586
- .highcharts-point {
1587
- cursor: pointer;
1588
- }
1589
- .highcharts-plot-background,
1590
- .highcharts-crosshair,
1591
- .highcharts-grid-line {
1592
- fill: transparent;
1593
- cursor: pointer;
1594
- }`}
1595
- `;
1596
479
 
1597
- // src/components/AreaChart/AreaChart.tsx
1598
- var import_seeds_react_theme8 = require("@sproutsocial/seeds-react-theme");
1599
- var import_jsx_runtime16 = require("react/jsx-runtime");
1600
- (0, import_accessibility.default)(import_highcharts3.default);
1601
- (0, import_annotations.default)(import_highcharts3.default);
1602
- var StyledBox3 = (0, import_styled_components8.default)(import_seeds_react_box9.Box)`
1603
- ${areaChartStyles}
480
+ _accessibility2.default.call(void 0, _highcharts2.default);
481
+ _annotations2.default.call(void 0, _highcharts2.default);
482
+ var StyledBox = _styledcomponents2.default.call(void 0, _seedsreactbox.Box)`
483
+ ${_chunkVFBZ7FNKjs.areaChartStyles}
1604
484
  `;
1605
- var AreaChart = (0, import_react16.memo)(function AreaChart2(props) {
485
+ var AreaChart = _react.memo.call(void 0, function AreaChart2(props) {
1606
486
  const { data } = props;
1607
- return data.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AreaChartWithData, { ...props });
487
+ return data.length === 0 ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AreaChartWithData, { ...props });
1608
488
  });
1609
- var AreaChartWithData = (0, import_react16.memo)(function AreaChartWithData2({
489
+ var AreaChartWithData = _react.memo.call(void 0, function AreaChartWithData2({
1610
490
  data,
1611
491
  invalidNumberLabel,
1612
492
  numberLocale = "en-us",
@@ -1640,45 +520,46 @@ var AreaChartWithData = (0, import_react16.memo)(function AreaChartWithData2({
1640
520
  xAnnotations
1641
521
  });
1642
522
  const colors = data.map(
1643
- (series, index) => series.styles?.color ?? import_seeds_react_theme8.theme.colors.DATAVIZ_COLORS_LIST[index]
523
+ (series, index) => _nullishCoalesce(_optionalChain([series, 'access', _20 => _20.styles, 'optionalAccess', _21 => _21.color]), () => ( _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]))
1644
524
  );
1645
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
1646
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(GlobalChartStyleOverrides, {}),
1647
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1648
- StyledBox3,
525
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
526
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.GlobalChartStyleOverrides, {}),
527
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
528
+ StyledBox,
1649
529
  {
1650
530
  $colors: colors,
1651
531
  $hasOnClick: Boolean(onClick),
1652
532
  bg: "container.background.base",
1653
533
  children: [
1654
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1655
- import_highcharts_react_official.HighchartsReact,
534
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
535
+ _highchartsreactofficial.HighchartsReact,
1656
536
  {
1657
- highcharts: import_highcharts3.default,
537
+ highcharts: _highcharts2.default,
1658
538
  options,
1659
539
  callback
1660
540
  }
1661
541
  ),
1662
- chart && chart.annotations?.length ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
542
+ chart && _optionalChain([chart, 'access', _22 => _22.annotations, 'optionalAccess', _23 => _23.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1663
543
  ChartXAnnotationMarkerPortal,
1664
544
  {
1665
545
  xAnnotations,
1666
- annotationContext: chart.annotations?.[0]
546
+ annotationContext: _optionalChain([chart, 'access', _24 => _24.annotations, 'optionalAccess', _25 => _25[0]]),
547
+ chartContainer: chart.container
1667
548
  }
1668
549
  ) : null,
1669
- chart && !disableTooltips ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1670
- ChartTooltipPortal,
550
+ chart && !disableTooltips ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
551
+ _chunkVFBZ7FNKjs.ChartTooltipPortal,
1671
552
  {
1672
553
  chart,
1673
554
  renderContent: (context) => {
1674
- const tooltipData = transformTimeSeriesTooltipData({
555
+ const tooltipData = _chunkVFBZ7FNKjs.transformTimeSeriesTooltipData.call(void 0, {
1675
556
  context,
1676
557
  data
1677
558
  });
1678
559
  const x = context.x;
1679
560
  const total = context.total;
1680
- const xAnnotationDetails = xAnnotations?.[x]?.details;
1681
- return tooltip ? tooltip({ data: tooltipData, total, x }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
561
+ const xAnnotationDetails = _optionalChain([xAnnotations, 'optionalAccess', _26 => _26[x], 'optionalAccess', _27 => _27.details]);
562
+ return tooltip ? tooltip({ data: tooltipData, total, x }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1682
563
  AreaChartTooltip,
1683
564
  {
1684
565
  currency,
@@ -1699,7 +580,7 @@ var AreaChartWithData = (0, import_react16.memo)(function AreaChartWithData2({
1699
580
  }
1700
581
  }
1701
582
  ) : null,
1702
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_seeds_react_box9.Box, { mt: 350, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AreaChartLegend, { data }) })
583
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactbox.Box, { mt: 350, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AreaChartLegend, { data }) })
1703
584
  ]
1704
585
  }
1705
586
  )
@@ -1707,30 +588,30 @@ var AreaChartWithData = (0, import_react16.memo)(function AreaChartWithData2({
1707
588
  });
1708
589
 
1709
590
  // src/components/ChartXAnnotationDetails/ChartXAnnotationDetails.tsx
1710
- var import_react17 = require("react");
1711
- var import_seeds_react_box10 = require("@sproutsocial/seeds-react-box");
1712
- var import_seeds_react_icon2 = require("@sproutsocial/seeds-react-icon");
1713
- var import_seeds_react_text5 = require("@sproutsocial/seeds-react-text");
1714
- var import_jsx_runtime17 = require("react/jsx-runtime");
1715
- var ChartXAnnotationDetails = (0, import_react17.memo)(
591
+
592
+
593
+
594
+
595
+
596
+ var ChartXAnnotationDetails = _react.memo.call(void 0,
1716
597
  ({ iconName, text }) => {
1717
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ChartTooltipHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_seeds_react_box10.Box, { display: "flex", alignItems: "center", gap: 300, children: [
1718
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_seeds_react_icon2.Icon, { name: iconName, size: "mini", color: "icon.base" }),
1719
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_seeds_react_text5.Text, { color: "text.body", fontSize: 200, children: text })
598
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartTooltipHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
599
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: iconName, size: "mini", color: "icon.base" }),
600
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.body", fontSize: 200, children: text })
1720
601
  ] }) });
1721
602
  }
1722
603
  );
1723
604
 
1724
605
  // src/components/ChartXAnnotationMarker/ChartXAnnotationMarker.tsx
1725
- var import_react18 = require("react");
1726
- var import_seeds_react_box11 = require("@sproutsocial/seeds-react-box");
1727
- var import_seeds_react_icon3 = require("@sproutsocial/seeds-react-icon");
1728
- var import_jsx_runtime18 = require("react/jsx-runtime");
1729
- var ChartXAnnotationMarker = (0, import_react18.memo)(
606
+
607
+
608
+
609
+
610
+ var ChartXAnnotationMarker = _react.memo.call(void 0,
1730
611
  ({ iconName }) => {
1731
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_seeds_react_box11.Box, { display: "flex", flexDirection: "column", alignItems: "center", gap: 200, children: [
1732
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1733
- import_seeds_react_box11.Box,
612
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", flexDirection: "column", alignItems: "center", gap: 200, children: [
613
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
614
+ _seedsreactbox.Box,
1734
615
  {
1735
616
  display: "flex",
1736
617
  alignItems: "center",
@@ -1739,49 +620,49 @@ var ChartXAnnotationMarker = (0, import_react18.memo)(
1739
620
  height: "20px",
1740
621
  bg: "icon.base",
1741
622
  borderRadius: "50%",
1742
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_seeds_react_icon3.Icon, { name: iconName, size: "mini", color: "icon.inverse" })
623
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: iconName, size: "mini", color: "icon.inverse" })
1743
624
  }
1744
625
  ),
1745
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_seeds_react_box11.Box, { height: `199px`, width: "0.5px", bg: "neutral.200" })
626
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactbox.Box, { height: `199px`, width: "0.5px", bg: "neutral.200" })
1746
627
  ] });
1747
628
  }
1748
629
  );
1749
630
 
1750
631
  // src/components/DonutChart/DonutChart.tsx
1751
- var import_react21 = require("react");
1752
- var import_highcharts4 = __toESM(require("highcharts"));
1753
- var import_highcharts_react_official2 = require("highcharts-react-official");
1754
- var import_accessibility2 = __toESM(require("highcharts/modules/accessibility"));
1755
- var import_styled_components9 = __toESM(require("styled-components"));
1756
- var import_seeds_react_box13 = require("@sproutsocial/seeds-react-box");
632
+
633
+
634
+
635
+
636
+
637
+
1757
638
 
1758
639
  // src/components/DonutChart/components/DonutChartLegend.tsx
1759
- var import_react19 = require("react");
1760
- var import_seeds_react_theme9 = require("@sproutsocial/seeds-react-theme");
1761
- var import_jsx_runtime19 = require("react/jsx-runtime");
640
+
641
+
642
+
1762
643
  var getDonutChartLegendLabels = ({
1763
644
  data
1764
645
  }) => {
1765
646
  return data.map((slice, index) => ({
1766
- content: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ChartLegendLabelContentWithIcon, { icon: slice.icon, children: slice.name }),
1767
- color: slice.styles?.color || import_seeds_react_theme9.theme.colors.DATAVIZ_COLORS_LIST[index]
647
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabelContentWithIcon, { icon: slice.icon, children: slice.name }),
648
+ color: _optionalChain([slice, 'access', _28 => _28.styles, 'optionalAccess', _29 => _29.color]) || _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]
1768
649
  }));
1769
650
  };
1770
- var DonutChartLegend = (0, import_react19.memo)(
651
+ var DonutChartLegend = _react.memo.call(void 0,
1771
652
  function DonutChartLegend2({ data }) {
1772
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ChartLegend, { legendLabels: getDonutChartLegendLabels({ data }) });
653
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegend, { legendLabels: getDonutChartLegendLabels({ data }) });
1773
654
  }
1774
655
  );
1775
656
 
1776
657
  // src/components/DonutChart/components/DonutChartTooltip.tsx
1777
- var import_react20 = require("react");
1778
- var import_seeds_react_box12 = require("@sproutsocial/seeds-react-box");
1779
- var import_seeds_react_duration3 = require("@sproutsocial/seeds-react-duration");
1780
- var import_seeds_react_icon4 = require("@sproutsocial/seeds-react-icon");
1781
- var import_seeds_react_numeral3 = require("@sproutsocial/seeds-react-numeral");
1782
- var import_seeds_react_text6 = require("@sproutsocial/seeds-react-text");
1783
- var import_jsx_runtime20 = require("react/jsx-runtime");
1784
- var DonutChartTooltip = (0, import_react20.memo)(
658
+
659
+
660
+
661
+
662
+
663
+
664
+
665
+ var DonutChartTooltip = _react.memo.call(void 0,
1785
666
  function DonutChartTooltip2({
1786
667
  color,
1787
668
  name,
@@ -1799,12 +680,12 @@ var DonutChartTooltip = (0, import_react20.memo)(
1799
680
  {
1800
681
  cells: [
1801
682
  {
1802
- content: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChartLegendLabel, { color, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_seeds_react_text6.Text, { "aria-label": `${name}: `, children: name }) }) })
683
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${name}: `, children: name }) }) })
1803
684
  },
1804
685
  {
1805
- content: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_seeds_react_box12.Box, { display: "inline-flex", alignItems: "center", gap: 350, children: [
1806
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1807
- import_seeds_react_numeral3.Numeral,
686
+ content: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "inline-flex", alignItems: "center", gap: 350, children: [
687
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
688
+ _seedsreactnumeral.Numeral,
1808
689
  {
1809
690
  number: percent,
1810
691
  format: "percent",
@@ -1812,8 +693,8 @@ var DonutChartTooltip = (0, import_react20.memo)(
1812
693
  locale: numberLocale
1813
694
  }
1814
695
  ),
1815
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_seeds_react_text6.Text, { fontWeight: "semibold", children: numberFormat === "duration" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_seeds_react_duration3.Duration, { locale: textLocale, milliseconds: value }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1816
- import_seeds_react_numeral3.Numeral,
696
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { fontWeight: "semibold", children: numberFormat === "duration" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactduration.Duration, { locale: textLocale, milliseconds: value }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
697
+ _seedsreactnumeral.Numeral,
1817
698
  {
1818
699
  abbreviate: false,
1819
700
  currency,
@@ -1828,26 +709,26 @@ var DonutChartTooltip = (0, import_react20.memo)(
1828
709
  ]
1829
710
  }
1830
711
  ];
1831
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(ChartTooltip, { children: [
1832
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChartTooltipTable, { rows }),
1833
- onClick && tooltipClickLabel ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_seeds_react_box12.Box, { display: "flex", alignItems: "center", gap: 300, children: [
1834
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_seeds_react_icon4.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
1835
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_seeds_react_text6.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
712
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkVFBZ7FNKjs.ChartTooltip, { children: [
713
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartTooltipTable, { rows }),
714
+ onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
715
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
716
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
1836
717
  ] }) : tooltipClickLabel }) : null
1837
718
  ] });
1838
719
  }
1839
720
  );
1840
721
 
1841
722
  // src/components/DonutChart/helpers/transformDonutChartTooltipData.ts
1842
- var import_seeds_react_theme10 = require("@sproutsocial/seeds-react-theme");
723
+
1843
724
  var transformDonutChartTooltipData = ({
1844
725
  context,
1845
726
  data
1846
727
  }) => {
1847
728
  const colorIndex = context.colorIndex;
1848
729
  return {
1849
- color: data[colorIndex]?.styles?.color ?? import_seeds_react_theme10.theme.colors.DATAVIZ_COLORS_LIST[colorIndex] ?? "",
1850
- ...data[colorIndex]?.icon ? { icon: data[colorIndex]?.icon } : {},
730
+ color: _nullishCoalesce(_nullishCoalesce(_optionalChain([data, 'access', _30 => _30[colorIndex], 'optionalAccess', _31 => _31.styles, 'optionalAccess', _32 => _32.color]), () => ( _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[colorIndex])), () => ( "")),
731
+ ..._optionalChain([data, 'access', _33 => _33[colorIndex], 'optionalAccess', _34 => _34.icon]) ? { icon: _optionalChain([data, 'access', _35 => _35[colorIndex], 'optionalAccess', _36 => _36.icon]) } : {},
1851
732
  name: context.key,
1852
733
  percent: context.percentage,
1853
734
  value: context.y
@@ -1855,17 +736,17 @@ var transformDonutChartTooltipData = ({
1855
736
  };
1856
737
 
1857
738
  // src/components/DonutChart/DonutChart.tsx
1858
- var import_seeds_react_theme11 = require("@sproutsocial/seeds-react-theme");
1859
- var import_jsx_runtime21 = require("react/jsx-runtime");
1860
- (0, import_accessibility2.default)(import_highcharts4.default);
1861
- var StyledBox4 = (0, import_styled_components9.default)(import_seeds_react_box13.Box)`
1862
- ${donutChartStyles}
739
+
740
+
741
+ _accessibility2.default.call(void 0, _highcharts2.default);
742
+ var StyledBox2 = _styledcomponents2.default.call(void 0, _seedsreactbox.Box)`
743
+ ${_chunkVFBZ7FNKjs.donutChartStyles}
1863
744
  `;
1864
- var DonutChart = (0, import_react21.memo)(function DonutChart2(props) {
745
+ var DonutChart = _react.memo.call(void 0, function DonutChart2(props) {
1865
746
  const { data } = props;
1866
- return data.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DonutChartWithData, { ...props });
747
+ return data.length === 0 ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DonutChartWithData, { ...props });
1867
748
  });
1868
- var DonutChartWithData = (0, import_react21.memo)(
749
+ var DonutChartWithData = _react.memo.call(void 0,
1869
750
  function DonutChartWithData2({
1870
751
  data,
1871
752
  numberLocale = "en-us",
@@ -1879,12 +760,12 @@ var DonutChartWithData = (0, import_react21.memo)(
1879
760
  onClick,
1880
761
  tooltipClickLabel
1881
762
  }) {
1882
- const [options, setOptions] = (0, import_react21.useState)(donutChartOptions);
1883
- const [chart, setChart] = (0, import_react21.useState)(null);
1884
- const callback = (0, import_react21.useCallback)((chartInstance) => {
763
+ const [options, setOptions] = _react.useState.call(void 0, _chunkVFBZ7FNKjs.donutChartOptions);
764
+ const [chart, setChart] = _react.useState.call(void 0, null);
765
+ const callback = _react.useCallback.call(void 0, (chartInstance) => {
1885
766
  setChart(chartInstance);
1886
767
  }, []);
1887
- (0, import_react21.useEffect)(() => {
768
+ _react.useEffect.call(void 0, () => {
1888
769
  setOptions({
1889
770
  accessibility: {
1890
771
  point: {
@@ -1896,17 +777,17 @@ var DonutChartWithData = (0, import_react21.memo)(
1896
777
  chart: {
1897
778
  events: {
1898
779
  render: function() {
1899
- const allSlices = this.series[0]?.data ?? [];
1900
- const tooltipId = generateChartTooltipPortalId(this.index);
780
+ const allSlices = _nullishCoalesce(_optionalChain([this, 'access', _37 => _37.series, 'access', _38 => _38[0], 'optionalAccess', _39 => _39.data]), () => ( []));
781
+ const tooltipId = _chunkVFBZ7FNKjs.generateChartTooltipPortalId.call(void 0, this.index);
1901
782
  allSlices.forEach((slice) => {
1902
- const sliceElement = slice?.graphic?.element;
1903
- sliceElement?.setAttribute("aria-describedby", tooltipId);
1904
- sliceElement?.addEventListener("focus", () => {
783
+ const sliceElement = _optionalChain([slice, 'optionalAccess', _40 => _40.graphic, 'optionalAccess', _41 => _41.element]);
784
+ _optionalChain([sliceElement, 'optionalAccess', _42 => _42.setAttribute, 'call', _43 => _43("aria-describedby", tooltipId)]);
785
+ _optionalChain([sliceElement, 'optionalAccess', _44 => _44.addEventListener, 'call', _45 => _45("focus", () => {
1905
786
  slice.series.chart.tooltip.refresh(slice);
1906
- });
1907
- sliceElement?.addEventListener("blur", () => {
787
+ })]);
788
+ _optionalChain([sliceElement, 'optionalAccess', _46 => _46.addEventListener, 'call', _47 => _47("blur", () => {
1908
789
  slice.series.chart.tooltip.hide(0);
1909
- });
790
+ })]);
1910
791
  });
1911
792
  }
1912
793
  }
@@ -1934,32 +815,32 @@ var DonutChartWithData = (0, import_react21.memo)(
1934
815
  });
1935
816
  }, [data]);
1936
817
  const colors = data.map(
1937
- (series, index) => series.styles?.color ?? import_seeds_react_theme11.theme.colors.DATAVIZ_COLORS_LIST[index] ?? ""
818
+ (series, index) => _nullishCoalesce(_nullishCoalesce(_optionalChain([series, 'access', _48 => _48.styles, 'optionalAccess', _49 => _49.color]), () => ( _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index])), () => ( ""))
1938
819
  );
1939
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
1940
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(GlobalChartStyleOverrides, {}),
1941
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1942
- StyledBox4,
820
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
821
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.GlobalChartStyleOverrides, {}),
822
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
823
+ StyledBox2,
1943
824
  {
1944
825
  $colors: colors,
1945
826
  $hasOnClick: Boolean(onClick),
1946
827
  bg: "container.background.base",
1947
828
  children: [
1948
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1949
- import_highcharts_react_official2.HighchartsReact,
829
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
830
+ _highchartsreactofficial.HighchartsReact,
1950
831
  {
1951
- highcharts: import_highcharts4.default,
832
+ highcharts: _highcharts2.default,
1952
833
  options,
1953
834
  callback
1954
835
  }
1955
836
  ),
1956
- chart && !disableTooltips ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1957
- ChartTooltipPortal,
837
+ chart && !disableTooltips ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
838
+ _chunkVFBZ7FNKjs.ChartTooltipPortal,
1958
839
  {
1959
840
  chart,
1960
841
  renderContent: (context) => {
1961
842
  const { color, icon, name, percent, value } = transformDonutChartTooltipData({ context, data });
1962
- return tooltip ? tooltip({ color, icon, name, percent, value }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
843
+ return tooltip ? tooltip({ color, icon, name, percent, value }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1963
844
  DonutChartTooltip,
1964
845
  {
1965
846
  color,
@@ -1978,7 +859,7 @@ var DonutChartWithData = (0, import_react21.memo)(
1978
859
  }
1979
860
  }
1980
861
  ) : null,
1981
- hideLegend ? null : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_seeds_react_box13.Box, { mt: 350, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DonutChartLegend, { data }) })
862
+ hideLegend ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactbox.Box, { mt: 350, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DonutChartLegend, { data }) })
1982
863
  ]
1983
864
  }
1984
865
  )
@@ -1987,14 +868,14 @@ var DonutChartWithData = (0, import_react21.memo)(
1987
868
  );
1988
869
 
1989
870
  // src/components/DonutChart/components/DonutChartLegendTable.tsx
1990
- var import_react22 = require("react");
1991
- var import_seeds_react_box14 = require("@sproutsocial/seeds-react-box");
1992
- var import_seeds_react_duration4 = require("@sproutsocial/seeds-react-duration");
1993
- var import_seeds_react_numeral4 = require("@sproutsocial/seeds-react-numeral");
1994
- var import_seeds_react_text7 = require("@sproutsocial/seeds-react-text");
1995
- var import_seeds_react_theme12 = require("@sproutsocial/seeds-react-theme");
1996
- var import_jsx_runtime22 = require("react/jsx-runtime");
1997
- var DonutChartLegendTable = (0, import_react22.memo)(
871
+
872
+
873
+
874
+
875
+
876
+
877
+
878
+ var DonutChartLegendTable = _react.memo.call(void 0,
1998
879
  function DonutChartLegendTable2({
1999
880
  data,
2000
881
  numberLocale = "en-us",
@@ -2010,16 +891,16 @@ var DonutChartLegendTable = (0, import_react22.memo)(
2010
891
  );
2011
892
  const rows = data.map((dataPoint, index) => {
2012
893
  const { name, icon, styles, value } = dataPoint;
2013
- const color = styles?.color || import_seeds_react_theme12.theme.colors.DATAVIZ_COLORS_LIST[index];
894
+ const color = _optionalChain([styles, 'optionalAccess', _50 => _50.color]) || _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index];
2014
895
  return {
2015
896
  cells: [
2016
897
  {
2017
- content: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChartLegendLabel, { color, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChartLegendLabelContentWithIcon, { icon, children: name }) })
898
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabelContentWithIcon, { icon, children: name }) })
2018
899
  },
2019
900
  {
2020
- content: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_seeds_react_box14.Box, { display: "inline-flex", alignItems: "center", gap: 350, children: [
2021
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_seeds_react_text7.Text, { color: "text.body", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2022
- import_seeds_react_numeral4.Numeral,
901
+ content: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "inline-flex", alignItems: "center", gap: 350, children: [
902
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.body", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
903
+ _seedsreactnumeral.Numeral,
2023
904
  {
2024
905
  abbreviate: false,
2025
906
  format: "percent",
@@ -2027,8 +908,8 @@ var DonutChartLegendTable = (0, import_react22.memo)(
2027
908
  number: value / total * 100
2028
909
  }
2029
910
  ) }),
2030
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_seeds_react_text7.Text, { color: "text.body", fontWeight: "semibold", children: numberFormat === "duration" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_seeds_react_duration4.Duration, { locale: textLocale, milliseconds: value }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2031
- import_seeds_react_numeral4.Numeral,
911
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.body", fontWeight: "semibold", children: numberFormat === "duration" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactduration.Duration, { locale: textLocale, milliseconds: value }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
912
+ _seedsreactnumeral.Numeral,
2032
913
  {
2033
914
  abbreviate: false,
2034
915
  currency,
@@ -2047,11 +928,11 @@ var DonutChartLegendTable = (0, import_react22.memo)(
2047
928
  {
2048
929
  cells: [
2049
930
  {
2050
- content: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_seeds_react_text7.Text, { fontWeight: "semibold", color: "text.headline", children: totalLabel })
931
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { fontWeight: "semibold", color: "text.headline", children: totalLabel })
2051
932
  },
2052
933
  {
2053
- content: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_seeds_react_text7.Text, { color: "text.body", fontWeight: "bold", children: numberFormat === "duration" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_seeds_react_duration4.Duration, { locale: textLocale, milliseconds: total }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2054
- import_seeds_react_numeral4.Numeral,
934
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.body", fontWeight: "bold", children: numberFormat === "duration" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactduration.Duration, { locale: textLocale, milliseconds: total }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
935
+ _seedsreactnumeral.Numeral,
2055
936
  {
2056
937
  abbreviate: false,
2057
938
  currency,
@@ -2066,8 +947,8 @@ var DonutChartLegendTable = (0, import_react22.memo)(
2066
947
  isAppendedRow: true
2067
948
  }
2068
949
  ];
2069
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2070
- ChartTable,
950
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
951
+ _chunkVFBZ7FNKjs.ChartTable,
2071
952
  {
2072
953
  rows: [...rows, ...totalRow]
2073
954
  }
@@ -2076,41 +957,41 @@ var DonutChartLegendTable = (0, import_react22.memo)(
2076
957
  );
2077
958
 
2078
959
  // src/components/LineChart/LineChart.tsx
2079
- var import_react25 = require("react");
2080
- var import_highcharts5 = __toESM(require("highcharts"));
2081
- var import_highcharts_react_official3 = require("highcharts-react-official");
2082
- var import_accessibility3 = __toESM(require("highcharts/modules/accessibility"));
2083
- var import_annotations2 = __toESM(require("highcharts/modules/annotations"));
2084
- var import_styled_components10 = __toESM(require("styled-components"));
2085
- var import_seeds_react_box16 = require("@sproutsocial/seeds-react-box");
960
+
961
+
962
+
963
+
964
+
965
+
966
+
2086
967
 
2087
968
  // src/components/LineChart/components/LineChartLegend.tsx
2088
- var import_react23 = require("react");
2089
- var import_seeds_react_theme13 = require("@sproutsocial/seeds-react-theme");
2090
- var import_jsx_runtime23 = require("react/jsx-runtime");
969
+
970
+
971
+
2091
972
  var getLineChartLegendLabels = ({
2092
973
  data
2093
974
  }) => {
2094
975
  return data.map((series, index) => ({
2095
- content: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChartLegendLabelContentWithIcon, { icon: series.icon, children: series.name }),
2096
- color: series.styles?.color || import_seeds_react_theme13.theme.colors.DATAVIZ_COLORS_LIST[index]
976
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabelContentWithIcon, { icon: series.icon, children: series.name }),
977
+ color: _optionalChain([series, 'access', _51 => _51.styles, 'optionalAccess', _52 => _52.color]) || _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]
2097
978
  }));
2098
979
  };
2099
- var LineChartLegend = (0, import_react23.memo)(
980
+ var LineChartLegend = _react.memo.call(void 0,
2100
981
  function LineChartLegend2({ data }) {
2101
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChartLegend, { legendLabels: getLineChartLegendLabels({ data }) });
982
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegend, { legendLabels: getLineChartLegendLabels({ data }) });
2102
983
  }
2103
984
  );
2104
985
 
2105
986
  // src/components/LineChart/components/LineChartTooltip.tsx
2106
- var import_react24 = require("react");
2107
- var import_seeds_react_box15 = require("@sproutsocial/seeds-react-box");
2108
- var import_seeds_react_duration5 = require("@sproutsocial/seeds-react-duration");
2109
- var import_seeds_react_icon5 = require("@sproutsocial/seeds-react-icon");
2110
- var import_seeds_react_numeral5 = require("@sproutsocial/seeds-react-numeral");
2111
- var import_seeds_react_text8 = require("@sproutsocial/seeds-react-text");
2112
- var import_jsx_runtime24 = require("react/jsx-runtime");
2113
- var LineChartTooltip = (0, import_react24.memo)(
987
+
988
+
989
+
990
+
991
+
992
+
993
+
994
+ var LineChartTooltip = _react.memo.call(void 0,
2114
995
  function LineChartTooltip2({
2115
996
  data,
2116
997
  invalidNumberLabel,
@@ -2129,11 +1010,11 @@ var LineChartTooltip = (0, import_react24.memo)(
2129
1010
  return {
2130
1011
  cells: [
2131
1012
  {
2132
- content: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChartLegendLabel, { color, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_seeds_react_text8.Text, { "aria-label": `${name}: `, children: name }) }) })
1013
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${name}: `, children: name }) }) })
2133
1014
  },
2134
1015
  {
2135
- content: value === null && invalidNumberLabel ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_seeds_react_text8.Text, { children: invalidNumberLabel }) : numberFormat === "duration" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_seeds_react_duration5.Duration, { locale: textLocale, milliseconds: value }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2136
- import_seeds_react_numeral5.Numeral,
1016
+ 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,
1017
+ _seedsreactnumeral.Numeral,
2137
1018
  {
2138
1019
  abbreviate: false,
2139
1020
  currency,
@@ -2147,31 +1028,31 @@ var LineChartTooltip = (0, import_react24.memo)(
2147
1028
  ]
2148
1029
  };
2149
1030
  });
2150
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(ChartTooltip, { children: [
1031
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkVFBZ7FNKjs.ChartTooltip, { children: [
2151
1032
  xAnnotationDetails ? xAnnotationDetails() : void 0,
2152
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
2153
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChartTooltipTable, { rows }),
2154
- onClick && tooltipClickLabel ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_seeds_react_box15.Box, { display: "flex", alignItems: "center", gap: 300, children: [
2155
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_seeds_react_icon5.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
2156
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_seeds_react_text8.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
1033
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
1034
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartTooltipTable, { rows }),
1035
+ onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
1036
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
1037
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
2157
1038
  ] }) : tooltipClickLabel }) : null
2158
1039
  ] });
2159
1040
  }
2160
1041
  );
2161
1042
 
2162
1043
  // src/components/LineChart/LineChart.tsx
2163
- var import_seeds_react_theme14 = require("@sproutsocial/seeds-react-theme");
2164
- var import_jsx_runtime25 = require("react/jsx-runtime");
2165
- (0, import_accessibility3.default)(import_highcharts5.default);
2166
- (0, import_annotations2.default)(import_highcharts5.default);
2167
- var StyledBox5 = (0, import_styled_components10.default)(import_seeds_react_box16.Box)`
2168
- ${lineChartStyles}
1044
+
1045
+
1046
+ _accessibility2.default.call(void 0, _highcharts2.default);
1047
+ _annotations2.default.call(void 0, _highcharts2.default);
1048
+ var StyledBox3 = _styledcomponents2.default.call(void 0, _seedsreactbox.Box)`
1049
+ ${_chunkVFBZ7FNKjs.lineChartStyles}
2169
1050
  `;
2170
- var LineChart = (0, import_react25.memo)(function LineChart2(props) {
1051
+ var LineChart = _react.memo.call(void 0, function LineChart2(props) {
2171
1052
  const { data } = props;
2172
- return data.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(LineChartWithData, { ...props });
1053
+ return data.length === 0 ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, LineChartWithData, { ...props });
2173
1054
  });
2174
- var LineChartWithData = (0, import_react25.memo)(function LineChartWithData2({
1055
+ var LineChartWithData = _react.memo.call(void 0, function LineChartWithData2({
2175
1056
  data,
2176
1057
  invalidNumberLabel,
2177
1058
  numberLocale = "en-us",
@@ -2208,9 +1089,9 @@ var LineChartWithData = (0, import_react25.memo)(function LineChartWithData2({
2208
1089
  const { colors, patterns } = data.reduce(
2209
1090
  (acc, item, index) => {
2210
1091
  acc.colors.push(
2211
- item.styles?.color ?? import_seeds_react_theme14.theme.colors.DATAVIZ_COLORS_LIST[index] ?? ""
1092
+ _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'access', _53 => _53.styles, 'optionalAccess', _54 => _54.color]), () => ( _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index])), () => ( ""))
2212
1093
  );
2213
- acc.patterns.push(item.styles?.pattern ?? "solid");
1094
+ acc.patterns.push(_nullishCoalesce(_optionalChain([item, 'access', _55 => _55.styles, 'optionalAccess', _56 => _56.pattern]), () => ( "solid")));
2214
1095
  return acc;
2215
1096
  },
2216
1097
  {
@@ -2218,43 +1099,44 @@ var LineChartWithData = (0, import_react25.memo)(function LineChartWithData2({
2218
1099
  patterns: []
2219
1100
  }
2220
1101
  );
2221
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
2222
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(GlobalChartStyleOverrides, {}),
2223
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2224
- StyledBox5,
1102
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1103
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.GlobalChartStyleOverrides, {}),
1104
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1105
+ StyledBox3,
2225
1106
  {
2226
1107
  $colors: colors,
2227
1108
  $patterns: patterns,
2228
1109
  $hasOnClick: Boolean(onClick),
2229
1110
  bg: "container.background.base",
2230
1111
  children: [
2231
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2232
- import_highcharts_react_official3.HighchartsReact,
1112
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1113
+ _highchartsreactofficial.HighchartsReact,
2233
1114
  {
2234
- highcharts: import_highcharts5.default,
1115
+ highcharts: _highcharts2.default,
2235
1116
  options,
2236
1117
  callback
2237
1118
  }
2238
1119
  ),
2239
- chart && chart.annotations?.length ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1120
+ chart && _optionalChain([chart, 'access', _57 => _57.annotations, 'optionalAccess', _58 => _58.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2240
1121
  ChartXAnnotationMarkerPortal,
2241
1122
  {
2242
1123
  xAnnotations,
2243
- annotationContext: chart.annotations?.[0]
1124
+ annotationContext: _optionalChain([chart, 'access', _59 => _59.annotations, 'optionalAccess', _60 => _60[0]]),
1125
+ chartContainer: chart.container
2244
1126
  }
2245
1127
  ) : null,
2246
- chart && !disableTooltips ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2247
- ChartTooltipPortal,
1128
+ chart && !disableTooltips ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1129
+ _chunkVFBZ7FNKjs.ChartTooltipPortal,
2248
1130
  {
2249
1131
  chart,
2250
1132
  renderContent: (context) => {
2251
- const tooltipData = transformTimeSeriesTooltipData({
1133
+ const tooltipData = _chunkVFBZ7FNKjs.transformTimeSeriesTooltipData.call(void 0, {
2252
1134
  context,
2253
1135
  data
2254
1136
  });
2255
1137
  const x = context.x;
2256
- const xAnnotationDetails = xAnnotations?.[x]?.details;
2257
- return tooltip ? tooltip({ data: tooltipData, x }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1138
+ const xAnnotationDetails = _optionalChain([xAnnotations, 'optionalAccess', _61 => _61[x], 'optionalAccess', _62 => _62.details]);
1139
+ return tooltip ? tooltip({ data: tooltipData, x }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2258
1140
  LineChartTooltip,
2259
1141
  {
2260
1142
  currency,
@@ -2273,7 +1155,7 @@ var LineChartWithData = (0, import_react25.memo)(function LineChartWithData2({
2273
1155
  }
2274
1156
  }
2275
1157
  ) : null,
2276
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_seeds_react_box16.Box, { mt: 350, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(LineChartLegend, { data }) })
1158
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactbox.Box, { mt: 350, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, LineChartLegend, { data }) })
2277
1159
  ]
2278
1160
  }
2279
1161
  )
@@ -2281,41 +1163,41 @@ var LineChartWithData = (0, import_react25.memo)(function LineChartWithData2({
2281
1163
  });
2282
1164
 
2283
1165
  // src/components/VerticalBarChart/VerticalBarChart.tsx
2284
- var import_react28 = require("react");
2285
- var import_highcharts6 = __toESM(require("highcharts"));
2286
- var import_highcharts_react_official4 = require("highcharts-react-official");
2287
- var import_accessibility4 = __toESM(require("highcharts/modules/accessibility"));
2288
- var import_annotations3 = __toESM(require("highcharts/modules/annotations"));
2289
- var import_styled_components12 = __toESM(require("styled-components"));
2290
- var import_seeds_react_box18 = require("@sproutsocial/seeds-react-box");
1166
+
1167
+
1168
+
1169
+
1170
+
1171
+
1172
+
2291
1173
 
2292
1174
  // src/components/VerticalBarChart/components/VerticalBarChartLegend.tsx
2293
- var import_react26 = require("react");
2294
- var import_seeds_react_theme15 = require("@sproutsocial/seeds-react-theme");
2295
- var import_jsx_runtime26 = require("react/jsx-runtime");
1175
+
1176
+
1177
+
2296
1178
  var getVerticalBarChartLegendLabels = ({
2297
1179
  data
2298
1180
  }) => {
2299
1181
  return data.map((series, index) => ({
2300
- content: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChartLegendLabelContentWithIcon, { icon: series.icon, children: series.name }),
2301
- color: series.styles?.color || import_seeds_react_theme15.theme.colors.DATAVIZ_COLORS_LIST[index]
1182
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabelContentWithIcon, { icon: series.icon, children: series.name }),
1183
+ color: _optionalChain([series, 'access', _63 => _63.styles, 'optionalAccess', _64 => _64.color]) || _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index]
2302
1184
  }));
2303
1185
  };
2304
- var VerticalBarChartLegend = (0, import_react26.memo)(
1186
+ var VerticalBarChartLegend = _react.memo.call(void 0,
2305
1187
  function VerticalbarChartLegend({ data }) {
2306
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChartLegend, { legendLabels: getVerticalBarChartLegendLabels({ data }) });
1188
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegend, { legendLabels: getVerticalBarChartLegendLabels({ data }) });
2307
1189
  }
2308
1190
  );
2309
1191
 
2310
1192
  // src/components/VerticalBarChart/components/VerticalBarChartTooltip.tsx
2311
- var import_react27 = require("react");
2312
- var import_seeds_react_box17 = require("@sproutsocial/seeds-react-box");
2313
- var import_seeds_react_duration6 = require("@sproutsocial/seeds-react-duration");
2314
- var import_seeds_react_icon6 = require("@sproutsocial/seeds-react-icon");
2315
- var import_seeds_react_numeral6 = require("@sproutsocial/seeds-react-numeral");
2316
- var import_seeds_react_text9 = require("@sproutsocial/seeds-react-text");
2317
- var import_jsx_runtime27 = require("react/jsx-runtime");
2318
- var VerticalBarChartTooltip = (0, import_react27.memo)(
1193
+
1194
+
1195
+
1196
+
1197
+
1198
+
1199
+
1200
+ var VerticalBarChartTooltip = _react.memo.call(void 0,
2319
1201
  function VerticalBarChartTooltip2({
2320
1202
  data,
2321
1203
  invalidNumberLabel,
@@ -2334,11 +1216,11 @@ var VerticalBarChartTooltip = (0, import_react27.memo)(
2334
1216
  return {
2335
1217
  cells: [
2336
1218
  {
2337
- content: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChartLegendLabel, { color, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_seeds_react_text9.Text, { "aria-label": `${name}: `, children: name }) }) })
1219
+ content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabel, { color, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartLegendLabelContentWithIcon, { icon, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { "aria-label": `${name}: `, children: name }) }) })
2338
1220
  },
2339
1221
  {
2340
- content: value === null && invalidNumberLabel ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_seeds_react_text9.Text, { children: invalidNumberLabel }) : numberFormat === "duration" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_seeds_react_duration6.Duration, { locale: textLocale, milliseconds: value }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2341
- import_seeds_react_numeral6.Numeral,
1222
+ 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,
1223
+ _seedsreactnumeral.Numeral,
2342
1224
  {
2343
1225
  abbreviate: false,
2344
1226
  currency,
@@ -2352,51 +1234,30 @@ var VerticalBarChartTooltip = (0, import_react27.memo)(
2352
1234
  ]
2353
1235
  };
2354
1236
  });
2355
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(ChartTooltip, { children: [
1237
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkVFBZ7FNKjs.ChartTooltip, { children: [
2356
1238
  xAnnotationDetails ? xAnnotationDetails() : void 0,
2357
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
2358
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChartTooltipTable, { rows }),
2359
- onClick && tooltipClickLabel ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_seeds_react_box17.Box, { display: "flex", alignItems: "center", gap: 300, children: [
2360
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_seeds_react_icon6.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
2361
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_seeds_react_text9.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
1239
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartTooltipTitle, { children: tooltipDateFormatter({ x }) }),
1240
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartTooltipTable, { rows }),
1241
+ onClick && tooltipClickLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.ChartTooltipFooter, { children: typeof tooltipClickLabel === "string" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _seedsreactbox.Box, { display: "flex", alignItems: "center", gap: 300, children: [
1242
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacticon.Icon, { name: "hand-pointer-clicking-outline", color: "icon.base" }),
1243
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreacttext.Text, { color: "text.subtext", fontSize: 200, children: tooltipClickLabel })
2362
1244
  ] }) : tooltipClickLabel }) : null
2363
1245
  ] });
2364
1246
  }
2365
1247
  );
2366
1248
 
2367
1249
  // src/components/VerticalBarChart/VerticalBarChart.tsx
2368
- var import_seeds_react_theme16 = require("@sproutsocial/seeds-react-theme");
2369
-
2370
- // src/components/VerticalBarChart/styles.ts
2371
- var import_styled_components11 = require("styled-components");
2372
- var verticalBarChartStyles = import_styled_components11.css`
2373
- ${timeSeriesChartStyles}
2374
-
2375
- /*
2376
- When the chart container is hovered, reduce the opacity of all columns.
2377
- Then, for the column that is being hovered, restore its opacity.
2378
- This gives the effect of fading out the non-hovered columns.
2379
- */
2380
- .highcharts-container:hover .highcharts-point {
2381
- fill-opacity: 0.3;
2382
- }
2383
1250
 
2384
- .highcharts-point.column-hover {
2385
- fill-opacity: 1 !important;
2386
- }
2387
- `;
2388
1251
 
2389
- // src/components/VerticalBarChart/VerticalBarChart.tsx
2390
- var import_jsx_runtime28 = require("react/jsx-runtime");
2391
- (0, import_accessibility4.default)(import_highcharts6.default);
2392
- (0, import_annotations3.default)(import_highcharts6.default);
2393
- var StyledBox6 = (0, import_styled_components12.default)(import_seeds_react_box18.Box)`
2394
- ${verticalBarChartStyles}
1252
+ _accessibility2.default.call(void 0, _highcharts2.default);
1253
+ _annotations2.default.call(void 0, _highcharts2.default);
1254
+ var StyledBox4 = _styledcomponents2.default.call(void 0, _seedsreactbox.Box)`
1255
+ ${_chunkVFBZ7FNKjs.verticalBarChartStyles}
2395
1256
  `;
2396
- var VerticalBarChart = (0, import_react28.memo)(
1257
+ var VerticalBarChart = _react.memo.call(void 0,
2397
1258
  function VerticalBarChart2(props) {
2398
1259
  const { data, showSeriesLimitWarning = true } = props;
2399
- const seriesLimit = props.seriesLimit ?? VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT;
1260
+ const seriesLimit = _nullishCoalesce(props.seriesLimit, () => ( _chunkVFBZ7FNKjs.VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT));
2400
1261
  const isSeriesLimitOverridden = props.seriesLimit !== void 0;
2401
1262
  if (data.length === 0) {
2402
1263
  return null;
@@ -2410,10 +1271,10 @@ var VerticalBarChart = (0, import_react28.memo)(
2410
1271
  }
2411
1272
  chartData = data.slice(0, seriesLimit);
2412
1273
  }
2413
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(VerticalBarChartWithData, { ...props, data: chartData });
1274
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, VerticalBarChartWithData, { ...props, data: chartData });
2414
1275
  }
2415
1276
  );
2416
- var VerticalBarChartWithData = (0, import_react28.memo)(
1277
+ var VerticalBarChartWithData = _react.memo.call(void 0,
2417
1278
  function VerticalBarChartWithData2({
2418
1279
  data,
2419
1280
  invalidNumberLabel,
@@ -2431,7 +1292,7 @@ var VerticalBarChartWithData = (0, import_react28.memo)(
2431
1292
  xAnnotations,
2432
1293
  xAxisLabelFormatter: xAxisLabelFormatter2
2433
1294
  }) {
2434
- const shouldUseTimeFormatter = isHourlyTimeData(data) || isCategoricalHourData(data);
1295
+ const shouldUseTimeFormatter = _chunkVFBZ7FNKjs.isHourlyTimeData.call(void 0, data) || _chunkVFBZ7FNKjs.isCategoricalHourData.call(void 0, data);
2435
1296
  const autoTimeXAxisLabelFormatter = ({
2436
1297
  value,
2437
1298
  timeFormat: timeFormat2
@@ -2487,9 +1348,9 @@ var VerticalBarChartWithData = (0, import_react28.memo)(
2487
1348
  const { colors, patterns } = data.reduce(
2488
1349
  (acc, item, index) => {
2489
1350
  acc.colors.push(
2490
- item.styles?.color ?? import_seeds_react_theme16.theme.colors.DATAVIZ_COLORS_LIST[index] ?? ""
1351
+ _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'access', _65 => _65.styles, 'optionalAccess', _66 => _66.color]), () => ( _seedsreacttheme.theme.colors.DATAVIZ_COLORS_LIST[index])), () => ( ""))
2491
1352
  );
2492
- acc.patterns.push(item.styles?.pattern ?? "solid");
1353
+ acc.patterns.push(_nullishCoalesce(_optionalChain([item, 'access', _67 => _67.styles, 'optionalAccess', _68 => _68.pattern]), () => ( "solid")));
2493
1354
  return acc;
2494
1355
  },
2495
1356
  {
@@ -2497,42 +1358,43 @@ var VerticalBarChartWithData = (0, import_react28.memo)(
2497
1358
  patterns: []
2498
1359
  }
2499
1360
  );
2500
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
2501
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(GlobalChartStyleOverrides, {}),
2502
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2503
- StyledBox6,
1361
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1362
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVFBZ7FNKjs.GlobalChartStyleOverrides, {}),
1363
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1364
+ StyledBox4,
2504
1365
  {
2505
1366
  $colors: colors,
2506
1367
  $hasOnClick: Boolean(onClick),
2507
1368
  bg: "container.background.base",
2508
1369
  children: [
2509
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2510
- import_highcharts_react_official4.HighchartsReact,
1370
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1371
+ _highchartsreactofficial.HighchartsReact,
2511
1372
  {
2512
- highcharts: import_highcharts6.default,
1373
+ highcharts: _highcharts2.default,
2513
1374
  options,
2514
1375
  callback
2515
1376
  }
2516
1377
  ),
2517
- chart && chart.annotations?.length ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1378
+ chart && _optionalChain([chart, 'access', _69 => _69.annotations, 'optionalAccess', _70 => _70.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2518
1379
  ChartXAnnotationMarkerPortal,
2519
1380
  {
2520
1381
  xAnnotations,
2521
- annotationContext: chart.annotations?.[0]
1382
+ annotationContext: _optionalChain([chart, 'access', _71 => _71.annotations, 'optionalAccess', _72 => _72[0]]),
1383
+ chartContainer: chart.container
2522
1384
  }
2523
1385
  ) : null,
2524
- chart ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2525
- ChartTooltipPortal,
1386
+ chart ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1387
+ _chunkVFBZ7FNKjs.ChartTooltipPortal,
2526
1388
  {
2527
1389
  chart,
2528
1390
  renderContent: (context) => {
2529
- const tooltipData = transformTimeSeriesTooltipData({
1391
+ const tooltipData = _chunkVFBZ7FNKjs.transformTimeSeriesTooltipData.call(void 0, {
2530
1392
  context,
2531
1393
  data
2532
1394
  });
2533
1395
  const x = context.x;
2534
- const xAnnotationDetails = typeof x === "number" ? xAnnotations?.[x]?.details : void 0;
2535
- return tooltip ? tooltip({ data: tooltipData, x }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1396
+ const xAnnotationDetails = typeof x === "number" ? _optionalChain([xAnnotations, 'optionalAccess', _73 => _73[x], 'optionalAccess', _74 => _74.details]) : void 0;
1397
+ return tooltip ? tooltip({ data: tooltipData, x }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2536
1398
  VerticalBarChartTooltip,
2537
1399
  {
2538
1400
  currency,
@@ -2551,62 +1413,61 @@ var VerticalBarChartWithData = (0, import_react28.memo)(
2551
1413
  }
2552
1414
  }
2553
1415
  ) : null,
2554
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_seeds_react_box18.Box, { mt: 350, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(VerticalBarChartLegend, { data }) })
1416
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _seedsreactbox.Box, { mt: 350, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, VerticalBarChartLegend, { data }) })
2555
1417
  ]
2556
1418
  }
2557
1419
  )
2558
1420
  ] });
2559
1421
  }
2560
1422
  );
2561
- // Annotate the CommonJS export names for ESM import in node:
2562
- 0 && (module.exports = {
2563
- AreaChart,
2564
- ChartLegend,
2565
- ChartLegendLabel,
2566
- ChartTable,
2567
- ChartTooltip,
2568
- ChartTooltipFooter,
2569
- ChartTooltipHeader,
2570
- ChartTooltipPortal,
2571
- ChartTooltipTable,
2572
- ChartTooltipTitle,
2573
- ChartXAnnotationDetails,
2574
- ChartXAnnotationMarker,
2575
- ColorBox,
2576
- DONUT_CHART_HALO_SIZE,
2577
- DONUT_CHART_HEIGHT,
2578
- DONUT_CHART_WIDTH,
2579
- DatavizColorBox,
2580
- DonutChart,
2581
- DonutChartLegendTable,
2582
- GlobalChartStyleOverrides,
2583
- LineChart,
2584
- NetworkColorBox,
2585
- TIME_SERIES_CHART_HEIGHT,
2586
- VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT,
2587
- VerticalBarChart,
2588
- areaChartOptions,
2589
- areaChartStyles,
2590
- baseChartOptions,
2591
- baseChartStyles,
2592
- columnChartOptions,
2593
- donutChartOptions,
2594
- donutChartStyles,
2595
- generateChartTooltipPortalId,
2596
- getDatavizColor,
2597
- getDatavizColorWithAlpha,
2598
- getDatavizOpacity,
2599
- getStorybookCategoricalData,
2600
- getStorybookSparseTimelineData,
2601
- isCategoricalHourData,
2602
- isHourlyTimeData,
2603
- lineChartOptions,
2604
- lineChartStyles,
2605
- timeSeriesChartOptions,
2606
- timeSeriesChartStyles,
2607
- transformDataToSeries,
2608
- transformTimeSeriesTooltipData,
2609
- xAxisLabelFormatter,
2610
- yAxisLabelFormatter
2611
- });
1423
+
1424
+
1425
+
1426
+
1427
+
1428
+
1429
+
1430
+
1431
+
1432
+
1433
+
1434
+
1435
+
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+
1447
+
1448
+
1449
+
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+
1456
+
1457
+
1458
+
1459
+
1460
+
1461
+
1462
+
1463
+
1464
+
1465
+
1466
+
1467
+
1468
+
1469
+
1470
+
1471
+
1472
+ exports.AreaChart = AreaChart; exports.ChartLegend = _chunkVFBZ7FNKjs.ChartLegend; exports.ChartLegendLabel = _chunkVFBZ7FNKjs.ChartLegendLabel; exports.ChartTable = _chunkVFBZ7FNKjs.ChartTable; exports.ChartTooltip = _chunkVFBZ7FNKjs.ChartTooltip; exports.ChartTooltipFooter = _chunkVFBZ7FNKjs.ChartTooltipFooter; exports.ChartTooltipHeader = _chunkVFBZ7FNKjs.ChartTooltipHeader; exports.ChartTooltipPortal = _chunkVFBZ7FNKjs.ChartTooltipPortal; exports.ChartTooltipTable = _chunkVFBZ7FNKjs.ChartTooltipTable; exports.ChartTooltipTitle = _chunkVFBZ7FNKjs.ChartTooltipTitle; exports.ChartXAnnotationDetails = ChartXAnnotationDetails; exports.ChartXAnnotationMarker = ChartXAnnotationMarker; exports.ColorBox = _chunkVFBZ7FNKjs.ColorBox; exports.DONUT_CHART_HALO_SIZE = _chunkVFBZ7FNKjs.DONUT_CHART_HALO_SIZE; exports.DONUT_CHART_HEIGHT = _chunkVFBZ7FNKjs.DONUT_CHART_HEIGHT; exports.DONUT_CHART_WIDTH = _chunkVFBZ7FNKjs.DONUT_CHART_WIDTH; exports.DatavizColorBox = _chunkVFBZ7FNKjs.DatavizColorBox; exports.DonutChart = DonutChart; exports.DonutChartLegendTable = DonutChartLegendTable; exports.GlobalChartStyleOverrides = _chunkVFBZ7FNKjs.GlobalChartStyleOverrides; exports.LineChart = LineChart; exports.NetworkColorBox = _chunkVFBZ7FNKjs.NetworkColorBox; exports.TIME_SERIES_CHART_HEIGHT = _chunkVFBZ7FNKjs.TIME_SERIES_CHART_HEIGHT; exports.VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT = _chunkVFBZ7FNKjs.VERTICAL_BAR_CHART_DEFAULT_SERIES_LIMIT; exports.VerticalBarChart = VerticalBarChart; exports.areaChartOptions = _chunkVFBZ7FNKjs.areaChartOptions; exports.areaChartStyles = _chunkVFBZ7FNKjs.areaChartStyles; exports.baseChartOptions = _chunkVFBZ7FNKjs.baseChartOptions; exports.baseChartStyles = _chunkVFBZ7FNKjs.baseChartStyles; exports.columnChartOptions = _chunkVFBZ7FNKjs.columnChartOptions; exports.donutChartOptions = _chunkVFBZ7FNKjs.donutChartOptions; exports.donutChartStyles = _chunkVFBZ7FNKjs.donutChartStyles; exports.generateChartTooltipPortalId = _chunkVFBZ7FNKjs.generateChartTooltipPortalId; exports.getDatavizColor = _chunkVFBZ7FNKjs.getDatavizColor; exports.getDatavizColorWithAlpha = _chunkVFBZ7FNKjs.getDatavizColorWithAlpha; exports.getDatavizOpacity = _chunkVFBZ7FNKjs.getDatavizOpacity; exports.getStorybookCategoricalData = _chunkVFBZ7FNKjs.getStorybookCategoricalData; exports.getStorybookSparseTimelineData = _chunkVFBZ7FNKjs.getStorybookSparseTimelineData; exports.isCategoricalHourData = _chunkVFBZ7FNKjs.isCategoricalHourData; exports.isHourlyTimeData = _chunkVFBZ7FNKjs.isHourlyTimeData; exports.lineChartOptions = _chunkVFBZ7FNKjs.lineChartOptions; exports.lineChartStyles = _chunkVFBZ7FNKjs.lineChartStyles; exports.timeSeriesChartOptions = _chunkVFBZ7FNKjs.timeSeriesChartOptions; exports.timeSeriesChartStyles = _chunkVFBZ7FNKjs.timeSeriesChartStyles; exports.transformDataToSeries = _chunkVFBZ7FNKjs.transformDataToSeries; exports.transformTimeSeriesTooltipData = _chunkVFBZ7FNKjs.transformTimeSeriesTooltipData; exports.xAxisLabelFormatter = _chunkVFBZ7FNKjs.xAxisLabelFormatter; exports.yAxisLabelFormatter = _chunkVFBZ7FNKjs.yAxisLabelFormatter;
2612
1473
  //# sourceMappingURL=index.js.map