Awesome
<h1 align="center">Kalo UI</h1> <p align="center">Design system for building user interfaces at Kalo.</p> <p align="center"> <img src="https://img.shields.io/npm/v/@kalo/ui.svg"> <a href="https://codecov.io/gh/kalohq/ui"> <img src="https://codecov.io/gh/kalohq/ui/branch/master/graph/badge.svg?token=UMKMabKV8s"> </a> </p>Welcome to Kalo UI.
This repo contains the source code for the design system, as well as the source for the documentation site that powers kalo.design The purpose of Kalo UI is to provide a UI kit of components to be used across all Kalo products, regardless of the technologies they are implememnted with. It should be our equivalent to Material, containing components, icons, design tokens and other tools required on Kalo products.
Getting started
The documentation site (kalo.design) are built using GatsbyJS and live in site/
.
To run the docs locally:
npm install
in the root of UIcd site
- this is where the docs live.npm install
(you will also need tonpm install
in the root UI directory).npm run start
- And you should be up and running at localhost:8000
Documentation
For full documentation on how to use @kalo/ui, please refer to the documentation site: KDS Documentation
- Common workflows
- Releasing
Common workflows
Adding a new icon
The raw SVG files are stored in src/icons/svg
. These are then converted in to symbols which are imported in to Kalo Frontend.
To add a new icon, follow these steps:
- Run the SVG through SVGO
- Add the SVG file to
src/icons/svg
. - Run
npm run generate:icons
to generate a new IconSymbols file. - Add the new icon to the ICON Enum in
src/components/icon/constants.js
.
Adding a new design token
Design tokens make up the core of our design system. They are shipped in several formats (including JSON, JS, CSS Custom Variables, and SCSS Variables). The source files are in config/design-tokens
.
To add a new design token:
- Add the token name and value to the appropriate file in
config/design-tokens
. - Then run
npm run generate:tokens
.
Releasing
-
Ensure you have been added to the
@kalo
NPM team.If you're not sure, you can ask in #frontend-cohort.
-
Once your changes have been merged in to master, checkout master and pull the latest.
-
Run
npm run release
.This will open an interactive cli, which will let you select the type of version that you're releasing.
Here's a rough guidance to the types of version:
patch
- Isolated bug fixes.minor
- An internal backwards-compatible changemajor
- A breaking change has been introduced.
-
Your change has been published 🎉. Remember to let the rest of the team know!