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 {