diff --git a/src/runtime/components/Modal.vue b/src/runtime/components/Modal.vue index 0bc75a7010..19ee5b054f 100644 --- a/src/runtime/components/Modal.vue +++ b/src/runtime/components/Modal.vue @@ -2,9 +2,8 @@ import type { DialogRootProps, DialogRootEmits, DialogContentProps, DialogContentEmits } from 'reka-ui' import type { AppConfig } from '@nuxt/schema' import theme from '#build/ui/modal' -import type { ButtonProps, IconProps } from '../types' -import type { EmitsToProps } from '../types/utils' -import type { ComponentConfig } from '../types/tv' +import type { ButtonProps } from '../types' +import type { EmitsToProps, ComponentConfig } from '../types/utils' type Modal = ComponentConfig @@ -44,7 +43,7 @@ export interface ModalProps extends DialogRootProps { * @defaultValue appConfig.ui.icons.close * @IconifyIcon */ - closeIcon?: IconProps['name'] + closeIcon?: string /** * When `false`, the modal will not close when clicking outside or pressing escape. * @defaultValue true @@ -55,26 +54,28 @@ export interface ModalProps extends DialogRootProps { } export interface ModalEmits extends DialogRootEmits { - 'after:leave': [] + 'enter': [] + 'leave': [] 'after:enter': [] + 'after:leave': [] 'close:prevent': [] } export interface ModalSlots { - default(props: { open: boolean }): any - content(props: { close: () => void }): any - header(props: { close: () => void }): any - title(props?: {}): any - description(props?: {}): any - actions(props?: {}): any - close(props: { close: () => void, ui: { [K in keyof Required]: (props?: Record) => string } }): any - body(props: { close: () => void }): any - footer(props: { close: () => void }): any + default(props: { open: boolean, transitioning: boolean }): any + content(props: { close: () => void, transitioning: boolean }): any + header(props: { close: () => void, transitioning: boolean }): any + title(props: { transitioning: boolean }): any + description(props: { transitioning: boolean }): any + actions(props: { transitioning: boolean }): any + close(props: { close: () => void, ui: { [K in keyof Required]: (props?: Record) => string }, transitioning: boolean }): any + body(props: { close: () => void, transitioning: boolean }): any + footer(props: { close: () => void, transitioning: boolean }): any } + \ No newline at end of file