@automattic/charts 1.9.0 → 1.10.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.
@@ -4,7 +4,7 @@ import type { CompleteChartTheme } from '../../types';
4
4
  * Default theme configuration
5
5
  */
6
6
  const defaultTheme: CompleteChartTheme = {
7
- backgroundColor: 'var(--wpds-color-bg-surface-neutral-strong, #fff)',
7
+ backgroundColor: 'var(--wpds-color-background-surface-neutral-strong, #fff)',
8
8
  labelBackgroundColor: 'transparent', // label background color (transparent by default)
9
9
  // White label text sits on top of arbitrary series colors, so it has no WPDS
10
10
  // content-foreground equivalent and stays hardcoded (tokenization outlier).
@@ -21,7 +21,7 @@ const defaultTheme: CompleteChartTheme = {
21
21
  xAxisLineStyles: { stroke: 'var(--wpds-color-stroke-surface-neutral, #dbdbdb)', strokeWidth: 1 },
22
22
  legend: {
23
23
  labelStyles: {
24
- color: 'var(--wpds-color-fg-content-neutral, #1e1e1e)',
24
+ color: 'var(--wpds-color-foreground-content-neutral, #1e1e1e)',
25
25
  },
26
26
  containerStyles: {},
27
27
  shapeStyles: [],
@@ -33,24 +33,27 @@ const defaultTheme: CompleteChartTheme = {
33
33
  // that `buildChartTheme` injects as an inline style on SVG `<text>`
34
34
  // elements for axis labels and ticks. Setting `inherit` lets SVG text
35
35
  // pick up the host application's font-family via normal CSS inheritance.
36
- svgLabelSmall: { fill: 'var(--wpds-color-fg-content-neutral, #1e1e1e)', fontFamily: 'inherit' },
36
+ svgLabelSmall: {
37
+ fill: 'var(--wpds-color-foreground-content-neutral, #1e1e1e)',
38
+ fontFamily: 'inherit',
39
+ },
37
40
  svgLabelBig: { fontFamily: 'inherit' },
38
41
  annotationStyles: {
39
42
  label: {
40
- anchorLineStroke: 'var(--wpds-color-fg-content-neutral, #1e1e1e)',
41
- backgroundFill: 'var(--wpds-color-bg-surface-neutral-strong, #fff)',
43
+ anchorLineStroke: 'var(--wpds-color-foreground-content-neutral, #1e1e1e)',
44
+ backgroundFill: 'var(--wpds-color-background-surface-neutral-strong, #fff)',
42
45
  },
43
46
  connector: {
44
- stroke: 'var(--wpds-color-fg-content-neutral, #1e1e1e)',
47
+ stroke: 'var(--wpds-color-foreground-content-neutral, #1e1e1e)',
45
48
  },
46
49
  circleSubject: {
47
50
  stroke: 'transparent',
48
- fill: 'var(--wpds-color-fg-content-neutral, #1e1e1e)',
51
+ fill: 'var(--wpds-color-foreground-content-neutral, #1e1e1e)',
49
52
  radius: 5,
50
53
  },
51
54
  },
52
55
  geoChart: {
53
- featureFillColor: 'var(--wpds-color-bg-surface-neutral-weak, #f4f4f4)',
56
+ featureFillColor: 'var(--wpds-color-background-surface-neutral-weak, #f4f4f4)',
54
57
  },
55
58
  leaderboardChart: {
56
59
  rowGap: 12,
@@ -58,15 +61,15 @@ const defaultTheme: CompleteChartTheme = {
58
61
  labelSpacing: 'xs',
59
62
  // [negative, neutral, positive]
60
63
  deltaColors: [
61
- 'var(--wpds-color-fg-content-error-weak, #cc1818)',
62
- 'var(--wpds-color-fg-content-neutral-weak, #707070)',
63
- 'var(--wpds-color-fg-content-success-weak, #008030)',
64
+ 'var(--wpds-color-foreground-content-error-weak, #cc1818)',
65
+ 'var(--wpds-color-foreground-content-neutral-weak, #707070)',
66
+ 'var(--wpds-color-foreground-content-success-weak, #008030)',
64
67
  ],
65
68
  },
66
69
  conversionFunnelChart: {
67
- backgroundColor: 'var(--wpds-color-bg-surface-neutral-weak, #f4f4f4)',
68
- positiveChangeColor: 'var(--wpds-color-fg-content-success-weak, #008030)',
69
- negativeChangeColor: 'var(--wpds-color-fg-content-error-weak, #cc1818)',
70
+ backgroundColor: 'var(--wpds-color-background-surface-neutral-weak, #f4f4f4)',
71
+ positiveChangeColor: 'var(--wpds-color-foreground-content-success-weak, #008030)',
72
+ negativeChangeColor: 'var(--wpds-color-foreground-content-error-weak, #cc1818)',
70
73
  },
71
74
  lineChart: {
72
75
  lineStyles: {