diff --git a/.drone.yml b/.drone.yml
index 947a292e..167d0143 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -6,7 +6,6 @@ name: components
steps:
- name: npm_auth
image: robertstettner/drone-npm-auth
- environment:
settings:
registry: npm.pkg.github.com
token:
@@ -29,7 +28,6 @@ steps:
- name: code-analysis
image: committed/drone-sonarqube-node
- detach: true
environment:
SONAR_HOST:
from_secret: sonar_host
@@ -40,6 +38,9 @@ steps:
when:
branch:
- master
+ event:
+ exclude:
+ - pull_request
- name: slack
image: plugins/slack
@@ -51,5 +52,18 @@ steps:
from_secret: slack_template
when:
status:
- - success
- failure
+
+ - name: announce
+ image: plugins/slack
+ settings:
+ channel: group-dev
+ webhook:
+ from_secret: slack_webhook
+ template: >
+ :tada: New version ${DRONE_TAG} of `@commitd/components` available
+ when:
+ ref:
+ - refs/tags/v*
+ status:
+ - success
diff --git a/.storybook/addons.js b/.storybook/addons.js
index 7353a960..5024fe3e 100644
--- a/.storybook/addons.js
+++ b/.storybook/addons.js
@@ -2,18 +2,14 @@ import '@storybook/addon-docs/register'
import '@storybook/addon-actions/register'
import '@storybook/addon-links/register'
import '@storybook/addon-a11y/register'
-import { STORY_CHANGED } from '@storybook/core-events'
+import { STORIES_CONFIGURED } from '@storybook/core-events'
import addonAPI from '@storybook/addons'
-let firstLoad = true
addonAPI.register('committed/components', storybookAPI => {
- // This doesn't currently work due to a bug in storybook
- // storybookAPI.on(STORY_CHANGED, (kind, story) => {
- // console.log('called')
- // if (firstLoad) {
- // firstLoad = false // make sure to set this flag to false, otherwise you will never be able to look at another story.
- // storybookAPI.selectStory('Design System', 'Introduction')
- // }
- // })
+ storybookAPI.on(STORIES_CONFIGURED, (kind, story) => {
+ if (storybookAPI.getUrlState().path === '/story/*') {
+ storybookAPI.selectStory('Design System', 'Introduction')
+ }
+ })
})
diff --git a/.storybook/config.tsx b/.storybook/config.tsx
index ed1083bf..e6923614 100644
--- a/.storybook/config.tsx
+++ b/.storybook/config.tsx
@@ -32,4 +32,4 @@ addParameters({
}
})
-configure(require.context('../src/stories', true, /\.(tsx|mdx)$/), module)
+configure(require.context('../src', true, /\.stories\.(tsx|mdx)$/), module)
diff --git a/README.md b/README.md
index e578172b..a05481ec 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
# Committed Components
+[](https://committed/software)
[](https://drone.committed.software/commitd/components)
For documentation see https://committed.software/components
diff --git a/example/index.tsx b/example/index.tsx
index 07ce9c70..28849c11 100644
--- a/example/index.tsx
+++ b/example/index.tsx
@@ -50,7 +50,7 @@ const Content = () => (
'Rejux',
'Baleen'
].map((name, index) => (
-
+
))}
diff --git a/package.json b/package.json
index b0a2b2fe..75f5e60e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@commitd/components",
- "version": "0.0.15",
+ "version": "0.0.16",
"description": "Committed Component Library",
"author": "Committed",
"license": "UNLICENSED",
@@ -83,7 +83,7 @@
"pretty-quick": "^1.11.1",
"prop-types": "^15.7.2",
"react": "^16.9.0",
- "react-docgen-typescript-loader": "^3.1.1",
+ "react-docgen-typescript-loader": "^3.3.0",
"react-dom": "^16.9.0",
"react-scripts-ts": "^2.16.0",
"rollup": "^0.62.0",
diff --git a/src/components/appbar/AppBar.tsx b/src/components/appbar/AppBar.tsx
index bb985288..f09618a6 100644
--- a/src/components/appbar/AppBar.tsx
+++ b/src/components/appbar/AppBar.tsx
@@ -1,4 +1,4 @@
-import React from 'react'
+import { ComponentType, FC } from 'react'
import { styled } from '@material-ui/styles'
import { fonts, Theme } from '../../theme'
import MaterialAppBar, {
@@ -7,7 +7,7 @@ import MaterialAppBar, {
export type AppBarProps = MaterialAppBarProps
-export const AppBar = styled>(MaterialAppBar)(
+export const AppBar: ComponentType = styled(MaterialAppBar)(
({ theme }: { theme: Theme }) => ({
'& h1, h2, h3, h4, h5, h6': {
fontSize: fonts.sizes[1],
@@ -15,3 +15,9 @@ export const AppBar = styled>(MaterialAppBar)(
}
})
)
+
+// For documentation only
+export type BaseAppBarProps = Pick
+export type RestAppBarProps = Omit
+export const BaseAppBarDocs: FC = () => null
+export const RestAppBarDocs: FC = () => null
diff --git a/src/stories/components/appBar.mdx b/src/components/appbar/appBar.stories.mdx
similarity index 61%
rename from src/stories/components/appBar.mdx
rename to src/components/appbar/appBar.stories.mdx
index 9594d39e..3221c092 100644
--- a/src/stories/components/appBar.mdx
+++ b/src/components/appbar/appBar.stories.mdx
@@ -1,10 +1,15 @@
import { Meta, Story, Preview, Props } from '@storybook/addon-docs/blocks'
import { AppBar, Box, Heading, Button, Toolbar } from '../../'
+import { BaseAppBarDocs, RestAppBarDocs } from './AppBar'
# AppBar
+Extends [Material UI AppBar](https://material-ui.com/components/app-bar/).
+
+The App Bar should the used for information and actions on the current screen.
+
@@ -20,4 +25,12 @@ import { AppBar, Box, Heading, Button, Toolbar } from '../../'
-
+# Props
+
+## Main props
+
+
+
+## Other props
+
+
diff --git a/src/stories/components/avatar.mdx b/src/components/avatar/avatar.stories.mdx
similarity index 100%
rename from src/stories/components/avatar.mdx
rename to src/components/avatar/avatar.stories.mdx
diff --git a/src/stories/components/badge.mdx b/src/components/badge/badge.stories.mdx
similarity index 100%
rename from src/stories/components/badge.mdx
rename to src/components/badge/badge.stories.mdx
diff --git a/src/components/box/Box.tsx b/src/components/box/Box.tsx
index e4210812..08c4870a 100644
--- a/src/components/box/Box.tsx
+++ b/src/components/box/Box.tsx
@@ -3,20 +3,18 @@ import MaterialBox, {
BoxProps as MaterialBoxProps
} from '@material-ui/core/Box'
+export type BoxRef = HTMLDivElement
+
export type BoxProps = MaterialBoxProps & {
/** The background colour */
bg?: string
}
-export type BoxRef = HTMLDivElement
-
-export const Box: React.FC = React.forwardRef(
- (props, ref) => (
- // @ts-ignore due to ref forward
-
- )
-)
+export const Box = React.forwardRef((props, ref) => (
+ // @ts-ignore due to ref forward
+
+))
diff --git a/src/stories/components/box.mdx b/src/components/box/box.stories.mdx
similarity index 100%
rename from src/stories/components/box.mdx
rename to src/components/box/box.stories.mdx
diff --git a/src/stories/components/button.mdx b/src/components/button/button.stories.mdx
similarity index 100%
rename from src/stories/components/button.mdx
rename to src/components/button/button.stories.mdx
diff --git a/src/components/card/Card.tsx b/src/components/card/Card.tsx
index 00a0514c..ddbcf300 100644
--- a/src/components/card/Card.tsx
+++ b/src/components/card/Card.tsx
@@ -44,7 +44,7 @@ export const CardHeader: React.ComponentType = ({
children,
...others
}: CardHeaderProps) => {
- if (typeof (children && children) === 'string') {
+ if (typeof children === 'string') {
return
}
return {children}
diff --git a/src/stories/components/card.mdx b/src/components/card/card.stories.mdx
similarity index 100%
rename from src/stories/components/card.mdx
rename to src/components/card/card.stories.mdx
diff --git a/src/stories/components/checkbox.mdx b/src/components/checkbox/checkbox.stories.mdx
similarity index 100%
rename from src/stories/components/checkbox.mdx
rename to src/components/checkbox/checkbox.stories.mdx
diff --git a/src/stories/components/chip.mdx b/src/components/chip/chip.stories.mdx
similarity index 100%
rename from src/stories/components/chip.mdx
rename to src/components/chip/chip.stories.mdx
diff --git a/src/stories/components/container.mdx b/src/components/container/container.stories.mdx
similarity index 100%
rename from src/stories/components/container.mdx
rename to src/components/container/container.stories.mdx
diff --git a/src/stories/components/divider.mdx b/src/components/divider/divider.stories.mdx
similarity index 100%
rename from src/stories/components/divider.mdx
rename to src/components/divider/divider.stories.mdx
diff --git a/src/stories/components/drawer.mdx b/src/components/drawer/drawer.stories.mdx
similarity index 100%
rename from src/stories/components/drawer.mdx
rename to src/components/drawer/drawer.stories.mdx
diff --git a/src/components/flex/Flex.tsx b/src/components/flex/Flex.tsx
index a43cc21b..d3453c1c 100644
--- a/src/components/flex/Flex.tsx
+++ b/src/components/flex/Flex.tsx
@@ -2,7 +2,23 @@ import * as React from 'react'
import { BoxProps, Box } from '../box/Box'
export type FlexProps = Omit
+export type RowProps = Omit
+export type ColumnProps = Omit
-export const Flex: React.FC = (props: FlexProps) => (
-
+export type FlexRef = HTMLDivElement
+
+export const Flex = React.forwardRef(
+ (props: FlexProps, ref) =>
+)
+
+export const Row = React.forwardRef(
+ (props: FlexProps, ref) => (
+
+ )
+)
+
+export const Column = React.forwardRef(
+ (props: FlexProps, ref) => (
+
+ )
)
diff --git a/src/stories/components/flex.mdx b/src/components/flex/flex.stories.mdx
similarity index 100%
rename from src/stories/components/flex.mdx
rename to src/components/flex/flex.stories.mdx
diff --git a/src/stories/components/hidden.mdx b/src/components/hidden/hidden.stories.mdx
similarity index 100%
rename from src/stories/components/hidden.mdx
rename to src/components/hidden/hidden.stories.mdx
diff --git a/src/stories/components/iconButton.mdx b/src/components/iconbutton/iconButton.stories.mdx
similarity index 100%
rename from src/stories/components/iconButton.mdx
rename to src/components/iconbutton/iconButton.stories.mdx
diff --git a/src/stories/components/icon.mdx b/src/components/icons/icon.stories.mdx
similarity index 100%
rename from src/stories/components/icon.mdx
rename to src/components/icons/icon.stories.mdx
diff --git a/src/components/index.ts b/src/components/index.ts
index 61a0c869..d71e3cc2 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -43,6 +43,9 @@ export type CheckboxProps = CheckboxProps
export { Chip } from './chip/Chip'
import { ChipProps } from './chip/Chip'
export type ChipProps = ChipProps
+export { Column } from './flex/Flex'
+import { ColumnProps } from './flex/Flex'
+export type ColumnProps = ColumnProps
export { Container } from './container/Container'
import { ContainerProps } from './container/Container'
export type ContainerProps = ContainerProps
@@ -100,6 +103,9 @@ export type RadioProps = RadioProps
export { RadioGroup } from './radio/RadioGroup'
import { RadioGroupProps } from './radio/RadioGroup'
export type RadioGroupProps = RadioGroupProps
+export { Row } from './flex/Flex'
+import { RowProps } from './flex/Flex'
+export type RowProps = RowProps
export { Select } from './select/Select'
import { SelectProps } from './select/Select'
export type SelectProps = SelectProps
diff --git a/src/stories/components/link.mdx b/src/components/link/link.stories.mdx
similarity index 100%
rename from src/stories/components/link.mdx
rename to src/components/link/link.stories.mdx
diff --git a/src/stories/components/loader.mdx b/src/components/loader/loader.stories.mdx
similarity index 100%
rename from src/stories/components/loader.mdx
rename to src/components/loader/loader.stories.mdx
diff --git a/src/stories/components/logo.mdx b/src/components/logo/logo.stories.mdx
similarity index 100%
rename from src/stories/components/logo.mdx
rename to src/components/logo/logo.stories.mdx
diff --git a/src/stories/components/popover.mdx b/src/components/popover/popover.stories.mdx
similarity index 100%
rename from src/stories/components/popover.mdx
rename to src/components/popover/popover.stories.mdx
diff --git a/src/stories/components/radio.mdx b/src/components/radio/radio.stories.mdx
similarity index 99%
rename from src/stories/components/radio.mdx
rename to src/components/radio/radio.stories.mdx
index 485b523c..ddbef688 100644
--- a/src/stories/components/radio.mdx
+++ b/src/components/radio/radio.stories.mdx
@@ -23,7 +23,7 @@ use radio when one option of more then two choices; [further info](https://www.n
Radios should always be used with a `RadioGroup` to handle the state control and layout.
-
+
{React.createElement(() => {
const [value, setValue] = React.useState('female')
function handleChange(event /*: React.ChangeEvent */) {
diff --git a/src/stories/components/select.mdx b/src/components/select/select.stories.mdx
similarity index 100%
rename from src/stories/components/select.mdx
rename to src/components/select/select.stories.mdx
diff --git a/src/stories/components/slider.mdx b/src/components/slider/slider.stories.mdx
similarity index 99%
rename from src/stories/components/slider.mdx
rename to src/components/slider/slider.stories.mdx
index 5770db37..82a6efc9 100644
--- a/src/stories/components/slider.mdx
+++ b/src/components/slider/slider.stories.mdx
@@ -9,7 +9,7 @@ import { action } from '@storybook/addon-actions'
Allows for selection from a (numeric) range of values.
-
+
{React.createElement(() => {
const marks = [
{
diff --git a/src/stories/components/switch.mdx b/src/components/switch/switch.stories.mdx
similarity index 100%
rename from src/stories/components/switch.mdx
rename to src/components/switch/switch.stories.mdx
diff --git a/src/stories/components/tabs.mdx b/src/components/tabs/tabs.stories.mdx
similarity index 100%
rename from src/stories/components/tabs.mdx
rename to src/components/tabs/tabs.stories.mdx
diff --git a/src/stories/components/textField.mdx b/src/components/textfield/textField.stories.mdx
similarity index 100%
rename from src/stories/components/textField.mdx
rename to src/components/textfield/textField.stories.mdx
diff --git a/src/stories/components/tooltip.mdx b/src/components/tooltip/tooltip.stories.mdx
similarity index 100%
rename from src/stories/components/tooltip.mdx
rename to src/components/tooltip/tooltip.stories.mdx
diff --git a/src/stories/typography.mdx b/src/components/typography/typography.stories.mdx
similarity index 100%
rename from src/stories/typography.mdx
rename to src/components/typography/typography.stories.mdx
diff --git a/src/stories/colour.mdx b/src/stories/colour.stories.mdx
similarity index 83%
rename from src/stories/colour.mdx
rename to src/stories/colour.stories.mdx
index 9032c4fa..04d5acd1 100644
--- a/src/stories/colour.mdx
+++ b/src/stories/colour.stories.mdx
@@ -6,6 +6,9 @@ import { ThemeProvider, theme, colors, Flex } from '../'
## Main Light
+The main light theme colours. They can be refered to in palette based props using the key with main, light or dark. e.g. `primary.main`, `secondary.dark`.
+We use the brand colour for accents and highlights, not as the primary colour.
+
@@ -21,6 +24,8 @@ import { ThemeProvider, theme, colors, Flex } from '../'
## Palettes
+Full palletes back the main colours and are keyed with `50, 100, 200, 300, 400, 500, 600, 700, 800, 900`.
+
Click to copy color to clipboard.
@@ -34,6 +39,9 @@ Click to copy color to clipboard.
## Colours
+Don't refer to hex values in your code, like `#FFBB00` but instead use the theme colours above or you can also import
+`colors` directly and select from a wider set for, say charts and graphs that require more colours.
+
diff --git a/src/stories/components/dialog.mdx b/src/stories/components/dialog.stories.mdx
similarity index 100%
rename from src/stories/components/dialog.mdx
rename to src/stories/components/dialog.stories.mdx
diff --git a/src/stories/components/list.mdx b/src/stories/components/list.stories.mdx
similarity index 99%
rename from src/stories/components/list.mdx
rename to src/stories/components/list.stories.mdx
index 726f2403..f1638598 100644
--- a/src/stories/components/list.mdx
+++ b/src/stories/components/list.stories.mdx
@@ -25,7 +25,7 @@ Listes can be used as toggle actions or as part of input forms.
Use when single select/deselect option, use radio when one option of more then two choices; [further info](https://www.nngroup.com/articles/checkboxes-vs-radio-buttons/).
-
+
diff --git a/src/stories/components/menu.mdx b/src/stories/components/menu.stories.mdx
similarity index 97%
rename from src/stories/components/menu.mdx
rename to src/stories/components/menu.stories.mdx
index c16ce735..eb9a8474 100644
--- a/src/stories/components/menu.mdx
+++ b/src/stories/components/menu.stories.mdx
@@ -8,7 +8,7 @@ import { Meta, Story, Preview, Props } from '@storybook/addon-docs/blocks'
# Menu
-
+
{React.createElement(() => {
const [anchorEl, setAnchorEl] = React.useState(null)
const click = action('clicked')
diff --git a/src/stories/components/table.mdx b/src/stories/components/table.stories.mdx
similarity index 99%
rename from src/stories/components/table.mdx
rename to src/stories/components/table.stories.mdx
index 5c498ef1..0122dfc3 100644
--- a/src/stories/components/table.mdx
+++ b/src/stories/components/table.stories.mdx
@@ -14,7 +14,7 @@ import {
# Table
-
+
{React.createElement(() => {
function createData(name, calories, fat, carbs, protein) {
return { name, calories, fat, carbs, protein }
diff --git a/src/stories/components/toolbar.mdx b/src/stories/components/toolbar.stories.mdx
similarity index 100%
rename from src/stories/components/toolbar.mdx
rename to src/stories/components/toolbar.stories.mdx
diff --git a/src/stories/designPrinciples.mdx b/src/stories/designPrinciples.mdx
deleted file mode 100644
index e9e9eef7..00000000
--- a/src/stories/designPrinciples.mdx
+++ /dev/null
@@ -1,42 +0,0 @@
-import { Meta } from '@storybook/addon-docs/blocks'
-
-
-
-# Design Principles
-
-## Breakpoints
-
-```
-value |0px 600px 960px 1280px 1920px
-key |xs sm md lg xl
-screen width |--------|--------|--------|--------|-------->
-range | xs | sm | md | lg | xl
-```
-
-### CSS Media Queries
-
-CSS media queries is the idiomatic approach to make your UI responsive. We provide four styles helpers to do so:
-
-- `theme.breakpoints.up(key)`
-- `theme.breakpoints.down(key)`
-- `theme.breakpoints.only(key)`
-- `theme.breakpoints.between(start, end)`
-
-In the following demo, we change the background color (red, blue & green) based on the screen width.
-
-```js
-const styles = theme => ({
- root: {
- padding: theme.spacing(1),
- [theme.breakpoints.down('sm')]: {
- backgroundColor: theme.palette.secondary.main
- },
- [theme.breakpoints.up('md')]: {
- backgroundColor: theme.palette.primary.main
- },
- [theme.breakpoints.up('lg')]: {
- backgroundColor: green[500]
- }
- }
-})
-```
diff --git a/src/stories/designPrinciples.stories.mdx b/src/stories/designPrinciples.stories.mdx
new file mode 100644
index 00000000..ffbfeee6
--- /dev/null
+++ b/src/stories/designPrinciples.stories.mdx
@@ -0,0 +1,173 @@
+import { Meta, Preview } from '@storybook/addon-docs/blocks'
+import { Flex, Box, theme, colors } from '../'
+
+
+
+# Design Principles
+
+We don't want to reinvent the wheel, therefore, we use the [Material](https://material.io/) design system, from Google, and their
+[principles](https://material.io/design/introduction/#principles). Committed Components is our particular customisation of it.
+
+## Material-UI
+
+The system is implemented using [@material-ui](https://material-ui.com), but does not support all components from it.
+Any unsupported components can be used directly from material-ui and it will still receive the Committed theming.
+The components are documented here but further detail may be required form material-ui.
+
+## Components
+
+In this library, we only aim to support simple components (or [atoms](http://atomicdesign.bradfrost.com/)).
+Higher level reusable components are in separate, themed libraries. Import those as required.
+
+Generally, a component should be self contained and should not require styling beyond what is provided via props.
+No assumptions are made about the placement of the component but we provide [positioning props][positioning] to simplify
+the location of the components.
+
+## Spacing
+
+We have a fixed list of spacings that double with each step. Using fixed spacing will give a better uniform
+feeling to the design. If a space is too small, go up a step, too large go down, try to avoid custom spacings.
+
+The [positioning props][positioning] that deal with spacing (e.g. margin and padding) take a number from 0 to 6 to select the correct
+spacing, 0 being no space and 6 is 128px.
+
+
+
+ 0
+
+
+
+ 1
+
+
+
+ 2
+
+
+
+ 3
+
+
+
+ 4
+
+
+
+ 5
+
+
+
+ 6
+
+
+
+
+## Sizing
+
+The [placement props][positioning] that deal with sizing (e.g. width and height) take a `number`. Numbers greater than `1` are treated as a pixel value for example `100 => "100px"`,
+and numbers less than or equal to `1` are transformed into a percentage for example `1/2 => "50%"`.
+
+
+ w={'{100}'}
+
+
+ w={'{1 / 3}'}
+
+
+ w={'{300}'}
+
+
+ w={'{1 / 2}'}
+
+
+## Breakpoints
+
+A set of standard breakpoints are defined as:
+
+```
+value |0px 600px 960px 1280px 1920px
+key |xs sm md lg xl
+screen width |--------|--------|--------|--------|-------->
+range | xs | sm | md | lg | xl
+```
+
+- xs, extra-small: 0px
+- sm, small: 600px
+- md, medium: 960px
+- lg, large: 1280px
+- xl, extra-large: 1920px
+
+We can refer to them in certain props with their keys or in standard
+ordering for example the following two exanmles are equivalent:
+
+```jsx
+
+
+```
+
+If in `xs` range the margin is 2, `sm` range 3 and `md` and uo 4.
+
+### CSS Media Queries
+
+CSS media queries is the idiomatic approach to make your UI responsive. We provide four styles helpers to do so:
+
+- `theme.breakpoints.up(key)`
+- `theme.breakpoints.down(key)`
+- `theme.breakpoints.only(key)`
+- `theme.breakpoints.between(start, end)`
+
+In the following demo, we change the background color (red, blue & green) based on the screen width.
+
+```js
+const styles = theme => ({
+ root: {
+ padding: theme.spacing(1),
+ [theme.breakpoints.down('sm')]: {
+ backgroundColor: theme.palette.secondary.main
+ },
+ [theme.breakpoints.up('md')]: {
+ backgroundColor: theme.palette.primary.main
+ },
+ [theme.breakpoints.up('lg')]: {
+ backgroundColor: green[500]
+ }
+ }
+})
+```
+
+[positioning]: /?path=/docs/design-system-positioning--page
diff --git a/src/stories/gettingStarted.mdx b/src/stories/gettingStarted.stories.mdx
similarity index 55%
rename from src/stories/gettingStarted.mdx
rename to src/stories/gettingStarted.stories.mdx
index 63832601..c312394b 100644
--- a/src/stories/gettingStarted.mdx
+++ b/src/stories/gettingStarted.stories.mdx
@@ -5,10 +5,10 @@ import { Meta } from '@storybook/addon-docs/blocks'
# Getting Started
Ensure you have setup access to the github @commitd packages, by following these [instructions](https://help.github.com/en/articles/configuring-npm-for-use-with-github-package-registry).
-Install the design system in your application
+Install the design system and dependencies in your application
```sh
-yarn add @commitd/components
+yarn add @commitd/components @material-ui/core @material-ui/icons
```
## ThemeProvider
@@ -19,14 +19,14 @@ This should only be included once in your application.
```jsx
import React from 'react'
-import { ThemeProvider } from '@committed/components'
-import SomeView from './SomeView'
+import { ThemeProvider } from '@commitd/components'
+import AppRoot from './AppRoot'
class App extends React.Component {
render() {
return (
- Hello
+
)
}
@@ -39,24 +39,18 @@ Import and use the design system UI components in your application.
```jsx
import React from 'react'
-import { Box, Text } from '@committed/components'
+import { Box, Text } from '@commitd/components'
-const SomeView = props => (
+const AppRoot = props => (
Hello
)
```
-## Material-UI
-
-The system is implemented using [@material-ui](https://material-ui.com), but does not support all components from it.
-Any unsupported components can be used directly from material-ui and it will still receive the Committed theming.
-The components are documented here but further detail may be required form material-ui.
-
## Icons
-We currently use the Sharp icons from @material-ui/icons exposed on the `Icons` component. In order to use this you must add the peer dependency:
+We currently use the Sharp icons from `@material-ui/icons` exposed on the `Icons` component. In order to use this you must add the peer dependency:
```sh
yarn add @material-ui/icons
diff --git a/src/stories/index.mdx b/src/stories/index.mdx
deleted file mode 100644
index 3dbb71c6..00000000
--- a/src/stories/index.mdx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { Meta } from '@storybook/addon-docs/blocks'
-import { version } from '../../package.json'
-
-
-
-# Committed Components
-
-v{version}
-
-This is Committed's design system and should be used to compose web applications.
-
-
-
-## Motivation
-
-Design systems enable teams to build better products faster by making design reusable—reusability makes scale possible. This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.
-
-Regardless of the technologies and tools behind them, a successful design system follows these guiding principles:
-
-- **It’s consistent**. The way components are built and managed follows a predictable pattern.
-- **It’s self-contained**. Your design system is treated as a standalone dependency.
-- **It’s reusable**. You’ve built components so they can be reused in many contexts.
-- **It’s accessible**. Applications built with your design system are usable by as many people as possible, no matter how they access the web.
-- **It’s robust**. No matter the product or platform to which your design system is applied, it should perform with grace and minimal bugs.
-
-## Next
-
-- [Getting Started](gettingStarted)
diff --git a/src/stories/introduction.stories.mdx b/src/stories/introduction.stories.mdx
new file mode 100644
index 00000000..4bc388d4
--- /dev/null
+++ b/src/stories/introduction.stories.mdx
@@ -0,0 +1,41 @@
+import { Meta } from '@storybook/addon-docs/blocks'
+import { version } from '../../package.json'
+
+
+
+# Committed Components
+
+v{version}
+
+This is Committed's design system.
+
+It serves as a resource to help define a common visual language for Committed applications.
+This is a living system, and will be updated as we continue to improve and evolve our design system.
+
+
+
+## Getting Started
+
+Here are a few helpful links for getting started with Committed Components:
+
+- [Getting Started](/?path=/docs/design-system-getting-started--page) Install and setup Components for your React app.
+- [Design Principles](/?path=/docs/design-system-design-principles--page) Learn about the principles for the design.
+- [Overview](/?path=/docs/design-system-overview) Get an overview of the main components in the system.
+- [Status](/?path=/docs/design-system-status--page) See the status of different components.
+
+## Motivation
+
+Design systems enable teams to build better products faster by making design reusable—reusability makes scale possible.
+This is the heart and primary value of design systems. A design system is a collection of reusable components, guided by
+clear standards, that can be assembled together to build any number of applications.
+
+Regardless of the technologies and tools chosen, we aim to follow these guiding principles:
+
+- **It’s consistent**. The way components are built and managed follows a predictable pattern.
+- **It’s reusable**. The components are built so they can be reused in many contexts, but not all.
+- **It’s accessible**. Applications built with Components are usable by as many people as possible, no matter how they access the web.
+- **It’s robust**. No matter the product or platform, it should perform with minimal bugs.
diff --git a/src/stories/overview.mdx b/src/stories/overview.mdx
deleted file mode 100644
index 1ba4449f..00000000
--- a/src/stories/overview.mdx
+++ /dev/null
@@ -1,785 +0,0 @@
-import { Meta, Story, Preview } from '@storybook/addon-docs/blocks'
-import { Background } from '../util'
-import commmitImage from '../../public/images/Avatar1-YellowTrans-32px.png'
-import {
- ThemeProvider,
- theme,
- colors,
- AppBar,
- Avatar,
- Badge,
- Box,
- Button,
- Brand,
- Card,
- CardHeader,
- CardContent,
- CardActionsArea,
- CardActions,
- CardMedia,
- Caption,
- Checkbox,
- Chip,
- Container,
- Divider,
- Display,
- Drawer,
- Flex,
- Form,
- FormControl,
- Heading,
- Hidden,
- IconButton,
- Icons,
- Link,
- Loader,
- Logo,
- Monospace,
- Popover,
- Radio,
- RadioGroup,
- Select,
- Slider,
- Switch,
- Table,
- TabPanel,
- Tooltip,
- Typography,
- TextField,
- Text,
- Span,
- Paragraph,
- Subheading,
- FormControlLabel,
- FormLabel,
- FormGroup,
- FormHelperText,
- Input,
- InputLabel,
- OutlinedInput,
- Menu,
- MenuItem,
- MenuList,
- Collapse,
- Dialog,
- DialogActions,
- DialogContent,
- DialogContentText,
- DialogTitle,
- List,
- ListItem,
- ListItemAvatar,
- ListItemIcon,
- ListItemSecondaryAction,
- ListItemText,
- ListSubheader,
- Tab,
- Tabs,
- TableBody,
- TableCell,
- TableFooter,
- TableHead,
- TablePagination,
- TableRow,
- TableSortLabel,
- Toolbar
-} from '../'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CF
-
-
- SH
-
-
-
-
-
-
-
-
-
-
-
-
- }
- label="Chip"
- onDelete={() => {}}
- />
-
- }
- label="Chip"
- onClick={() => {}}
- onDelete={() => {}}
- color="primary"
- />
- }
- label="Chip"
- onClick={() => {}}
- color="secondary"
- />
-
-
- {React.createElement(() => {
- const currencies = [
- {
- value: 'USD',
- label: '$'
- },
- {
- value: 'EUR',
- label: '€'
- },
- {
- value: 'BTC',
- label: '฿'
- },
- {
- value: 'JPY',
- label: '¥'
- }
- ]
- const [values, setValues] = React.useState({
- name: 'Cat in the Hat',
- age: '',
- multiline: 'Controlled',
- currency: 'EUR'
- })
- const handleChange = name => event =>
- setValues({ ...values, [name]: event.target.value })
- return (
-
- )
- })}
-
- {React.createElement(() => {
- const [checked, setChecked] = React.useState(true)
- return (
-
-
- setChecked(event.target.checked)}
- color="primary"
- />
- setChecked(!event.target.checked)}
- color="secondary"
- />
-
-
- setChecked(event.target.checked)}
- color="primary"
- />
- setChecked(!event.target.checked)}
- color="secondary"
- />
-
-
- setChecked(event.target.checked)}
- color="primary"
- />
- setChecked(!event.target.checked)}
- color="secondary"
- />
-
-
- )
- })}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {['18 June 2014', '20 July 2015', '3 January 2018'].map(
- (item, index) => (
-
-
-
-
-
-
-
-
-
-
-
- )
- )}
-
-
-
-
-
-
-
- Committed Card
-
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
- eiusmod tempor incididunt ut labore et dolore magna aliqua. Id nibh
- tortor id aliquet lectus. Feugiat nibh sed pulvinar proin gravida
- hendrerit lectus. Facilisis magna etiam tempor orci eu lobortis
- elementum.
-
-
-
-
-
-
-
-
- Card
-
-
-
- }
- checkedIcon={}
- />
-
- }
- checkedIcon={
-
- }
- />
-
-
-
-
-
-
-
-
- Title
-
- Subtitle
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-