-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade to storybook 8 * Upgrade to storybook 8 * Upgrade to storybook 8 * fix failing build * patch version
- Loading branch information
1 parent
3516f1c
commit 0a76dd6
Showing
56 changed files
with
4,617 additions
and
4,731 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 |
---|---|---|
@@ -1,17 +1,20 @@ | ||
{ | ||
"env": { | ||
"es": { | ||
"presets": [ | ||
["@babel/preset-env", { "modules": false }], | ||
"@babel/preset-react" | ||
] | ||
} | ||
}, | ||
"presets": ["@babel/preset-env", "@babel/preset-react"], | ||
"plugins": [ | ||
"@babel/plugin-transform-runtime", | ||
"@babel/plugin-proposal-class-properties", | ||
"babel-plugin-styled-components", | ||
"react-docgen" | ||
] | ||
} | ||
"env": { | ||
"es": { | ||
"presets": [ | ||
["@babel/preset-env", { "modules": false }], | ||
["@babel/preset-react", { "runtime": "automatic" }] | ||
] | ||
} | ||
}, | ||
"presets": [ | ||
"@babel/preset-env", | ||
["@babel/preset-react", { "runtime": "automatic" }] | ||
], | ||
"plugins": [ | ||
"@babel/plugin-transform-runtime", | ||
"@babel/plugin-proposal-class-properties", | ||
"babel-plugin-styled-components", | ||
"react-docgen" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,32 @@ | ||
module.exports = { | ||
stories: ["../lib/**/*.@(mdx|stories.@(js))"], | ||
|
||
addons: [ | ||
"@storybook/addon-docs", | ||
"@storybook/addon-links", | ||
"@storybook/addon-viewport", | ||
"@storybook/addon-knobs", | ||
"@storybook/addon-a11y", | ||
"@storybook/addon-toolbars", | ||
"@storybook/components", | ||
"@storybook/api", | ||
"@storybook/addon-mdx-gfm", | ||
"@storybook/manager-api", | ||
"@storybook/core-events" | ||
"@storybook/core-events", | ||
"@chromatic-com/storybook", | ||
"@storybook/preset-create-react-app", | ||
"@storybook/addon-webpack5-compiler-babel" | ||
], | ||
|
||
framework: { | ||
name: "@storybook/react-webpack5", | ||
options: {} | ||
}, | ||
docs: { | ||
autodocs: "docs" | ||
} | ||
|
||
swc: () => ({ | ||
jsc: { | ||
transform: { | ||
react: { | ||
runtime: "automatic" | ||
} | ||
} | ||
} | ||
}) | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
import { | ||
Meta, | ||
ColorPalette, | ||
ColorItem, | ||
Story, | ||
Canvas | ||
} from "@storybook/addon-docs"; | ||
import { colors } from "./systemtheme"; | ||
import Flex from "./components/Flex"; | ||
import Colour from "./assets/Colour"; | ||
import Box from "./components/Box/"; | ||
import * as ColourStories from "./assets/Colour/Colour.stories"; | ||
|
||
<Meta of={ColourStories} /> | ||
|
||
# Colour | ||
|
||
These are the colours used throughout the design system, defined in `systemtheme`. They can be referenced using the `color` prop for components that accept this prop, or through referencing the theme object. | ||
|
||
## Main palette | ||
|
||
<ColorPalette> | ||
<ColorItem | ||
title="Greyscale" | ||
subtitle="Greyscale theme colours" | ||
colors={[ | ||
colors.black, | ||
colors.greyDarkest, | ||
colors.greyDarker, | ||
colors.greyDark, | ||
colors.grey, | ||
colors.greyLight, | ||
colors.greyLighter, | ||
colors.greyLightest, | ||
colors.white | ||
]} | ||
/> | ||
<ColorItem | ||
title="Primary" | ||
subtitle="Main theme colour" | ||
colors={[ | ||
colors.primaryDarkest, | ||
colors.primaryDarker, | ||
colors.primaryDark, | ||
colors.primary, | ||
colors.primaryLight, | ||
colors.primaryLighter, | ||
colors.primaryLightest | ||
]} | ||
/> | ||
<ColorItem | ||
title="Secondary" | ||
subtitle="Secondary theme colour" | ||
colors={[ | ||
colors.secondaryDarkest, | ||
colors.secondaryDarker, | ||
colors.secondaryDark, | ||
colors.secondary, | ||
colors.secondaryLight, | ||
colors.secondaryLighter, | ||
colors.secondaryLightest | ||
]} | ||
/> | ||
<ColorItem | ||
title="Success" | ||
subtitle="Success indicator colour" | ||
colors={[ | ||
colors.successDarkest, | ||
colors.successDarker, | ||
colors.successDark, | ||
colors.success, | ||
colors.successLight, | ||
colors.successLighter, | ||
colors.successLightest | ||
]} | ||
/> | ||
<ColorItem | ||
title="Warning" | ||
subtitle="Warning indicator colour" | ||
colors={[ | ||
colors.warningDarkest, | ||
colors.warningDarker, | ||
colors.warningDark, | ||
colors.warning, | ||
colors.warningLight, | ||
colors.warningLighter, | ||
colors.warningLightest | ||
]} | ||
/> | ||
<ColorItem | ||
title="Danger" | ||
subtitle="Danger indicator colour" | ||
colors={[ | ||
colors.dangerDarkest, | ||
colors.dangerDarker, | ||
colors.dangerDark, | ||
colors.danger, | ||
colors.dangerLight, | ||
colors.dangerLighter, | ||
colors.dangerLightest | ||
]} | ||
/> | ||
</ColorPalette> | ||
|
||
## Monochrome opacities | ||
|
||
For black and white colours at different opacities, use the following scales. | ||
|
||
### Black opacity scale | ||
|
||
<Canvas of={ColourStories.BlackOpacityScale} /> | ||
|
||
### White opacity scale | ||
|
||
<Canvas of={ColourStories.WhiteOpacityScale} /> | ||
|
||
## Coloured opacities | ||
|
||
### Primary opacity scale | ||
|
||
<Canvas of={ColourStories.PrimaryOpacityScale} /> | ||
|
||
### Secondary opacity scale | ||
|
||
<Canvas of={ColourStories.SecondaryOpacityScale} /> | ||
|
||
### Success opacity scale | ||
|
||
<Canvas of={ColourStories.SuccessOpacityScale} /> | ||
|
||
### Warning opacity scale | ||
|
||
<Canvas of={ColourStories.WarningOpacityScale} /> | ||
|
||
### Danger opacity scale | ||
|
||
<Canvas of={ColourStories.DangerOpacityScale} /> |
Oops, something went wrong.