Skip to content

Commit

Permalink
Update default color values from 'grey' to 'base-content-muted' in An…
Browse files Browse the repository at this point in the history
…notations, and SankeyDiagram
  • Loading branch information
archiewood committed Jan 15, 2025
1 parent 84ef302 commit 700ea77
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-carrots-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/core-components': patch
---

replace deprecated colors
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
/**
* @type {string}
* @default "grey"
* @default "base-content-muted"
*/
export let color = 'grey';
export let color = 'base-content-muted';
$: color = checkDeprecatedColor('ReferenceLine', 'color', color);
$: colorStore = resolveColor(color);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
/**
* @type {string}
* @default "grey"
* @default "base-content-muted"
*/
export let color = 'grey';
export let color = 'base-content-muted';
$: color = checkDeprecatedColor(chartType, 'color', color);
$: colorStore = resolveColor(color);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
export let depthOverride; // object like: {'node name': 1, 'node name 2': 2} where number is depth level (0-based)
export let linkColor = 'grey'; // grey (default), source, target, gradient
export let linkColor = 'base-content-muted'; // base-content-muted (default), source, target, gradient
$: linkColorStore = resolveColor(linkColor);
// Data Formatting
Expand Down
4 changes: 2 additions & 2 deletions sites/docs/pages/components/charts/annotations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ where sales_diff < -2000
name=color
description="Color to override default line and label colors"
options="CSS name | hexademical | RGB | HSL"
defaultValue=grey
defaultValue=base-content-muted
/>
<PropListing
name=labelColor
Expand Down Expand Up @@ -1356,7 +1356,7 @@ where sales_diff < -2000
name=color
description="Color to override default line and label colors"
options="CSS name | hexademical | RGB | HSL"
defaultValue=grey
defaultValue=base-content-muted
/>
<PropListing
name=labelColor
Expand Down
14 changes: 7 additions & 7 deletions sites/docs/pages/components/charts/sankey-diagram/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ Requires `percentCol` to show percentage beside value
targetCol=target
valueCol=amount
percentCol=percent
linkColor=grey
linkColor=base-content-muted
colorPalette={['#ad4940', '#3d8cc4', '#1b5218', '#ebb154']}
/>
</div>
Expand All @@ -367,7 +367,7 @@ Requires `percentCol` to show percentage beside value
targetCol=target
valueCol=amount
percentCol=percent
linkColor=grey
linkColor=base-content-muted
colorPalette={['#ad4940', '#3d8cc4', '#1b5218', '#ebb154']}
/>
```
Expand All @@ -376,7 +376,7 @@ Requires `percentCol` to show percentage beside value

## Link Colors

### `linkColor=grey` (default)
### `linkColor=base-content-muted` (default)

<DocTab>
<div slot='preview'>
Expand All @@ -386,7 +386,7 @@ Requires `percentCol` to show percentage beside value
targetCol=target
valueCol=amount
percentCol=percent
linkColor=grey
linkColor=base-content-muted
colorPalette={['#ad4940', '#3d8cc4', '#1b5218', '#ebb154']}
/>
</div>
Expand All @@ -398,7 +398,7 @@ Requires `percentCol` to show percentage beside value
targetCol=target
valueCol=amount
percentCol=percent
linkColor=grey
linkColor=base-content-muted
colorPalette={['#ad4940', '#3d8cc4', '#1b5218', '#ebb154']}
/>
```
Expand Down Expand Up @@ -697,8 +697,8 @@ Array of custom colours to use for the chart. E.g., `{['#cf0d06','#eb5752','#e88
</PropListing>
<PropListing
name="linkColor"
options={['grey', 'source', 'target', 'gradient']}
defaultValue="grey"
options={['base-content-muted', 'source', 'target', 'gradient']}
defaultValue="base-content-muted"
>
Color to use for the links between nodes in the diagram
Expand Down

0 comments on commit 700ea77

Please sign in to comment.