diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 00000000..8992a98c --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,68 @@ +name: Publish www + +on: + push: + paths: + - 'apps/www/**' + pull_request: + paths: + - 'apps/www/**' + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + deployments: write + name: Publish to Cloudflare Pages + steps: + - name: Checkout + uses: actions/checkout@v3 + + # Run a build step here + - name: Setup Node.js environment + uses: actions/setup-node@v2 + with: + node-version: 18 + + - uses: pnpm/action-setup@v2 + 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@v3 + 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 i --frozen-lockfile + + - name: Build www + run: pnpm build + + # Run a action to publish docs + - name: Publish to Cloudflare Pages + uses: cloudflare/pages-action@v1.5.0 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: shadcn-vue + directory: .vitepress/dist + # Optional: Enable this if you want to have GitHub Deployments triggered + gitHubToken: ${{ secrets.GITHUB_TOKEN }} + # Optional: Switch what branch you are publishing to. + # By default this will be the branch which triggered this workflow + # branch: main + # Optional: Change the working directory + workingDirectory: apps/www + wranglerVersion: '3' diff --git a/README.md b/README.md index 7b3df7f3..e8ee038e 100644 --- a/README.md +++ b/README.md @@ -15,19 +15,19 @@ Accessible and customizable components that you can copy and paste into your app ## Documentation -Visit https://shadcn-vue.com/docs to view the documentation. +[View documentation here](https://www.shadcn-vue.com/docs/introduction.html) ## Credits All credits go to these open-source works and resources -- [Shadnc UI](https://ui.shadcn.com) for creating this beautiful project -- [Shadnc Svelte](https://shadcn-svelte.com) for some inspiration for registry -- [Radix Vue](https://radix-vue.com) for doing all the hard work to make sure components are accessible +- [Shadcn UI](https://ui.shadcn.com) for creating this beautiful project. +- [Shadcn Svelte](https://shadcn-svelte.com) for some inspiration for registry. +- [Radix Vue](https://radix-vue.com) for doing all the hard work to make sure components are accessible. - [VueUse](https://vueuse.org) for providing many useful utilities. - [ahmedmayara](https://github.com/ahmedmayara/shadcn-vue) for populating many components ## License -Licensed under the [MIT license](https://github.com/shadcn/ui/blob/main/LICENSE.md). \ No newline at end of file +Licensed under the [MIT license](https://github.com/shadcn/ui/blob/main/LICENSE.md). diff --git a/apps/www/.vitepress/config.mts b/apps/www/.vitepress/config.mts index d72b958c..11573b64 100644 --- a/apps/www/.vitepress/config.mts +++ b/apps/www/.vitepress/config.mts @@ -1,6 +1,8 @@ import path from 'node:path' import { defineConfig } from 'vitepress' import Icons from 'unplugin-icons/vite' +import tailwind from 'tailwindcss' +import autoprefixer from 'autoprefixer' import { siteConfig } from './theme/config/site' import ComponentPreviewPlugin from './theme/plugins/previewer' @@ -54,8 +56,16 @@ export default defineConfig({ 'content/(.*)': '(.*)', }, vite: { + css: { + postcss: { + plugins: [ + tailwind(), + autoprefixer(), + ], + }, + }, plugins: [ - Icons({ compiler: 'vue3', autoInstall: true }) as any, + Icons({ compiler: 'vue3', autoInstall: true }), ], resolve: { alias: { diff --git a/apps/www/.vitepress/theme/components/ComponentPreview.vue b/apps/www/.vitepress/theme/components/ComponentPreview.vue index 0e07e8a6..403cb932 100644 --- a/apps/www/.vitepress/theme/components/ComponentPreview.vue +++ b/apps/www/.vitepress/theme/components/ComponentPreview.vue @@ -41,7 +41,7 @@ const { style } = useConfigStore()
Style: - - {{ styles.find(s => s.name === config.style)?.label }} - + diff --git a/apps/www/package.json b/apps/www/package.json index d96dc694..eac5050b 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -9,21 +9,19 @@ "dev": "vitepress dev", "build": "vitepress build", "preview": "vitepress preview", - "build:registry": "ts-node --esm --project ./tsconfig.scripts.json ./scripts/build-registry.ts" + "build:registry": "tsx ./scripts/build-registry.ts" }, "dependencies": { "@morev/vue-transitions": "^2.3.6", - "@tanstack/vue-table": "^8.9.3", + "@tanstack/vue-table": "^8.9.8", "@unovis/ts": "^1.2.1", - "@vitejs/plugin-vue-jsx": "^3.0.2", - "@vueuse/core": "^10.2.1", - "class-variance-authority": "^0.6.1", + "@vueuse/core": "^10.4.1", + "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", "date-fns": "^2.30.0", - "lucide-vue-next": "^0.268.0", - "tailwindcss-animate": "^1.0.6", + "lucide-vue-next": "^0.276.0", + "tailwindcss-animate": "^1.0.7", "v-calendar": "^3.0.3", - "vitepress": "^1.0.0-rc.10", "vue": "^3.3.4", "vue-wrap-balancer": "^1.1.3", "zod": "^3.22.2" @@ -35,20 +33,21 @@ "@iconify/vue": "^4.1.1", "@types/lodash.template": "^4.5.1", "@types/node": "^20.5.7", - "@vitejs/plugin-vue": "^4.1.0", + "@vitejs/plugin-vue": "^4.3.4", + "@vitejs/plugin-vue-jsx": "^3.0.2", "@vue/compiler-core": "^3.3.4", "@vue/compiler-dom": "^3.3.4", - "autoprefixer": "^10.4.14", + "autoprefixer": "^10.4.15", "lodash.template": "^4.5.0", - "postcss": "^8.4.24", - "radix-vue": "^0.1.32", + "radix-vue": "^0.1.34", "rimraf": "^5.0.1", "tailwind-merge": "^1.14.0", "tailwindcss": "^3.3.3", - "ts-node": "^10.9.1", - "typescript": "^5.0.2", - "unplugin-icons": "^0.16.6", - "vite": "^4.3.9", - "vue-tsc": "^1.4.2" + "tsx": "^3.12.8", + "typescript": "^5.2.2", + "unplugin-icons": "^0.17.0", + "vite": "^4.4.9", + "vitepress": "^1.0.0-rc.12", + "vue-tsc": "^1.8.10" } } diff --git a/apps/www/postcss.config.js b/apps/www/postcss.config.js deleted file mode 100644 index 2e7af2b7..00000000 --- a/apps/www/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -} diff --git a/apps/www/src/content/docs/figma.md b/apps/www/src/content/docs/figma.md index 363b583c..161292b5 100644 --- a/apps/www/src/content/docs/figma.md +++ b/apps/www/src/content/docs/figma.md @@ -18,4 +18,8 @@ The Figma UI Kit is open sourced by [Pietro Schirano](https://twitter.com/skiran ## Grab a copy -https://www.figma.com/community/file/1203061493325953101 \ No newline at end of file +
+ +https://www.figma.com/community/file/1203061493325953101 + +
diff --git a/apps/www/src/content/examples/forms/account.md b/apps/www/src/content/examples/forms/account.md new file mode 100644 index 00000000..2561b69c --- /dev/null +++ b/apps/www/src/content/examples/forms/account.md @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/apps/www/src/content/examples/forms/appearance.md b/apps/www/src/content/examples/forms/appearance.md new file mode 100644 index 00000000..964013ff --- /dev/null +++ b/apps/www/src/content/examples/forms/appearance.md @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/apps/www/src/content/examples/forms/display.md b/apps/www/src/content/examples/forms/display.md new file mode 100644 index 00000000..73dbf166 --- /dev/null +++ b/apps/www/src/content/examples/forms/display.md @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/apps/www/src/content/examples/forms/forms.md b/apps/www/src/content/examples/forms/forms.md new file mode 100644 index 00000000..a9f4d65f --- /dev/null +++ b/apps/www/src/content/examples/forms/forms.md @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/apps/www/src/content/examples/forms/notifications.md b/apps/www/src/content/examples/forms/notifications.md new file mode 100644 index 00000000..11778304 --- /dev/null +++ b/apps/www/src/content/examples/forms/notifications.md @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/apps/www/src/examples/forms/Account.vue b/apps/www/src/examples/forms/Account.vue new file mode 100644 index 00000000..bb3d6f97 --- /dev/null +++ b/apps/www/src/examples/forms/Account.vue @@ -0,0 +1,10 @@ + + + diff --git a/apps/www/src/examples/forms/Appearance.vue b/apps/www/src/examples/forms/Appearance.vue new file mode 100644 index 00000000..f678c509 --- /dev/null +++ b/apps/www/src/examples/forms/Appearance.vue @@ -0,0 +1,10 @@ + + + diff --git a/apps/www/src/examples/forms/Display.vue b/apps/www/src/examples/forms/Display.vue new file mode 100644 index 00000000..d75619ef --- /dev/null +++ b/apps/www/src/examples/forms/Display.vue @@ -0,0 +1,10 @@ + + + diff --git a/apps/www/src/examples/forms/Example.vue b/apps/www/src/examples/forms/Example.vue new file mode 100644 index 00000000..34171518 --- /dev/null +++ b/apps/www/src/examples/forms/Example.vue @@ -0,0 +1,10 @@ + + + diff --git a/apps/www/src/examples/forms/Notifications.vue b/apps/www/src/examples/forms/Notifications.vue new file mode 100644 index 00000000..89501d56 --- /dev/null +++ b/apps/www/src/examples/forms/Notifications.vue @@ -0,0 +1,10 @@ + + + diff --git a/apps/www/src/examples/forms/components/AccountForm.vue b/apps/www/src/examples/forms/components/AccountForm.vue new file mode 100644 index 00000000..b6a488a5 --- /dev/null +++ b/apps/www/src/examples/forms/components/AccountForm.vue @@ -0,0 +1,158 @@ + + + diff --git a/apps/www/src/examples/forms/components/AppearanceForm.vue b/apps/www/src/examples/forms/components/AppearanceForm.vue new file mode 100644 index 00000000..190d5be2 --- /dev/null +++ b/apps/www/src/examples/forms/components/AppearanceForm.vue @@ -0,0 +1,169 @@ + + + diff --git a/apps/www/src/examples/forms/components/DisplayForm.vue b/apps/www/src/examples/forms/components/DisplayForm.vue new file mode 100644 index 00000000..f715fcc1 --- /dev/null +++ b/apps/www/src/examples/forms/components/DisplayForm.vue @@ -0,0 +1,98 @@ + + + diff --git a/apps/www/src/examples/forms/components/NotificationsForm.vue b/apps/www/src/examples/forms/components/NotificationsForm.vue new file mode 100644 index 00000000..9eb00801 --- /dev/null +++ b/apps/www/src/examples/forms/components/NotificationsForm.vue @@ -0,0 +1,176 @@ + + + diff --git a/apps/www/src/examples/forms/components/ProfileForm.vue b/apps/www/src/examples/forms/components/ProfileForm.vue new file mode 100644 index 00000000..7fdb783f --- /dev/null +++ b/apps/www/src/examples/forms/components/ProfileForm.vue @@ -0,0 +1,152 @@ + + +