This repository has been archived by the owner on Dec 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1440 from guardian/v5
5.0.0
- Loading branch information
Showing
42 changed files
with
364 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@guardian/source-foundations': patch | ||
'@guardian/source-react-components': patch | ||
--- | ||
|
||
Replace deprecated colour tokens with palette |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@guardian/source-react-components': major | ||
--- | ||
|
||
Improve Link/ButtonLink accessibility |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@guardian/source-react-components': major | ||
'@guardian/source-foundations': minor | ||
--- | ||
|
||
Add spaced focus halo and apply to buttons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@guardian/source-react-components': major | ||
--- | ||
|
||
Change underline on subdued Button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@guardian/source-react-components": major | ||
--- | ||
|
||
Increase spacing between choice cards and label |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@guardian/source-foundations': major | ||
--- | ||
|
||
Update culture and opinion colours for better contrast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@guardian/source-react-components': major | ||
--- | ||
|
||
Improve accessibility of unselected state of ChoiceCard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@guardian/source-foundations': major | ||
--- | ||
|
||
Change brand[500] colour token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@guardian/source-foundations": major | ||
--- | ||
|
||
update palette.labs.200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@guardian/source-react-components': major | ||
--- | ||
|
||
Improve accessibility of unselected state of checkbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@guardian/source-foundations': major | ||
--- | ||
|
||
Update focusHalo colour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,27 @@ | ||
import { | ||
background, | ||
brandBackground, | ||
brandAltBackground, | ||
} from '@guardian/source-foundations'; | ||
import { palette } from '@guardian/source-foundations'; | ||
|
||
export const backgrounds = { | ||
default: 'background.primary', | ||
values: [ | ||
{ | ||
name: 'background.primary', | ||
value: background.primary, | ||
value: palette.neutral[100], | ||
}, | ||
{ | ||
name: 'background.secondary', | ||
value: background.secondary, | ||
value: palette.neutral[97], | ||
}, | ||
{ | ||
name: 'background.inverse', | ||
value: background.inverse, | ||
value: palette.neutral[10], | ||
}, | ||
{ | ||
name: 'brandBackground.primary', | ||
value: brandBackground.primary, | ||
value: palette.brand[400], | ||
}, | ||
{ | ||
name: 'brandAltBackground.primary', | ||
value: brandAltBackground.primary, | ||
value: palette.brandAlt[400], | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import { Meta } from '@storybook/addon-docs'; | ||
|
||
<Meta | ||
title="Release notes/Source v5" | ||
parameters={{ previewTabs: { canvas: { hidden: true } } }} | ||
/> | ||
|
||
# What's new in v5.0.0 | ||
|
||
_tl;dr_ | ||
|
||
- Accessibility improvements (some components look different) | ||
- Component APIs have not changed | ||
- Functionality and dependencies have not changed | ||
|
||
This brings Source closer to WCAG 2.1 Level AA compliance. | ||
|
||
## Migrating to v5 | ||
|
||
From a code perspective, v5 of Source is a drop-in replacement for v4. There are no | ||
breaking API changes and functionality has not changed. | ||
|
||
There are a number of updates that change the way Source components appear. There are | ||
also some colour changes. Consumers are advised to ensure the Source components | ||
and colours still look beautiful and accessible within their products. | ||
|
||
If a changed component or colour appears in automated visual regression tests (e.g. in | ||
Chromatic), please review the changes before upgrading Source. | ||
|
||
## Changes | ||
|
||
### Identifying Links and Buttons | ||
|
||
Links and Buttons are distinctively identified as interactive elements by applying | ||
an underline to the text. | ||
|
||
- Deprecate `subdued` styling in `<Link>` component. | ||
- Give all links (including now-deprecated `subdued`) an underline. | ||
- Increase the thickness of the `<Link>` component's underline on hover | ||
- Give text-only `<Button>` components (`priority="subdued"`) an underline which increases in thickness on hover | ||
- Add a small amount of spacing between the `<Button>` and the focus outline | ||
|
||
### Colour | ||
|
||
Our text colours are optimised to have a 4.5:1 contrast ratio against their background. | ||
|
||
For graphical objects and user interface components (e.g. icons, infographics and buttons), | ||
we aim for a 3:1 contrast ratio against its background. | ||
|
||
#### Changes | ||
|
||
- ChoiceCard border colour `#999999` -> `#707070` | ||
- Checkbox border colour `#999999` -> `#707070` | ||
- labs.200 `#4B8878` -> `#0C7A73` | ||
- opinion.400 `#E05E00` -> `#C74600` | ||
- culture.400 `#A1845C` -> `#866D50` | ||
- brand.500 `#007ABC` -> `#0077B6` | ||
- focus.400 `#007CC4` -> `#0077B6` | ||
|
||
#### Additions | ||
|
||
- opinion.450 `#E05E00` | ||
- culture.450 `#A1845C` | ||
|
||
#### Deprecations | ||
|
||
- Deprecate opinion.300 `#C74600` | ||
- Deprecate culture.350 `#866D50` | ||
|
||
### Other changes | ||
|
||
- Increase spacing between `<ChoiceCard />` and the label | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
packages/@guardian/source-react-components/src/accordion/theme.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { border, text } from '@guardian/source-foundations'; | ||
import { palette } from '@guardian/source-foundations'; | ||
|
||
export const accordionThemeDefault = { | ||
accordion: { | ||
textPrimary: text.primary, | ||
borderPrimary: border.primary, | ||
textPrimary: palette.neutral[7], | ||
borderPrimary: palette.neutral[60], | ||
}, | ||
}; |
Oops, something went wrong.