-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ba3b630
Showing
49 changed files
with
9,432 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* eslint-env node */ | ||
require('@rushstack/eslint-patch/modern-module-resolution') | ||
|
||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'plugin:vue/vue3-essential', | ||
'eslint:recommended', | ||
'@vue/eslint-config-typescript', | ||
'@vue/eslint-config-prettier/skip-formatting', | ||
'plugin:storybook/recommended' | ||
], | ||
env: { | ||
node: true | ||
}, | ||
|
||
parserOptions: { | ||
ecmaVersion: 'latest' | ||
}, | ||
rules: { | ||
// TODO: decide if we want to use this custom rule | ||
'vue/multi-word-component-names': 'off' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: 2 | ||
updates: | ||
# Fetch and update latest `npm` packages | ||
- package-ecosystem: npm | ||
directory: '/' | ||
schedule: | ||
interval: weekly | ||
# Fetch and update latest `github-actions` pkgs | ||
- package-ecosystem: github-actions | ||
directory: '/' | ||
schedule: | ||
interval: weekly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
cache-and-install: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Run linter | ||
run: pnpm lint | ||
|
||
- name: Run formatter | ||
run: pnpm format | ||
|
||
- name: Run unit tests | ||
run: pnpm test:unit | ||
|
||
- name: Run build | ||
run: pnpm build | ||
|
||
- name: Run build storybook | ||
run: pnpm build-storybook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
.DS_Store | ||
dist | ||
dist-ssr | ||
coverage | ||
*.local | ||
|
||
/cypress/videos/ | ||
/cypress/screenshots/ | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
*.tsbuildinfo | ||
|
||
storybook-static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/prettierrc", | ||
"semi": false, | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"printWidth": 100, | ||
"trailingComma": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import type { StorybookConfig } from '@storybook/vue3-vite' | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@storybook/addon-onboarding', | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@chromatic-com/storybook', | ||
'@storybook/addon-interactions' | ||
], | ||
framework: { | ||
name: '@storybook/vue3-vite', | ||
options: {} | ||
} | ||
} | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import type { Preview } from '@storybook/vue3' | ||
import '../src/assets/main.css' | ||
import '../src/assets/colors.scss' | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i | ||
} | ||
}, | ||
backgrounds: { | ||
default: '', | ||
values: [ | ||
{ | ||
name: 'white', | ||
value: '#fff' | ||
}, | ||
{ | ||
name: 'grey', | ||
value: '#707070' | ||
}, | ||
{ | ||
name: 'blue', | ||
value: '#00e2ed' | ||
} | ||
] | ||
} | ||
} | ||
} | ||
|
||
export default preview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["Vue.volar", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# wit-vue-ui | ||
|
||
wit-vue-ui is a vue component library with components intented to use in the witnet ecosystem. | ||
|
||
## Installation | ||
|
||
|
||
```bash | ||
pnpm install wit-vue-ui | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
# main.ts | ||
|
||
import { createApp } from "vue"; | ||
import App from "./App.vue"; | ||
|
||
import WitVueUi from "wit-vue-ui"; | ||
|
||
createApp(App) | ||
.use(WitVueUi) | ||
.mount("#app"); | ||
``` | ||
|
||
## Contributing | ||
|
||
Pull requests are welcome. For major changes, please open an issue first | ||
to discuss what you would like to change. | ||
|
||
Please make sure to update tests as appropriate. | ||
|
||
## License | ||
|
||
[MIT](https://choosealicense.com/licenses/mit/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="vite/client" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
{ | ||
"name": "wit-vue-ui", | ||
"version": "0.0.1", | ||
"private": false, | ||
"type": "module", | ||
"types": "dist/index.d.ts", | ||
"main": "dist/wit-vue-ui.umd.js", | ||
"module": "dist/wit-vue-ui.es.js", | ||
"exports": { | ||
".": { | ||
"import": "./dist/wit-vue-ui.es.js", | ||
"require": "./dist/wit-vue-ui.umd.js", | ||
"types": "./dist/index.d.ts" | ||
}, | ||
"./style.css": "./dist/style.css" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "run-p type-check \"build-only {@}\" --", | ||
"preview": "vite preview", | ||
"test:unit": "vitest", | ||
"build-only": "vite build", | ||
"type-check": "vue-tsc --build --force", | ||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore", | ||
"format": "prettier --write src/", | ||
"storybook": "storybook dev -p 6006", | ||
"build-storybook": "storybook build" | ||
}, | ||
"dependencies": { | ||
"gsap": "^3.12.5", | ||
"postcss-cli": "^11.0.0", | ||
"sass": "^1.77.8", | ||
"vue": "^3.4.38" | ||
}, | ||
"devDependencies": { | ||
"@chromatic-com/storybook": "^1.6.1", | ||
"@rushstack/eslint-patch": "^1.8.0", | ||
"@storybook/addon-essentials": "^8.2.9", | ||
"@storybook/addon-interactions": "^8.2.9", | ||
"@storybook/addon-links": "^8.2.9", | ||
"@storybook/addon-onboarding": "^8.2.9", | ||
"@storybook/blocks": "^8.2.9", | ||
"@storybook/test": "^8.2.9", | ||
"@storybook/vue3": "^8.2.9", | ||
"@storybook/vue3-vite": "^8.2.9", | ||
"@tsconfig/node20": "^20.1.4", | ||
"@types/jsdom": "^21.1.7", | ||
"@types/node": "^20.14.5", | ||
"@vitejs/plugin-vue": "^5.0.5", | ||
"@vue/eslint-config-prettier": "^9.0.0", | ||
"@vue/eslint-config-typescript": "^13.0.0", | ||
"@vue/test-utils": "^2.4.6", | ||
"@vue/tsconfig": "^0.5.1", | ||
"autoprefixer": "^10.4.20", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-storybook": "^0.8.0", | ||
"eslint-plugin-vue": "^9.23.0", | ||
"jsdom": "^24.1.0", | ||
"npm-run-all2": "^6.2.0", | ||
"postcss": "^8.4.41", | ||
"prettier": "^3.2.5", | ||
"storybook": "^8.2.9", | ||
"tailwindcss": "^3.4.10", | ||
"typescript": "~5.4.0", | ||
"vite": "^5.4.2", | ||
"vitest": "^1.6.0", | ||
"vue-tsc": "^2.0.21" | ||
} | ||
} |
Oops, something went wrong.