1.0.5 β€’ Published 5 months ago

@connexion-mobility-ltd/component-ui-library v1.0.5

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

UI Shared Library

This repository contains a shared UI component library built using React and Vite, designed for reuse across multiple applications. The goal is to provide a consistent, easily maintainable, and scalable design system that accelerates development and ensures visual consistency across products.

✨ Features

  • βš›οΈ React with fast refresh and HMR (Hot Module Replacement) via Vite
  • 🧱 Prebuilt shared components following the Connexion Design System
  • 🎨 Figma design integration for accurate visual matching
  • πŸ“¦ Ready to publish as an npm package (optional)
  • 🧹 Code linting with ESLint
  • πŸ“š Component documentation and previews via Storybook

πŸ“ Folder Structure

ui-shared-library/
β”œβ”€β”€ .storybook/         # Storybook configuration
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/     # Shared UI components
β”‚   β”œβ”€β”€ hooks/          # Reusable custom React hooks (optional)
β”‚   └── index.ts        # Export components for consumption
β”œβ”€β”€ public/             # Static assets
β”œβ”€β”€ vite.config.ts      # Vite configuration
β”œβ”€β”€ tsconfig.json       # TypeScript configuration
β”œβ”€β”€ .eslintrc.js        # ESLint rules
└── package.json

🎨 Design Reference

All components follow the design guidelines provided in the Connexion Design System. For reference, please consult the Figma file linked below:

πŸ‘‰ Figma File

πŸš€ Getting Started

1. Install dependencies

npm install

2. Run Storybook (Component Previews)

Storybook is used to develop and showcase individual components in isolation.

npm run storybook

Storybook will be available at http://localhost:6006 by default.

3. Build the library

To generate a bundled version of the library for distribution:

npm run build

4. Lint your code

To run ESLint:

npm run lint

πŸ“¦ Publishing (Optional)

To publish your library as a package to npm:

  1. Ensure your components are exported via src/index.ts
  2. Build the library:
    npm run build
  3. Login and publish:
    npm login
    npm publish

πŸ” Consider setting "private": true in package.json if you don’t want it published.

πŸ§‘β€πŸ’» Tech Stack

  • React
  • TypeScript
  • Vite
  • Storybook
  • ESLint
  • Figma (for design specs)

πŸ“¬ Contributing

  1. Fork the repo
  2. Create your feature branch: git checkout -b feat/my-new-component
  3. Commit your changes: git commit -m "Add new component"
  4. Push to the branch: git push origin feat/my-new-component
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License.