@automattic/charts 1.5.3 → 1.7.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 (61) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +2 -2
  3. package/dist/index.cjs +8981 -9569
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +318 -202
  6. package/dist/index.d.cts +1319 -1183
  7. package/dist/index.d.ts +1319 -1183
  8. package/dist/index.js +8561 -9570
  9. package/dist/index.js.map +1 -1
  10. package/dist/visx/group/index.cjs +8 -8
  11. package/dist/visx/group/index.d.cts +2 -3
  12. package/dist/visx/group/index.d.ts +2 -3
  13. package/dist/visx/group/index.js +1 -7
  14. package/dist/visx/legend/index.cjs +20 -10
  15. package/dist/visx/legend/index.d.cts +2 -1
  16. package/dist/visx/legend/index.d.ts +2 -1
  17. package/dist/visx/legend/index.js +2 -10
  18. package/dist/visx/text/index.cjs +20 -12
  19. package/dist/visx/text/index.d.cts +2 -1
  20. package/dist/visx/text/index.d.ts +2 -1
  21. package/dist/visx/text/index.js +2 -12
  22. package/package.json +32 -38
  23. package/src/charts/area-chart/types.ts +1 -1
  24. package/src/charts/bar-chart/bar-chart.tsx +1 -1
  25. package/src/charts/geo-chart/geo-chart.tsx +3 -1
  26. package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +113 -1
  27. package/src/charts/leaderboard-chart/leaderboard-chart.tsx +37 -6
  28. package/src/charts/leaderboard-chart/test/leaderboard-chart.test.tsx +81 -0
  29. package/src/charts/line-chart/line-chart.tsx +1 -1
  30. package/src/charts/line-chart/private/line-chart-annotation-label-popover.tsx +18 -2
  31. package/src/charts/line-chart/private/line-chart-annotation.tsx +1 -1
  32. package/src/charts/line-chart/types.ts +1 -1
  33. package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.tsx +2 -2
  34. package/src/charts/private/chart-layout/chart-layout.tsx +1 -2
  35. package/src/charts/private/x-zoom.tsx +2 -2
  36. package/src/components/legend/hooks/use-chart-legend-items.ts +6 -2
  37. package/src/components/legend/legend.tsx +1 -2
  38. package/src/components/legend/utils/label-transform-factory.ts +1 -1
  39. package/src/components/tooltip/accessible-tooltip.tsx +2 -6
  40. package/src/index.ts +6 -5
  41. package/src/providers/chart-context/themes.ts +1 -1
  42. package/src/providers/chart-context/types.ts +7 -2
  43. package/src/types.ts +118 -11
  44. package/src/utils/get-styles.ts +1 -2
  45. package/src/visx/types.ts +30 -1
  46. package/dist/chunk-5WRI5ZAA.js +0 -31
  47. package/dist/chunk-5WRI5ZAA.js.map +0 -1
  48. package/dist/chunk-7OZEQ5HE.cjs +0 -9
  49. package/dist/chunk-7OZEQ5HE.cjs.map +0 -1
  50. package/dist/chunk-DZUJEN5N.cjs +0 -31
  51. package/dist/chunk-DZUJEN5N.cjs.map +0 -1
  52. package/dist/chunk-NFRB2POF.js +0 -9
  53. package/dist/chunk-NFRB2POF.js.map +0 -1
  54. package/dist/index.css.map +0 -1
  55. package/dist/visx/group/index.cjs.map +0 -1
  56. package/dist/visx/group/index.js.map +0 -1
  57. package/dist/visx/legend/index.cjs.map +0 -1
  58. package/dist/visx/legend/index.js.map +0 -1
  59. package/dist/visx/text/index.cjs.map +0 -1
  60. package/dist/visx/text/index.js.map +0 -1
  61. package/tsup.config.ts +0 -46
package/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.7.0] - 2026-06-23
9
+ ### Added
10
+ - Leaderboard interactive rows gain an opt-in `ariaLabel` for image-only labels, and the hover affordance now shrinks each bar in proportion to its length so small-share rows stay consistent. [#49812]
11
+
12
+ ### Changed
13
+ - Add React 19 compatibility for consumers. [#49661]
14
+ - Type `leaderboardChart.labelSpacing` as a WPDS `GapSize` token instead of `number` (the numeric value was silently ignored by `@wordpress/ui`'s Stack) to fix `@wordpress/ui` 0.15 type errors. [#49797]
15
+
16
+ ## [1.6.0] - 2026-06-22
17
+ ### Added
18
+ - Allow Leaderboard items to be made interactive via a per-entry onClick, rendering the row as a keyboard-accessible button with a hover chevron. [#49733]
19
+
20
+ ### Changed
21
+ - Update package dependencies. [#49594] [#49631] [#49691] [#49757]
22
+
8
23
  ## [1.5.3] - 2026-06-10
9
24
  ### Changed
10
25
  - Update package dependencies. [#49273]
@@ -863,6 +878,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
863
878
  - Fixed lints following ESLint rule changes for TS [#40584]
864
879
  - Fixing a bug in Chart storybook data. [#40640]
865
880
 
881
+ [1.7.0]: https://github.com/Automattic/charts/compare/v1.6.0...v1.7.0
882
+ [1.6.0]: https://github.com/Automattic/charts/compare/v1.5.3...v1.6.0
866
883
  [1.5.3]: https://github.com/Automattic/charts/compare/v1.5.2...v1.5.3
867
884
  [1.5.2]: https://github.com/Automattic/charts/compare/v1.5.1...v1.5.2
868
885
  [1.5.1]: https://github.com/Automattic/charts/compare/v1.5.0...v1.5.1
package/README.md CHANGED
@@ -6,8 +6,8 @@ Explore the available charts and their documentation in [Storybook](https://auto
6
6
 
7
7
  ## Requirements
8
8
 
9
- - **Node.js**: >= 20.10.0 (required by `@wordpress/ui` dependency)
10
- - **React**: 17.x or 18.x
9
+ - **Node.js**: >= 20.11.0
10
+ - **React**: 18.x or 19.x
11
11
 
12
12
  ## Quick Start
13
13