@automattic/charts 1.0.2 → 1.1.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 (38) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/{chunk-G3PMV62Z.js → chunk-5WRI5ZAA.js} +1 -6
  3. package/dist/{chunk-EMMSS5I5.cjs → chunk-DZUJEN5N.cjs} +2 -7
  4. package/dist/chunk-DZUJEN5N.cjs.map +1 -0
  5. package/dist/index.cjs +519 -1350
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.css +31 -40
  8. package/dist/index.css.map +1 -1
  9. package/dist/index.d.cts +2 -0
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.js +619 -1450
  12. package/dist/index.js.map +1 -1
  13. package/dist/visx/group/index.cjs +1 -1
  14. package/dist/visx/group/index.js +1 -1
  15. package/dist/visx/legend/index.cjs +1 -1
  16. package/dist/visx/legend/index.js +1 -1
  17. package/dist/visx/text/index.cjs +1 -1
  18. package/dist/visx/text/index.js +1 -1
  19. package/package.json +8 -7
  20. package/src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss +19 -26
  21. package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +1 -1
  22. package/src/charts/leaderboard-chart/leaderboard-chart.tsx +2 -2
  23. package/src/charts/line-chart/line-chart.module.scss +3 -3
  24. package/src/charts/line-chart/private/line-chart-annotation-label-popover.tsx +2 -2
  25. package/src/charts/pie-chart/pie-chart.tsx +5 -3
  26. package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.module.scss +3 -3
  27. package/src/components/legend/private/base-legend.module.scss +2 -2
  28. package/src/components/tooltip/base-tooltip.module.scss +1 -1
  29. package/src/components/trend-indicator/trend-indicator.module.scss +2 -2
  30. package/src/hooks/use-chart-margin.tsx +1 -14
  31. package/src/providers/chart-context/themes.ts +7 -1
  32. package/src/types.ts +2 -0
  33. package/src/utils/index.ts +3 -0
  34. package/src/utils/resolve-font-size.ts +37 -0
  35. package/src/utils/test/resolve-css-var.test.ts +3 -5
  36. package/src/utils/test/resolve-font-size.test.ts +66 -0
  37. package/dist/chunk-EMMSS5I5.cjs.map +0 -1
  38. /package/dist/{chunk-G3PMV62Z.js.map → chunk-5WRI5ZAA.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ 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.1.0] - 2026-04-10
9
+ ### Changed
10
+ - Replace hardcoded typography values with WPDS design tokens for font family, size, weight, and line height. [#47989]
11
+ - Replace __experimentalText from @wordpress/components with stable Text from @wordpress/ui. [#47894]
12
+ - Update package dependencies. [#47890] [#47998]
13
+
14
+ ### Fixed
15
+ - Fix Line Chart Annotations Custom and Alert story errors in Storybook by replacing the CJS-only gridicons dependency with @wordpress/icons. [#47990]
16
+ - Storybook: Replace manual design-system token override with real WPDS ThemeProvider. [#47983]
17
+
8
18
  ## [1.0.2] - 2026-04-06
9
19
  ### Changed
10
20
  - Conversion Funnel Chart: Rename non-BEM classnames to BEM modifiers. [#47854]
@@ -784,6 +794,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
784
794
  - Fixed lints following ESLint rule changes for TS [#40584]
785
795
  - Fixing a bug in Chart storybook data. [#40640]
786
796
 
797
+ [1.1.0]: https://github.com/Automattic/charts/compare/v1.0.2...v1.1.0
787
798
  [1.0.2]: https://github.com/Automattic/charts/compare/v1.0.1...v1.0.2
788
799
  [1.0.1]: https://github.com/Automattic/charts/compare/v1.0.0...v1.0.1
789
800
  [1.0.0]: https://github.com/Automattic/charts/compare/v0.59.0...v1.0.0
@@ -7,10 +7,6 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __commonJS = (cb, mod) => function __require() {
8
8
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
9
  };
10
- var __export = (target, all) => {
11
- for (var name in all)
12
- __defProp(target, name, { get: all[name], enumerable: true });
13
- };
14
10
  var __copyProps = (to, from, except, desc) => {
15
11
  if (from && typeof from === "object" || typeof from === "function") {
16
12
  for (let key of __getOwnPropNames(from))
@@ -30,7 +26,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
26
 
31
27
  export {
32
28
  __commonJS,
33
- __export,
34
29
  __toESM
35
30
  };
36
- //# sourceMappingURL=chunk-G3PMV62Z.js.map
31
+ //# sourceMappingURL=chunk-5WRI5ZAA.js.map
@@ -7,10 +7,6 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __commonJS = (cb, mod) => function __require() {
8
8
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
9
  };
10
- var __export = (target, all) => {
11
- for (var name in all)
12
- __defProp(target, name, { get: all[name], enumerable: true });
13
- };
14
10
  var __copyProps = (to, from, except, desc) => {
15
11
  if (from && typeof from === "object" || typeof from === "function") {
16
12
  for (let key of __getOwnPropNames(from))
@@ -31,6 +27,5 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
31
27
 
32
28
 
33
29
 
34
-
35
- exports.__commonJS = __commonJS; exports.__export = __export; exports.__toESM = __toESM;
36
- //# sourceMappingURL=chunk-EMMSS5I5.cjs.map
30
+ exports.__commonJS = __commonJS; exports.__toESM = __toESM;
31
+ //# sourceMappingURL=chunk-DZUJEN5N.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/chunk-DZUJEN5N.cjs"],"names":[],"mappings":"AAAA,6EAAI,SAAS,EAAE,MAAM,CAAC,MAAM;AAC5B,IAAI,UAAU,EAAE,MAAM,CAAC,cAAc;AACrC,IAAI,iBAAiB,EAAE,MAAM,CAAC,wBAAwB;AACtD,IAAI,k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