diff --git a/cli/templates.mjs b/cli/templates.mjs
index 41236638..bad13252 100644
--- a/cli/templates.mjs
+++ b/cli/templates.mjs
@@ -31,7 +31,6 @@ const component = ({ name, primitive, pro, prose, content }) => {
? `
diff --git a/src/runtime/components/Breadcrumb.vue b/src/runtime/components/Breadcrumb.vue
index ba6064f0..b214d89e 100644
--- a/src/runtime/components/Breadcrumb.vue
+++ b/src/runtime/components/Breadcrumb.vue
@@ -1,6 +1,5 @@
diff --git a/src/runtime/components/ContextMenu.vue b/src/runtime/components/ContextMenu.vue
index 37588610..64689479 100644
--- a/src/runtime/components/ContextMenu.vue
+++ b/src/runtime/components/ContextMenu.vue
@@ -19,7 +19,7 @@ export interface ContextMenuItem extends Omit, Pic
kbds?: KbdProps['value'][] | KbdProps[]
/**
* The item type.
- * @defaultValue `'link'`
+ * @defaultValue 'link'
*/
type?: 'label' | 'separator' | 'link'
slot?: string
@@ -35,7 +35,7 @@ export interface ContextMenuProps extends Omit,
content?: Omit
/**
* Render the menu in a portal.
- * @defaultValue `true`
+ * @defaultValue true
*/
portal?: boolean
class?: any
diff --git a/src/runtime/components/Drawer.vue b/src/runtime/components/Drawer.vue
index 7b8bd0a8..713e7a97 100644
--- a/src/runtime/components/Drawer.vue
+++ b/src/runtime/components/Drawer.vue
@@ -10,7 +10,12 @@ const appConfig = _appConfig as AppConfig & { ui: { drawer: Partial {
+export interface DrawerProps extends Pick {
+ /**
+ * The element or component this component should render as.
+ * @defaultValue 'div'
+ */
+ as?: any
title?: string
description?: string
/** The content of the drawer. */
@@ -18,7 +23,7 @@ export interface DrawerProps extends Omit {
overlay?: boolean
/**
* Render the drawer in a portal.
- * @defaultValue `true`
+ * @defaultValue true
*/
portal?: boolean
class?: any
diff --git a/src/runtime/components/DropdownMenu.vue b/src/runtime/components/DropdownMenu.vue
index 669a6f92..50159d3f 100644
--- a/src/runtime/components/DropdownMenu.vue
+++ b/src/runtime/components/DropdownMenu.vue
@@ -19,7 +19,7 @@ export interface DropdownMenuItem extends Omit, Pi
kbds?: KbdProps['value'][] | KbdProps[]
/**
* The item type.
- * @defaultValue `'link'`
+ * @defaultValue 'link'
*/
type?: 'label' | 'separator' | 'link'
slot?: string
@@ -36,17 +36,17 @@ export interface DropdownMenuProps extends Omit
items?: T[] | T[][]
/**
* The content of the menu.
- * @defaultValue `{ side: 'bottom', sideOffset: 8 }`
+ * @defaultValue { side: 'bottom', sideOffset: 8 }
*/
content?: Omit
/**
* Display an arrow alongside the menu.
- * @defaultValue `false`
+ * @defaultValue false
*/
arrow?: boolean | Omit
/**
* Render the menu in a portal.
- * @defaultValue `true`
+ * @defaultValue true
*/
portal?: boolean
class?: any
diff --git a/src/runtime/components/InputMenu.vue b/src/runtime/components/InputMenu.vue
index e7e29b4e..55206a80 100644
--- a/src/runtime/components/InputMenu.vue
+++ b/src/runtime/components/InputMenu.vue
@@ -20,14 +20,19 @@ export interface InputMenuItem extends Pick {
chip?: ChipProps
/**
* The item type.
- * @defaultValue `'item'`
+ * @defaultValue 'item'
*/
type?: 'label' | 'separator' | 'item'
}
type InputMenuVariants = VariantProps
-export interface InputMenuProps extends Omit, 'asChild' | 'dir' | 'filterFunction' | 'displayValue'>, UseComponentIconsProps {
+export interface InputMenuProps extends Pick, 'modelValue' | 'defaultValue' | 'open' | 'defaultOpen' | 'searchTerm' | 'multiple' | 'disabled' | 'name' | 'resetSearchTermOnBlur'>, UseComponentIconsProps {
+ /**
+ * The element or component this component should render as.
+ * @defaultValue 'div'
+ */
+ as?: any
id?: string
type?: InputHTMLAttributes['type']
/** The placeholder text when the input is empty. */
@@ -40,39 +45,39 @@ export interface InputMenuProps extends Omit, 'asChild'
autofocusDelay?: number
/**
* The icon displayed to open the menu.
- * @defaultValue `appConfig.ui.icons.chevronDown`
+ * @defaultValue appConfig.ui.icons.chevronDown
*/
trailingIcon?: string
/**
* The icon displayed when an item is selected.
- * @defaultValue `appConfig.ui.icons.check`
+ * @defaultValue appConfig.ui.icons.check
*/
selectedIcon?: string
/**
* The icon displayed to delete a tag.
* Works only when `multiple` is `true`.
- * @defaultValue `appConfig.ui.icons.close`
+ * @defaultValue appConfig.ui.icons.close
*/
deleteIcon?: string
/**
* The content of the menu.
- * @defaultValue `{ side: 'bottom', sideOffset: 8, position: 'popper' }`
+ * @defaultValue { side: 'bottom', sideOffset: 8, position: 'popper' }
*/
content?: Omit
/**
* Display an arrow alongside the menu.
- * @defaultValue `false`
+ * @defaultValue false
*/
arrow?: boolean | Omit
/**
* Render the menu in a portal.
- * @defaultValue `true`
+ * @defaultValue true
*/
portal?: boolean
/**
* Whether to filter items or not, can be an array of fields to filter.
* When `false`, items will not be filtered which is useful for custom filtering.
- * @defaultValue `['label']`
+ * @defaultValue ['label']
*/
filter?: boolean | string[]
items?: T[] | T[][]
@@ -120,7 +125,7 @@ const slots = defineSlots>()
const searchTerm = defineModel('searchTerm', { default: '' })
const appConfig = useAppConfig()
-const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'modelValue', 'defaultValue', 'open', 'defaultOpen', 'multiple'), emits)
+const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'modelValue', 'defaultValue', 'open', 'defaultOpen', 'multiple', 'resetSearchTermOnBlur'), emits)
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, position: 'popper' }) as ComboboxContentProps)
const { emitFormBlur, emitFormChange, size: formGroupSize, color, id, name, disabled } = useFormField(props)
const { orientation, size: buttonGroupSize } = useButtonGroup(props)
diff --git a/src/runtime/components/Kbd.vue b/src/runtime/components/Kbd.vue
index a4b35297..b38ac2bc 100644
--- a/src/runtime/components/Kbd.vue
+++ b/src/runtime/components/Kbd.vue
@@ -1,6 +1,5 @@
@@ -17,7 +21,7 @@ export interface SkeletonProps extends Omit {
diff --git a/src/runtime/components/Slideover.vue b/src/runtime/components/Slideover.vue
index 28939707..61351048 100644
--- a/src/runtime/components/Slideover.vue
+++ b/src/runtime/components/Slideover.vue
@@ -19,28 +19,28 @@ export interface SlideoverProps extends DialogRootProps {
content?: Omit
/**
* Display an overlay behind the slideover.
- * @defaultValue `true`
+ * @defaultValue true
*/
overlay?: boolean
/**
* Open & close the slideover with a transition.
- * @defaultValue `true`
+ * @defaultValue true
*/
transition?: boolean
side?: SlideoverVariants['side']
/**
* Render the slideover in a portal.
- * @defaultValue `true`
+ * @defaultValue true
*/
portal?: boolean
/**
* Display a close button to dismiss the slideover.
- * @defaultValue `true` (`{ size: 'md', color: 'gray', variant: 'ghost' }`)
+ * @defaultValue true ({ size: 'md', color: 'gray', variant: 'ghost' })
*/
close?: ButtonProps | boolean
/**
* The icon displayed in the close button.
- * @defaultValue `appConfig.ui.icons.close`
+ * @defaultValue appConfig.ui.icons.close
*/
closeIcon?: string
/** When `true`, the slideover will not close when clicking outside. */
diff --git a/src/runtime/components/Slider.vue b/src/runtime/components/Slider.vue
index 8fc02e9a..16c3e605 100644
--- a/src/runtime/components/Slider.vue
+++ b/src/runtime/components/Slider.vue
@@ -11,12 +11,17 @@ const slider = tv({ extend: tv(theme), ...(appConfig.ui?.slider || {}) })
type SliderVariants = VariantProps
-export interface SliderProps extends Omit {
+export interface SliderProps extends Pick {
+ /**
+ * The element or component this component should render as.
+ * @defaultValue `div`
+ */
+ as?: any
size?: SliderVariants['size']
color?: SliderVariants['color']
/**
* The orientation of the slider.
- * @defaultValue `'horizontal'`
+ * @defaultValue 'horizontal'
*/
orientation?: SliderRootProps['orientation']
/** The value of the slider when initially rendered. Use when you do not need to control the state of the slider. */
diff --git a/src/runtime/components/Switch.vue b/src/runtime/components/Switch.vue
index caecfe78..97348bec 100644
--- a/src/runtime/components/Switch.vue
+++ b/src/runtime/components/Switch.vue
@@ -11,14 +11,19 @@ const switchTv = tv({ extend: tv(theme), ...(appConfig.ui?.switch || {}) })
type SwitchVariants = VariantProps
-export interface SwitchProps extends Omit {
+export interface SwitchProps extends Pick {
+ /**
+ * The element or component this component should render as.
+ * @defaultValue `div`
+ */
+ as?: any
color?: SwitchVariants['color']
size?: SwitchVariants['size']
/** When `true`, the loading icon will be displayed. */
loading?: boolean
/**
* The icon when the `loading` prop is `true`.
- * @defaultValue `appConfig.ui.icons.loading`
+ * @defaultValue appConfig.ui.icons.loading
*/
loadingIcon?: string
/** Display an icon when the switch is checked. */
diff --git a/src/runtime/components/Tabs.vue b/src/runtime/components/Tabs.vue
index 0b7af3e8..319edbd6 100644
--- a/src/runtime/components/Tabs.vue
+++ b/src/runtime/components/Tabs.vue
@@ -21,19 +21,24 @@ export interface TabsItem extends Partial
-export interface TabsProps extends Omit {
+export interface TabsProps extends Pick {
+ /**
+ * The element or component this component should render as.
+ * @defaultValue 'div'
+ */
+ as?: any
items?: T[]
color?: TabsVariants['color']
variant?: TabsVariants['variant']
size?: TabsVariants['size']
/**
* The orientation of the tabs.
- * @defaultValue `'horizontal'`
+ * @defaultValue 'horizontal'
*/
orientation?: TabsRootProps['orientation']
/**
* The content of the tabs, can be disabled to prevent rendering the content.
- * @defaultValue `true`
+ * @defaultValue true
*/
content?: boolean | Omit
class?: any
diff --git a/src/runtime/components/Toast.vue b/src/runtime/components/Toast.vue
index ae28f6c3..7472a461 100644
--- a/src/runtime/components/Toast.vue
+++ b/src/runtime/components/Toast.vue
@@ -12,7 +12,12 @@ const toast = tv({ extend: tv(theme), ...(appConfig.ui?.toast || {}) })
type ToastVariants = VariantProps
-export interface ToastProps extends Omit {
+export interface ToastProps extends Pick {
+ /**
+ * The element or component this component should render as.
+ * @defaultValue 'div'
+ */
+ as?: any
title?: string
description?: string
icon?: string
@@ -26,12 +31,12 @@ export interface ToastProps extends Omit(), { close: true })
+const props = withDefaults(defineProps(), {
+ close: true
+})
const emits = defineEmits()
const slots = defineSlots()
diff --git a/src/runtime/components/Toaster.vue b/src/runtime/components/Toaster.vue
index d482f5b4..2f6d755b 100644
--- a/src/runtime/components/Toaster.vue
+++ b/src/runtime/components/Toaster.vue
@@ -16,7 +16,7 @@ export interface ToasterProps extends Omit
position?: ToasterVariants['position']
/**
* Expand the toasts to show multiple toasts at once.
- * @defaultValue `true`
+ * @defaultValue true
*/
expand?: boolean
class?: any
diff --git a/src/runtime/components/Tooltip.vue b/src/runtime/components/Tooltip.vue
index eca4c03a..d5462e0b 100644
--- a/src/runtime/components/Tooltip.vue
+++ b/src/runtime/components/Tooltip.vue
@@ -17,17 +17,17 @@ export interface TooltipProps extends TooltipRootProps {
kbds?: KbdProps['value'][] | KbdProps[]
/**
* The content of the tooltip.
- * @defaultValue `{ side: 'bottom', sideOffset: 8 }`
+ * @defaultValue { side: 'bottom', sideOffset: 8 }
*/
content?: Omit
/**
* Display an arrow alongside the tooltip.
- * @defaultValue `false`
+ * @defaultValue false
*/
arrow?: boolean | Omit
/**
* Render the tooltip in a portal.
- * @defaultValue `true`
+ * @defaultValue true
*/
portal?: boolean
class?: any
@@ -49,7 +49,9 @@ import { TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArro
import { reactivePick } from '@vueuse/core'
import { UKbd } from '#components'
-const props = withDefaults(defineProps(), { portal: true })
+const props = withDefaults(defineProps(), {
+ portal: true
+})
const emits = defineEmits()
const slots = defineSlots()
diff --git a/src/runtime/composables/useComponentIcons.ts b/src/runtime/composables/useComponentIcons.ts
index 77fa72b2..ba59321b 100644
--- a/src/runtime/composables/useComponentIcons.ts
+++ b/src/runtime/composables/useComponentIcons.ts
@@ -16,7 +16,7 @@ export interface UseComponentIconsProps {
loading?: boolean
/**
* The icon when the `loading` prop is `true`.
- * @defaultValue `appConfig.ui.icons.loading`
+ * @defaultValue appConfig.ui.icons.loading
*/
loadingIcon?: string
}