feat(SW-375): new tokens

new asset generation logic

BREAKING CHANGE: New tokens.
This commit is contained in:
Michael Zetterberg
2025-01-20 14:46:25 +01:00
parent 7ce2ee2922
commit 56973888c9
189 changed files with 34368 additions and 10344 deletions

View File

@@ -0,0 +1,35 @@
import { Meta } from '@storybook/blocks'
<Meta title="Introduction" />
# Scandic Hotels design system ✨
## Components
### File structure
```
[Component]
├── Compositions/ # A folder with Storybook stories to showcase compositions with other components
├──── [CompositionX].stories.tsx # Storybook stories that showcase component compositions
├── [component].module.css # The CSS for the component
├── [Component].stories.tsx # Storybook stories for the component, without compositions
├── [Component].tsx # The main component file
├── index.tsx # Entrypoint for the component exports
├── types.ts # TypeScript typings for the component
└── variants.ts # Class Variance Authority configuration for variants of the component
```
### Components
Each component of the design system is defined in `lib/components`.
Each component has an `index.tsx` file that exports the component and its optional subcomponents. Subcomponents are components that are meant to be used together/nested with the component.
The components that are considered public API from a consumer standpoint **must** have Storybook stories that showcases and documents their use. It should at least contain one default story that showcases the component by itself in its default state. More stories are added to showcase other variants or usages of the component.
Styling is done with CSS modules.
Variants are implemented with [Class Variance Authority](https://cva.style/).
The typings for each components live in their respective `types.ts` file inside the component folder.