@automattic/charts 4.10.0 → 4.11.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/TOKENS.md +7 -3
  3. package/dist/index.cjs +337 -708
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +52 -3
  6. package/dist/index.d.cts +39 -39
  7. package/dist/index.d.ts +39 -39
  8. package/dist/index.js +308 -660
  9. package/dist/index.js.map +1 -1
  10. package/dist/visx/group/index.js +1 -2
  11. package/dist/visx/legend/index.js +1 -2
  12. package/dist/visx/text/index.js +1 -2
  13. package/package.json +13 -12
  14. package/src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss +5 -0
  15. package/src/charts/geo-chart/geo-chart.module.scss +27 -0
  16. package/src/charts/geo-chart/geo-chart.tsx +68 -43
  17. package/src/charts/geo-chart/private/use-tooltip-position.ts +106 -0
  18. package/src/charts/geo-chart/test/geo-chart.test.tsx +68 -42
  19. package/src/charts/geo-chart/test/use-tooltip-position.test.ts +43 -0
  20. package/src/charts/heatmap-chart/heatmap-chart.module.scss +3 -3
  21. package/src/charts/heatmap-chart/private/heatmap-scale.ts +48 -43
  22. package/src/charts/heatmap-chart/test/heatmap-chart.test.tsx +5 -5
  23. package/src/charts/heatmap-chart/test/heatmap-scale.test.ts +55 -27
  24. package/src/charts/heatmap-chart/types.ts +1 -1
  25. package/src/charts/leaderboard-chart/test/leaderboard-chart.test.tsx +8 -5
  26. package/src/components/legend/private/base-legend.module.scss +5 -0
  27. package/src/components/legend/private/base-legend.tsx +8 -2
  28. package/src/components/tooltip/_surface.scss +19 -0
  29. package/src/components/tooltip/private/bounded-tooltip.tsx +2 -2
  30. package/src/components/tooltip/tooltip-box.module.scss +3 -17
  31. package/src/styles/chart-scope.scss +6 -4
  32. package/src/styles/test/chart-scope.test.ts +6 -2
package/dist/index.css CHANGED
@@ -1,4 +1,4 @@
1
- :where(.a8c-charts-scope, .a8c-charts-tooltip-scope) {
1
+ :where(.a8c-charts-scope, .a8c-charts-tooltip-scope, .geo-chart .google-visualization-tooltip) {
2
2
  --a8c-charts-color-series-1: var(--wp-admin-theme-color, var(--wpds-color-foreground-interactive-brand, var(--wp-admin-theme-color, #3858e9)));
3
3
  --a8c-charts-color-grid: var(--wpds-color-stroke-surface-neutral, #dbdbdb);
4
4
  --a8c-charts-color-axis-x: var(--wpds-color-stroke-surface-neutral, #dbdbdb);
@@ -37,10 +37,12 @@
37
37
  --a8c-charts-border-radius-leaderboard-bar: 9999px;
38
38
  --a8c-charts-dimension-leaderboard-row-gap: var(--wpds-dimension-gap-md, 12px);
39
39
  --a8c-charts-dimension-leaderboard-column-gap: var(--wpds-dimension-gap-xs, 4px);
40
+ --a8c-charts-dimension-legend-column-gap: var(--wpds-dimension-gap-lg, 16px);
41
+ --a8c-charts-dimension-legend-row-gap: var(--wpds-dimension-gap-sm, 8px);
40
42
  }
41
43
 
42
44
  @media (forced-colors: active) {
43
- :where(.a8c-charts-scope, .a8c-charts-tooltip-scope) {
45
+ :where(.a8c-charts-scope, .a8c-charts-tooltip-scope, .geo-chart .google-visualization-tooltip) {
44
46
  --a8c-charts-color-label-axis: CanvasText;
45
47
  --a8c-charts-color-grid: GrayText;
46
48
  --a8c-charts-color-axis-x: GrayText;
@@ -51,6 +53,11 @@
51
53
  align-self: stretch;
52
54
  }
53
55
 
56
+ .a8ccharts-04TogW-legend--horizontal {
57
+ column-gap: var(--a8c-charts-dimension-legend-column-gap);
58
+ row-gap: var(--a8c-charts-dimension-legend-row-gap);
59
+ }
60
+
54
61
  .a8ccharts-04TogW-legend-item {
55
62
  font-size: var(--wpds-typography-font-size-md, 13px);
56
63
  }
@@ -428,6 +435,11 @@
428
435
  position: relative;
429
436
  }
430
437
 
438
+ .a8ccharts-mGEVca-bar-container:focus-visible {
439
+ outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9));
440
+ outline-offset: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px));
441
+ }
442
+
431
443
  .a8ccharts-mGEVca-funnel-bar {
432
444
  border-radius: var(--a8c-charts-border-radius-bar) var(--a8c-charts-border-radius-bar) 0 0;
433
445
  width: 100%;
@@ -478,6 +490,43 @@
478
490
 
479
491
  .a8ccharts-8hS2IW-container .google-visualization-tooltip {
480
492
  white-space: nowrap;
493
+ padding: var(--wpds-dimension-padding-xs, 4px) var(--wpds-dimension-padding-sm, 8px);
494
+ background-color: var(--a8c-charts-color-surface);
495
+ color: var(--a8c-charts-color-label);
496
+ border-radius: var(--wpds-border-radius-md, 4px);
497
+ font-family: var(--wpds-typography-font-family-body, -apple-system, system-ui, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif);
498
+ font-size: var(--wpds-typography-font-size-sm, 12px);
499
+ box-shadow: var(--a8c-charts-elevation-sm, 0 1px 2px 0 #0000000d, 0 2px 3px 0 #0000000a, 0 6px 6px 0 #00000008, 0 8px 8px 0 #00000005);
500
+ pointer-events: none;
501
+ border: 0;
502
+ min-width: fit-content;
503
+ line-height: 1.4;
504
+ }
505
+
506
+ @media (forced-colors: active) {
507
+ .a8ccharts-8hS2IW-container .google-visualization-tooltip {
508
+ border: var(--wpds-border-width-xs, 1px) solid CanvasText;
509
+ }
510
+ }
511
+
512
+ .a8ccharts-8hS2IW-container .google-visualization-tooltip-item-list {
513
+ margin: 0;
514
+ padding: 0;
515
+ }
516
+
517
+ .a8ccharts-8hS2IW-container .google-visualization-tooltip .google-visualization-tooltip-item-list .google-visualization-tooltip-item {
518
+ margin: 0;
519
+ padding: 0;
520
+ }
521
+
522
+ .a8ccharts-8hS2IW-container .google-visualization-tooltip .google-visualization-tooltip-item-list .google-visualization-tooltip-item:first-child {
523
+ padding-block-end: var(--wpds-dimension-padding-md, 12px);
524
+ }
525
+
526
+ .a8ccharts-8hS2IW-container .google-visualization-tooltip-item span {
527
+ color: inherit !important;
528
+ font-family: inherit !important;
529
+ font-size: inherit !important;
481
530
  }
482
531
  .a8ccharts-O3YMOW-heatmap-chart {
483
532
  isolation: isolate;
@@ -507,7 +556,7 @@
507
556
 
508
557
  .a8ccharts-O3YMOW-heatmap-chart__grid:focus-visible {
509
558
  outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9));
510
- outline-offset: 2px;
559
+ outline-offset: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px));
511
560
  border-radius: var(--wpds-border-radius-sm, 2px);
512
561
  }
513
562
 
package/dist/index.d.cts CHANGED
@@ -32,7 +32,7 @@ type LegendShapeRenderProps<Data, Output> = {
32
32
  };
33
33
  type LegendShape<Data, Output> = 'rect' | 'circle' | 'line' | FC<LegendShapeRenderProps<Data, Output>> | ComponentClass<LegendShapeRenderProps<Data, Output>>;
34
34
  type GoogleDataTableColumnType = 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'timeofday';
35
- declare enum GoogleDataTableColumnRoleType {
35
+ export declare enum GoogleDataTableColumnRoleType {
36
36
  annotation = "annotation",
37
37
  annotationText = "annotationText",
38
38
  certainty = "certainty",
@@ -783,7 +783,7 @@ type BaseLegendItem = {
783
783
  };
784
784
  //#endregion
785
785
  //#region src/components/legend/legend.d.ts
786
- declare const Legend: import("react").ForwardRefExoticComponent<Omit<BaseLegendProps, "items"> & {
786
+ export declare const Legend: import("react").ForwardRefExoticComponent<Omit<BaseLegendProps, "items"> & {
787
787
  items?: BaseLegendItem[];
788
788
  chartId?: string;
789
789
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -818,7 +818,7 @@ interface ChartLegendOptions {
818
818
  * @param legendShape - The shape type for legend items (string literal or React component)
819
819
  * @return Array of legend items ready for display
820
820
  */
821
- declare function useChartLegendItems<T extends SeriesData[] | DataPointDate[] | DataPointPercentageCalculated[]>(data: T, options?: ChartLegendOptions, legendShape?: LegendShape<SeriesData[], number>): BaseLegendItem[];
821
+ export declare function useChartLegendItems<T extends SeriesData[] | DataPointDate[] | DataPointPercentageCalculated[]>(data: T, options?: ChartLegendOptions, legendShape?: LegendShape<SeriesData[], number>): BaseLegendItem[];
822
822
  //#endregion
823
823
  //#region src/charts/private/chart-instance-context/chart-instance-context.d.ts
824
824
  interface ChartInstanceRef {
@@ -1456,7 +1456,7 @@ interface HeatmapChartProps extends Omit<BaseChartProps<HeatmapColumn[]>, 'showL
1456
1456
  /** Floor a cell's height (px) in non-compact mode; see `minCellWidth`. */
1457
1457
  minCellHeight?: number;
1458
1458
  /**
1459
- * Color the cell scale is built from, deepened at the highest value toward 9:1
1459
+ * Color the cell scale is built from, deepened at the highest value toward 6:1
1460
1460
  * against the background. Defaults to the first series palette slot,
1461
1461
  * `--a8c-charts-color-series-1`.
1462
1462
  */
@@ -1546,7 +1546,7 @@ declare const HeatmapChartResponsive: FC<HeatmapChartProps & ResponsiveConfig> &
1546
1546
  * @param options - Grid shape, plus the locale and zone to read days in.
1547
1547
  * @return Columns and row labels for `HeatmapChart`.
1548
1548
  */
1549
- declare const buildCalendarHeatmapData: (series: DataPointDate[], options?: CalendarHeatmapOptions) => CalendarHeatmapResult;
1549
+ export declare const buildCalendarHeatmapData: (series: DataPointDate[], options?: CalendarHeatmapOptions) => CalendarHeatmapResult;
1550
1550
  //#endregion
1551
1551
  //#region src/charts/heatmap-chart/build-month-calendar-data.d.ts
1552
1552
  /**
@@ -1558,7 +1558,7 @@ declare const buildCalendarHeatmapData: (series: DataPointDate[], options?: Cale
1558
1558
  * @param options - Week start and label locale.
1559
1559
  * @return Columns and one group per month; empty for an invalid or reversed range.
1560
1560
  */
1561
- declare const buildMonthCalendarHeatmapData: (valueByDay: Record<string, number | null>, range: MonthCalendarHeatmapRange, options?: MonthCalendarHeatmapOptions) => MonthCalendarHeatmapResult;
1561
+ export declare const buildMonthCalendarHeatmapData: (valueByDay: Record<string, number | null>, range: MonthCalendarHeatmapRange, options?: MonthCalendarHeatmapOptions) => MonthCalendarHeatmapResult;
1562
1562
  //#endregion
1563
1563
  //#region src/charts/heatmap-chart/use-calendar-heatmap-data.d.ts
1564
1564
  /**
@@ -1569,7 +1569,7 @@ declare const buildMonthCalendarHeatmapData: (valueByDay: Record<string, number
1569
1569
  * @param options - As for `buildCalendarHeatmapData`; `locale` and `timeZone` win over the provider.
1570
1570
  * @return Columns and row labels for `HeatmapChart`.
1571
1571
  */
1572
- declare const useCalendarHeatmapData: (series: DataPointDate[], options?: CalendarHeatmapOptions) => CalendarHeatmapResult;
1572
+ export declare const useCalendarHeatmapData: (series: DataPointDate[], options?: CalendarHeatmapOptions) => CalendarHeatmapResult;
1573
1573
  //#endregion
1574
1574
  //#region src/charts/heatmap-chart/use-month-calendar-heatmap-data.d.ts
1575
1575
  /**
@@ -1581,7 +1581,7 @@ declare const useCalendarHeatmapData: (series: DataPointDate[], options?: Calend
1581
1581
  * @param options - As for `buildMonthCalendarHeatmapData`; `locale` wins over the provider.
1582
1582
  * @return Columns and groups for `HeatmapChart`.
1583
1583
  */
1584
- declare const useMonthCalendarHeatmapData: (valueByDay: Record<string, number | null>, range: MonthCalendarHeatmapRange, options?: MonthCalendarHeatmapOptions) => MonthCalendarHeatmapResult;
1584
+ export declare const useMonthCalendarHeatmapData: (valueByDay: Record<string, number | null>, range: MonthCalendarHeatmapRange, options?: MonthCalendarHeatmapOptions) => MonthCalendarHeatmapResult;
1585
1585
  //#endregion
1586
1586
  //#region src/charts/leaderboard-chart/types.d.ts
1587
1587
  interface LeaderboardChartProps extends Pick<BaseChartProps<LeaderboardEntry>, 'className' | 'showLegend' | 'legend' | 'chartId' | 'width' | 'height' | 'size' | 'gap' | 'animation' | 'ariaLabel'> {
@@ -1678,7 +1678,7 @@ declare const LeaderboardChartResponsive: (({ resizeDebounceTime, maxWidth, aspe
1678
1678
  * @param tickResolution - Caller-declared bucket resolution, when known.
1679
1679
  * @return The declared or inferred bucket, and the resolution formats key on.
1680
1680
  */
1681
- declare const getBucketInfo: (data: SeriesData[], tickResolution?: TickResolution) => BucketInfo;
1681
+ export declare const getBucketInfo: (data: SeriesData[], tickResolution?: TickResolution) => BucketInfo;
1682
1682
  //#endregion
1683
1683
  //#region src/utils/date-parsing.d.ts
1684
1684
  /**
@@ -1697,7 +1697,7 @@ declare const getBucketInfo: (data: SeriesData[], tickResolution?: TickResolutio
1697
1697
  * @param {string} [timeZone] - IANA zone a naive string is read in; the runtime's own when absent, and ignored by a string that carries its own offset
1698
1698
  * @return {Date} A Date object representing the parsed instant, or an invalid Date if parsing fails
1699
1699
  */
1700
- declare const parseAsLocalDate: (dateString: string, timeZone?: string) => Date;
1700
+ export declare const parseAsLocalDate: (dateString: string, timeZone?: string) => Date;
1701
1701
  //#endregion
1702
1702
  //#region src/utils/format-metric-value.d.ts
1703
1703
  /**
@@ -1721,7 +1721,7 @@ type FormatMetricValueOptions = {
1721
1721
  * @param options.signDisplay - Controls when to display the sign (auto, always, never, exceptZero)
1722
1722
  * @return Formatted string
1723
1723
  */
1724
- declare const formatMetricValue: (value: string | number, type?: MetricValueType, { decimals, useMultipliers, signDisplay }?: FormatMetricValueOptions) => string;
1724
+ export declare const formatMetricValue: (value: string | number, type?: MetricValueType, { decimals, useMultipliers, signDisplay }?: FormatMetricValueOptions) => string;
1725
1725
  //#endregion
1726
1726
  //#region src/utils/format-percentage.d.ts
1727
1727
  /**
@@ -1732,7 +1732,7 @@ declare const formatMetricValue: (value: string | number, type?: MetricValueType
1732
1732
  * @param value - The percentage value (0-100 range)
1733
1733
  * @return Formatted percentage string (e.g., "30%", "30.1%", "30.25%")
1734
1734
  */
1735
- declare const formatPercentage: (value: number) => string;
1735
+ export declare const formatPercentage: (value: number) => string;
1736
1736
  //#endregion
1737
1737
  //#region src/utils/merge-themes.d.ts
1738
1738
  /**
@@ -1743,8 +1743,8 @@ declare const formatPercentage: (value: number) => string;
1743
1743
  * @param overrideTheme - Theme to override base with (takes precedence)
1744
1744
  * @return Merged theme with overrideTheme values taking precedence
1745
1745
  */
1746
- declare function mergeThemes(baseTheme: CompleteChartTheme, overrideTheme: Partial<ChartTheme>): CompleteChartTheme;
1747
- declare function mergeThemes(baseTheme: ChartTheme, overrideTheme: Partial<ChartTheme>): ChartTheme;
1746
+ export declare function mergeThemes(baseTheme: CompleteChartTheme, overrideTheme: Partial<ChartTheme>): CompleteChartTheme;
1747
+ export declare function mergeThemes(baseTheme: ChartTheme, overrideTheme: Partial<ChartTheme>): ChartTheme;
1748
1748
  //#endregion
1749
1749
  //#region src/utils/color-utils.d.ts
1750
1750
  /**
@@ -1752,13 +1752,13 @@ declare function mergeThemes(baseTheme: ChartTheme, overrideTheme: Partial<Chart
1752
1752
  * @param hex - The value to check
1753
1753
  * @return true if valid hex color format (e.g., '#ff0000')
1754
1754
  */
1755
- declare const isValidHexColor: (hex: unknown) => hex is string;
1755
+ export declare const isValidHexColor: (hex: unknown) => hex is string;
1756
1756
  /**
1757
1757
  * Validate hex color format, throwing descriptive errors if invalid
1758
1758
  * @param hex - The hex color string to validate
1759
1759
  * @throws {Error} if hex string is malformed
1760
1760
  */
1761
- declare const validateHexColor: (hex: unknown) => void;
1761
+ export declare const validateHexColor: (hex: unknown) => void;
1762
1762
  /**
1763
1763
  * Convert hex color to rgba with specified opacity.
1764
1764
  * This is genuinely reusable across chart components.
@@ -1767,7 +1767,7 @@ declare const validateHexColor: (hex: unknown) => void;
1767
1767
  * @return The rgba color string (e.g., 'rgba(255, 0, 0, 0.5)')
1768
1768
  * @throws {Error} if hex string is malformed or alpha is not a valid number
1769
1769
  */
1770
- declare const hexToRgba: (hex: string, alpha: number) => string;
1770
+ export declare const hexToRgba: (hex: string, alpha: number) => string;
1771
1771
  /**
1772
1772
  * Weighted Euclidean distance between two HSL colors.
1773
1773
  *
@@ -1776,14 +1776,14 @@ declare const hexToRgba: (hex: string, alpha: number) => string;
1776
1776
  * @param hsl2 - second color in HSL format [h, s, l]
1777
1777
  * @return distance value (0-100+, lower means more similar)
1778
1778
  */
1779
- declare const getColorDistance: (hsl1: [number, number, number], hsl2: [number, number, number]) => number;
1779
+ export declare const getColorDistance: (hsl1: [number, number, number], hsl2: [number, number, number]) => number;
1780
1780
  /**
1781
1781
  * Parse an HSL string like 'hsl(120, 50%, 50%)' into an HSL tuple.
1782
1782
  *
1783
1783
  * @param hslString - HSL color string
1784
1784
  * @return HSL tuple [h, s, l] or null if invalid
1785
1785
  */
1786
- declare const parseHslString: (hslString: string) => [number, number, number] | null;
1786
+ export declare const parseHslString: (hslString: string) => [number, number, number] | null;
1787
1787
  /**
1788
1788
  * Normalize any CSS color value to a hex color string.
1789
1789
  * Handles hex, HSL, HSLA, RGB, RGBA, named CSS colors, and CSS variables.
@@ -1794,7 +1794,7 @@ declare const parseHslString: (hslString: string) => [number, number, number] |
1794
1794
  * @param _depth - Internal recursion depth counter to prevent infinite loops
1795
1795
  * @return hex color string, or the original value if conversion fails
1796
1796
  */
1797
- declare const normalizeColorToHex: (color: string, element?: HTMLElement | null, resolveCss?: (value: string, el?: HTMLElement | null) => string | null, _depth?: number) => string;
1797
+ export declare const normalizeColorToHex: (color: string, element?: HTMLElement | null, resolveCss?: (value: string, el?: HTMLElement | null) => string | null, _depth?: number) => string;
1798
1798
  /**
1799
1799
  * Lighten a hex color by blending it with white.
1800
1800
  * Useful for creating color gradients or lighter variants.
@@ -1804,7 +1804,7 @@ declare const normalizeColorToHex: (color: string, element?: HTMLElement | null,
1804
1804
  * @return Lightened hex color string (e.g., '#cce4ef')
1805
1805
  * @throws {Error} if hex string is malformed
1806
1806
  */
1807
- declare const lightenHexColor: (hex: string, blend: number) => string;
1807
+ export declare const lightenHexColor: (hex: string, blend: number) => string;
1808
1808
  /**
1809
1809
  * Blend one hex color toward another, per-channel in sRGB.
1810
1810
  *
@@ -1814,7 +1814,7 @@ declare const lightenHexColor: (hex: string, blend: number) => string;
1814
1814
  * @return Blended hex color string
1815
1815
  * @throws {Error} if either hex string is malformed
1816
1816
  */
1817
- declare const mixHexColors: (fromHex: string, toHex: string, blend: number) => string;
1817
+ export declare const mixHexColors: (fromHex: string, toHex: string, blend: number) => string;
1818
1818
  /**
1819
1819
  * WCAG relative luminance of a hex color (0 = black, 1 = white).
1820
1820
  *
@@ -1822,7 +1822,7 @@ declare const mixHexColors: (fromHex: string, toHex: string, blend: number) => s
1822
1822
  * @return Relative luminance in the range [0, 1]
1823
1823
  * @throws {Error} if hex string is malformed
1824
1824
  */
1825
- declare const relativeLuminance: (hex: string) => number;
1825
+ export declare const relativeLuminance: (hex: string) => number;
1826
1826
  /**
1827
1827
  * Whether light text reads better than dark text on the given background, using the W3C
1828
1828
  * luminance threshold (0.179) that maximizes contrast against black vs white.
@@ -1831,7 +1831,7 @@ declare const relativeLuminance: (hex: string) => number;
1831
1831
  * @param backgroundHex - Hex background color
1832
1832
  * @return true if light text should be used; false (dark text) for malformed colors
1833
1833
  */
1834
- declare const prefersLightText: (backgroundHex: string) => boolean;
1834
+ export declare const prefersLightText: (backgroundHex: string) => boolean;
1835
1835
  //#endregion
1836
1836
  //#region src/utils/resolve-css-var.d.ts
1837
1837
  /**
@@ -1846,7 +1846,7 @@ declare const prefersLightText: (backgroundHex: string) => boolean;
1846
1846
  * @param element - Optional DOM element to resolve the variable from (defaults to document.documentElement)
1847
1847
  * @return The resolved value, fallback value, or null if unresolvable
1848
1848
  */
1849
- declare const resolveCssVariable: (value: string, element?: HTMLElement | null) => string | null;
1849
+ export declare const resolveCssVariable: (value: string, element?: HTMLElement | null) => string | null;
1850
1850
  //#endregion
1851
1851
  //#region src/charts/leaderboard-chart/hooks/use-leaderboard-legend-items.d.ts
1852
1852
  /**
@@ -1862,7 +1862,7 @@ declare const resolveCssVariable: (value: string, element?: HTMLElement | null)
1862
1862
  * @param root0.legendLabels.comparison - Label for comparison period data
1863
1863
  * @return Array of legend items for the leaderboard chart
1864
1864
  */
1865
- declare function useLeaderboardLegendItems({ data, primaryColor, secondaryColor, withComparison, withOverlayLabel, legendLabels }: {
1865
+ export declare function useLeaderboardLegendItems({ data, primaryColor, secondaryColor, withComparison, withOverlayLabel, legendLabels }: {
1866
1866
  data: LeaderboardEntry[];
1867
1867
  primaryColor?: string;
1868
1868
  secondaryColor?: string;
@@ -2218,7 +2218,7 @@ type BaseTooltipProps = TooltipCommonProps & (DefaultDataTooltip | CustomTooltip
2218
2218
  * @param props.renderContainer - Deprecated; render the content alone when false.
2219
2219
  * @return The tooltip.
2220
2220
  */
2221
- declare const BaseTooltip: ({ data, top, left, component: Component, children, className, style, renderContainer }: BaseTooltipProps) => string | number | true | import("react").JSX.Element | Iterable<ReactNode>;
2221
+ export declare const BaseTooltip: ({ data, top, left, component: Component, children, className, style, renderContainer }: BaseTooltipProps) => string | number | true | import("react").JSX.Element | Iterable<ReactNode>;
2222
2222
  //#endregion
2223
2223
  //#region src/components/tooltip/xy-chart-tooltip.d.ts
2224
2224
  type FlattenedTooltipData = {
@@ -2249,9 +2249,9 @@ interface XYChartTooltipProps extends Omit<XyChartTooltipProps<DataPointDate>, '
2249
2249
  */
2250
2250
  mode?: 'individual' | 'group';
2251
2251
  }
2252
- declare const XYChartTooltip: React.FC<XYChartTooltipProps>;
2252
+ export declare const XYChartTooltip: React.FC<XYChartTooltipProps>;
2253
2253
  /** @deprecated Use `XYChartTooltip`. */
2254
- declare const AccessibleTooltip: import("react").FC<XYChartTooltipProps>;
2254
+ export declare const AccessibleTooltip: import("react").FC<XYChartTooltipProps>;
2255
2255
  //#endregion
2256
2256
  //#region src/components/tooltip/tooltip-box.d.ts
2257
2257
  type TooltipBoxProps = HTMLAttributes<HTMLDivElement> & {
@@ -2266,7 +2266,7 @@ type TooltipBoxProps = HTMLAttributes<HTMLDivElement> & {
2266
2266
  * @param ref - Forwarded to the box element.
2267
2267
  * @return The tooltip box.
2268
2268
  */
2269
- declare const TooltipBox: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
2269
+ export declare const TooltipBox: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
2270
2270
  /** Drop the chart surface, scope class and dark theme, leaving a bare box. */
2271
2271
  unstyled?: boolean;
2272
2272
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -2311,7 +2311,7 @@ type TrendIndicatorProps = {
2311
2311
  * @param {TrendIndicatorProps} props - Component props
2312
2312
  * @return {JSX.Element} The rendered trend indicator
2313
2313
  */
2314
- declare function TrendIndicator({ direction, value, className, style, showIcon }: TrendIndicatorProps): JSX.Element;
2314
+ export declare function TrendIndicator({ direction, value, className, style, showIcon }: TrendIndicatorProps): JSX.Element;
2315
2315
  //#endregion
2316
2316
  //#region src/providers/chart-context/types.d.ts
2317
2317
  interface ChartRegistration {
@@ -2354,7 +2354,7 @@ interface GlobalChartsContextValue {
2354
2354
  }
2355
2355
  //#endregion
2356
2356
  //#region src/providers/chart-context/global-charts-provider.d.ts
2357
- declare const GlobalChartsContext: import("react").Context<GlobalChartsContextValue>;
2357
+ export declare const GlobalChartsContext: import("react").Context<GlobalChartsContextValue>;
2358
2358
  interface GlobalChartsProviderProps {
2359
2359
  children: ReactNode;
2360
2360
  theme?: Partial<ChartTheme>;
@@ -2369,13 +2369,13 @@ interface GlobalChartsProviderProps {
2369
2369
  */
2370
2370
  timeZone?: string;
2371
2371
  }
2372
- declare const GlobalChartsProvider: FC<GlobalChartsProviderProps>;
2372
+ export declare const GlobalChartsProvider: FC<GlobalChartsProviderProps>;
2373
2373
  //#endregion
2374
2374
  //#region src/providers/chart-context/hooks/use-global-charts-context.d.ts
2375
- declare const useGlobalChartsContext: () => GlobalChartsContextValue;
2375
+ export declare const useGlobalChartsContext: () => GlobalChartsContextValue;
2376
2376
  //#endregion
2377
2377
  //#region src/providers/chart-context/hooks/use-chart-registration.d.ts
2378
- declare const useChartRegistration: ({ chartId, legendItems, chartType, isDataValid, metadata }: {
2378
+ export declare const useChartRegistration: ({ chartId, legendItems, chartType, isDataValid, metadata }: {
2379
2379
  chartId: string;
2380
2380
  legendItems: BaseLegendItem[];
2381
2381
  chartType: ChartType;
@@ -2389,7 +2389,7 @@ declare const useChartRegistration: ({ chartId, legendItems, chartType, isDataVa
2389
2389
  *
2390
2390
  * @return The global chart theme
2391
2391
  */
2392
- declare const useGlobalChartsTheme: () => CompleteChartTheme;
2392
+ export declare const useGlobalChartsTheme: () => CompleteChartTheme;
2393
2393
  //#endregion
2394
2394
  //#region src/providers/chart-context/hooks/use-chart-formatting.d.ts
2395
2395
  /**
@@ -2401,7 +2401,7 @@ declare const useGlobalChartsTheme: () => CompleteChartTheme;
2401
2401
  *
2402
2402
  * @return The host's formatting context.
2403
2403
  */
2404
- declare const useChartFormatting: () => ChartFormatting;
2404
+ export declare const useChartFormatting: () => ChartFormatting;
2405
2405
  //#endregion
2406
2406
  //#region src/providers/chart-context/themes.d.ts
2407
2407
  /**
@@ -2418,7 +2418,7 @@ declare const defaultTheme: CompleteChartTheme;
2418
2418
  *
2419
2419
  * @return {HTMLElement | null} The nearest chart scope element, or `null`.
2420
2420
  */
2421
- declare const useChartScopeElement: () => HTMLElement | null;
2421
+ export declare const useChartScopeElement: () => HTMLElement | null;
2422
2422
  //#endregion
2423
- export { AccessibleTooltip, type AnnotationStyles, type ArcData, AreaChartResponsive as AreaChart, type AreaChartProps, AreaChart as AreaChartUnresponsive, type AxisOptions, type BandHighlightSelection, BarChartResponsive as BarChart, type BarChartProps, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, type BarListChartProps, BarListChart as BarListChartUnresponsive, type BaseChartProps, type BaseLegendItem, type BaseLegendProps, BaseTooltip, type BaseTooltipProps, type BucketInfo, type CalendarHeatmapOptions, type CalendarHeatmapResult, type ChartFormatting, type ChartLegendConfig, type ChartLegendOptions, type ChartTheme, type ComparisonItemLabel, type CompleteChartTheme, ConversionFunnelChartWithProvider as ConversionFunnelChart, type ConversionFunnelChartProps, type CrosshairStyle, type CurveType, type DataPoint, type DataPointDate, type DataPointPercentage, type EventHandlerParams, type FunnelStep, GeoChartResponsive as GeoChart, type GeoChartError, type GeoChartProps, GeoChartWithProvider as GeoChartUnresponsive, type GeoData, type GeoDisplayMode, type GeoRegion, type GeoResolution, GlobalChartsContext, GlobalChartsProvider, GlobalChartsProvider as ThemeProvider, type GoogleDataTableColumn, GoogleDataTableColumnRoleType, type GoogleDataTableRow, type GradientConfig, type GradientStop, type GridStyles, type HeatmapCell, HeatmapChartResponsive as HeatmapChart, type HeatmapChartProps, HeatmapChart as HeatmapChartUnresponsive, type HeatmapColumn, type HeatmapColumnGroup, type HeatmapTooltipData, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, Legend, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, type LegendShape, type LegendShapeLabel, type LegendShapeRenderProps, type LegendShapeStyles, type LegendValueDisplay, LineChartResponsive as LineChart, type LineChartAnnotationProps, type LineChartProps, LineChart as LineChartUnresponsive, type LineStyles, type MainMetricRenderProps, type MetricValueType, type MonthCalendarHeatmapOptions, type MonthCalendarHeatmapRange, type MonthCalendarHeatmapResult, type MultipleDataPointsDate, type Optional, type OrientationType, PieChartResponsive as PieChart, type PieChartProps, type PieChartRenderTooltipParams, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, type PieSemiCircleChartProps, type PieSemiCircleChartRenderTooltipParams, PieSemiCircleChart as PieSemiCircleChartUnresponsive, type RenderLabelProps, type RenderLineGlyphProps, type RenderTooltipGlyphProps, type RenderTooltipParams, type RenderValueProps, type ScaleOptions, type SeriesChartLegendConfig, type SeriesData, type SeriesDataOptions, type SeriesVisibilityProps, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TickResolution, TooltipBox, type TooltipBoxProps, type TooltipData, type TooltipDatum, type TooltipPlacement, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, XYChartTooltip, type XyChartTooltipProps, buildCalendarHeatmapData, buildMonthCalendarHeatmapData, defaultTheme, formatMetricValue, formatPercentage, getBucketInfo, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, mixHexColors, normalizeColorToHex, parseAsLocalDate, parseHslString, prefersLightText, relativeLuminance, resolveCssVariable, useCalendarHeatmapData, useChartFormatting, useChartLegendItems, useChartRegistration, useChartScopeElement, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, useMonthCalendarHeatmapData, validateHexColor };
2423
+ export { type AnnotationStyles, type ArcData, AreaChartResponsive as AreaChart, type AreaChartProps, AreaChart as AreaChartUnresponsive, type AxisOptions, type BandHighlightSelection, BarChartResponsive as BarChart, type BarChartProps, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, type BarListChartProps, BarListChart as BarListChartUnresponsive, type BaseChartProps, type BaseLegendItem, type BaseLegendProps, type BaseTooltipProps, type BucketInfo, type CalendarHeatmapOptions, type CalendarHeatmapResult, type ChartFormatting, type ChartLegendConfig, type ChartLegendOptions, type ChartTheme, type ComparisonItemLabel, type CompleteChartTheme, ConversionFunnelChartWithProvider as ConversionFunnelChart, type ConversionFunnelChartProps, type CrosshairStyle, type CurveType, type DataPoint, type DataPointDate, type DataPointPercentage, type EventHandlerParams, type FunnelStep, GeoChartResponsive as GeoChart, type GeoChartError, type GeoChartProps, GeoChartWithProvider as GeoChartUnresponsive, type GeoData, type GeoDisplayMode, type GeoRegion, type GeoResolution, GlobalChartsProvider as ThemeProvider, type GoogleDataTableColumn, type GoogleDataTableRow, type GradientConfig, type GradientStop, type GridStyles, type HeatmapCell, HeatmapChartResponsive as HeatmapChart, type HeatmapChartProps, HeatmapChart as HeatmapChartUnresponsive, type HeatmapColumn, type HeatmapColumnGroup, type HeatmapTooltipData, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, type LegendShape, type LegendShapeLabel, type LegendShapeRenderProps, type LegendShapeStyles, type LegendValueDisplay, LineChartResponsive as LineChart, type LineChartAnnotationProps, type LineChartProps, LineChart as LineChartUnresponsive, type LineStyles, type MainMetricRenderProps, type MetricValueType, type MonthCalendarHeatmapOptions, type MonthCalendarHeatmapRange, type MonthCalendarHeatmapResult, type MultipleDataPointsDate, type Optional, type OrientationType, PieChartResponsive as PieChart, type PieChartProps, type PieChartRenderTooltipParams, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, type PieSemiCircleChartProps, type PieSemiCircleChartRenderTooltipParams, PieSemiCircleChart as PieSemiCircleChartUnresponsive, type RenderLabelProps, type RenderLineGlyphProps, type RenderTooltipGlyphProps, type RenderTooltipParams, type RenderValueProps, type ScaleOptions, type SeriesChartLegendConfig, type SeriesData, type SeriesDataOptions, type SeriesVisibilityProps, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TickResolution, type TooltipBoxProps, type TooltipData, type TooltipDatum, type TooltipPlacement, type TooltipProps, type TooltipRenderProps, type TrendDirection, type TrendIndicatorProps, type XyChartTooltipProps, defaultTheme };
2424
2424
  //# sourceMappingURL=index.d.cts.map