@nuxt/ui 4.0.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/.nuxt/ui/calendar.ts +221 -9
  2. package/.nuxt/ui/chat-message.ts +10 -3
  3. package/.nuxt/ui/command-palette.ts +12 -2
  4. package/.nuxt/ui/context-menu.ts +3 -1
  5. package/.nuxt/ui/dropdown-menu.ts +3 -1
  6. package/.nuxt/ui/empty.ts +83 -0
  7. package/.nuxt/ui/index.ts +1 -0
  8. package/.nuxt/ui/input-menu.ts +12 -2
  9. package/.nuxt/ui/input-number.ts +25 -14
  10. package/.nuxt/ui/kbd.ts +1 -1
  11. package/.nuxt/ui/prose/code-tree.ts +1 -1
  12. package/.nuxt/ui/prose/img.ts +2 -1
  13. package/.nuxt/ui/select-menu.ts +12 -2
  14. package/.nuxt/ui/select.ts +4 -2
  15. package/.nuxt/ui/table.ts +8 -2
  16. package/.nuxt/ui/tree.ts +25 -11
  17. package/cli/templates.mjs +14 -2
  18. package/dist/module.d.mts +15 -0
  19. package/dist/module.json +2 -2
  20. package/dist/module.mjs +5 -2
  21. package/dist/runtime/components/Accordion.d.vue.ts +7 -1
  22. package/dist/runtime/components/Accordion.vue +4 -4
  23. package/dist/runtime/components/Accordion.vue.d.ts +7 -1
  24. package/dist/runtime/components/Alert.d.vue.ts +4 -4
  25. package/dist/runtime/components/Alert.vue +1 -1
  26. package/dist/runtime/components/Alert.vue.d.ts +4 -4
  27. package/dist/runtime/components/AuthForm.d.vue.ts +3 -1
  28. package/dist/runtime/components/AuthForm.vue +1 -1
  29. package/dist/runtime/components/AuthForm.vue.d.ts +3 -1
  30. package/dist/runtime/components/Avatar.d.vue.ts +5 -4
  31. package/dist/runtime/components/Avatar.vue +10 -3
  32. package/dist/runtime/components/Avatar.vue.d.ts +5 -4
  33. package/dist/runtime/components/Badge.d.vue.ts +9 -3
  34. package/dist/runtime/components/Badge.vue +3 -3
  35. package/dist/runtime/components/Badge.vue.d.ts +9 -3
  36. package/dist/runtime/components/Banner.d.vue.ts +4 -2
  37. package/dist/runtime/components/Banner.vue +1 -1
  38. package/dist/runtime/components/Banner.vue.d.ts +4 -2
  39. package/dist/runtime/components/BlogPost.d.vue.ts +9 -3
  40. package/dist/runtime/components/BlogPost.vue +2 -2
  41. package/dist/runtime/components/BlogPost.vue.d.ts +9 -3
  42. package/dist/runtime/components/BlogPosts.d.vue.ts +22 -13
  43. package/dist/runtime/components/BlogPosts.vue +8 -2
  44. package/dist/runtime/components/BlogPosts.vue.d.ts +22 -13
  45. package/dist/runtime/components/Breadcrumb.d.vue.ts +19 -4
  46. package/dist/runtime/components/Breadcrumb.vue +8 -8
  47. package/dist/runtime/components/Breadcrumb.vue.d.ts +19 -4
  48. package/dist/runtime/components/Button.d.vue.ts +9 -3
  49. package/dist/runtime/components/Button.vue +3 -3
  50. package/dist/runtime/components/Button.vue.d.ts +9 -3
  51. package/dist/runtime/components/Calendar.d.vue.ts +4 -0
  52. package/dist/runtime/components/Calendar.vue +3 -1
  53. package/dist/runtime/components/Calendar.vue.d.ts +4 -0
  54. package/dist/runtime/components/ChangelogVersion.d.vue.ts +12 -4
  55. package/dist/runtime/components/ChangelogVersion.vue +3 -3
  56. package/dist/runtime/components/ChangelogVersion.vue.d.ts +12 -4
  57. package/dist/runtime/components/ChangelogVersions.d.vue.ts +8 -36
  58. package/dist/runtime/components/ChangelogVersions.vue +2 -2
  59. package/dist/runtime/components/ChangelogVersions.vue.d.ts +8 -36
  60. package/dist/runtime/components/ChatMessage.d.vue.ts +1 -0
  61. package/dist/runtime/components/ChatMessage.vue +1 -1
  62. package/dist/runtime/components/ChatMessage.vue.d.ts +1 -0
  63. package/dist/runtime/components/ChatMessages.d.vue.ts +14 -15
  64. package/dist/runtime/components/ChatMessages.vue +24 -8
  65. package/dist/runtime/components/ChatMessages.vue.d.ts +14 -15
  66. package/dist/runtime/components/CommandPalette.d.vue.ts +43 -12
  67. package/dist/runtime/components/CommandPalette.vue +134 -68
  68. package/dist/runtime/components/CommandPalette.vue.d.ts +43 -12
  69. package/dist/runtime/components/ContextMenu.d.vue.ts +28 -6
  70. package/dist/runtime/components/ContextMenu.vue +2 -0
  71. package/dist/runtime/components/ContextMenu.vue.d.ts +28 -6
  72. package/dist/runtime/components/ContextMenuContent.d.vue.ts +2 -3
  73. package/dist/runtime/components/ContextMenuContent.vue +21 -11
  74. package/dist/runtime/components/ContextMenuContent.vue.d.ts +2 -3
  75. package/dist/runtime/components/DashboardNavbar.d.vue.ts +9 -3
  76. package/dist/runtime/components/DashboardNavbar.vue +3 -3
  77. package/dist/runtime/components/DashboardNavbar.vue.d.ts +9 -3
  78. package/dist/runtime/components/DashboardSearch.d.vue.ts +3 -1
  79. package/dist/runtime/components/DashboardSearch.vue +2 -2
  80. package/dist/runtime/components/DashboardSearch.vue.d.ts +3 -1
  81. package/dist/runtime/components/DashboardSearchButton.vue +2 -2
  82. package/dist/runtime/components/DashboardSidebar.d.vue.ts +5 -1
  83. package/dist/runtime/components/DashboardSidebar.vue +4 -4
  84. package/dist/runtime/components/DashboardSidebar.vue.d.ts +5 -1
  85. package/dist/runtime/components/Drawer.vue +2 -5
  86. package/dist/runtime/components/DropdownMenu.d.vue.ts +28 -6
  87. package/dist/runtime/components/DropdownMenu.vue +2 -0
  88. package/dist/runtime/components/DropdownMenu.vue.d.ts +28 -6
  89. package/dist/runtime/components/DropdownMenuContent.d.vue.ts +8 -5
  90. package/dist/runtime/components/DropdownMenuContent.vue +21 -11
  91. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +8 -5
  92. package/dist/runtime/components/Empty.d.vue.ts +53 -0
  93. package/dist/runtime/components/Empty.vue +68 -0
  94. package/dist/runtime/components/Empty.vue.d.ts +53 -0
  95. package/dist/runtime/components/Error.d.vue.ts +0 -1
  96. package/dist/runtime/components/Error.vue +1 -1
  97. package/dist/runtime/components/Error.vue.d.ts +0 -1
  98. package/dist/runtime/components/FileUpload.d.vue.ts +6 -1
  99. package/dist/runtime/components/FileUpload.vue +8 -7
  100. package/dist/runtime/components/FileUpload.vue.d.ts +6 -1
  101. package/dist/runtime/components/FooterColumns.d.vue.ts +9 -2
  102. package/dist/runtime/components/FooterColumns.vue +2 -2
  103. package/dist/runtime/components/FooterColumns.vue.d.ts +9 -2
  104. package/dist/runtime/components/Header.d.vue.ts +4 -1
  105. package/dist/runtime/components/Header.vue +3 -3
  106. package/dist/runtime/components/Header.vue.d.ts +4 -1
  107. package/dist/runtime/components/Input.d.vue.ts +9 -3
  108. package/dist/runtime/components/Input.vue +3 -3
  109. package/dist/runtime/components/Input.vue.d.ts +9 -3
  110. package/dist/runtime/components/InputMenu.d.vue.ts +40 -10
  111. package/dist/runtime/components/InputMenu.vue +117 -65
  112. package/dist/runtime/components/InputMenu.vue.d.ts +40 -10
  113. package/dist/runtime/components/InputNumber.d.vue.ts +4 -2
  114. package/dist/runtime/components/InputNumber.vue +7 -5
  115. package/dist/runtime/components/InputNumber.vue.d.ts +4 -2
  116. package/dist/runtime/components/InputTags.d.vue.ts +10 -3
  117. package/dist/runtime/components/InputTags.vue +5 -5
  118. package/dist/runtime/components/InputTags.vue.d.ts +10 -3
  119. package/dist/runtime/components/Main.d.vue.ts +2 -4
  120. package/dist/runtime/components/Main.vue +1 -1
  121. package/dist/runtime/components/Main.vue.d.ts +2 -4
  122. package/dist/runtime/components/Modal.d.vue.ts +1 -4
  123. package/dist/runtime/components/Modal.vue +3 -6
  124. package/dist/runtime/components/Modal.vue.d.ts +1 -4
  125. package/dist/runtime/components/NavigationMenu.d.vue.ts +16 -4
  126. package/dist/runtime/components/NavigationMenu.vue +14 -7
  127. package/dist/runtime/components/NavigationMenu.vue.d.ts +16 -4
  128. package/dist/runtime/components/PageAnchors.d.vue.ts +9 -2
  129. package/dist/runtime/components/PageAnchors.vue +2 -2
  130. package/dist/runtime/components/PageAnchors.vue.d.ts +9 -2
  131. package/dist/runtime/components/PageCard.d.vue.ts +3 -1
  132. package/dist/runtime/components/PageCard.vue +1 -1
  133. package/dist/runtime/components/PageCard.vue.d.ts +3 -1
  134. package/dist/runtime/components/PageFeature.d.vue.ts +3 -1
  135. package/dist/runtime/components/PageFeature.vue +1 -1
  136. package/dist/runtime/components/PageFeature.vue.d.ts +3 -1
  137. package/dist/runtime/components/PageLinks.d.vue.ts +9 -2
  138. package/dist/runtime/components/PageLinks.vue +2 -2
  139. package/dist/runtime/components/PageLinks.vue.d.ts +9 -2
  140. package/dist/runtime/components/PageSection.d.vue.ts +3 -1
  141. package/dist/runtime/components/PageSection.vue +1 -1
  142. package/dist/runtime/components/PageSection.vue.d.ts +3 -1
  143. package/dist/runtime/components/Pagination.d.vue.ts +3 -1
  144. package/dist/runtime/components/Pagination.vue +1 -1
  145. package/dist/runtime/components/Pagination.vue.d.ts +3 -1
  146. package/dist/runtime/components/Popover.d.vue.ts +24 -23
  147. package/dist/runtime/components/Popover.vue +4 -4
  148. package/dist/runtime/components/Popover.vue.d.ts +24 -23
  149. package/dist/runtime/components/PricingPlan.d.vue.ts +9 -3
  150. package/dist/runtime/components/PricingPlan.vue +3 -3
  151. package/dist/runtime/components/PricingPlan.vue.d.ts +9 -3
  152. package/dist/runtime/components/PricingPlans.d.vue.ts +20 -13
  153. package/dist/runtime/components/PricingPlans.vue +7 -1
  154. package/dist/runtime/components/PricingPlans.vue.d.ts +20 -13
  155. package/dist/runtime/components/Select.d.vue.ts +20 -9
  156. package/dist/runtime/components/Select.vue +18 -9
  157. package/dist/runtime/components/Select.vue.d.ts +20 -9
  158. package/dist/runtime/components/SelectMenu.d.vue.ts +39 -11
  159. package/dist/runtime/components/SelectMenu.vue +114 -61
  160. package/dist/runtime/components/SelectMenu.vue.d.ts +39 -11
  161. package/dist/runtime/components/Separator.d.vue.ts +3 -1
  162. package/dist/runtime/components/Separator.vue +1 -1
  163. package/dist/runtime/components/Separator.vue.d.ts +3 -1
  164. package/dist/runtime/components/Slideover.d.vue.ts +1 -4
  165. package/dist/runtime/components/Slideover.vue +3 -6
  166. package/dist/runtime/components/Slideover.vue.d.ts +1 -4
  167. package/dist/runtime/components/Stepper.d.vue.ts +4 -1
  168. package/dist/runtime/components/Stepper.vue +1 -1
  169. package/dist/runtime/components/Stepper.vue.d.ts +4 -1
  170. package/dist/runtime/components/Table.d.vue.ts +21 -1
  171. package/dist/runtime/components/Table.vue +126 -60
  172. package/dist/runtime/components/Table.vue.d.ts +21 -1
  173. package/dist/runtime/components/Tabs.d.vue.ts +8 -3
  174. package/dist/runtime/components/Tabs.vue +3 -3
  175. package/dist/runtime/components/Tabs.vue.d.ts +8 -3
  176. package/dist/runtime/components/Textarea.d.vue.ts +9 -3
  177. package/dist/runtime/components/Textarea.vue +3 -3
  178. package/dist/runtime/components/Textarea.vue.d.ts +9 -3
  179. package/dist/runtime/components/Toast.d.vue.ts +4 -4
  180. package/dist/runtime/components/Toast.vue +1 -1
  181. package/dist/runtime/components/Toast.vue.d.ts +4 -4
  182. package/dist/runtime/components/Toaster.d.vue.ts +6 -0
  183. package/dist/runtime/components/Toaster.vue +6 -3
  184. package/dist/runtime/components/Toaster.vue.d.ts +6 -0
  185. package/dist/runtime/components/Tooltip.d.vue.ts +3 -1
  186. package/dist/runtime/components/Tooltip.vue +1 -1
  187. package/dist/runtime/components/Tooltip.vue.d.ts +3 -1
  188. package/dist/runtime/components/Tree.d.vue.ts +43 -5
  189. package/dist/runtime/components/Tree.vue +169 -81
  190. package/dist/runtime/components/Tree.vue.d.ts +43 -5
  191. package/dist/runtime/components/User.d.vue.ts +3 -1
  192. package/dist/runtime/components/User.vue +1 -1
  193. package/dist/runtime/components/User.vue.d.ts +3 -1
  194. package/dist/runtime/components/content/ContentNavigation.d.vue.ts +1 -0
  195. package/dist/runtime/components/content/ContentNavigation.vue +5 -5
  196. package/dist/runtime/components/content/ContentNavigation.vue.d.ts +1 -0
  197. package/dist/runtime/components/content/ContentSearch.d.vue.ts +3 -1
  198. package/dist/runtime/components/content/ContentSearch.vue +4 -2
  199. package/dist/runtime/components/content/ContentSearch.vue.d.ts +3 -1
  200. package/dist/runtime/components/content/ContentSearchButton.vue +2 -2
  201. package/dist/runtime/components/content/ContentSurround.d.vue.ts +1 -0
  202. package/dist/runtime/components/content/ContentSurround.vue +4 -4
  203. package/dist/runtime/components/content/ContentSurround.vue.d.ts +1 -0
  204. package/dist/runtime/components/content/ContentToc.d.vue.ts +2 -0
  205. package/dist/runtime/components/content/ContentToc.vue +2 -2
  206. package/dist/runtime/components/content/ContentToc.vue.d.ts +2 -0
  207. package/dist/runtime/components/prose/Accordion.d.vue.ts +6 -0
  208. package/dist/runtime/components/prose/Accordion.vue +3 -2
  209. package/dist/runtime/components/prose/Accordion.vue.d.ts +6 -0
  210. package/dist/runtime/components/prose/CodeTree.vue +40 -36
  211. package/dist/runtime/components/prose/Collapsible.d.vue.ts +2 -2
  212. package/dist/runtime/components/prose/Collapsible.vue +2 -2
  213. package/dist/runtime/components/prose/Collapsible.vue.d.ts +2 -2
  214. package/dist/runtime/components/prose/Field.d.vue.ts +1 -1
  215. package/dist/runtime/components/prose/Field.vue.d.ts +1 -1
  216. package/dist/runtime/components/prose/Img.vue +14 -3
  217. package/dist/runtime/components/prose/Tabs.d.vue.ts +6 -0
  218. package/dist/runtime/components/prose/Tabs.vue +3 -2
  219. package/dist/runtime/components/prose/Tabs.vue.d.ts +6 -0
  220. package/dist/runtime/composables/useKbd.js +1 -1
  221. package/dist/runtime/composables/useToast.d.ts +3 -1
  222. package/dist/runtime/composables/useToast.js +4 -3
  223. package/dist/runtime/inertia/components/Link.vue +12 -7
  224. package/dist/runtime/locale/hr.d.ts +3 -0
  225. package/dist/runtime/locale/hr.js +129 -0
  226. package/dist/runtime/locale/index.d.ts +1 -0
  227. package/dist/runtime/locale/index.js +1 -0
  228. package/dist/runtime/types/index.d.ts +2 -1
  229. package/dist/runtime/types/index.js +2 -1
  230. package/dist/runtime/types/tv.d.ts +6 -0
  231. package/dist/shared/{ui.D-FDXAUi.mjs → ui.Cmctwxv6.mjs} +381 -48
  232. package/dist/unplugin.mjs +2 -1
  233. package/dist/vite.mjs +3 -2
  234. package/package.json +18 -17
@@ -11,6 +11,7 @@ interface DropdownMenuContentProps<T extends ArrayOrNested<DropdownMenuItem>> ex
11
11
  portal?: boolean | string | HTMLElement;
12
12
  sub?: boolean;
13
13
  labelKey: GetItemKeys<T>;
14
+ descriptionKey: GetItemKeys<T>;
14
15
  /**
15
16
  * @IconifyIcon
16
17
  */
@@ -24,16 +25,18 @@ interface DropdownMenuContentProps<T extends ArrayOrNested<DropdownMenuItem>> ex
24
25
  */
25
26
  externalIcon?: boolean | IconProps['name'];
26
27
  class?: any;
27
- ui: {
28
- [K in keyof Required<DropdownMenu['slots']>]: (props?: Record<string, any>) => string;
29
- };
28
+ ui: DropdownMenu['ui'];
30
29
  uiOverride?: DropdownMenu['slots'];
31
30
  }
32
- type DropdownMenuContentSlots<A extends ArrayOrNested<DropdownMenuItem> = ArrayOrNested<DropdownMenuItem>, T extends NestedItem<A> = NestedItem<A>> = Pick<DropdownMenuSlots<A>, 'item' | 'item-leading' | 'item-label' | 'item-trailing' | 'content-top' | 'content-bottom'> & {
31
+ type DropdownMenuContentSlots<A extends ArrayOrNested<DropdownMenuItem> = ArrayOrNested<DropdownMenuItem>, T extends NestedItem<A> = NestedItem<A>> = Pick<DropdownMenuSlots<A>, 'item' | 'item-leading' | 'item-label' | 'item-description' | 'item-trailing' | 'content-top' | 'content-bottom'> & {
33
32
  default(props?: {}): any;
34
- } & DynamicSlots<MergeTypes<T>, 'leading' | 'label' | 'trailing', {
33
+ } & DynamicSlots<MergeTypes<T>, 'label' | 'description', {
35
34
  active?: boolean;
36
35
  index: number;
36
+ }> & DynamicSlots<MergeTypes<T>, 'leading' | 'trailing', {
37
+ active?: boolean;
38
+ index: number;
39
+ ui: DropdownMenu['ui'];
37
40
  }>;
38
41
  declare const __VLS_export: <T extends ArrayOrNested<DropdownMenuItem>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
39
42
  props: __VLS_PrettifyLocal<DropdownMenuContentProps<T> & {
@@ -0,0 +1,53 @@
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import theme from '#build/ui/empty';
3
+ import type { ComponentConfig } from '../types/tv';
4
+ import type { ButtonProps, IconProps, AvatarProps } from '../types';
5
+ type Empty = ComponentConfig<typeof theme, AppConfig, 'empty'>;
6
+ export interface EmptyProps {
7
+ /**
8
+ * The element or component this component should render as.
9
+ * @defaultValue 'div'
10
+ */
11
+ as?: any;
12
+ /**
13
+ * The icon displayed above the title.
14
+ * @IconifyIcon
15
+ */
16
+ icon?: IconProps['name'];
17
+ avatar?: AvatarProps;
18
+ title?: string;
19
+ description?: string;
20
+ /**
21
+ * Display a list of Button in the body.
22
+ */
23
+ actions?: ButtonProps[];
24
+ /**
25
+ * @defaultValue 'outline'
26
+ */
27
+ variant?: Empty['variants']['variant'];
28
+ /**
29
+ * @defaultValue 'md'
30
+ */
31
+ size?: Empty['variants']['size'];
32
+ class?: any;
33
+ ui?: Empty['slots'];
34
+ }
35
+ export interface EmptySlots {
36
+ header(props?: {}): any;
37
+ leading(props: {
38
+ ui: Empty['ui'];
39
+ }): any;
40
+ title(props?: {}): any;
41
+ description(props?: {}): any;
42
+ body(props?: {}): any;
43
+ actions(props?: {}): any;
44
+ footer(props?: {}): any;
45
+ }
46
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<EmptyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<EmptyProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, EmptySlots>;
47
+ declare const _default: typeof __VLS_export;
48
+ export default _default;
49
+ type __VLS_WithSlots<T, S> = T & {
50
+ new (): {
51
+ $slots: S;
52
+ };
53
+ };
@@ -0,0 +1,68 @@
1
+ <script>
2
+ import theme from "#build/ui/empty";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { Primitive } from "reka-ui";
8
+ import { useAppConfig } from "#imports";
9
+ import { tv } from "../utils/tv";
10
+ import UAvatar from "./Avatar.vue";
11
+ import UButton from "./Button.vue";
12
+ const props = defineProps({
13
+ as: { type: null, required: false },
14
+ icon: { type: [String, Object], required: false },
15
+ avatar: { type: Object, required: false },
16
+ title: { type: String, required: false },
17
+ description: { type: String, required: false },
18
+ actions: { type: Array, required: false },
19
+ variant: { type: null, required: false },
20
+ size: { type: null, required: false },
21
+ class: { type: null, required: false },
22
+ ui: { type: null, required: false }
23
+ });
24
+ const slots = defineSlots();
25
+ const appConfig = useAppConfig();
26
+ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.empty || {} })({
27
+ variant: props.variant,
28
+ size: props.size
29
+ }));
30
+ </script>
31
+
32
+ <template>
33
+ <Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
34
+ <div v-if="!!slots.header || (icon || avatar || !!slots.leading) || (title || !!slots.title) || (description || !!slots.description)" :class="ui.header({ class: props.ui?.header })">
35
+ <slot name="header">
36
+ <slot name="leading" :ui="ui">
37
+ <UAvatar v-if="icon || avatar" :icon="icon" v-bind="typeof avatar === 'object' ? avatar : {}" :class="ui.avatar({ class: props.ui?.avatar })" />
38
+ </slot>
39
+
40
+ <h2 v-if="title || !!slots.title" :class="ui.title({ class: props.ui?.title })">
41
+ <slot name="title">
42
+ {{ title }}
43
+ </slot>
44
+ </h2>
45
+
46
+ <div v-if="description || !!slots.description" :class="ui.description({ class: props.ui?.description })">
47
+ <slot name="description">
48
+ {{ description }}
49
+ </slot>
50
+ </div>
51
+ </slot>
52
+ </div>
53
+
54
+ <div v-if="!!slots.body || (actions?.length || !!slots.actions)" :class="ui.body({ class: props.ui?.body })">
55
+ <slot name="body">
56
+ <div v-if="actions?.length || !!slots.actions" :class="ui.actions({ class: props.ui?.actions })">
57
+ <slot name="actions">
58
+ <UButton v-for="(action, index) in actions" :key="index" :size="size" v-bind="action" />
59
+ </slot>
60
+ </div>
61
+ </slot>
62
+ </div>
63
+
64
+ <div v-if="!!slots.footer" :class="ui.footer({ class: props.ui?.footer })">
65
+ <slot name="footer" />
66
+ </div>
67
+ </Primitive>
68
+ </template>
@@ -0,0 +1,53 @@
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import theme from '#build/ui/empty';
3
+ import type { ComponentConfig } from '../types/tv';
4
+ import type { ButtonProps, IconProps, AvatarProps } from '../types';
5
+ type Empty = ComponentConfig<typeof theme, AppConfig, 'empty'>;
6
+ export interface EmptyProps {
7
+ /**
8
+ * The element or component this component should render as.
9
+ * @defaultValue 'div'
10
+ */
11
+ as?: any;
12
+ /**
13
+ * The icon displayed above the title.
14
+ * @IconifyIcon
15
+ */
16
+ icon?: IconProps['name'];
17
+ avatar?: AvatarProps;
18
+ title?: string;
19
+ description?: string;
20
+ /**
21
+ * Display a list of Button in the body.
22
+ */
23
+ actions?: ButtonProps[];
24
+ /**
25
+ * @defaultValue 'outline'
26
+ */
27
+ variant?: Empty['variants']['variant'];
28
+ /**
29
+ * @defaultValue 'md'
30
+ */
31
+ size?: Empty['variants']['size'];
32
+ class?: any;
33
+ ui?: Empty['slots'];
34
+ }
35
+ export interface EmptySlots {
36
+ header(props?: {}): any;
37
+ leading(props: {
38
+ ui: Empty['ui'];
39
+ }): any;
40
+ title(props?: {}): any;
41
+ description(props?: {}): any;
42
+ body(props?: {}): any;
43
+ actions(props?: {}): any;
44
+ footer(props?: {}): any;
45
+ }
46
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<EmptyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<EmptyProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, EmptySlots>;
47
+ declare const _default: typeof __VLS_export;
48
+ export default _default;
49
+ type __VLS_WithSlots<T, S> = T & {
50
+ new (): {
51
+ $slots: S;
52
+ };
53
+ };
@@ -36,7 +36,6 @@ export interface ErrorSlots {
36
36
  }
37
37
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ErrorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ErrorProps> & Readonly<{}>, {
38
38
  clear: boolean | Partial<ButtonProps>;
39
- as: any;
40
39
  redirect: string;
41
40
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ErrorSlots>;
42
41
  declare const _default: typeof __VLS_export;
@@ -10,7 +10,7 @@ import { useLocale } from "../composables/useLocale";
10
10
  import { tv } from "../utils/tv";
11
11
  import UButton from "./Button.vue";
12
12
  const props = defineProps({
13
- as: { type: null, required: false, default: "main" },
13
+ as: { type: null, required: false },
14
14
  error: { type: Object, required: false },
15
15
  redirect: { type: String, required: false, default: "/" },
16
16
  clear: { type: [Boolean, Object], required: false, default: true },
@@ -36,7 +36,6 @@ export interface ErrorSlots {
36
36
  }
37
37
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ErrorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ErrorProps> & Readonly<{}>, {
38
38
  clear: boolean | Partial<ButtonProps>;
39
- as: any;
40
39
  redirect: string;
41
40
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ErrorSlots>;
42
41
  declare const _default: typeof __VLS_export;
@@ -100,8 +100,11 @@ export interface FileUploadSlots<M extends boolean = false> {
100
100
  'default'(props: {
101
101
  open: UseFileDialogReturn['open'];
102
102
  removeFile: (index?: number) => void;
103
+ ui: FileUpload['ui'];
104
+ }): any;
105
+ 'leading'(props: {
106
+ ui: FileUpload['ui'];
103
107
  }): any;
104
- 'leading'(props?: {}): any;
105
108
  'label'(props?: {}): any;
106
109
  'description'(props?: {}): any;
107
110
  'actions'(props: {
@@ -129,6 +132,7 @@ export interface FileUploadSlots<M extends boolean = false> {
129
132
  'file-leading'(props: {
130
133
  file: File;
131
134
  index: number;
135
+ ui: FileUpload['ui'];
132
136
  }): any;
133
137
  'file-name'(props: {
134
138
  file: File;
@@ -141,6 +145,7 @@ export interface FileUploadSlots<M extends boolean = false> {
141
145
  'file-trailing'(props: {
142
146
  file: File;
143
147
  index: number;
148
+ ui: FileUpload['ui'];
144
149
  }): any;
145
150
  }
146
151
  declare const __VLS_export: <M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
@@ -35,7 +35,7 @@ const props = defineProps({
35
35
  required: { type: Boolean, required: false },
36
36
  disabled: { type: Boolean, required: false },
37
37
  fileIcon: { type: [String, Object], required: false },
38
- fileDelete: { type: [Boolean, Object], required: false },
38
+ fileDelete: { type: [Boolean, Object], required: false, default: true },
39
39
  fileDeleteIcon: { type: [String, Object], required: false },
40
40
  class: { type: null, required: false },
41
41
  ui: { type: null, required: false }
@@ -142,8 +142,8 @@ defineExpose({
142
142
  <slot name="files" :files="modelValue">
143
143
  <div v-for="(file, index) in Array.isArray(modelValue) ? modelValue : [modelValue]" :key="file.name" :class="ui.file({ class: props.ui?.file })">
144
144
  <slot name="file" :file="file" :index="index">
145
- <slot name="file-leading" :file="file" :index="index">
146
- <UAvatar :src="createObjectUrl(file)" :icon="fileIcon || appConfig.ui.icons.file" :size="props.size" :class="ui.fileLeadingAvatar({ class: props.ui?.fileLeadingAvatar })" />
145
+ <slot name="file-leading" :file="file" :index="index" :ui="ui">
146
+ <UAvatar :as="{ img: 'img' }" :src="createObjectUrl(file)" :icon="fileIcon || appConfig.ui.icons.file" :size="props.size" :class="ui.fileLeadingAvatar({ class: props.ui?.fileLeadingAvatar })" />
147
147
  </slot>
148
148
 
149
149
  <div :class="ui.fileWrapper({ class: props.ui?.fileWrapper })">
@@ -160,8 +160,9 @@ defineExpose({
160
160
  </span>
161
161
  </div>
162
162
 
163
- <slot name="file-trailing" :file="file" :index="index">
163
+ <slot name="file-trailing" :file="file" :index="index" :ui="ui">
164
164
  <UButton
165
+ v-if="fileDelete"
165
166
  color="neutral"
166
167
  v-bind="{
167
168
  ...layout === 'grid' ? {
@@ -189,7 +190,7 @@ defineExpose({
189
190
  </DefineFilesTemplate>
190
191
 
191
192
  <Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
192
- <slot :open="open" :remove-file="removeFile">
193
+ <slot :open="open" :remove-file="removeFile" :ui="ui">
193
194
  <component
194
195
  :is="variant === 'button' ? 'button' : 'div'"
195
196
  ref="dropzoneRef"
@@ -199,13 +200,13 @@ defineExpose({
199
200
  :class="ui.base({ class: props.ui?.base })"
200
201
  :tabindex="interactive && !disabled ? 0 : -1"
201
202
  @click="interactive && !disabled && open()"
202
- @keydown.prevent
203
+ @keydown.space.prevent
203
204
  @keyup.enter.space="interactive && !disabled && open()"
204
205
  >
205
206
  <ReuseFilesTemplate v-if="position === 'inside'" />
206
207
 
207
208
  <div v-if="position === 'inside' ? multiple ? !modelValue?.length : !modelValue : true" :class="ui.wrapper({ class: props.ui?.wrapper })">
208
- <slot name="leading">
209
+ <slot name="leading" :ui="ui">
209
210
  <UIcon v-if="variant === 'button'" :name="icon || appConfig.ui.icons.upload" :class="ui.icon({ class: props.ui?.icon })" />
210
211
  <UAvatar v-else :icon="icon || appConfig.ui.icons.upload" :size="props.size" :class="ui.avatar({ class: props.ui?.avatar })" />
211
212
  </slot>
@@ -100,8 +100,11 @@ export interface FileUploadSlots<M extends boolean = false> {
100
100
  'default'(props: {
101
101
  open: UseFileDialogReturn['open'];
102
102
  removeFile: (index?: number) => void;
103
+ ui: FileUpload['ui'];
104
+ }): any;
105
+ 'leading'(props: {
106
+ ui: FileUpload['ui'];
103
107
  }): any;
104
- 'leading'(props?: {}): any;
105
108
  'label'(props?: {}): any;
106
109
  'description'(props?: {}): any;
107
110
  'actions'(props: {
@@ -129,6 +132,7 @@ export interface FileUploadSlots<M extends boolean = false> {
129
132
  'file-leading'(props: {
130
133
  file: File;
131
134
  index: number;
135
+ ui: FileUpload['ui'];
132
136
  }): any;
133
137
  'file-name'(props: {
134
138
  file: File;
@@ -141,6 +145,7 @@ export interface FileUploadSlots<M extends boolean = false> {
141
145
  'file-trailing'(props: {
142
146
  file: File;
143
147
  index: number;
148
+ ui: FileUpload['ui'];
144
149
  }): any;
145
150
  }
146
151
  declare const __VLS_export: <M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
@@ -29,6 +29,7 @@ export interface FooterColumnsProps<T extends FooterColumnLink = FooterColumnLin
29
29
  type SlotProps<T> = (props: {
30
30
  link: T;
31
31
  active: boolean;
32
+ ui: FooterColumns['ui'];
32
33
  }) => any;
33
34
  export interface FooterColumnsSlots<T extends FooterColumnLink = FooterColumnLink> {
34
35
  'left'(props?: {}): any;
@@ -39,8 +40,14 @@ export interface FooterColumnsSlots<T extends FooterColumnLink = FooterColumnLin
39
40
  }) => any;
40
41
  'link': SlotProps<T>;
41
42
  'link-leading': SlotProps<T>;
42
- 'link-label': SlotProps<T>;
43
- 'link-trailing': SlotProps<T>;
43
+ 'link-label'(props: {
44
+ link: T;
45
+ active: boolean;
46
+ }): any;
47
+ 'link-trailing'(props: {
48
+ link: T;
49
+ active: boolean;
50
+ }): any;
44
51
  }
45
52
  declare const __VLS_export: <T extends FooterColumnLink>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
46
53
  props: __VLS_PrettifyLocal<FooterColumnsProps<T>> & import("vue").PublicProps;
@@ -41,8 +41,8 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.footerColumns
41
41
  <li v-for="(link, linkIndex) in column.children" :key="linkIndex" :class="ui.item({ class: [props.ui?.item, link.ui?.item] })">
42
42
  <ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(link)" custom>
43
43
  <ULinkBase v-bind="slotProps" :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], active })">
44
- <slot name="link" :link="link" :active="active">
45
- <slot name="link-leading" :link="link" :active="active">
44
+ <slot name="link" :link="link" :active="active" :ui="ui">
45
+ <slot name="link-leading" :link="link" :active="active" :ui="ui">
46
46
  <UIcon v-if="link.icon" :name="link.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, link.ui?.linkLeadingIcon], active })" />
47
47
  </slot>
48
48
 
@@ -29,6 +29,7 @@ export interface FooterColumnsProps<T extends FooterColumnLink = FooterColumnLin
29
29
  type SlotProps<T> = (props: {
30
30
  link: T;
31
31
  active: boolean;
32
+ ui: FooterColumns['ui'];
32
33
  }) => any;
33
34
  export interface FooterColumnsSlots<T extends FooterColumnLink = FooterColumnLink> {
34
35
  'left'(props?: {}): any;
@@ -39,8 +40,14 @@ export interface FooterColumnsSlots<T extends FooterColumnLink = FooterColumnLin
39
40
  }) => any;
40
41
  'link': SlotProps<T>;
41
42
  'link-leading': SlotProps<T>;
42
- 'link-label': SlotProps<T>;
43
- 'link-trailing': SlotProps<T>;
43
+ 'link-label'(props: {
44
+ link: T;
45
+ active: boolean;
46
+ }): any;
47
+ 'link-trailing'(props: {
48
+ link: T;
49
+ active: boolean;
50
+ }): any;
44
51
  }
45
52
  declare const __VLS_export: <T extends FooterColumnLink>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
46
53
  props: __VLS_PrettifyLocal<FooterColumnsProps<T>> & import("vue").PublicProps;
@@ -43,11 +43,14 @@ export interface HeaderSlots {
43
43
  toggle(props: {
44
44
  open: boolean;
45
45
  toggle: () => void;
46
+ ui: Header['ui'];
46
47
  }): any;
47
48
  top(props?: {}): any;
48
49
  bottom(props?: {}): any;
49
50
  body(props?: {}): any;
50
- content(props?: {}): any;
51
+ content(props: {
52
+ close?: () => void;
53
+ }): any;
51
54
  }
52
55
  declare const __VLS_export: <T extends HeaderMode>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
53
56
  props: __VLS_PrettifyLocal<(HeaderProps<T> & {
@@ -62,7 +62,7 @@ function toggleOpen() {
62
62
 
63
63
  <template>
64
64
  <DefineToggleTemplate>
65
- <slot name="toggle" :open="open" :toggle="toggleOpen">
65
+ <slot name="toggle" :open="open" :toggle="toggleOpen" :ui="ui">
66
66
  <UButton
67
67
  v-if="toggle"
68
68
  color="neutral"
@@ -124,8 +124,8 @@ function toggleOpen() {
124
124
  content: ui.content({ class: props.ui?.content })
125
125
  }"
126
126
  >
127
- <template #content>
128
- <slot name="content">
127
+ <template #content="contentData">
128
+ <slot name="content" v-bind="contentData">
129
129
  <div v-if="mode !== 'drawer'" :class="ui.header({ class: props.ui?.header })">
130
130
  <ReuseLeftTemplate />
131
131
 
@@ -43,11 +43,14 @@ export interface HeaderSlots {
43
43
  toggle(props: {
44
44
  open: boolean;
45
45
  toggle: () => void;
46
+ ui: Header['ui'];
46
47
  }): any;
47
48
  top(props?: {}): any;
48
49
  bottom(props?: {}): any;
49
50
  body(props?: {}): any;
50
- content(props?: {}): any;
51
+ content(props: {
52
+ close?: () => void;
53
+ }): any;
51
54
  }
52
55
  declare const __VLS_export: <T extends HeaderMode>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
53
56
  props: __VLS_PrettifyLocal<(HeaderProps<T> & {
@@ -49,9 +49,15 @@ export interface InputEmits<T extends InputValue = InputValue> {
49
49
  'change': [event: Event];
50
50
  }
51
51
  export interface InputSlots {
52
- leading(props?: {}): any;
53
- default(props?: {}): any;
54
- trailing(props?: {}): any;
52
+ leading(props: {
53
+ ui: Input['ui'];
54
+ }): any;
55
+ default(props: {
56
+ ui: Input['ui'];
57
+ }): any;
58
+ trailing(props: {
59
+ ui: Input['ui'];
60
+ }): any;
55
61
  }
56
62
  declare const __VLS_export: <T extends InputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
57
63
  props: __VLS_PrettifyLocal<InputProps<T> & {
@@ -135,17 +135,17 @@ defineExpose({
135
135
  @focus="emitFormFocus"
136
136
  >
137
137
 
138
- <slot />
138
+ <slot :ui="ui" />
139
139
 
140
140
  <span v-if="isLeading || !!avatar || !!slots.leading" :class="ui.leading({ class: props.ui?.leading })">
141
- <slot name="leading">
141
+ <slot name="leading" :ui="ui">
142
142
  <UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon })" />
143
143
  <UAvatar v-else-if="!!avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })" />
144
144
  </slot>
145
145
  </span>
146
146
 
147
147
  <span v-if="isTrailing || !!slots.trailing" :class="ui.trailing({ class: props.ui?.trailing })">
148
- <slot name="trailing">
148
+ <slot name="trailing" :ui="ui">
149
149
  <UIcon v-if="trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
150
150
  </slot>
151
151
  </span>
@@ -49,9 +49,15 @@ export interface InputEmits<T extends InputValue = InputValue> {
49
49
  'change': [event: Event];
50
50
  }
51
51
  export interface InputSlots {
52
- leading(props?: {}): any;
53
- default(props?: {}): any;
54
- trailing(props?: {}): any;
52
+ leading(props: {
53
+ ui: Input['ui'];
54
+ }): any;
55
+ default(props: {
56
+ ui: Input['ui'];
57
+ }): any;
58
+ trailing(props: {
59
+ ui: Input['ui'];
60
+ }): any;
55
61
  }
56
62
  declare const __VLS_export: <T extends InputValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
57
63
  props: __VLS_PrettifyLocal<InputProps<T> & {
@@ -11,6 +11,7 @@ type InputMenu = ComponentConfig<typeof theme, AppConfig, 'inputMenu'>;
11
11
  export type InputMenuValue = AcceptableValue;
12
12
  export type InputMenuItem = InputMenuValue | {
13
13
  label?: string;
14
+ description?: string;
14
15
  /**
15
16
  * @IconifyIcon
16
17
  */
@@ -23,9 +24,9 @@ export type InputMenuItem = InputMenuValue | {
23
24
  */
24
25
  type?: 'label' | 'separator' | 'item';
25
26
  disabled?: boolean;
26
- onSelect?(e?: Event): void;
27
+ onSelect?: (e: Event) => void;
27
28
  class?: any;
28
- ui?: Pick<InputMenu['slots'], 'tagsItem' | 'tagsItemText' | 'tagsItemDelete' | 'tagsItemDeleteIcon' | 'label' | 'separator' | 'item' | 'itemLeadingIcon' | 'itemLeadingAvatarSize' | 'itemLeadingAvatar' | 'itemLeadingChip' | 'itemLeadingChipSize' | 'itemLabel' | 'itemTrailing' | 'itemTrailingIcon'>;
29
+ ui?: Pick<InputMenu['slots'], 'tagsItem' | 'tagsItemText' | 'tagsItemDelete' | 'tagsItemDeleteIcon' | 'label' | 'separator' | 'item' | 'itemLeadingIcon' | 'itemLeadingAvatarSize' | 'itemLeadingAvatar' | 'itemLeadingChip' | 'itemLeadingChipSize' | 'itemWrapper' | 'itemLabel' | 'itemDescription' | 'itemTrailing' | 'itemTrailingIcon'>;
29
30
  [key: string]: any;
30
31
  };
31
32
  export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<T> | undefined = undefined, M extends boolean = false> extends Pick<ComboboxRootProps<T>, 'open' | 'defaultOpen' | 'disabled' | 'name' | 'resetSearchTermOnBlur' | 'resetSearchTermOnSelect' | 'highlightOnHover' | 'openOnClick' | 'openOnFocus'>, UseComponentIconsProps {
@@ -87,6 +88,23 @@ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOr
87
88
  * @defaultValue true
88
89
  */
89
90
  portal?: boolean | string | HTMLElement;
91
+ /**
92
+ * Enable virtualization for large lists.
93
+ * Note: when enabled, all groups are flattened into a single list due to a limitation of Reka UI (https://github.com/unovue/reka-ui/issues/1885).
94
+ * @defaultValue false
95
+ */
96
+ virtualize?: boolean | {
97
+ /**
98
+ * Number of items rendered outside the visible area
99
+ * @defaultValue 12
100
+ */
101
+ overscan?: number;
102
+ /**
103
+ * Estimated size (in px) of each item
104
+ * @defaultValue 32
105
+ */
106
+ estimateSize?: number;
107
+ };
90
108
  /**
91
109
  * When `items` is an array of objects, select the field to use as the value instead of the object itself.
92
110
  * @defaultValue undefined
@@ -97,6 +115,11 @@ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOr
97
115
  * @defaultValue 'label'
98
116
  */
99
117
  labelKey?: GetItemKeys<T>;
118
+ /**
119
+ * When `items` is an array of objects, select the field to use as the description.
120
+ * @defaultValue 'description'
121
+ */
122
+ descriptionKey?: GetItemKeys<T>;
100
123
  items?: T;
101
124
  /** The value of the InputMenu when initially rendered. Use when you do not need to control the state of the InputMenu. */
102
125
  defaultValue?: GetModelValue<T, VK, M>;
@@ -144,30 +167,37 @@ export type InputMenuEmits<A extends ArrayOrNested<InputMenuItem>, VK extends Ge
144
167
  type SlotProps<T extends InputMenuItem> = (props: {
145
168
  item: T;
146
169
  index: number;
170
+ ui: InputMenu['ui'];
147
171
  }) => any;
148
172
  export interface InputMenuSlots<A extends ArrayOrNested<InputMenuItem> = ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<A> | undefined = undefined, M extends boolean = false, T extends NestedItem<A> = NestedItem<A>> {
149
173
  'leading'(props: {
150
174
  modelValue?: GetModelValue<A, VK, M>;
151
175
  open: boolean;
152
- ui: {
153
- [K in keyof Required<InputMenu['slots']>]: (props?: Record<string, any>) => string;
154
- };
176
+ ui: InputMenu['ui'];
155
177
  }): any;
156
178
  'trailing'(props: {
157
179
  modelValue?: GetModelValue<A, VK, M>;
158
180
  open: boolean;
159
- ui: {
160
- [K in keyof Required<InputMenu['slots']>]: (props?: Record<string, any>) => string;
161
- };
181
+ ui: InputMenu['ui'];
162
182
  }): any;
163
183
  'empty'(props: {
164
184
  searchTerm?: string;
165
185
  }): any;
166
186
  'item': SlotProps<T>;
167
187
  'item-leading': SlotProps<T>;
168
- 'item-label': SlotProps<T>;
188
+ 'item-label'(props: {
189
+ item: T;
190
+ index: number;
191
+ }): any;
192
+ 'item-description'(props: {
193
+ item: T;
194
+ index: number;
195
+ }): any;
169
196
  'item-trailing': SlotProps<T>;
170
- 'tags-item-text': SlotProps<T>;
197
+ 'tags-item-text'(props: {
198
+ item: T;
199
+ index: number;
200
+ }): any;
171
201
  'tags-item-delete': SlotProps<T>;
172
202
  'content-top': (props?: {}) => any;
173
203
  'content-bottom': (props?: {}) => any;