Skip to content

Commit 56cd65e

Browse files
committed
Add bulk of components and stories.
1 parent 9c06e8d commit 56cd65e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+31428
-2408
lines changed

.github/workflows/release.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release library
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Install NPM dependencies
15+
run: npm ci
16+
17+
- name: Test with Jest
18+
run: npm run test
19+
20+
- name: Build library
21+
run: npm run build
22+
23+
- name: Build storybook
24+
run: npm run build-storybook
25+
26+
- name: Publish storybook build to github pages
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: npx semantic-release
30+
31+
- name: Publish library to github packages
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
run: npx semantic-release

.github/workflows/test.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Test library
2+
on:
3+
pull_request:
4+
branches:
5+
- "main"
6+
paths:
7+
- src/**
8+
jobs:
9+
build_and_test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Install NPM dependencies
16+
run: npm ci
17+
18+
- name: Test with Jest
19+
run: npm run test
20+
21+
- name: Build library
22+
run: npm run build

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
node_modules
2+
build
3+
storybook.log

.storybook/main.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const config = {
2+
stories: ["../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
3+
addons: [
4+
"@storybook/addon-links",
5+
"@storybook/addon-essentials",
6+
"@storybook/addon-onboarding",
7+
"@storybook/addon-interactions",
8+
],
9+
framework: {
10+
name: "@storybook/react-vite",
11+
options: {},
12+
},
13+
docs: {
14+
autodocs: "tag",
15+
},
16+
};
17+
export default config;

.storybook/preview.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import "../src/styles.css";
2+
const preview = {
3+
parameters: {
4+
actions: { argTypesRegex: "^on[A-Z].*" },
5+
controls: {
6+
matchers: {
7+
color: /(background|color)$/i,
8+
date: /Date$/i,
9+
},
10+
},
11+
},
12+
};
13+
14+
export default preview;

README.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,23 @@
11
# quantinuum-ui
2-
Quantinuum design tokens.
2+
Quantinuum design tokens and React components.
3+
4+
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`.
5+
6+
Run storybook and tailwind compiler in watch mode
7+
```bash
8+
npm run dev
9+
```
10+
11+
Run jest unit tests
12+
```
13+
npm run test
14+
```
15+
16+
Build library with rollup
17+
```bash
18+
npm run build
19+
```
20+
21+
22+
23+

components.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "src/tailwind.config.ts",
8+
"css": "src/globals.css",
9+
"baseColor": "zinc",
10+
"cssVariables": true
11+
},
12+
"aliases": {
13+
"components": "src/components",
14+
"utils": "src/utils"
15+
}
16+
}

demo/.gitignore

-1
This file was deleted.

demo/index.html

-75
This file was deleted.

demo/input.css

-3
This file was deleted.

demo/tailwind.config.ts

-6
This file was deleted.

0 commit comments

Comments
 (0)