From dcad2c6ecf9ef505ab962c45492f9a4ae25e924d Mon Sep 17 00:00:00 2001 From: Hooray <304327508@qq.com> Date: Mon, 10 Mar 2025 16:07:52 +0800 Subject: [PATCH] =?UTF-8?q?refactor!:=20radix-vue=20=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E5=88=B0=20reka-ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.json | 4 +- package.json | 3 +- pnpm-lock.yaml | 85 ++++++------------- .../Topbar/Toolbar/ColorScheme/index.vue | 2 +- .../Topbar/Toolbar/Fullscreen/index.vue | 2 +- .../Topbar/Toolbar/NavSearch/index.vue | 2 +- .../Topbar/Toolbar/PageReload/index.vue | 2 +- src/ui/components/FaAvatar/avatar/Avatar.vue | 2 +- .../FaAvatar/avatar/AvatarFallback.vue | 4 +- .../FaAvatar/avatar/AvatarImage.vue | 8 +- src/ui/components/FaButton/button/Button.vue | 4 +- src/ui/components/FaButton/button/index.ts | 17 ++-- .../FaCheckbox/checkbox/Checkbox.vue | 4 +- .../context-menu/ContextMenu.vue | 4 +- .../context-menu/ContextMenuCheckboxItem.vue | 5 +- .../context-menu/ContextMenuContent.vue | 5 +- .../context-menu/ContextMenuGroup.vue | 4 +- .../context-menu/ContextMenuItem.vue | 5 +- .../context-menu/ContextMenuLabel.vue | 9 +- .../context-menu/ContextMenuPortal.vue | 4 +- .../context-menu/ContextMenuRadioGroup.vue | 5 +- .../context-menu/ContextMenuRadioItem.vue | 5 +- .../context-menu/ContextMenuSeparator.vue | 5 +- .../context-menu/ContextMenuSub.vue | 5 +- .../context-menu/ContextMenuSubContent.vue | 5 +- .../context-menu/ContextMenuSubTrigger.vue | 5 +- .../context-menu/ContextMenuTrigger.vue | 4 +- src/ui/components/FaDrawer/sheet/Sheet.vue | 4 +- .../components/FaDrawer/sheet/SheetClose.vue | 4 +- .../FaDrawer/sheet/SheetContent.vue | 4 +- .../FaDrawer/sheet/SheetDescription.vue | 4 +- .../components/FaDrawer/sheet/SheetTitle.vue | 4 +- .../FaDrawer/sheet/SheetTrigger.vue | 12 +++ src/ui/components/FaDrawer/sheet/index.ts | 5 +- .../FaDropdown/dropdown-menu/DropdownMenu.vue | 4 +- .../DropdownMenuCheckboxItem.vue | 5 +- .../dropdown-menu/DropdownMenuContent.vue | 5 +- .../dropdown-menu/DropdownMenuGroup.vue | 4 +- .../dropdown-menu/DropdownMenuItem.vue | 4 +- .../dropdown-menu/DropdownMenuLabel.vue | 4 +- .../dropdown-menu/DropdownMenuRadioGroup.vue | 5 +- .../dropdown-menu/DropdownMenuRadioItem.vue | 5 +- .../dropdown-menu/DropdownMenuSeparator.vue | 5 +- .../dropdown-menu/DropdownMenuSub.vue | 5 +- .../dropdown-menu/DropdownMenuSubContent.vue | 5 +- .../dropdown-menu/DropdownMenuSubTrigger.vue | 5 +- .../dropdown-menu/DropdownMenuTrigger.vue | 4 +- .../FaDropdown/dropdown-menu/index.ts | 2 +- src/ui/components/FaDropdown/index.vue | 2 +- src/ui/components/FaModal/dialog/Dialog.vue | 4 +- .../components/FaModal/dialog/DialogClose.vue | 4 +- .../FaModal/dialog/DialogContent.vue | 4 +- .../FaModal/dialog/DialogDescription.vue | 4 +- .../FaModal/dialog/DialogScrollContent.vue | 59 +++++++++++++ .../components/FaModal/dialog/DialogTitle.vue | 4 +- .../FaModal/dialog/DialogTrigger.vue | 12 +++ src/ui/components/FaModal/dialog/index.ts | 2 + src/ui/components/FaModal/index.vue | 2 +- .../components/FaNotification/toast/Toast.vue | 4 +- .../FaNotification/toast/ToastAction.vue | 4 +- .../FaNotification/toast/ToastClose.vue | 4 +- .../FaNotification/toast/ToastDescription.vue | 4 +- .../FaNotification/toast/ToastProvider.vue | 4 +- .../FaNotification/toast/ToastTitle.vue | 4 +- .../FaNotification/toast/ToastViewport.vue | 4 +- .../components/FaNotification/toast/index.ts | 4 +- .../FaPinInput/pin-input/PinInput.vue | 4 +- .../FaPinInput/pin-input/PinInputGroup.vue | 4 +- .../FaPinInput/pin-input/PinInputInput.vue | 4 +- .../pin-input/PinInputSeparator.vue | 16 ++++ .../components/FaPinInput/pin-input/index.ts | 1 + src/ui/components/FaPopover/index.vue | 2 +- .../components/FaPopover/popover/Popover.vue | 4 +- .../FaPopover/popover/PopoverContent.vue | 5 +- .../FaPopover/popover/PopoverTrigger.vue | 4 +- .../FaScrollArea/scroll-area/ScrollArea.vue | 5 +- .../FaScrollArea/scroll-area/ScrollBar.vue | 4 +- src/ui/components/FaSelect/select/Select.vue | 4 +- .../FaSelect/select/SelectContent.vue | 7 +- .../FaSelect/select/SelectGroup.vue | 4 +- .../components/FaSelect/select/SelectItem.vue | 5 +- .../FaSelect/select/SelectItemText.vue | 4 +- .../FaSelect/select/SelectLabel.vue | 6 +- .../select/SelectScrollDownButton.vue | 4 +- .../FaSelect/select/SelectScrollUpButton.vue | 4 +- .../FaSelect/select/SelectSeparator.vue | 4 +- .../FaSelect/select/SelectTrigger.vue | 4 +- .../FaSelect/select/SelectValue.vue | 4 +- src/ui/components/FaSwitch/switch/Switch.vue | 5 +- src/ui/components/FaTabs/tabs/Tabs.vue | 4 +- src/ui/components/FaTabs/tabs/TabsContent.vue | 4 +- src/ui/components/FaTabs/tabs/TabsList.vue | 4 +- src/ui/components/FaTabs/tabs/TabsTrigger.vue | 4 +- src/ui/components/FaToast/sonner/Sonner.vue | 2 +- src/ui/components/FaTooltip/index.vue | 2 +- .../components/FaTooltip/tooltip/Tooltip.vue | 4 +- .../FaTooltip/tooltip/TooltipContent.vue | 4 +- .../FaTooltip/tooltip/TooltipProvider.vue | 4 +- .../FaTooltip/tooltip/TooltipTrigger.vue | 4 +- src/ui/shadcn/ui/form/FormControl.vue | 2 +- src/ui/shadcn/ui/form/FormItem.vue | 2 +- src/ui/shadcn/ui/form/FormLabel.vue | 4 +- src/ui/shadcn/ui/form/FormMessage.vue | 2 +- src/ui/shadcn/ui/form/useFormField.ts | 3 +- src/ui/shadcn/ui/label/Label.vue | 2 +- tsconfig.app.json | 6 +- tsconfig.json | 7 ++ 107 files changed, 331 insertions(+), 278 deletions(-) create mode 100644 src/ui/components/FaDrawer/sheet/SheetTrigger.vue create mode 100644 src/ui/components/FaModal/dialog/DialogScrollContent.vue create mode 100644 src/ui/components/FaModal/dialog/DialogTrigger.vue create mode 100644 src/ui/components/FaPinInput/pin-input/PinInputSeparator.vue diff --git a/components.json b/components.json index 37204273..73fcc132 100644 --- a/components.json +++ b/components.json @@ -8,9 +8,9 @@ "baseColor": "neutral", "cssVariables": true }, - "framework": "vite", "aliases": { "components": "@/ui/shadcn", - "utils": "@/utils" + "utils": "@/utils", + "lib": "@/utils" } } diff --git a/package.json b/package.json index 7728d07f..e6c9c65c 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "type": "module", "version": "5.1.0", + "packageManager": "pnpm@9.10.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -45,7 +46,7 @@ "path-to-regexp": "^8.2.0", "pinia": "^3.0.1", "qs": "^6.14.0", - "radix-vue": "^1.9.17", + "reka-ui": "^2.0.2", "scule": "^1.3.0", "tailwind-merge": "^3.0.2", "ua-parser-js": "^2.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fa3f3959..2a2f6e17 100755 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,9 +71,9 @@ importers: qs: specifier: ^6.14.0 version: 6.14.0 - radix-vue: - specifier: ^1.9.17 - version: 1.9.17(vue@3.5.13(typescript@5.8.2)) + reka-ui: + specifier: ^2.0.2 + version: 2.0.2(typescript@5.8.2)(vue@3.5.13(typescript@5.8.2)) scule: specifier: ^1.3.0 version: 1.3.0 @@ -2352,9 +2352,6 @@ packages: '@vueuse/components@12.7.0': resolution: {integrity: sha512-LbaKPOx9sTPRxI8ymJt3VCm2CifmC432yaXxCGbjkuKIh2jyNlXvE7sGrLm7kbC7WkBJnUXzm3K/cI1pIE8ueQ==} - '@vueuse/core@10.11.1': - resolution: {integrity: sha512-guoy26JQktXPcz+0n3GukWIy/JDNKti9v6VEMu6kV2sYBsWuGiTU8OWdg+ADfUbHg3/3DlqySDe7JmdHrktiww==} - '@vueuse/core@12.7.0': resolution: {integrity: sha512-jtK5B7YjZXmkGNHjviyGO4s3ZtEhbzSgrbX+s5o+Lr8i2nYqNyHuPVOeTdM1/hZ5Tkxg/KktAuAVDDiHMraMVA==} @@ -2402,18 +2399,12 @@ packages: universal-cookie: optional: true - '@vueuse/metadata@10.11.1': - resolution: {integrity: sha512-IGa5FXd003Ug1qAZmyE8wF3sJ81xGLSqTqtQ6jaVfkeZ4i5kS2mwQF61yhVqojRnenVew5PldLyRgvdl4YYuSw==} - '@vueuse/metadata@12.7.0': resolution: {integrity: sha512-4VvTH9mrjXqFN5LYa5YfqHVRI6j7R00Vy4995Rw7PQxyCL3z0Lli86iN4UemWqixxEvYfRjG+hF9wL8oLOn+3g==} '@vueuse/metadata@9.13.0': resolution: {integrity: sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==} - '@vueuse/shared@10.11.1': - resolution: {integrity: sha512-LHpC8711VFZlDaYUXEBbFBCQ7GS3dVU9mjOhhMhXP6txTV4EhYQg/KGnQuvt/sPAtoUKq7VVUnL6mVtFoL42sA==} - '@vueuse/shared@12.7.0': resolution: {integrity: sha512-coLlUw2HHKsm7rPN6WqHJQr18WymN4wkA/3ThFaJ4v4gWGWAQQGK+MJxLuJTBs4mojQiazlVWAKNJNpUWGRkNw==} @@ -4795,11 +4786,6 @@ packages: engines: {node: ^18 || >=20} hasBin: true - nanoid@5.1.2: - resolution: {integrity: sha512-b+CiXQCNMUGe0Ri64S9SXFcP9hogjAJ2Rd6GdVxhPLRm7mhGaM7VgOvCAJ1ZshfHbqVDI3uqTI5C8/GaKuLI7g==} - engines: {node: ^18 || >=20} - hasBin: true - nanomatch@1.2.13: resolution: {integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==} engines: {node: '>=0.10.0'} @@ -5252,11 +5238,6 @@ packages: queue-tick@1.0.1: resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} - radix-vue@1.9.17: - resolution: {integrity: sha512-mVCu7I2vXt1L2IUYHTt0sZMz7s1K2ZtqKeTIxG3yC5mMFfLBG4FtE1FDeRMpDd+Hhg/ybi9+iXmAP1ISREndoQ==} - peerDependencies: - vue: '>= 3.2.0' - radix3@1.1.2: resolution: {integrity: sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==} @@ -5344,6 +5325,11 @@ packages: resolution: {integrity: sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==} hasBin: true + reka-ui@2.0.2: + resolution: {integrity: sha512-pC2UF6Z+kJF96aJvIErhkSO4DJYIeq9pgvh3pntNqcZb3zFGMzw8h2uny+GnLX2CKiQV54kZNYXxecYIiPMGyg==} + peerDependencies: + vue: '>= 3.2.0' + repeat-element@1.1.4: resolution: {integrity: sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==} engines: {node: '>=0.10.0'} @@ -8881,16 +8867,6 @@ snapshots: transitivePeerDependencies: - typescript - '@vueuse/core@10.11.1(vue@3.5.13(typescript@5.8.2))': - dependencies: - '@types/web-bluetooth': 0.0.20 - '@vueuse/metadata': 10.11.1 - '@vueuse/shared': 10.11.1(vue@3.5.13(typescript@5.8.2)) - vue-demi: 0.14.10(vue@3.5.13(typescript@5.8.2)) - transitivePeerDependencies: - - '@vue/composition-api' - - vue - '@vueuse/core@12.7.0(typescript@5.8.2)': dependencies: '@types/web-bluetooth': 0.0.20 @@ -8922,19 +8898,10 @@ snapshots: transitivePeerDependencies: - typescript - '@vueuse/metadata@10.11.1': {} - '@vueuse/metadata@12.7.0': {} '@vueuse/metadata@9.13.0': {} - '@vueuse/shared@10.11.1(vue@3.5.13(typescript@5.8.2))': - dependencies: - vue-demi: 0.14.10(vue@3.5.13(typescript@5.8.2)) - transitivePeerDependencies: - - '@vue/composition-api' - - vue - '@vueuse/shared@12.7.0(typescript@5.8.2)': dependencies: vue: 3.5.13(typescript@5.8.2) @@ -11665,8 +11632,6 @@ snapshots: nanoid@5.1.0: {} - nanoid@5.1.2: {} - nanomatch@1.2.13: dependencies: arr-diff: 4.0.0 @@ -12158,23 +12123,6 @@ snapshots: queue-tick@1.0.1: {} - radix-vue@1.9.17(vue@3.5.13(typescript@5.8.2)): - dependencies: - '@floating-ui/dom': 1.6.13 - '@floating-ui/vue': 1.1.6(vue@3.5.13(typescript@5.8.2)) - '@internationalized/date': 3.7.0 - '@internationalized/number': 3.6.0 - '@tanstack/vue-virtual': 3.13.2(vue@3.5.13(typescript@5.8.2)) - '@vueuse/core': 10.11.1(vue@3.5.13(typescript@5.8.2)) - '@vueuse/shared': 10.11.1(vue@3.5.13(typescript@5.8.2)) - aria-hidden: 1.2.4 - defu: 6.1.4 - fast-deep-equal: 3.1.3 - nanoid: 5.1.2 - vue: 3.5.13(typescript@5.8.2) - transitivePeerDependencies: - - '@vue/composition-api' - radix3@1.1.2: {} rc9@2.1.2: @@ -12284,6 +12232,23 @@ snapshots: dependencies: jsesc: 3.0.2 + reka-ui@2.0.2(typescript@5.8.2)(vue@3.5.13(typescript@5.8.2)): + dependencies: + '@floating-ui/dom': 1.6.13 + '@floating-ui/vue': 1.1.6(vue@3.5.13(typescript@5.8.2)) + '@internationalized/date': 3.7.0 + '@internationalized/number': 3.6.0 + '@tanstack/vue-virtual': 3.13.2(vue@3.5.13(typescript@5.8.2)) + '@vueuse/core': 12.7.0(typescript@5.8.2) + '@vueuse/shared': 12.7.0(typescript@5.8.2) + aria-hidden: 1.2.4 + defu: 6.1.4 + ohash: 1.1.4 + vue: 3.5.13(typescript@5.8.2) + transitivePeerDependencies: + - '@vue/composition-api' + - typescript + repeat-element@1.1.4: {} repeat-string@1.6.1: {} diff --git a/src/layouts/components/Topbar/Toolbar/ColorScheme/index.vue b/src/layouts/components/Topbar/Toolbar/ColorScheme/index.vue index 6e82da94..938e5a23 100644 --- a/src/layouts/components/Topbar/Toolbar/ColorScheme/index.vue +++ b/src/layouts/components/Topbar/Toolbar/ColorScheme/index.vue @@ -37,7 +37,7 @@ function toggleColorScheme(event: MouseEvent) { diff --git a/src/layouts/components/Topbar/Toolbar/NavSearch/index.vue b/src/layouts/components/Topbar/Toolbar/NavSearch/index.vue index 069a7984..01fe0aa9 100644 --- a/src/layouts/components/Topbar/Toolbar/NavSearch/index.vue +++ b/src/layouts/components/Topbar/Toolbar/NavSearch/index.vue @@ -12,7 +12,7 @@ const isShow = ref(false)