import { Meta, Source } from '@storybook/blocks'; import { Heading } from '@components'; import { colors } from '@components/theme'; import { Grid, FlexGrid, ColorCard, CopyButton, Seperator } from './mdx-components'; import borderSource from '@components/theme/foundations/borders?raw'; import colorsSource from '@components/theme/foundations/colors?raw'; import typographySource from '@components/theme/foundations/typography?raw'; import radiusSource from '@components/theme/foundations/radius?raw'; import shadowsSource from '@components/theme/foundations/shadows?raw'; import sizesSource from '@components/theme/foundations/sizes?raw'; import spacingSource from '@components/theme/foundations/spacing?raw'; import transitionSource from '@components/theme/foundations/transition?raw'; import zIndexSource from '@components/theme/foundations/zIndex?raw';
## Style Guide The purpose of this Style Guide is to establish a unified and cohesive design language that ensures a consistent user experience across all Acryl products. By adhering to these guidelines, we can maintain a high standard of design quality and improve the usability of our applications. ### Theme You can import the theme object into any component or file in your application and use it to style your components. The theme object is a single source of truth for your application's design system. ```tsx import { typography, colors, spacing } from '@components/theme'; ``` ### Colors Colors are managed via the `colors.ts` file in the `theme/foundations` directory. The colors are defined as a nested object with the following structure: By default, all `500` values are considered the "default" value of that color range. For example, `gray.500` is the default gray color. The other values are used for shading and highlighting. Color values are defined in hex format and their values range between 25 and 1000. With 25 being the lighest and 1000 being the darkest. #### Black & White
Black {colors['black']}
White {colors['white']}
#### Gray {Object.keys(colors.gray).map((color) => (
Gray {color} {colors['gray'][color]}
))}
#### Violet (Primary) {Object.keys(colors.violet).map((color) => (
Violet {color} {colors['violet'][color]}
))}
#### Blue {Object.keys(colors.blue).map((color) => (
Blue {color} {colors['blue'][color]}
))}
#### Green {Object.keys(colors.green).map((color) => (
Green {color} {colors['green'][color]}
))}
#### Yellow {Object.keys(colors.yellow).map((color) => (
Yellow {color} {colors['yellow'][color]}
))}
#### Red {Object.keys(colors.red).map((color) => (
Red {color} {colors['red'][color]}
))}
### Typography Font styles are managed via the `typography.ts` file in the `theme/foundations` directory. The primary font family in use is `Mulish`. The font styles are defined as a nested object with the following structure: ### Borders A set of border values defined by the border key. ### Border Radius A set smooth corner radius values defined by the radii key. ### Shadows A set of shadow values defined by the shadows key. ## Sizes A set of size values defined by the sizes key. ### Spacing A set of spacing values defined by the spacing key. ### Transitions A set of transition values defined by the transition key. ### Z-Index A set of z-index values defined by the zindex key.