From de4f12c38a7e6fe2c3ff8f078342a0b51ad18c46 Mon Sep 17 00:00:00 2001 From: Anonimus Programus <7464749+anonimusprogramus@users.noreply.github.com> Date: Mon, 13 Nov 2023 17:16:36 +0700 Subject: [PATCH 01/22] docs: Update TeamSwitcher.vue (#167) --- apps/www/src/examples/dashboard/components/TeamSwitcher.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/www/src/examples/dashboard/components/TeamSwitcher.vue b/apps/www/src/examples/dashboard/components/TeamSwitcher.vue index 20ebc947..2d8c1ac6 100644 --- a/apps/www/src/examples/dashboard/components/TeamSwitcher.vue +++ b/apps/www/src/examples/dashboard/components/TeamSwitcher.vue @@ -131,7 +131,7 @@ const selectedTeam = ref(groups[0].teams[0]) Date: Tue, 14 Nov 2023 15:26:55 +0530 Subject: [PATCH 03/22] docs(form): fix closing of form tags in VeeValidate document (#171) --- apps/www/src/content/docs/components/form.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/www/src/content/docs/components/form.md b/apps/www/src/content/docs/components/form.md index a5712001..04cff449 100644 --- a/apps/www/src/content/docs/components/form.md +++ b/apps/www/src/content/docs/components/form.md @@ -209,7 +209,7 @@ const onSubmit = form.handleSubmit((values) => { ``` @@ -302,7 +302,7 @@ const onSubmit = form.handleSubmit((values) => { - + ``` From cbb40522dc1bea1362ce1dbb529c79e3c48f8c26 Mon Sep 17 00:00:00 2001 From: Anonimus Programus <7464749+anonimusprogramus@users.noreply.github.com> Date: Fri, 17 Nov 2023 21:09:19 +0700 Subject: [PATCH 04/22] fix: add missing presentation role in new-york style (#175) A
is missing from "new-york" but exists in "default" --- apps/www/src/lib/registry/new-york/ui/command/CommandList.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/www/src/lib/registry/new-york/ui/command/CommandList.vue b/apps/www/src/lib/registry/new-york/ui/command/CommandList.vue index 9904943a..be8a46f9 100644 --- a/apps/www/src/lib/registry/new-york/ui/command/CommandList.vue +++ b/apps/www/src/lib/registry/new-york/ui/command/CommandList.vue @@ -11,6 +11,8 @@ const forwarded = useForwardPropsEmits(props, emits) From 87da925085f3be1dfc9c609e9cfa1e408044626f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Marius=20L=C3=B8set?= Date: Sat, 18 Nov 2023 01:55:21 +0100 Subject: [PATCH 05/22] refactor: use pathe instead of node:path (#179) Closes #178 --- apps/www/package.json | 1 + apps/www/src/lib/registry/registry.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/www/package.json b/apps/www/package.json index c45f0129..896c739c 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -47,6 +47,7 @@ "@vue/compiler-dom": "^3.3.7", "autoprefixer": "^10.4.16", "lodash.template": "^4.5.0", + "pathe": "^1.1.1", "rimraf": "^5.0.5", "tailwind-merge": "^2.0.0", "tailwindcss": "^3.3.5", diff --git a/apps/www/src/lib/registry/registry.ts b/apps/www/src/lib/registry/registry.ts index 77a69b7b..8887e9c3 100644 --- a/apps/www/src/lib/registry/registry.ts +++ b/apps/www/src/lib/registry/registry.ts @@ -1,5 +1,5 @@ import { readFile, readdir } from 'node:fs/promises' -import { join, resolve } from 'node:path' +import { join, resolve } from 'pathe' import { compileScript, parse } from 'vue/compiler-sfc' import type { Registry } from '../../lib/registry' From c242a7955acc6b7c0f96594630d392e0ed16e7b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Marius=20L=C3=B8set?= Date: Mon, 20 Nov 2023 11:52:36 +0100 Subject: [PATCH 06/22] add vue-tsc typecheck before build registry (#182) * chore: add vue-tsc script * fix: remove non existent props from ModelSelector * fix: add basic typing for files * fix: fix Artwork object in demo * fix: use DatePickerModel from v-calendar on modelValue Fixes vue-tsc validation errors * chore: add `@vue/tsconfig` * refactor: extracted types from v-calendar --------- Co-authored-by: Sadegh Barati --- apps/www/.vitepress/theme/utils/codeeditor.ts | 2 +- apps/www/package.json | 5 +++- apps/www/src/examples/playground/Example.vue | 2 +- .../example/ScrollAreaHorizontalDemo.vue | 6 ++++- .../registry/default/ui/calendar/Calendar.vue | 23 ++++++++++++++---- .../example/ScrollAreaHorizontalDemo.vue | 6 ++++- .../new-york/ui/calendar/Calendar.vue | 24 +++++++++++++++---- apps/www/tsconfig.json | 16 ++++--------- apps/www/tsconfig.registry.json | 13 ++++++++++ pnpm-lock.yaml | 10 ++++++++ 10 files changed, 82 insertions(+), 25 deletions(-) create mode 100644 apps/www/tsconfig.registry.json diff --git a/apps/www/.vitepress/theme/utils/codeeditor.ts b/apps/www/.vitepress/theme/utils/codeeditor.ts index 00dae457..2e006d61 100644 --- a/apps/www/.vitepress/theme/utils/codeeditor.ts +++ b/apps/www/.vitepress/theme/utils/codeeditor.ts @@ -7,7 +7,7 @@ import cssRaw from '../../../../../packages/cli/test/fixtures/nuxt/assets/css/ta import { type Style } from '@/lib/registry/styles' export function makeCodeSandboxParams(componentName: string, style: Style, sources: Record) { - let files = {} + let files: Record = {} files = constructFiles(componentName, style, sources) files['.codesandbox/Dockerfile'] = { content: 'FROM node:18', diff --git a/apps/www/package.json b/apps/www/package.json index 896c739c..4993cd02 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -9,7 +9,9 @@ "dev": "vitepress dev", "build": "vitepress build", "preview": "vitepress preview", - "build:registry": "tsx ./scripts/build-registry.ts" + "typecheck": "vue-tsc --noEmit", + "typecheck:registry": "vue-tsc --noEmit -p tsconfig.registry.json", + "build:registry": "typecheck:registry && tsx ./scripts/build-registry.ts" }, "dependencies": { "@formkit/auto-animate": "^0.8.0", @@ -45,6 +47,7 @@ "@vitejs/plugin-vue-jsx": "^3.0.2", "@vue/compiler-core": "^3.3.7", "@vue/compiler-dom": "^3.3.7", + "@vue/tsconfig": "^0.4.0", "autoprefixer": "^10.4.16", "lodash.template": "^4.5.0", "pathe": "^1.1.1", diff --git a/apps/www/src/examples/playground/Example.vue b/apps/www/src/examples/playground/Example.vue index e52a58fe..d30c2e12 100644 --- a/apps/www/src/examples/playground/Example.vue +++ b/apps/www/src/examples/playground/Example.vue @@ -236,7 +236,7 @@ import CounterClockwiseClockIcon from '~icons/radix-icons/counter-clockwise-cloc
- + diff --git a/apps/www/src/lib/registry/default/example/ScrollAreaHorizontalDemo.vue b/apps/www/src/lib/registry/default/example/ScrollAreaHorizontalDemo.vue index ee875e5c..d687c9a0 100644 --- a/apps/www/src/lib/registry/default/example/ScrollAreaHorizontalDemo.vue +++ b/apps/www/src/lib/registry/default/example/ScrollAreaHorizontalDemo.vue @@ -2,20 +2,24 @@ import { ScrollArea, ScrollBar } from '@/lib/registry/default/ui/scroll-area' interface Artwork { + id: string artist: string art: string } const works: Artwork[] = [ { + id: '1', artist: 'Ornella Binni', art: 'https://images.unsplash.com/photo-1465869185982-5a1a7522cbcb?auto=format&fit=crop&w=300&q=80', }, { + id: '2', artist: 'Tom Byrom', art: 'https://images.unsplash.com/photo-1548516173-3cabfa4607e9?auto=format&fit=crop&w=300&q=80', }, { + id: '3', artist: 'Vladimir Malyavko', art: 'https://images.unsplash.com/photo-1494337480532-3725c85fd2ab?auto=format&fit=crop&w=300&q=80', }, @@ -30,7 +34,7 @@ const works: Artwork[] = [
diff --git a/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue b/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue index 4657fa60..c349efa0 100644 --- a/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue +++ b/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue @@ -7,15 +7,30 @@ import { computed, nextTick, onMounted, ref } from 'vue' import { buttonVariants } from '@/lib/registry/default/ui/button' import { cn } from '@/lib/utils' +/* Extracted from v-calendar */ +type DatePickerModel = DatePickerDate | DatePickerRangeObject +type DateSource = Date | string | number +type DatePickerDate = DateSource | Partial | null +interface DatePickerRangeObject { + start: Exclude + end: Exclude +} +interface SimpleDateParts { + year: number + month: number + day: number + hours: number + minutes: number + seconds: number + milliseconds: number +} + defineOptions({ inheritAttrs: false, }) const props = withDefaults(defineProps<{ - modelValue?: string | number | Date | Partial<{ - start: Date - end: Date - }> + modelValue?: string | number | Date | DatePickerModel modelModifiers?: object columns?: number type?: 'single' | 'range' diff --git a/apps/www/src/lib/registry/new-york/example/ScrollAreaHorizontalDemo.vue b/apps/www/src/lib/registry/new-york/example/ScrollAreaHorizontalDemo.vue index e3c9bb7f..13c8efcd 100644 --- a/apps/www/src/lib/registry/new-york/example/ScrollAreaHorizontalDemo.vue +++ b/apps/www/src/lib/registry/new-york/example/ScrollAreaHorizontalDemo.vue @@ -2,20 +2,24 @@ import { ScrollArea, ScrollBar } from '@/lib/registry/new-york/ui/scroll-area' interface Artwork { + id: string artist: string art: string } const works: Artwork[] = [ { + id: '1', artist: 'Ornella Binni', art: 'https://images.unsplash.com/photo-1465869185982-5a1a7522cbcb?auto=format&fit=crop&w=300&q=80', }, { + id: '2', artist: 'Tom Byrom', art: 'https://images.unsplash.com/photo-1548516173-3cabfa4607e9?auto=format&fit=crop&w=300&q=80', }, { + id: '3', artist: 'Vladimir Malyavko', art: 'https://images.unsplash.com/photo-1494337480532-3725c85fd2ab?auto=format&fit=crop&w=300&q=80', }, @@ -30,7 +34,7 @@ const works: Artwork[] = [
diff --git a/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue b/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue index 6bbf1de4..10543957 100644 --- a/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue +++ b/apps/www/src/lib/registry/new-york/ui/calendar/Calendar.vue @@ -7,15 +7,29 @@ import { computed, nextTick, onMounted, ref } from 'vue' import { buttonVariants } from '@/lib/registry/new-york/ui/button' import { cn } from '@/lib/utils' +/* Extracted from v-calendar */ +type DatePickerModel = DatePickerDate | DatePickerRangeObject +type DateSource = Date | string | number +type DatePickerDate = DateSource | Partial | null +interface DatePickerRangeObject { + start: Exclude + end: Exclude +} +interface SimpleDateParts { + year: number + month: number + day: number + hours: number + minutes: number + seconds: number + milliseconds: number +} + defineOptions({ inheritAttrs: false, }) - const props = withDefaults(defineProps< { - modelValue?: string | number | Date | Partial<{ - start: Date - end: Date - }> + modelValue?: string | number | Date | DatePickerModel modelModifiers?: object columns?: number type?: 'single' | 'range' diff --git a/apps/www/tsconfig.json b/apps/www/tsconfig.json index a7a93c78..7371e775 100644 --- a/apps/www/tsconfig.json +++ b/apps/www/tsconfig.json @@ -1,23 +1,17 @@ { + "extends": "@vue/tsconfig/tsconfig.dom.json", "compilerOptions": { - "target": "esnext", - "lib": ["esnext", "dom"], - "jsx": "preserve", - "module": "esnext", - "moduleResolution": "node", + "lib": ["ESNext", "DOM", "DOM.Iterable"], + "moduleResolution": "Node", "baseUrl": ".", "paths": { "@/*": ["./src/*"] }, "types": ["unplugin-icons/types/vue", "node"], - "resolveJsonModule": true, "declaration": false, "sourceMap": true, - "outDir": "dist", - "esModuleInterop": true, - "strict": true, - "skipLibCheck": true + "outDir": "dist" }, - "include": ["/**/*.vue", "src", ".vitepress/**/*.vue", "/**/*.ts", ".vitepress/**/*.mts", ".vitepress/**/*.vue", "src/lib/**/*"], + "include": ["src", ".vitepress/**/*.vue", ".vitepress/**/*.mts", ".vitepress/**/*.vue", "src/lib/**/*"], "exclude": ["node_modules", "./scripts/build-registry.ts"] } diff --git a/apps/www/tsconfig.registry.json b/apps/www/tsconfig.registry.json new file mode 100644 index 00000000..d89c8b4a --- /dev/null +++ b/apps/www/tsconfig.registry.json @@ -0,0 +1,13 @@ +{ + "extends": "@vue/tsconfig/tsconfig.json", + "compilerOptions": { + "moduleResolution": "Node", + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + }, + "declaration": false + }, + "include": ["src/lib/**/*"], + "exclude": ["node_modules", "src/lib/registry/**/example/**/*"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9c31e8f0..a2a3300c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -138,12 +138,18 @@ importers: '@vue/compiler-dom': specifier: ^3.3.7 version: 3.3.7 + '@vue/tsconfig': + specifier: ^0.4.0 + version: 0.4.0 autoprefixer: specifier: ^10.4.16 version: 10.4.16(postcss@8.4.31) lodash.template: specifier: ^4.5.0 version: 4.5.0 + pathe: + specifier: ^1.1.1 + version: 1.1.1 rimraf: specifier: ^5.0.5 version: 5.0.5 @@ -2860,6 +2866,10 @@ packages: /@vue/shared@3.3.7: resolution: {integrity: sha512-N/tbkINRUDExgcPTBvxNkvHGu504k8lzlNQRITVnm6YjOjwa4r0nnbd4Jb01sNpur5hAllyRJzSK5PvB9PPwRg==} + /@vue/tsconfig@0.4.0: + resolution: {integrity: sha512-CPuIReonid9+zOG/CGTT05FXrPYATEqoDGNrEaqS4hwcw5BUNM2FguC0mOwJD4Jr16UpRVl9N0pY3P+srIbqmg==} + dev: true + /@vuedx/compiler-sfc@0.7.1: resolution: {integrity: sha512-M+j3COLqmTFgtsDOJEeeijUFCk7FF8x7vQsdORPPxipZF1S2vPvlcLg1bKVE6NF4wh7Gaq9Wvwv0zPi87pWRVA==} dependencies: From 9074d75d96b6e35f6ea6a7ab33b08d819d10d11c Mon Sep 17 00:00:00 2001 From: zernonia Date: Sat, 25 Nov 2023 09:55:16 +0800 Subject: [PATCH 07/22] chore: update deps --- apps/www/package.json | 4 ++-- .../public/registry/styles/default/calendar.json | 2 +- .../public/registry/styles/new-york/calendar.json | 2 +- .../public/registry/styles/new-york/command.json | 2 +- packages/cli/package.json | 2 +- packages/cli/test/fixtures/nuxt/package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/www/package.json b/apps/www/package.json index 4993cd02..b96314bd 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -11,7 +11,7 @@ "preview": "vitepress preview", "typecheck": "vue-tsc --noEmit", "typecheck:registry": "vue-tsc --noEmit -p tsconfig.registry.json", - "build:registry": "typecheck:registry && tsx ./scripts/build-registry.ts" + "build:registry": "pnpm typecheck:registry && tsx ./scripts/build-registry.ts" }, "dependencies": { "@formkit/auto-animate": "^0.8.0", @@ -28,7 +28,7 @@ "codesandbox": "^2.2.3", "date-fns": "^2.30.0", "lucide-vue-next": "^0.276.0", - "radix-vue": "^1.1.3", + "radix-vue": "^1.2.2", "tailwindcss-animate": "^1.0.7", "v-calendar": "^3.1.2", "vee-validate": "4.11.8", diff --git a/apps/www/src/public/registry/styles/default/calendar.json b/apps/www/src/public/registry/styles/default/calendar.json index e0b0aae7..84aa0701 100644 --- a/apps/www/src/public/registry/styles/default/calendar.json +++ b/apps/www/src/public/registry/styles/default/calendar.json @@ -11,7 +11,7 @@ "files": [ { "name": "Calendar.vue", - "content": "\n\n\n\n\n" + "content": "\n\n\n\n\n" }, { "name": "index.ts", diff --git a/apps/www/src/public/registry/styles/new-york/calendar.json b/apps/www/src/public/registry/styles/new-york/calendar.json index 84f222ff..9029ca0f 100644 --- a/apps/www/src/public/registry/styles/new-york/calendar.json +++ b/apps/www/src/public/registry/styles/new-york/calendar.json @@ -11,7 +11,7 @@ "files": [ { "name": "Calendar.vue", - "content": "\n\n\n\n\n" + "content": "\n\n\n\n\n" }, { "name": "index.ts", diff --git a/apps/www/src/public/registry/styles/new-york/command.json b/apps/www/src/public/registry/styles/new-york/command.json index 5f5f2f12..208942c8 100644 --- a/apps/www/src/public/registry/styles/new-york/command.json +++ b/apps/www/src/public/registry/styles/new-york/command.json @@ -34,7 +34,7 @@ }, { "name": "CommandList.vue", - "content": "\n\n\n" + "content": "\n\n\n" }, { "name": "CommandSeparator.vue", diff --git a/packages/cli/package.json b/packages/cli/package.json index f89289a8..b7348189 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -63,7 +63,7 @@ "node-fetch": "^3.3.2", "ora": "^7.0.1", "prompts": "^2.4.2", - "radix-vue": "^1.1.3", + "radix-vue": "^1.2.2", "recast": "^0.23.4", "rimraf": "^5.0.1", "ts-morph": "^19.0.0", diff --git a/packages/cli/test/fixtures/nuxt/package.json b/packages/cli/test/fixtures/nuxt/package.json index 0495a2d2..1675aeff 100644 --- a/packages/cli/test/fixtures/nuxt/package.json +++ b/packages/cli/test/fixtures/nuxt/package.json @@ -13,7 +13,7 @@ "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", "lucide-vue-next": "^0.276.0", - "radix-vue": "^1.1.3", + "radix-vue": "^1.2.2", "tailwind-merge": "^1.14.0", "tailwindcss-animate": "^1.0.7" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a2a3300c..a3978b61 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -87,8 +87,8 @@ importers: specifier: ^0.276.0 version: 0.276.0(vue@3.3.7) radix-vue: - specifier: ^1.1.3 - version: 1.1.3(vue@3.3.7) + specifier: ^1.2.2 + version: 1.2.2(vue@3.3.7) tailwindcss-animate: specifier: ^1.0.7 version: 1.0.7(tailwindcss@3.3.5) @@ -235,8 +235,8 @@ importers: specifier: ^2.4.2 version: 2.4.2 radix-vue: - specifier: ^1.1.3 - version: 1.1.3(vue@3.3.7) + specifier: ^1.2.2 + version: 1.2.2(vue@3.3.7) recast: specifier: ^0.23.4 version: 0.23.4 @@ -5161,7 +5161,6 @@ packages: /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - dev: true /fast-equals@5.0.1: resolution: {integrity: sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==} @@ -7855,11 +7854,12 @@ packages: resolution: {integrity: sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==} dev: false - /radix-vue@1.1.3(vue@3.3.7): - resolution: {integrity: sha512-sWA6oxcTZrbU66ua6a4q8MgsaH/UYDGg6u5UOUZUV+l9bJN35SB7c+KGP/QjAPz3aKwCLhEPdkMJjeOmZuC49g==} + /radix-vue@1.2.2(vue@3.3.7): + resolution: {integrity: sha512-34Z+Oy4AuiajdGmkcfi2H6LthT5qMeby6jP9DaNzcf9299KQfm8PHUuo754XnguL2PnfgePa9T7IF+hSkwYwmQ==} dependencies: '@floating-ui/dom': 1.5.3 '@floating-ui/vue': 1.0.2(vue@3.3.7) + fast-deep-equal: 3.1.3 transitivePeerDependencies: - '@vue/composition-api' - vue From a9c3c8709f6b7e807b01a507dad827061240b0e3 Mon Sep 17 00:00:00 2001 From: zernonia Date: Sat, 25 Nov 2023 09:55:28 +0800 Subject: [PATCH 08/22] chore: release v0.8.3 --- apps/www/package.json | 2 +- package.json | 2 +- packages/cli/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/www/package.json b/apps/www/package.json index b96314bd..a78de0a2 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -1,7 +1,7 @@ { "name": "www", "type": "module", - "version": "0.8.2", + "version": "0.8.3", "files": [ "dist" ], diff --git a/package.json b/package.json index eaa9a25d..bb49aae1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shadcn-vue", - "version": "0.8.2", + "version": "0.8.3", "private": true, "packageManager": "pnpm@8.10.2", "license": "MIT", diff --git a/packages/cli/package.json b/packages/cli/package.json index b7348189..3a49a1de 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "shadcn-vue", "type": "module", - "version": "0.8.2", + "version": "0.8.3", "description": "Add components to your apps.", "publishConfig": { "access": "public" From 89874ca3243a4d173227f96fb4ec8d62ff4eab51 Mon Sep 17 00:00:00 2001 From: Lucas Goyeche Date: Sat, 25 Nov 2023 02:52:37 -0300 Subject: [PATCH 09/22] feat(cli): add collapsible animations by default (#186) * feat(cli): add collapsible animations by default * docs: add collapsible animation instructions --- .../content/docs/components/collapsible.md | 37 ++++++++++++++++++- packages/cli/src/utils/templates.ts | 10 +++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/apps/www/src/content/docs/components/collapsible.md b/apps/www/src/content/docs/components/collapsible.md index a1307c5a..19f32739 100644 --- a/apps/www/src/content/docs/components/collapsible.md +++ b/apps/www/src/content/docs/components/collapsible.md @@ -10,11 +10,46 @@ primitive: https://www.radix-vue.com/components/collapsible.html ## Installation - + + + +### Run the following command + ```bash npx shadcn-vue@latest add collapsible ``` +### Update `tailwind.config.js` + +Add the following animations to your `tailwind.config.js` file: + +```js title="tailwind.config.js" {5-18} +/** @type {import('tailwindcss').Config} */ +module.exports = { + theme: { + extend: { + keyframes: { + 'collapsible-down': { + from: { height: 0 }, + to: { height: 'var(--radix-collapsible-content-height)' }, + }, + 'collapsible-up': { + from: { height: 'var(--radix-collapsible-content-height)' }, + to: { height: 0 }, + }, + }, + animation: { + 'collapsible-down': 'collapsible-down 0.2s ease-in-out', + 'collapsible-up': 'collapsible-up 0.2s ease-in-out', + }, + }, + }, +} +``` + + + + ## Usage ```vue diff --git a/packages/cli/src/utils/templates.ts b/packages/cli/src/utils/templates.ts index 3eae5012..c94e48a3 100644 --- a/packages/cli/src/utils/templates.ts +++ b/packages/cli/src/utils/templates.ts @@ -128,10 +128,20 @@ module.exports = { from: { height: "var(--radix-accordion-content-height)" }, to: { height: 0 }, }, + "collapsible-down": { + from: { height: 0 }, + to: { height: 'var(--radix-collapsible-content-height)' }, + }, + "collapsible-up": { + from: { height: 'var(--radix-collapsible-content-height)' }, + to: { height: 0 }, + }, }, animation: { "accordion-down": "accordion-down 0.2s ease-out", "accordion-up": "accordion-up 0.2s ease-out", + "collapsible-down": "collapsible-down 0.2s ease-in-out", + "collapsible-up": "collapsible-up 0.2s ease-in-out", }, }, }, From 8d1dfe8da9df5046dd9cbe18601c515d6028516f Mon Sep 17 00:00:00 2001 From: zernonia Date: Sat, 25 Nov 2023 23:56:25 +0800 Subject: [PATCH 10/22] docs: fix demo after refactoring --- .../src/content/docs/components/combobox.md | 43 ++++++++++++------- .../registry/default/example/ComboboxDemo.vue | 42 ++++++++++-------- .../registry/default/example/ComboboxForm.vue | 37 ++++++++-------- .../new-york/example/ComboboxDemo.vue | 41 ++++++++++-------- .../new-york/example/ComboboxForm.vue | 37 ++++++++-------- 5 files changed, 112 insertions(+), 88 deletions(-) diff --git a/apps/www/src/content/docs/components/combobox.md b/apps/www/src/content/docs/components/combobox.md index 8f909099..8134d38e 100644 --- a/apps/www/src/content/docs/components/combobox.md +++ b/apps/www/src/content/docs/components/combobox.md @@ -6,6 +6,14 @@ component: true +
+ + +[Radix Vue](https://github.com/radix-vue/radix-vue/releases/tag/v1.2.0) introduced a breaking change. You will need to wrap `ComboboxGroup` and `ComboboxItem` inside of `ComboboxList` now. + + + + ## Installation The Combobox is built using a composition of the `` and the `` components. @@ -27,6 +35,7 @@ import { CommandGroup, CommandInput, CommandItem, + CommandList } from '@/components/ui/command' import { Popover, @@ -64,22 +73,24 @@ const value = ref({}) No framework found. - - - - {{ framework.label }} - - + + + + + {{ framework.label }} + + + diff --git a/apps/www/src/lib/registry/default/example/ComboboxDemo.vue b/apps/www/src/lib/registry/default/example/ComboboxDemo.vue index 8a4f7f48..758020bd 100644 --- a/apps/www/src/lib/registry/default/example/ComboboxDemo.vue +++ b/apps/www/src/lib/registry/default/example/ComboboxDemo.vue @@ -10,6 +10,7 @@ import { CommandGroup, CommandInput, CommandItem, + CommandList, } from '@/lib/registry/default/ui/command' import { Popover, @@ -48,25 +49,28 @@ const filterFunction = (list: typeof frameworks, search: string) => list.filter( No framework found. - - - - {{ framework.label }} - - + + + + + {{ framework.label }} + + + diff --git a/apps/www/src/lib/registry/default/example/ComboboxForm.vue b/apps/www/src/lib/registry/default/example/ComboboxForm.vue index 5ab4b6bb..fe4de4c4 100644 --- a/apps/www/src/lib/registry/default/example/ComboboxForm.vue +++ b/apps/www/src/lib/registry/default/example/ComboboxForm.vue @@ -13,6 +13,7 @@ import { CommandGroup, CommandInput, CommandItem, + CommandList, } from '@/lib/registry/default/ui/command' import { FormControl, @@ -83,23 +84,25 @@ const onSubmit = handleSubmit((values) => { Nothing found. - - - - {{ language.label }} - - + + + + + {{ language.label }} + + + diff --git a/apps/www/src/lib/registry/new-york/example/ComboboxDemo.vue b/apps/www/src/lib/registry/new-york/example/ComboboxDemo.vue index 04f9614f..9d2e4506 100644 --- a/apps/www/src/lib/registry/new-york/example/ComboboxDemo.vue +++ b/apps/www/src/lib/registry/new-york/example/ComboboxDemo.vue @@ -10,6 +10,7 @@ import { CommandGroup, CommandInput, CommandItem, + CommandList, } from '@/lib/registry/new-york/ui/command' import { Popover, @@ -48,25 +49,27 @@ const filterFunction = (list: typeof frameworks, search: string) => list.filter( No framework found. - - - {{ framework.label }} - - - + + + + {{ framework.label }} + + + + diff --git a/apps/www/src/lib/registry/new-york/example/ComboboxForm.vue b/apps/www/src/lib/registry/new-york/example/ComboboxForm.vue index eb112afc..247c0870 100644 --- a/apps/www/src/lib/registry/new-york/example/ComboboxForm.vue +++ b/apps/www/src/lib/registry/new-york/example/ComboboxForm.vue @@ -13,6 +13,7 @@ import { CommandGroup, CommandInput, CommandItem, + CommandList, } from '@/lib/registry/new-york/ui/command' import { FormControl, @@ -86,23 +87,25 @@ const onSubmit = handleSubmit((values) => { Nothing found. - - - {{ language.label }} - - - + + + + {{ language.label }} + + + + From 4156bf6703d7e60ec4831dfed777773fc1e6b882 Mon Sep 17 00:00:00 2001 From: Benjamin Gervan Date: Sun, 26 Nov 2023 10:23:05 +0100 Subject: [PATCH 11/22] fix: checkbox icon off-center fix (#184) * fix: checkbox icon off-center fix * fix: checkbox icon off-center update fix * fix: revert box-content --- apps/www/src/lib/registry/default/ui/checkbox/Checkbox.vue | 2 +- apps/www/src/lib/registry/new-york/ui/checkbox/Checkbox.vue | 2 +- apps/www/src/public/registry/styles/default/checkbox.json | 4 ++-- apps/www/src/public/registry/styles/new-york/checkbox.json | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/www/src/lib/registry/default/ui/checkbox/Checkbox.vue b/apps/www/src/lib/registry/default/ui/checkbox/Checkbox.vue index 338abf7b..900ca771 100644 --- a/apps/www/src/lib/registry/default/ui/checkbox/Checkbox.vue +++ b/apps/www/src/lib/registry/default/ui/checkbox/Checkbox.vue @@ -17,7 +17,7 @@ const forwarded = useForwardPropsEmits(props, emits) cn('peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground', $attrs.class ?? '')" > - + diff --git a/apps/www/src/lib/registry/new-york/ui/checkbox/Checkbox.vue b/apps/www/src/lib/registry/new-york/ui/checkbox/Checkbox.vue index 3c3397fb..33d498cc 100644 --- a/apps/www/src/lib/registry/new-york/ui/checkbox/Checkbox.vue +++ b/apps/www/src/lib/registry/new-york/ui/checkbox/Checkbox.vue @@ -17,7 +17,7 @@ const forwarded = useForwardPropsEmits(props, emits) cn('peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground', $attrs.class ?? '')" > - + diff --git a/apps/www/src/public/registry/styles/default/checkbox.json b/apps/www/src/public/registry/styles/default/checkbox.json index 16db473d..2b9bc597 100644 --- a/apps/www/src/public/registry/styles/default/checkbox.json +++ b/apps/www/src/public/registry/styles/default/checkbox.json @@ -9,7 +9,7 @@ "files": [ { "name": "Checkbox.vue", - "content": "\n\n\n" + "content": "\n\n\n" }, { "name": "index.ts", @@ -17,4 +17,4 @@ } ], "type": "components:ui" -} \ No newline at end of file +} diff --git a/apps/www/src/public/registry/styles/new-york/checkbox.json b/apps/www/src/public/registry/styles/new-york/checkbox.json index a17b7646..d7aa75bc 100644 --- a/apps/www/src/public/registry/styles/new-york/checkbox.json +++ b/apps/www/src/public/registry/styles/new-york/checkbox.json @@ -9,7 +9,7 @@ "files": [ { "name": "Checkbox.vue", - "content": "\n\n\n" + "content": "\n\n\n" }, { "name": "index.ts", @@ -17,4 +17,4 @@ } ], "type": "components:ui" -} \ No newline at end of file +} From 3a941e101eec857a852e3d80d268e261d6ccf060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emir=20B=C3=BC=C3=A7k=C3=BCn?= Date: Wed, 29 Nov 2023 10:45:50 +0300 Subject: [PATCH 12/22] docs: fix typo `dialog.md` (#192) The dialogue title was incorrect. I deleted one of the two "sure" words. --- apps/www/src/content/docs/components/dialog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/www/src/content/docs/components/dialog.md b/apps/www/src/content/docs/components/dialog.md index 05abcbef..e948079d 100644 --- a/apps/www/src/content/docs/components/dialog.md +++ b/apps/www/src/content/docs/components/dialog.md @@ -76,7 +76,7 @@ To activate the `Dialog` component from within a `Context Menu` or `Dropdown Men - Are you sure absolutely sure? + Are you absolutely sure? This action cannot be undone. Are you sure you want to permanently delete this file from our servers? @@ -87,4 +87,4 @@ To activate the `Dialog` component from within a `Context Menu` or `Dropdown Men -``` \ No newline at end of file +``` From e2d9e04daa308150eb28e2a367ced783e4ad1094 Mon Sep 17 00:00:00 2001 From: Youssef Date: Fri, 1 Dec 2023 03:30:37 +0100 Subject: [PATCH 13/22] fix: Calendar transition bug (#195) * fix: `calendar` transition glitch * fix: calendar transition bugs Added overflow hidden + z-index to the buttons --------- Co-authored-by: Sadegh Barati --- .../registry/default/ui/calendar/Calendar.vue | 92 ++++++++++++++++- .../new-york/ui/calendar/Calendar.vue | 99 ++++++++++++++++++- 2 files changed, 189 insertions(+), 2 deletions(-) diff --git a/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue b/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue index c349efa0..9aeb0752 100644 --- a/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue +++ b/apps/www/src/lib/registry/default/ui/calendar/Calendar.vue @@ -68,7 +68,7 @@ onMounted(async () => {