mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 12:14:41 +01:00
fix: define empty props in slots for nuxt-component-meta parsing
This commit is contained in:
@@ -46,7 +46,7 @@ export interface ${upperName}Props extends Omit<PrimitiveProps, 'asChild'> {
|
||||
}
|
||||
|
||||
export interface ${upperName}Slots {
|
||||
default(): any
|
||||
default(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -46,10 +46,10 @@ export interface AlertEmits {
|
||||
}
|
||||
|
||||
export interface AlertSlots {
|
||||
leading(): any
|
||||
title(): any
|
||||
description(): any
|
||||
actions(): any
|
||||
leading(props?: any): any
|
||||
title(props?: any): any
|
||||
description(props?: any): any
|
||||
actions(props?: any): any
|
||||
close(props: { class: string }): any
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -22,7 +22,7 @@ export interface AvatarGroupProps extends Omit<PrimitiveProps, 'asChild'> {
|
||||
}
|
||||
|
||||
export interface AvatarGroupSlots {
|
||||
default(): any
|
||||
default(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export interface BadgeProps extends Omit<PrimitiveProps, 'asChild'> {
|
||||
}
|
||||
|
||||
export interface BadgeSlots {
|
||||
default(): any
|
||||
default(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ export type BreadcrumbSlots<T extends { slot?: string }> = {
|
||||
'item-leading': SlotProps<T>
|
||||
'item-label': SlotProps<T>
|
||||
'item-trailing': SlotProps<T>
|
||||
'separator'(): any
|
||||
'separator'(props?: any): any
|
||||
} & DynamicSlots<T, SlotProps<T>>
|
||||
</script>
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ export interface ButtonProps extends UseComponentIconsProps, Omit<LinkProps, 'cu
|
||||
}
|
||||
|
||||
export interface ButtonSlots {
|
||||
leading(): any
|
||||
default(): any
|
||||
trailing(): any
|
||||
leading(props?: any): any
|
||||
default(props?: any): any
|
||||
trailing(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ export interface ButtonGroupProps extends Omit<PrimitiveProps, 'asChild'> {
|
||||
}
|
||||
|
||||
export interface ButtonGroupSlots {
|
||||
default(): any
|
||||
default(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@ export interface CardProps extends Omit<PrimitiveProps, 'asChild'> {
|
||||
}
|
||||
|
||||
export interface CardSlots {
|
||||
header(): any
|
||||
default(): any
|
||||
footer(): any
|
||||
header(props?: any): any
|
||||
default(props?: any): any
|
||||
footer(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ export interface ChipProps extends Omit<PrimitiveProps, 'asChild'> {
|
||||
}
|
||||
|
||||
export interface ChipSlots {
|
||||
default(): any
|
||||
content(): any
|
||||
default(props?: any): any
|
||||
content(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ export interface CollapsibleEmits extends CollapsibleRootEmits {}
|
||||
|
||||
export interface CollapsibleSlots {
|
||||
default(props: { open: boolean }): any
|
||||
content(): any
|
||||
content(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ type SlotProps<T> = (props: { item: T, index: number }) => any
|
||||
|
||||
export type CommandPaletteSlots<G extends { slot?: string }, T extends { slot?: string }> = {
|
||||
'empty'(props: { searchTerm?: string }): any
|
||||
'close'(): any
|
||||
'close'(props?: any): any
|
||||
'item': SlotProps<T>
|
||||
'item-leading': SlotProps<T>
|
||||
'item-label': SlotProps<T>
|
||||
|
||||
@@ -14,7 +14,7 @@ export interface ContainerProps extends Omit<PrimitiveProps, 'asChild'> {
|
||||
}
|
||||
|
||||
export interface ContainerSlots {
|
||||
default(): any
|
||||
default(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export interface ContextMenuEmits extends ContextMenuRootEmits {}
|
||||
type SlotProps<T> = (props: { item: T, active?: boolean, index: number }) => any
|
||||
|
||||
export type ContextMenuSlots<T extends { slot?: string }> = {
|
||||
'default'(): any
|
||||
'default'(props?: any): any
|
||||
'item': SlotProps<T>
|
||||
'item-leading': SlotProps<T>
|
||||
'item-label': SlotProps<T>
|
||||
|
||||
@@ -28,14 +28,14 @@ export interface DrawerProps extends Omit<DrawerRootProps, 'asChild'> {
|
||||
export interface DrawerEmits extends DrawerRootEmits {}
|
||||
|
||||
export interface DrawerSlots {
|
||||
default(): any
|
||||
handle(): any
|
||||
content(): any
|
||||
header(): any
|
||||
title(): any
|
||||
description(): any
|
||||
body(): any
|
||||
footer(): any
|
||||
default(props?: any): any
|
||||
handle(props?: any): any
|
||||
content(props?: any): any
|
||||
header(props?: any): any
|
||||
title(props?: any): any
|
||||
description(props?: any): any
|
||||
body(props?: any): any
|
||||
footer(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ interface DropdownMenuContentProps<T> extends Omit<RadixDropdownMenuContentProps
|
||||
interface DropdownMenuContentEmits extends RadixDropdownMenuContentEmits {}
|
||||
|
||||
type DropdownMenuContentSlots<T extends { slot?: string }> = Omit<DropdownMenuSlots<T>, 'default'> & {
|
||||
default(): any
|
||||
default(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ export interface FormEmits<T extends object> {
|
||||
}
|
||||
|
||||
export interface FormSlots {
|
||||
default(): any
|
||||
default(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ export interface InputEmits {
|
||||
}
|
||||
|
||||
export interface InputSlots {
|
||||
leading(): any
|
||||
default(): any
|
||||
trailing(): any
|
||||
leading(props?: any): any
|
||||
default(props?: any): any
|
||||
trailing(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export interface KbdProps extends Omit<PrimitiveProps, 'asChild'> {
|
||||
}
|
||||
|
||||
export interface KbdSlots {
|
||||
default(): any
|
||||
default(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -43,13 +43,13 @@ export interface ModalEmits extends DialogRootEmits {}
|
||||
|
||||
export interface ModalSlots {
|
||||
default(props: { open: boolean }): any
|
||||
content(): any
|
||||
header(): any
|
||||
title(): any
|
||||
description(): any
|
||||
content(props?: any): any
|
||||
header(props?: any): any
|
||||
title(props?: any): any
|
||||
description(props?: any): any
|
||||
close(props: { class: string }): any
|
||||
body(): any
|
||||
footer(): any
|
||||
body(props?: any): any
|
||||
footer(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -75,11 +75,11 @@ export interface PaginationProps extends Omit<PaginationRootProps, 'asChild'> {
|
||||
export interface PaginationEmits extends PaginationRootEmits {}
|
||||
|
||||
export interface PaginationSlots {
|
||||
first(): any
|
||||
prev(): any
|
||||
next(): any
|
||||
last(): any
|
||||
ellipsis(): any
|
||||
first(props?: any): any
|
||||
prev(props?: any): any
|
||||
next(props?: any): any
|
||||
last(props?: any): any
|
||||
ellipsis(props?: any): any
|
||||
item(props: {
|
||||
page: number
|
||||
pageCount: number
|
||||
|
||||
@@ -38,7 +38,7 @@ export interface PopoverEmits extends PopoverRootEmits {}
|
||||
|
||||
export interface PopoverSlots {
|
||||
default(props: { open: boolean }): any
|
||||
content(): any
|
||||
content(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ export interface RadioGroupEmits extends RadioGroupRootEmits {}
|
||||
type SlotProps<T> = (props: { item: T, modelValue?: string }) => any
|
||||
|
||||
export interface RadioGroupSlots<T> {
|
||||
legend(): any
|
||||
legend(props?: any): any
|
||||
label: SlotProps<T>
|
||||
description: SlotProps<T>
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ export interface SeparatorProps extends Omit<_SeparatorProps, 'asChild' | 'orien
|
||||
}
|
||||
|
||||
export interface SeparatorSlots {
|
||||
default(): any
|
||||
default(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -53,13 +53,13 @@ export interface SlideoverEmits extends DialogRootEmits {}
|
||||
|
||||
export interface SlideoverSlots {
|
||||
default(props: { open: boolean }): any
|
||||
content(): any
|
||||
header(): any
|
||||
title(): any
|
||||
description(): any
|
||||
content(props?: any): any
|
||||
header(props?: any): any
|
||||
title(props?: any): any
|
||||
description(props?: any): any
|
||||
close(props: { class: string }): any
|
||||
body(): any
|
||||
footer(): any
|
||||
body(props?: any): any
|
||||
footer(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ export interface TextareaEmits {
|
||||
}
|
||||
|
||||
export interface TextareaSlots {
|
||||
default(): any
|
||||
default(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -42,10 +42,10 @@ export interface ToastProps extends Omit<ToastRootProps, 'asChild' | 'forceMount
|
||||
export interface ToastEmits extends ToastRootEmits {}
|
||||
|
||||
export interface ToastSlots {
|
||||
leading(): any
|
||||
title(): any
|
||||
description(): any
|
||||
actions(): any
|
||||
leading(props?: any): any
|
||||
title(props?: any): any
|
||||
description(props?: any): any
|
||||
actions(props?: any): any
|
||||
close(props: { class: string }): any
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface ToasterProps extends Omit<ToastProviderProps, 'swipeDirection'>
|
||||
}
|
||||
|
||||
export interface ToasterSlots {
|
||||
default(): any
|
||||
default(props?: any): any
|
||||
}
|
||||
|
||||
export type ToasterContext = ComputedRef<{
|
||||
|
||||
@@ -38,7 +38,7 @@ export interface TooltipEmits extends TooltipRootEmits {}
|
||||
|
||||
export interface TooltipSlots {
|
||||
default(props: { open: boolean }): any
|
||||
content(): any
|
||||
content(props?: any): any
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user