diff --git a/docs/pages/migration.vue b/docs/pages/migration.vue
index dd548a0761..01f3e1d145 100644
--- a/docs/pages/migration.vue
+++ b/docs/pages/migration.vue
@@ -77,6 +77,7 @@ const components = [
label: 'AvatarGroup',
to: '/components/AvatarGroup',
nuxt3: true,
+ capi: true,
typescript: true
},
{
@@ -129,6 +130,7 @@ const components = [
label: 'Alert',
to: '/components/Alert',
nuxt3: true,
+ capi: true,
typescript: true
},
{
@@ -181,6 +183,8 @@ const components = [
{
label: 'SelectCustom',
to: '/components/SelectCustom',
+ capi: true,
+ preset: true,
typescript: true
},
{
@@ -265,6 +269,7 @@ const components = [
to: '/components/Slideover',
nuxt3: true,
capi: true,
+ preset: true,
typescript: true
},
{
diff --git a/src/runtime/components/overlays/Modal.vue b/src/runtime/components/overlays/Modal.vue
index 4a27818262..e02578b192 100644
--- a/src/runtime/components/overlays/Modal.vue
+++ b/src/runtime/components/overlays/Modal.vue
@@ -12,7 +12,7 @@
leave-from="opacity-100"
leave-to="opacity-0"
>
-
+
@@ -77,6 +77,10 @@ const props = defineProps({
type: String,
default: () => $ui.modal.background
},
+ overlayClass: {
+ type: String,
+ default: () => $ui.modal.overlay
+ },
shadowClass: {
type: String,
default: () => $ui.modal.shadow
diff --git a/src/runtime/components/overlays/Slideover.vue b/src/runtime/components/overlays/Slideover.vue
index a32d70a809..19c64e85d1 100644
--- a/src/runtime/components/overlays/Slideover.vue
+++ b/src/runtime/components/overlays/Slideover.vue
@@ -16,7 +16,7 @@
leave-from="opacity-100"
leave-to="opacity-0"
>
-
+
-
-
-
+
+
@@ -45,6 +45,8 @@
import { computed } from 'vue'
import type { WritableComputedRef, PropType } from 'vue'
import { Dialog, DialogPanel, TransitionRoot, TransitionChild } from '@headlessui/vue'
+import { classNames } from '../../utils/'
+import $ui from '#build/ui'
const props = defineProps({
modelValue: {
@@ -56,9 +58,29 @@ const props = defineProps({
default: 'left',
validator: (value: string) => ['left', 'right'].includes(value)
},
- panelClass: {
+ baseClass: {
type: String,
- default: 'max-w-md'
+ default: () => $ui.slideover.base
+ },
+ backgroundClass: {
+ type: String,
+ default: () => $ui.slideover.background
+ },
+ overlayClass: {
+ type: String,
+ default: () => $ui.slideover.overlay
+ },
+ widthClass: {
+ type: String,
+ default: () => $ui.slideover.width
+ },
+ headerWrapperClass: {
+ type: String,
+ default: () => $ui.slideover.header.wrapper
+ },
+ headerClass: {
+ type: String,
+ default: () => $ui.slideover.header.base
}
})
const emit = defineEmits(['update:modelValue'])
@@ -71,6 +93,14 @@ const isOpen: WritableComputedRef = computed({
emit('update:modelValue', value)
}
})
+
+const slideoverClass = computed(() => {
+ return classNames(
+ props.baseClass,
+ props.widthClass,
+ props.backgroundClass
+ )
+})