@automattic/charts 1.1.1 → 1.2.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/AGENTS.md CHANGED
@@ -24,7 +24,7 @@ jp changelog add js-packages/charts -s patch -t changed -e "Charts: <user-facing
24
24
 
25
25
  The package is migrating to WordPress UI and Theme as its defaults. When adding or changing code, follow these defaults unless the task explicitly says otherwise:
26
26
 
27
- - **Design tokens (WPDS).** In SCSS, use `var(--wpds-dimension-*, <fallback>)`, `var(--wpds-border-*, <fallback>)`, and `var(--wpds-font-*, <fallback>)` instead of hardcoded px values for spacing, padding, margins, border radius, border width, font size, and font weight. Fallbacks must match the WPDS spec value for that token — do not invent fallback values.
27
+ - **Design tokens (WPDS).** In SCSS, use `var(--wpds-dimension-*, <fallback>)`, `var(--wpds-border-*, <fallback>)`, and `var(--wpds-typography-*, <fallback>)` instead of hardcoded px values for spacing, padding, margins, border radius, border width, font size, and font weight. Fallbacks must match the WPDS spec value for that token — do not invent fallback values.
28
28
  - **UI primitives.** Prefer `Stack` and the stable `Text` from `@wordpress/ui` over ad-hoc flexbox or raw `<span>`/`<div>` for layout and text. Do not use `__experimental*` exports from `@wordpress/components` (e.g. `__experimentalText`, `__experimentalHStack`) — use the stable `@wordpress/ui` equivalents. Exception: `__experimentalGrid` has no stable alternative yet and is acceptable to use for now.
29
29
  - **Theming.** Theming flows through `@wordpress/theme`'s `ThemeProvider` (unlocked via private APIs in Storybook; see `src/stories/chart-decorator.tsx`). Do not manually override DS tokens in stories or components to achieve theming — pass a color through `ThemeProvider` instead.
30
30
  - **Chart element styles.** Read chart element styles via `getElementStyles` from `GlobalChartsProvider`, not directly from `theme`. This is the supported path for color/style resolution across themes.
@@ -54,7 +54,7 @@ The package is migrating to WordPress UI and Theme as its defaults. When adding
54
54
  - Defining new chart prop interfaces that diverge from established base chart contracts (for example, not aligning with `BaseChartProps` when appropriate).
55
55
  - Using ad-hoc flexbox layouts where established layout primitives (e.g. `Stack` from `@wordpress/ui`) should be preferred.
56
56
  - Accessing colors/styles directly from `theme` rather than using `getElementStyles` from `GlobalChartsProvider`.
57
- - Hardcoding px values in SCSS for spacing, borders, or typography where a WPDS token (`--wpds-dimension-*`, `--wpds-border-*`, `--wpds-font-*`) exists.
57
+ - Hardcoding px values in SCSS for spacing, borders, or typography where a WPDS token (`--wpds-dimension-*`, `--wpds-border-*`, `--wpds-typography-*`) exists.
58
58
  - CSS variable fallback values that diverge from the WPDS spec for that token.
59
59
  - Using `__experimental*` exports from `@wordpress/components` (e.g. `__experimentalText`, `__experimentalHStack`) instead of the stable `@wordpress/ui` equivalents. (`__experimentalGrid` is excepted — no stable alternative exists yet.)
60
60
  - Manually overriding DS tokens in stories or components to achieve theming instead of passing a color through `@wordpress/theme`'s `ThemeProvider`.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ 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.2.0] - 2026-04-20
9
+ ### Changed
10
+ - Charts: Replace hardcoded spacing and border values in module SCSS with WPDS dimension and border design tokens. [#48019]
11
+ - Update package dependencies. [#48106] [#48126] [#48141]
12
+
8
13
  ## [1.1.1] - 2026-04-15
9
14
  ### Changed
10
15
  - Charts: Document WordPress UI + Theme integration defaults. [#48020]
@@ -800,6 +805,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
800
805
  - Fixed lints following ESLint rule changes for TS [#40584]
801
806
  - Fixing a bug in Chart storybook data. [#40640]
802
807
 
808
+ [1.2.0]: https://github.com/Automattic/charts/compare/v1.1.1...v1.2.0
803
809
  [1.1.1]: https://github.com/Automattic/charts/compare/v1.1.0...v1.1.1
804
810
  [1.1.0]: https://github.com/Automattic/charts/compare/v1.0.2...v1.1.0
805
811
  [1.0.2]: https://github.com/Automattic/charts/compare/v1.0.1...v1.0.2