Skip to content

Commit

Permalink
refactor: migrate radix-vue to reka-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
zernonia committed Dec 16, 2024
1 parent 4df119c commit 5068004
Show file tree
Hide file tree
Showing 13 changed files with 230 additions and 76 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Vaul Vue

Vaul Vue is an unstyled drawer component for Vue that can be used as a Dialog replacement on tablet and mobile devices.
It uses [Radix Vue's Dialog primitive](https://www.radix-vue.com/components/dialog.html) under the hood and is a feature complete port of [Emil Kowalski's Vaul library](https://github.com/emilkowalski/vaul) (built for React).
It uses [Radix Vue's Dialog primitive](https://www.reka-ui.com/docs/components/dialog) under the hood and is a feature complete port of [Emil Kowalski's Vaul library](https://github.com/emilkowalski/vaul) (built for React).

## Installation

Expand Down Expand Up @@ -42,4 +42,4 @@ import { DrawerContent, DrawerOverlay, DrawerPortal, DrawerRoot, DrawerTrigger }
All credits go to these open-source works and resources

- Major credits go to [Emil Kowalski](https://emilkowal.ski/) for the original [Vaul library](https://github.com/emilkowalski/vaul).
- [Radix Vue](https://www.radix-vue.com/) for the Dialog primitive used under the hood.
- [Reka UI](https://www.reka-ui.com/) for the Dialog primitive used under the hood.
4 changes: 2 additions & 2 deletions packages/vaul-vue/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Vaul Vue

Vaul Vue is an unstyled drawer component for Vue that can be used as a Dialog replacement on tablet and mobile devices.
It uses [Radix Vue's Dialog primitive](https://www.radix-vue.com/components/dialog.html) under the hood and is a feature complete port of [Emil Kowalski's Vaul library](https://github.com/emilkowalski/vaul) (built for React).
It uses [Radix Vue's Dialog primitive](https://www.reka-ui.com/docs/components/dialog) under the hood and is a feature complete port of [Emil Kowalski's Vaul library](https://github.com/emilkowalski/vaul) (built for React).

## Installation

Expand Down Expand Up @@ -42,4 +42,4 @@ import { DrawerContent, DrawerOverlay, DrawerPortal, DrawerRoot, DrawerTrigger }
All credits go to these open-source works and resources

- Major credits go to [Emil Kowalski](https://emilkowal.ski/) for the original [Vaul library](https://github.com/emilkowalski/vaul).
- [Radix Vue](https://www.radix-vue.com/) for the Dialog primitive used under the hood.
- [Reka UI](https://www.reka-ui.com/) for the Dialog primitive used under the hood.
4 changes: 2 additions & 2 deletions packages/vaul-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
"release": "pnpm run build-only"
},
"peerDependencies": {
"radix-vue": "^1.4.0",
"reka-ui": "^1.0.0-alpha.7",
"vue": "^3.3.0"
},
"dependencies": {
"@vueuse/core": "^10.8.0",
"radix-vue": "^1.4.9",
"reka-ui": "^1.0.0-alpha.7",
"vue": "^3.4.5"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/vaul-vue/src/DrawerContent.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { computed, watch } from 'vue'
import { DialogContent } from 'radix-vue'
import { DialogContent } from 'reka-ui'
import { injectDrawerRootContext } from './context'
const {
Expand Down
2 changes: 1 addition & 1 deletion packages/vaul-vue/src/DrawerOverlay.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { DialogOverlay } from 'radix-vue'
import { DialogOverlay } from 'reka-ui'
import { computed } from 'vue'
import { injectDrawerRootContext } from './context'
Expand Down
2 changes: 1 addition & 1 deletion packages/vaul-vue/src/DrawerRoot.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { DialogRoot } from 'radix-vue'
import { DialogRoot } from 'reka-ui'
import { useVModel } from '@vueuse/core'
import { type WritableComputedRef, computed, toRefs } from 'vue'
import { provideDrawerRootContext } from './context'
Expand Down
2 changes: 1 addition & 1 deletion packages/vaul-vue/src/DrawerRootNested.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { useForwardPropsEmits } from 'radix-vue'
import { useForwardPropsEmits } from 'reka-ui'
import DrawerRoot from './DrawerRoot.vue'
import type { DrawerRootEmits, DrawerRootProps } from './controls'
import { injectDrawerRootContext } from './context'
Expand Down
2 changes: 1 addition & 1 deletion packages/vaul-vue/src/context.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ComponentPublicInstance, Ref } from 'vue'
import { createContext } from 'radix-vue'
import { createContext } from 'reka-ui'
import type { DrawerDirection } from './types'

export interface DrawerRootContext {
Expand Down
2 changes: 1 addition & 1 deletion packages/vaul-vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ export {

DialogTrigger as DrawerTrigger,
type DialogTriggerProps as DrawerTriggerProps,
} from 'radix-vue'
} from 'reka-ui'
2 changes: 1 addition & 1 deletion packages/vaul-vue/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default defineConfig({
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library (Vue)
external: ['vue', 'radix-vue'],
external: ['vue', 'reka-ui'],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
Expand Down
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test": "pnpm run test:e2e"
},
"dependencies": {
"radix-vue": "^1.8.3",
"reka-ui": "^1.0.0-alpha.7",
"vaul-vue": "workspace:*",
"vue": "^3.4.5",
"vue-router": "4"
Expand Down
2 changes: 1 addition & 1 deletion playground/src/views/HomeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import BackgroundTexture from '@/components/BackgroundTexture.vue'
<div class="flex gap-4 justify-center mt-6">
<DemoDrawer />
<a
href="https://github.com/radix-vue/vaul-vue" target="_blank"
href="https://github.com/unovue/vaul-vue" target="_blank"
class="font-semibold text-sm px-4 py-2.5 hover:bg-gray-100 rounded-full"
> GitHub <span
aria-hidden="true"
Expand Down
Loading

0 comments on commit 5068004

Please sign in to comment.