import { Meta, ColorItem, ColorPalette, Title, Typeset } from '@storybook/blocks'; import colors from '../../stylesheets/foundations/tokens/colors.json'; import typography from '../../stylesheets/foundations/tokens/typography.json'; import borderRadius from '../../stylesheets/foundations/tokens/borderRadius.json'; import spacing from '../../stylesheets/foundations/tokens/spacing.json'; # Foundations Foundations in UX design are the basic rules and core elements, like colors, fonts, and spacing, that ensure consistency across the design.

These palettes are generated from our token files. The tokens were exported from Figma and split into separate files to categorise: Token files on GitHub

**Table of Contents** - [Primitive colors](#primitive-colors) - [Background colors](#background-colors) - [Content colors](#content-colors) - [Border colors](#border-colors) - [Link colors](#link-colors) - [Special colors](#special-colors) - [Font weight](#font-weight) - [Font size](#font-size) - [Border radius](#border-radius) - [Spacing](#spacing) # Colors
## Primitive colors {Object.entries(colors.PrimitiveColor).map(([name, color]) => ( ))} ## Background colors Colors used for page and component backgrounds. {Object.entries(colors) .filter(([name]) => name.startsWith('bg-')) .map(([name, colors]) => ( ))} ## Content colors Colors used for text and icons. {Object.entries(colors) .filter(([name]) => name.startsWith('content-')) .map(([name, colors]) => ( ))} ## Border colors Colors used for borders and dividers. {Object.entries(colors) .filter(([name]) => name.startsWith('border-')) .map(([name, colors]) => ( ))} ## Link colors Colors used for hyperlink states. {Object.entries(colors) .filter(([name]) => name.startsWith('link-')) .map(([name, colors]) => ( ))} ## Special colors Colors used for specific UI elements like color pickers. {Object.entries(colors) .filter(([name]) => name.startsWith('special-')) .map(([name, colors]) => ( ))} # Typography
## Font weight
{Object.entries(typography.Fontweight).map(([name, typography]) => (
{name}
))} ## Font size
{Object.entries(typography['Fontsize']).map(([name, typography]) => { const mixins = typography.$mixin ? [].concat(typography.$mixin) : []; return (
{name} {mixins.map(mixin => ( / @mixin {mixin} ))}
); })} ## Border radius
{Object.entries(borderRadius['BorderRadius']).map(([name, borderRadius]) => ( ))}
Variable name Value Example
{name} {borderRadius.$value}px
## Spacing
{Object.entries(spacing.Spacing) .filter(([, spacing]) => spacing.$value > 0) .map(([name, spacing]) => ( ))}
Variable Name Value Example
{name} {spacing.$value}px