Skip to content

Commit

Permalink
Add bulk of components and stories.
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanCQ committed Dec 17, 2023
1 parent 9c06e8d commit 56cd65e
Show file tree
Hide file tree
Showing 86 changed files with 31,428 additions and 2,408 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release library
on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install NPM dependencies
run: npm ci

- name: Test with Jest
run: npm run test

- name: Build library
run: npm run build

- name: Build storybook
run: npm run build-storybook

- name: Publish storybook build to github pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release

- name: Publish library to github packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test library
on:
pull_request:
branches:
- "main"
paths:
- src/**
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install NPM dependencies
run: npm ci

- name: Test with Jest
run: npm run test

- name: Build library
run: npm run build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
build
storybook.log
17 changes: 17 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const config = {
stories: ["../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-onboarding",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: "tag",
},
};
export default config;
14 changes: 14 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import "../src/styles.css";
const preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# quantinuum-ui
Quantinuum design tokens.
Quantinuum design tokens and React components.

Based on [shadcn](https://ui.shadcn.com/), an opinionated tailwind / radix-ui theme. Shadcn isn't a direct dependency but has a CLI tool to generate components into this repo based on `components.json`.

Run storybook and tailwind compiler in watch mode
```bash
npm run dev
```

Run jest unit tests
```
npm run test
```

Build library with rollup
```bash
npm run build
```




16 changes: 16 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"tailwind": {
"config": "src/tailwind.config.ts",
"css": "src/globals.css",
"baseColor": "zinc",
"cssVariables": true
},
"aliases": {
"components": "src/components",
"utils": "src/utils"
}
}
1 change: 0 additions & 1 deletion demo/.gitignore

This file was deleted.

75 changes: 0 additions & 75 deletions demo/index.html

This file was deleted.

3 changes: 0 additions & 3 deletions demo/input.css

This file was deleted.

6 changes: 0 additions & 6 deletions demo/tailwind.config.ts

This file was deleted.

Loading

0 comments on commit 56cd65e

Please sign in to comment.