From 0ee23fb53db989457db3867bf4bd1bca6d2085a6 Mon Sep 17 00:00:00 2001 From: Sadegh Barati Date: Fri, 26 Jul 2024 00:56:56 +0330 Subject: [PATCH] docs: add dialog with form example (#682) --- apps/www/__registry__/index.ts | 14 + apps/www/package.json | 24 +- .../www/src/content/docs/components/dialog.md | 4 + apps/www/src/content/docs/dark-mode/vite.md | 2 +- .../www/src/content/docs/installation/nuxt.md | 22 +- apps/www/src/content/docs/introduction.md | 10 +- .../cards/components/ReportAnIssue.vue | 2 +- .../registry/default/example/DialogForm.vue | 79 +++ .../registry/default/example/StepperForm.vue | 11 +- .../default/example/StepperHorizental.vue | 2 +- .../default/example/StepperVertical.vue | 2 +- .../registry/new-york/example/DialogForm.vue | 79 +++ .../registry/new-york/example/StepperForm.vue | 11 +- .../new-york/example/StepperHorizental.vue | 2 +- .../new-york/example/StepperVertical.vue | 2 +- .../ui/dialog/DialogScrollContent.vue | 1 + .../registry/styles/new-york/dialog.json | 2 +- packages/cli/package.json | 4 +- packages/module/package.json | 2 +- pnpm-lock.yaml | 670 ++++++++++-------- pnpm-workspace.yaml | 7 +- 21 files changed, 601 insertions(+), 351 deletions(-) create mode 100644 apps/www/src/lib/registry/default/example/DialogForm.vue create mode 100644 apps/www/src/lib/registry/new-york/example/DialogForm.vue diff --git a/apps/www/__registry__/index.ts b/apps/www/__registry__/index.ts index 2cf972ad..19a64516 100644 --- a/apps/www/__registry__/index.ts +++ b/apps/www/__registry__/index.ts @@ -570,6 +570,13 @@ export const Index = { component: () => import("../src/lib/registry/default/example/DialogDemo.vue").then((m) => m.default), files: ["../src/lib/registry/default/example/DialogDemo.vue"], }, + "DialogForm": { + name: "DialogForm", + type: "components:example", + registryDependencies: ["button","form","dialog","input","toast"], + component: () => import("../src/lib/registry/default/example/DialogForm.vue").then((m) => m.default), + files: ["../src/lib/registry/default/example/DialogForm.vue"], + }, "DialogScrollBodyDemo": { name: "DialogScrollBodyDemo", type: "components:example", @@ -2041,6 +2048,13 @@ export const Index = { component: () => import("../src/lib/registry/new-york/example/DialogDemo.vue").then((m) => m.default), files: ["../src/lib/registry/new-york/example/DialogDemo.vue"], }, + "DialogForm": { + name: "DialogForm", + type: "components:example", + registryDependencies: ["button","form","dialog","input","toast"], + component: () => import("../src/lib/registry/new-york/example/DialogForm.vue").then((m) => m.default), + files: ["../src/lib/registry/new-york/example/DialogForm.vue"], + }, "DialogScrollBodyDemo": { name: "DialogScrollBodyDemo", type: "components:example", diff --git a/apps/www/package.json b/apps/www/package.json index deb21e07..9635205d 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -31,15 +31,15 @@ "date-fns": "^3.6.0", "embla-carousel-autoplay": "^8.1.7", "embla-carousel-vue": "^8.1.7", - "lucide-vue-next": "^0.400.0", + "lucide-vue-next": "^0.416.0", "magic-string": "^0.30.10", "radix-vue": "catalog:", "tailwindcss-animate": "^1.0.7", "v-calendar": "^3.1.2", "vaul-vue": "^0.2.0", "vee-validate": "4.13.2", - "vue": "^3.4.33", - "vue-sonner": "^1.1.3", + "vue": "^3.4.34", + "vue-sonner": "^1.1.4", "vue-wrap-balancer": "^1.1.3", "zod": "catalog:" }, @@ -54,13 +54,13 @@ "@iconify-json/tabler": "^1.1.116", "@iconify/vue": "^4.1.2", "@oxc-parser/wasm": "catalog:", - "@shikijs/transformers": "^1.11.0", + "@shikijs/transformers": "^1.11.1", "@types/lodash-es": "^4.17.12", - "@types/node": "^20.14.11", - "@vitejs/plugin-vue": "^5.0.5", + "@types/node": "^20.14.12", + "@vitejs/plugin-vue": "^5.1.0", "@vitejs/plugin-vue-jsx": "^4.0.0", - "@vue/compiler-core": "^3.4.33", - "@vue/compiler-dom": "^3.4.33", + "@vue/compiler-core": "^3.4.34", + "@vue/compiler-dom": "^3.4.34", "@vue/tsconfig": "^0.5.1", "autoprefixer": "^10.4.19", "fast-glob": "^3.3.2", @@ -68,14 +68,14 @@ "markdown-it": "^14.1.0", "pathe": "^1.1.2", "rimraf": "^6.0.1", - "shiki": "^1.11.0", + "shiki": "^1.11.1", "tailwind-merge": "^2.4.0", - "tailwindcss": "^3.4.6", + "tailwindcss": "^3.4.7", "tsx": "^4.16.2", "typescript": "^5.5.3", "unplugin-icons": "^0.19.0", "vitepress": "^1.3.1", - "vue-component-meta": "^2.0.28", - "vue-tsc": "^2.0.28" + "vue-component-meta": "^2.0.29", + "vue-tsc": "^2.0.29" } } diff --git a/apps/www/src/content/docs/components/dialog.md b/apps/www/src/content/docs/components/dialog.md index de448dbb..fee3e020 100644 --- a/apps/www/src/content/docs/components/dialog.md +++ b/apps/www/src/content/docs/components/dialog.md @@ -62,6 +62,10 @@ import { +### Form + + + ## Notes To activate the `Dialog` component from within a `Context Menu` or `Dropdown Menu`, you must encase the `Context Menu` or `Dropdown Menu` component in the `Dialog` component. For more information, refer to the linked issue [here](https://github.com/radix-ui/primitives/issues/1836). diff --git a/apps/www/src/content/docs/dark-mode/vite.md b/apps/www/src/content/docs/dark-mode/vite.md index a7795237..a0108c09 100644 --- a/apps/www/src/content/docs/dark-mode/vite.md +++ b/apps/www/src/content/docs/dark-mode/vite.md @@ -33,7 +33,7 @@ import { Button } from '@/components/ui/button' import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@/components/ui/dropdown-menu' // Pass { disableTransition: false } to enable transitions -const mode = useColorMode(); +const mode = useColorMode()