fix(components): prefix @headlessui/vue components

Resolves #315
This commit is contained in:
Benjamin Canac
2023-06-22 13:01:58 +02:00
parent 759af058df
commit 41b85d50a8
12 changed files with 104 additions and 88 deletions

View File

@@ -1,6 +1,6 @@
<template>
<TransitionRoot :appear="appear" :show="isOpen" as="template">
<Dialog :class="ui.wrapper" @close="close">
<HDialog :class="ui.wrapper" @close="close">
<TransitionChild v-if="overlay" as="template" :appear="appear" v-bind="ui.overlay.transition">
<div :class="[ui.overlay.base, ui.overlay.background]" />
</TransitionChild>
@@ -8,13 +8,13 @@
<div :class="ui.inner">
<div :class="[ui.container, ui.padding]">
<TransitionChild as="template" :appear="appear" v-bind="ui.transition">
<DialogPanel :class="[ui.base, ui.width, ui.height, ui.background, ui.ring, ui.rounded, ui.shadow]">
<HDialogPanel :class="[ui.base, ui.width, ui.height, ui.background, ui.ring, ui.rounded, ui.shadow]">
<slot />
</DialogPanel>
</HDialogPanel>
</TransitionChild>
</div>
</div>
</Dialog>
</HDialog>
</TransitionRoot>
</template>
@@ -22,7 +22,7 @@
import { computed, defineComponent } from 'vue'
import type { PropType } from 'vue'
import { defu } from 'defu'
import { Dialog, DialogPanel, TransitionRoot, TransitionChild } from '@headlessui/vue'
import { Dialog as HDialog, DialogPanel as HDialogPanel, TransitionRoot, TransitionChild } from '@headlessui/vue'
import { useAppConfig } from '#imports'
// TODO: Remove
// @ts-expect-error
@@ -32,9 +32,8 @@ import appConfig from '#build/app.config'
export default defineComponent({
components: {
// eslint-disable-next-line vue/no-reserved-component-names
Dialog,
DialogPanel,
HDialog,
HDialogPanel,
TransitionRoot,
TransitionChild
},