From 66c51ab3395d35c162045f43cc1d2b45ded5125b Mon Sep 17 00:00:00 2001 From: zernonia Date: Wed, 27 Sep 2023 11:58:32 +0800 Subject: [PATCH 1/3] refactor: changes all instance of unplugin-icons to radix-icons --- apps/www/package.json | 1 + .../lib/registry/default/example/Cards/DataTable.vue | 7 +++---- .../default/ui/menubar/MenubarCheckboxItem.vue | 4 ++-- .../registry/default/ui/menubar/MenubarRadioItem.vue | 4 ++-- .../default/ui/radio-group/RadioGroupItem.vue | 4 ++-- .../src/lib/registry/default/ui/select/SelectItem.vue | 4 ++-- .../src/lib/registry/new-york/example/AlertDemo.vue | 4 ++-- .../src/lib/registry/new-york/example/CardDemo.vue | 8 +++----- .../registry/new-york/example/Cards/ActivityGoal.vue | 7 +++---- .../lib/registry/new-york/example/Cards/DataTable.vue | 7 +++---- .../lib/registry/new-york/example/CollapsibleDemo.vue | 4 ++-- .../lib/registry/new-york/example/ComboboxDemo.vue | 7 +++---- .../lib/registry/new-york/example/DataTableDemo.vue | 7 +++---- .../registry/new-york/example/DataTableDemoColumn.vue | 4 ++-- .../lib/registry/new-york/example/DatePickerDemo.vue | 4 ++-- .../registry/new-york/example/DatePickerWithRange.vue | 4 ++-- .../lib/registry/new-york/example/HoverCardDemo.vue | 4 ++-- .../src/lib/registry/new-york/example/ToggleDemo.vue | 4 ++-- .../new-york/ui/accordion/AccordionTrigger.vue | 4 ++-- .../lib/registry/new-york/ui/checkbox/Checkbox.vue | 4 ++-- .../ui/context-menu/ContextMenuCheckboxItem.vue | 4 ++-- .../new-york/ui/context-menu/ContextMenuRadioItem.vue | 4 ++-- .../lib/registry/new-york/ui/dialog/DialogContent.vue | 4 ++-- .../ui/dropdown-menu/DropdownMenuCheckboxItem.vue | 4 ++-- .../ui/dropdown-menu/DropdownMenuRadioItem.vue | 4 ++-- .../ui/dropdown-menu/DropdownMenuSubTrigger.vue | 4 ++-- .../new-york/ui/menubar/MenubarCheckboxItem.vue | 4 ++-- .../registry/new-york/ui/menubar/MenubarRadioItem.vue | 4 ++-- .../ui/navigation-menu/NavigationMenuTrigger.vue | 4 ++-- .../new-york/ui/radio-group/RadioGroupItem.vue | 4 ++-- .../lib/registry/new-york/ui/select/SelectItem.vue | 4 ++-- .../lib/registry/new-york/ui/select/SelectTrigger.vue | 4 ++-- .../lib/registry/new-york/ui/sheet/SheetContent.vue | 4 ++-- pnpm-lock.yaml | 11 +++++++++++ 34 files changed, 82 insertions(+), 77 deletions(-) diff --git a/apps/www/package.json b/apps/www/package.json index 3a146d652..0c994fa13 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -13,6 +13,7 @@ }, "dependencies": { "@morev/vue-transitions": "^2.3.6", + "@radix-icons/vue": "^1.0.0", "@tanstack/vue-table": "^8.9.9", "@unovis/ts": "^1.2.1", "@unovis/vue": "1.3.0-alpha.3", diff --git a/apps/www/src/lib/registry/default/example/Cards/DataTable.vue b/apps/www/src/lib/registry/default/example/Cards/DataTable.vue index 561ae80e2..a6d201ff6 100644 --- a/apps/www/src/lib/registry/default/example/Cards/DataTable.vue +++ b/apps/www/src/lib/registry/default/example/Cards/DataTable.vue @@ -14,9 +14,8 @@ import { useVueTable, } from '@tanstack/vue-table' import { h, ref } from 'vue' +import { CaretSortIcon, ChevronDownIcon } from '@radix-icons/vue' import DropdownAction from '../DataTableDemoColumn.vue' -import RadixIconsCaretSort from '~icons/radix-icons/caret-sort' -import RadixIconsChevronDown from '~icons/radix-icons/chevron-down' import { Button } from '@/lib/registry/default/ui/button' import { Checkbox } from '@/lib/registry/default/ui/checkbox' @@ -105,7 +104,7 @@ const columns: ColumnDef[] = [ return h(Button, { variant: 'ghost', onClick: () => column.toggleSorting(column.getIsSorted() === 'asc'), - }, ['Email', h(RadixIconsCaretSort, { class: 'ml-2 h-4 w-4' })]) + }, ['Email', h(CaretSortIcon, { class: 'ml-2 h-4 w-4' })]) }, cell: ({ row }) => h('div', { class: 'lowercase' }, row.getValue('email')), }, @@ -180,7 +179,7 @@ const table = useVueTable({ diff --git a/apps/www/src/lib/registry/default/ui/menubar/MenubarCheckboxItem.vue b/apps/www/src/lib/registry/default/ui/menubar/MenubarCheckboxItem.vue index fe9002a28..b0274d9b9 100644 --- a/apps/www/src/lib/registry/default/ui/menubar/MenubarCheckboxItem.vue +++ b/apps/www/src/lib/registry/default/ui/menubar/MenubarCheckboxItem.vue @@ -5,8 +5,8 @@ import { type MenubarCheckboxItemProps, MenubarItemIndicator, } from 'radix-vue' +import { Check } from 'lucide-vue-next' import { cn } from '@/lib/utils' -import RadixIconsCheck from '~icons/radix-icons/check' const props = defineProps() @@ -28,7 +28,7 @@ const emit = defineEmits() - + diff --git a/apps/www/src/lib/registry/default/ui/menubar/MenubarRadioItem.vue b/apps/www/src/lib/registry/default/ui/menubar/MenubarRadioItem.vue index 960389aad..4619f96a6 100644 --- a/apps/www/src/lib/registry/default/ui/menubar/MenubarRadioItem.vue +++ b/apps/www/src/lib/registry/default/ui/menubar/MenubarRadioItem.vue @@ -5,8 +5,8 @@ import { type MenubarRadioItemEmits, type MenubarRadioItemProps, } from 'radix-vue' +import { Circle } from 'lucide-vue-next' import { cn } from '@/lib/utils' -import RiCheckboxBlankCircleFill from '~icons/ri/checkbox-blank-circle-fill' const props = defineProps() @@ -27,7 +27,7 @@ const emits = defineEmits() - + diff --git a/apps/www/src/lib/registry/default/ui/radio-group/RadioGroupItem.vue b/apps/www/src/lib/registry/default/ui/radio-group/RadioGroupItem.vue index 6d74489d0..b9af78cfe 100644 --- a/apps/www/src/lib/registry/default/ui/radio-group/RadioGroupItem.vue +++ b/apps/www/src/lib/registry/default/ui/radio-group/RadioGroupItem.vue @@ -4,8 +4,8 @@ import { RadioGroupItem, type RadioGroupItemProps, } from 'radix-vue' +import { Circle } from 'lucide-vue-next' import { cn } from '@/lib/utils' -import RiCheckboxBlankCircleFill from '~icons/ri/checkbox-blank-circle-fill' const props = defineProps() @@ -23,7 +23,7 @@ const props = defineProps() - + diff --git a/apps/www/src/lib/registry/default/ui/select/SelectItem.vue b/apps/www/src/lib/registry/default/ui/select/SelectItem.vue index 5ebbd0bed..cae5d6ec1 100644 --- a/apps/www/src/lib/registry/default/ui/select/SelectItem.vue +++ b/apps/www/src/lib/registry/default/ui/select/SelectItem.vue @@ -5,8 +5,8 @@ import { type SelectItemProps, SelectItemText, } from 'radix-vue' +import { Check } from 'lucide-vue-next' import { cn } from '@/lib/utils' -import RadixIconsCheck from '~icons/radix-icons/check' const props = defineProps() @@ -23,7 +23,7 @@ const props = defineProps() > - + diff --git a/apps/www/src/lib/registry/new-york/example/AlertDemo.vue b/apps/www/src/lib/registry/new-york/example/AlertDemo.vue index cd4a87966..ebb70284b 100644 --- a/apps/www/src/lib/registry/new-york/example/AlertDemo.vue +++ b/apps/www/src/lib/registry/new-york/example/AlertDemo.vue @@ -1,11 +1,11 @@ diff --git a/apps/www/src/lib/registry/new-york/ui/select/SelectItem.vue b/apps/www/src/lib/registry/new-york/ui/select/SelectItem.vue index 5ebbd0bed..e5c533c3e 100644 --- a/apps/www/src/lib/registry/new-york/ui/select/SelectItem.vue +++ b/apps/www/src/lib/registry/new-york/ui/select/SelectItem.vue @@ -5,8 +5,8 @@ import { type SelectItemProps, SelectItemText, } from 'radix-vue' +import { CheckIcon } from '@radix-icons/vue' import { cn } from '@/lib/utils' -import RadixIconsCheck from '~icons/radix-icons/check' const props = defineProps() @@ -23,7 +23,7 @@ const props = defineProps() > - + diff --git a/apps/www/src/lib/registry/new-york/ui/select/SelectTrigger.vue b/apps/www/src/lib/registry/new-york/ui/select/SelectTrigger.vue index 2811c5bc9..15219cd11 100644 --- a/apps/www/src/lib/registry/new-york/ui/select/SelectTrigger.vue +++ b/apps/www/src/lib/registry/new-york/ui/select/SelectTrigger.vue @@ -1,6 +1,6 @@ - - diff --git a/apps/www/src/lib/registry/registry.ts b/apps/www/src/lib/registry/registry.ts index 2f0a7f02f..3ffd32485 100644 --- a/apps/www/src/lib/registry/registry.ts +++ b/apps/www/src/lib/registry/registry.ts @@ -64,7 +64,7 @@ async function crawlExample(rootPath: string) { const [name] = dirent.name.split('.vue') const file_path = join('example', dirent.name) const { dependencies, registryDependencies } - = await getDependencies(join(rootPath, dirent.name)) + = await getDependencies(join(dirent.path, dirent.name)) exampleRegistry.push({ name, diff --git a/apps/www/src/public/registry/styles/default/menubar.json b/apps/www/src/public/registry/styles/default/menubar.json index 3a37f6ab2..b04470db3 100644 --- a/apps/www/src/public/registry/styles/default/menubar.json +++ b/apps/www/src/public/registry/styles/default/menubar.json @@ -13,7 +13,7 @@ }, { "name": "MenubarCheckboxItem.vue", - "content": "\n\n\n" + "content": "\n\n\n" }, { "name": "MenubarContent.vue", @@ -41,7 +41,7 @@ }, { "name": "MenubarRadioItem.vue", - "content": "\n\n\n" + "content": "\n\n\n" }, { "name": "MenubarSeparator.vue", diff --git a/apps/www/src/public/registry/styles/default/radio-group.json b/apps/www/src/public/registry/styles/default/radio-group.json index e05dcd8ca..6bdf20b77 100644 --- a/apps/www/src/public/registry/styles/default/radio-group.json +++ b/apps/www/src/public/registry/styles/default/radio-group.json @@ -13,7 +13,7 @@ }, { "name": "RadioGroupItem.vue", - "content": "\n\n\n" + "content": "\n\n\n" }, { "name": "index.ts", diff --git a/apps/www/src/public/registry/styles/default/select.json b/apps/www/src/public/registry/styles/default/select.json index 285f7f169..8cd6d9036 100644 --- a/apps/www/src/public/registry/styles/default/select.json +++ b/apps/www/src/public/registry/styles/default/select.json @@ -21,7 +21,7 @@ }, { "name": "SelectItem.vue", - "content": "\n\n\n" + "content": "\n\n\n" }, { "name": "SelectItemText.vue", diff --git a/apps/www/src/public/registry/styles/default/textarea.json b/apps/www/src/public/registry/styles/default/textarea.json index 7ceaf393a..66db35564 100644 --- a/apps/www/src/public/registry/styles/default/textarea.json +++ b/apps/www/src/public/registry/styles/default/textarea.json @@ -7,7 +7,7 @@ "files": [ { "name": "Textarea.vue", - "content": "\n\n