-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
johancs.mm@gmail.com
committed
May 3, 2024
1 parent
64665bd
commit 34c2ae6
Showing
39 changed files
with
861 additions
and
13 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 |
---|---|---|
|
@@ -4,4 +4,5 @@ export default eslint({ | |
formatters: true, | ||
markdown: true, | ||
typescript: true, | ||
vue: true, | ||
}) |
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
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,6 @@ | ||
* | ||
!package.json | ||
!dist/**/* | ||
!CHANGELOG.md | ||
!README.md | ||
!LICENSE |
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,22 @@ | ||
<script setup lang="ts"> | ||
import { button, cn } from '@openui-org/theme' | ||
interface Props { | ||
variant?: NonNullable<Parameters<typeof button>[0]>['variant'] | ||
size?: NonNullable<Parameters<typeof button>[0]>['size'] | ||
as?: string | ||
} | ||
withDefaults(defineProps<Props>(), { | ||
as: 'button', | ||
}) | ||
</script> | ||
|
||
<template> | ||
<component | ||
:is="as" | ||
:class="cn(button({ variant, size }), $attrs.class ?? '')" | ||
> | ||
<slot /> | ||
</component> | ||
</template> |
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 @@ | ||
export { default as Button } from './button.vue' |
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 @@ | ||
export * from './button' |
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 |
---|---|---|
@@ -1,12 +1,38 @@ | ||
{ | ||
"name": "@openui-org/vue", | ||
"version": "1.0.0", | ||
"description": "", | ||
"author": "", | ||
"license": "ISC", | ||
"keywords": [], | ||
"main": "index.js", | ||
"type": "module", | ||
"version": "0.1.0", | ||
"description": "Open UI. OpenLand's official framework design system 🎨", | ||
"author": "Open Lab", | ||
"license": "MIT", | ||
"homepage": "https://github.com/open-land/openui#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/open-land/openui.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/open-land/openui/issues" | ||
}, | ||
"keywords": [ | ||
"ui", | ||
"design system", | ||
"open" | ||
], | ||
"sideEffects": false, | ||
"main": "./dist/index.es.js", | ||
"module": "./dist/index.es.js", | ||
"types": "./dist/types/index.d.ts", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"build": "vue-tsc && vite build", | ||
"clean": "rm -rf .turbo node_modules dist" | ||
}, | ||
"dependencies": { | ||
"@openui-org/theme": "workspace:*", | ||
"vue": "^3.4.26" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-vue": "^5.0.4", | ||
"vite": "^4.4.7", | ||
"vue-tsc": "^2.0.16" | ||
} | ||
} |
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,34 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"jsx": "preserve", | ||
"lib": ["ES2020", "DOM", "DOM.Iterable"], | ||
"useDefineForClassFields": true, | ||
|
||
"baseUrl": ".", | ||
"module": "ESNext", | ||
|
||
/* Bundler mode */ | ||
"moduleResolution": "bundler", | ||
"paths": { | ||
"~/*": ["src/*"] | ||
}, | ||
"resolveJsonModule": true, | ||
"allowImportingTsExtensions": true, | ||
|
||
/* Linting */ | ||
"strict": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
|
||
/* Build Declaration */ | ||
"declaration": true, | ||
"declarationDir": "./dist/types", | ||
"emitDeclarationOnly": true, | ||
"isolatedModules": true, | ||
"skipLibCheck": true | ||
}, | ||
"references": [{ "path": "./tsconfig.node.json" }], | ||
"include": ["*.ts", "*.tsx", "*.vue"] | ||
} |
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,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"composite": true, | ||
"module": "ESNext", | ||
"moduleResolution": "bundler", | ||
"allowSyntheticDefaultImports": true, | ||
"skipLibCheck": true | ||
}, | ||
"include": ["vite.config.ts"] | ||
} |
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 @@ | ||
import { defineConfig } from 'vite' | ||
import vue from '@vitejs/plugin-vue' | ||
|
||
export default defineConfig({ | ||
plugins: [vue()], | ||
build: { | ||
lib: { | ||
name: 'vue', | ||
entry: './index.ts', | ||
formats: ['es'], | ||
fileName(entryName) { | ||
return `index.${entryName}.js` | ||
}, | ||
}, | ||
rollupOptions: { | ||
external: ['vue'], | ||
output: { | ||
exports: 'named', | ||
globals: { vue: 'Vue' }, | ||
}, | ||
}, | ||
emptyOutDir: false, | ||
}, | ||
}) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
packages/utilities/playground/package.json → .../utilities/playground/nextjs/package.json
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
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
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 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
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,9 @@ | ||
# Vue 3 + TypeScript + Vite | ||
|
||
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more. | ||
|
||
## Recommended Setup | ||
|
||
- [VS Code](https://code.visualstudio.com/) + [Vue - Official](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (previously Volar) and disable Vetur | ||
|
||
- Use [vue-tsc](https://github.com/vuejs/language-tools/tree/master/packages/tsc) for performing the same type checking from the command line, or for generating d.ts files for SFCs. |
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" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + Vue + TS</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,25 @@ | ||
{ | ||
"name": "@openui-org/playground-vue", | ||
"type": "module", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vue-tsc && vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@openui-org/theme": "workspace:*", | ||
"@openui-org/vue": "workspace:*", | ||
"vue": "^3.4.21" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-vue": "^5.0.4", | ||
"autoprefixer": "10.4.19", | ||
"postcss": "8.4.38", | ||
"tailwindcss": "3.4.3", | ||
"typescript": "^5.2.2", | ||
"vite": "^5.2.0", | ||
"vue-tsc": "^2.0.6" | ||
} | ||
} |
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,6 @@ | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,34 @@ | ||
<script setup lang="ts"> | ||
import { Button } from '@openui-org/vue' | ||
import HelloWorld from './components/HelloWorld.vue' | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<a href="https://vitejs.dev" target="_blank"> | ||
<img src="/vite.svg" class="logo" alt="Vite logo"> | ||
</a> | ||
<a href="https://vuejs.org/" target="_blank"> | ||
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo"> | ||
</a> | ||
</div> | ||
<HelloWorld msg="Vite + Vue" /> | ||
<Button> | ||
Hello vue | ||
</Button> | ||
</template> | ||
|
||
<style scoped> | ||
.logo { | ||
height: 6em; | ||
padding: 1.5em; | ||
will-change: filter; | ||
transition: filter 300ms; | ||
} | ||
.logo:hover { | ||
filter: drop-shadow(0 0 2em #646cffaa); | ||
} | ||
.logo.vue:hover { | ||
filter: drop-shadow(0 0 2em #42b883aa); | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions
40
packages/utilities/playground/vue/src/components/HelloWorld.vue
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,40 @@ | ||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
defineProps<{ msg: string }>() | ||
const count = ref(0) | ||
</script> | ||
|
||
<template> | ||
<h1>{{ msg }}</h1> | ||
|
||
<div class="card"> | ||
<button type="button" @click="count++"> | ||
count is {{ count }} | ||
</button> | ||
<p> | ||
Edit | ||
<code>components/HelloWorld.vue</code> to test HMR | ||
</p> | ||
</div> | ||
|
||
<p> | ||
Check out | ||
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank">create-vue</a>, the official Vue + Vite starter | ||
</p> | ||
<p> | ||
Install | ||
<a href="https://github.com/vuejs/language-tools" target="_blank">Volar</a> | ||
in your IDE for a better DX | ||
</p> | ||
<p class="read-the-docs"> | ||
Click on the Vite and Vue logos to learn more | ||
</p> | ||
</template> | ||
|
||
<style scoped> | ||
.read-the-docs { | ||
color: #888; | ||
} | ||
</style> |
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,5 @@ | ||
import { createApp } from 'vue' | ||
import './style.css' | ||
import App from './App.vue' | ||
|
||
createApp(App).mount('#app') |
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 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
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,25 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"jsx": "preserve", | ||
"lib": ["ES2020", "DOM", "DOM.Iterable"], | ||
"useDefineForClassFields": true, | ||
"module": "ESNext", | ||
|
||
/* Bundler mode */ | ||
"moduleResolution": "bundler", | ||
"resolveJsonModule": true, | ||
"allowImportingTsExtensions": true, | ||
|
||
/* Linting */ | ||
"strict": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noEmit": true, | ||
"isolatedModules": true, | ||
"skipLibCheck": true | ||
}, | ||
"references": [{ "path": "./tsconfig.node.json" }], | ||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] | ||
} |
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,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"composite": true, | ||
"module": "ESNext", | ||
"moduleResolution": "bundler", | ||
"strict": true, | ||
"allowSyntheticDefaultImports": true, | ||
"skipLibCheck": true | ||
}, | ||
"include": ["vite.config.ts"] | ||
} |
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,7 @@ | ||
import { defineConfig } from 'vite' | ||
import vue from '@vitejs/plugin-vue' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [vue()], | ||
}) |
Oops, something went wrong.