@asantemedia-org/leybold-design-system
v1.0.10
Published
Design system for Leybold
Downloads
943
Readme
Leybold Design System
A comprehensive design system for Leybold, built with React, TypeScript, Storybook, and Next.js.
Getting Started
Prerequisites
- Node.js (v18 or higher)
- npm or yarn
Installation
- Clone the repository
- Install dependencies:
npm installDevelopment
Run Storybook
To start the Storybook development server:
npm run storybookThis will open Storybook at http://localhost:6006
Run Next.js Development Server
npm run devThis will start the Next.js development server at http://localhost:3000
Building
Build Storybook
npm run build-storybookBuild Next.js Application
npm run buildBuild NPM Package
npm run build:npmPublishing to npm
Publishing requires an npm access token with publish permissions for the @asantemedia-org organization.
Setup Access Token
- Generate an access token at npmjs.com → Access Tokens
- Configure the token:
npm config set //registry.npmjs.org/:_authToken YOUR_ACCESS_TOKENPublish
npm run build:npm
npm run publish:npmOr to bump version and publish in one step:
npm run build:npm
npm version patch # or minor/major
npm publish --access publicProject Structure
leybold-storybook/
├── .storybook/ # Storybook configuration
├── public/ # Static assets
│ ├── fonts/ # Custom fonts
│ └── assets/ # Images and other assets
├── src/
│ ├── app/ # Next.js app directory
│ ├── stories/ # Storybook stories
│ │ ├── introduction/ # Introduction pages
│ │ ├── foundation/ # Design foundations (colors, typography, etc.)
│ │ ├── atoms/ # Atomic components
│ │ ├── components/ # Component stories
│ │ ├── experiences/ # Complex component compositions
│ │ └── templates/ # Page templates
│ └── utils/ # Utility functions and styles
│ └── styles/ # Global styles and SCSS utilities
├── types/ # TypeScript type definitions
├── dist/ # Build output
└── package.json
Scripts
npm run dev- Start Next.js development servernpm run build- Build Next.js applicationnpm run start- Start production Next.js servernpm run lint- Run ESLintnpm run storybook- Start Storybook development servernpm run build-storybook- Build Storybook for productionnpm run build:npm- Build package for npm distributionnpm run publish:npm- Publish package to npm
Technologies Used
- React 18.2.0 - UI library
- TypeScript 5.0.4 - Type safety
- Next.js 13.3.0 - React framework
- Storybook 7.0.4 - Component development and documentation
- Tailwind CSS 3.3.1 - Utility-first CSS framework
- SCSS/Sass - CSS preprocessing
- Rollup - Module bundler for npm package
Contributing
- Create a new branch for your feature/fix
- Make your changes
- Write/update tests and stories
- Submit a pull request
License
UNLICENSED - This is proprietary software for Atlas Copco/Leybold.
Design System Organization
The design system follows the Atomic Design methodology:
- Introduction - Overview and getting started guides
- Foundation - Design tokens (colors, typography, spacing, etc.)
- Atoms - Basic building blocks (buttons, inputs, etc.)
- Components - Composite components
- Experiences - Complex patterns and page sections
- Templates - Complete page layouts
Each component should include:
- Component implementation
- Storybook stories with different variants
- Documentation
- TypeScript types
- SCSS modules for styling
