# clad-ui

> Classified Ads group (Carousell, Chotot, Mudah, Onekyat) design system

Latest version **0.4.0** (published 2021-01-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install clad-ui
pnpm add clad-ui
yarn add clad-ui
bun add clad-ui
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2021-01-25 |
| First published | 2020-08-07 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 2 |
| Unpacked size | 331.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Chotot Engineers |
| Maintainers | trongthanh, chototoss |

## Links

- npm: https://www.npmjs.com/package/clad-ui
- Repository: https://git.chotot.org/chotot-web/clad-ui
- npm.io page: https://npm.io/package/clad-ui

## Dependencies (2)

- [@styled-system/css](https://npm.io/package/@styled-system/css.md) ^5.1.5
- [@types/styled-system__css](https://npm.io/package/@types/styled-system__css.md) 5.0.13

## Recent versions

- 0.4.0 (latest) — 2021-01-25
- 0.3.3 — 2021-01-20
- 0.1.2 — 2020-09-09
- 0.0.1 — 2020-08-07

## README

<img src="./banner.png" class="intro-banner" />

# Clad UI Design System

[![npm version](https://clad-ui.chotot.org/badges/npm.svg)](https://storybook.js.org/)
[![Linaria dependency version](https://clad-ui.chotot.org/badges/linaria.svg)](https://github.com/callstack/linaria)
[![Storybook dependency version](https://clad-ui.chotot.org/badges/storybook.svg)](https://storybook.js.org/)
[![Pipeline Status](https://git.chotot.org/chotot-web/clad-ui/badges/main/pipeline.svg)](https://git.chotot.org/chotot-web/clad-ui)

## Why the name clad-ui?

**Clad** is the short form of **cl**assified **ad**s, which is the main product of our group, besides, **clad** also mean “to be dressed or to be coated” (past participle of _clothe_).

## What Clad UI Design System is

- A unified solution for styling components for Chotot Web user-facing platforms
- A theme specifications that define primitive Clad UI design tokens
- A collection of reusable components from atomic inputs to composite components
- A workbench (a.k.a kitchen sink) to preview all available components and their usage guide
- A set of CLI tools to assist generate new components...

### What Clad UI Design System is NOT

- A base framework for doing Chotot web apps (refer to Next.js framework)
- An end user-facing web app
- Any full web page

## Colophon (A.K.A prerequisites to this design system)

Building components:

- 📚 [Storybook](https://storybook.js.org) for UI component development and [auto-generated docs](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a)
- ⚛️ [React](https://reactjs.org/) declarative component-centric UI. React is also our core UI library of Front End development
- 💅 [Linaria](https://linaria.now.sh//) which enable CSS-in-JS styling and extract all CSS to external CSS file.
- 📄 [System UI Theme Specification](https://system-ui.com/theme/) as a standard design token format with theme-aware [`css` props helper](https://styled-system.com/css)
- ⬇️ [MDX](https://mdxjs.com) (part of Storybook) for seamless React / JSX documentation

Maintaining the system:

- 🐟 [Babel](https://babeljs.io/) and [module resolver plugin](https://github.com/tleunen/babel-plugin-module-resolver) for transpiling modern JS and static theming
- 📦 [NPM](https://www.npmjs.com/) for packaging and distribution
- 🧶 [yarn](https://yarnpkg.com/) as package manager's CLI
- 🧪 [Jest](https://jestjs.io/) as test runner for unit testing
- 🐐 [react-testing-library](https://github.com/testing-library/react-testing-library) to assist unit testing React components
- 🚥 [Gitlab CI](https://docs.gitlab.com/ee/ci/): Continuous integration

TODO:

- ✅ [Chromatic](https://www.chromatic.com/) to prevent UI bugs in components (by Storybook maintainers)

## Getting started

Refer to `/docs/1.2-getting-started.stories.mdx` document.

## Frequently Asked Questions

#### 1. Does this design system work with `create-react-app`?

_Partially_ Yes. Since our solution introduce a custom Babel plugin and Webpack loader, it's not possible to use `clad-ui` with non-configurable `react-scripts`. You have to eject `react-scripts` to be able to customize Babel and webpack config.

## Technical Debts

#### 1. Storybook addon-docs parse and execute ${...} placeholders in code blocks that use styled component tagged template

Because of this, example of `styled` and `css` usage in Markdown code fence will be transpiled to special variables. So to work around temporary, we'll use a special ＄ (U+FF04) character at tagged template string's placeholders.

Refer to StoryBook issue [#10011](https://github.com/storybookjs/storybook/issues/10011)

#### 2. Linaria lack an object serializer that assist snapshot testing.

Currently, snapshots contains only rendered HTML and hashed class names. Ideally, snapshots should contain rendered HTML and associated CSS combined as component's signature.

[Github issue to keep track](https://github.com/callstack/linaria/issues/633)

---

**© 2020 Chotot.vn. Apache-2.0 license**.

---
_Source: https://npm.io/package/clad-ui · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
