@nuxt/ui 4.0.0-alpha.1 → 4.0.0-alpha.2

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 (251) hide show
  1. package/.nuxt/ui/content/content-navigation.ts +2 -1
  2. package/.nuxt/ui/marquee.ts +1 -1
  3. package/.nuxt/ui/progress.ts +3 -3
  4. package/.nuxt/ui/prose/code-tree.ts +1 -1
  5. package/.nuxt/ui/tree.ts +1 -1
  6. package/README.md +13 -1
  7. package/dist/module.d.mts +6 -6
  8. package/dist/module.json +2 -2
  9. package/dist/module.mjs +8 -6
  10. package/dist/runtime/components/Accordion.d.vue.ts +79 -0
  11. package/dist/runtime/components/Accordion.vue +3 -3
  12. package/dist/runtime/components/Accordion.vue.d.ts +2 -2
  13. package/dist/runtime/components/Alert.d.vue.ts +81 -0
  14. package/dist/runtime/components/App.d.vue.ts +25 -0
  15. package/dist/runtime/components/AuthForm.d.vue.ts +128 -0
  16. package/dist/runtime/components/AuthForm.vue.d.ts +39 -1
  17. package/dist/runtime/components/Avatar.d.vue.ts +41 -0
  18. package/dist/runtime/components/AvatarGroup.d.vue.ts +31 -0
  19. package/dist/runtime/components/Badge.d.vue.ts +43 -0
  20. package/dist/runtime/components/Banner.d.vue.ts +72 -0
  21. package/dist/runtime/components/Banner.vue +1 -1
  22. package/dist/runtime/components/BlogPost.d.vue.ts +60 -0
  23. package/dist/runtime/components/BlogPosts.d.vue.ts +31 -0
  24. package/dist/runtime/components/Breadcrumb.d.vue.ts +67 -0
  25. package/dist/runtime/components/Breadcrumb.vue +1 -1
  26. package/dist/runtime/components/Breadcrumb.vue.d.ts +2 -2
  27. package/dist/runtime/components/Button.d.vue.ts +44 -0
  28. package/dist/runtime/components/Calendar.d.vue.ts +112 -0
  29. package/dist/runtime/components/Card.d.vue.ts +29 -0
  30. package/dist/runtime/components/Carousel.d.vue.ts +127 -0
  31. package/dist/runtime/components/Carousel.vue.d.ts +10 -10
  32. package/dist/runtime/components/ChangelogVersion.d.vue.ts +59 -0
  33. package/dist/runtime/components/ChangelogVersions.d.vue.ts +78 -0
  34. package/dist/runtime/components/ChangelogVersions.vue +2 -2
  35. package/dist/runtime/components/ChatMessage.d.vue.ts +67 -0
  36. package/dist/runtime/components/ChatMessages.d.vue.ts +83 -0
  37. package/dist/runtime/components/ChatMessages.vue +2 -2
  38. package/dist/runtime/components/ChatPalette.d.vue.ts +24 -0
  39. package/dist/runtime/components/ChatPrompt.d.vue.ts +61 -0
  40. package/dist/runtime/components/ChatPrompt.vue +2 -2
  41. package/dist/runtime/components/ChatPromptSubmit.d.vue.ts +100 -0
  42. package/dist/runtime/components/Checkbox.d.vue.ts +74 -0
  43. package/dist/runtime/components/CheckboxGroup.d.vue.ts +89 -0
  44. package/dist/runtime/components/CheckboxGroup.vue +8 -8
  45. package/dist/runtime/components/CheckboxGroup.vue.d.ts +17 -13
  46. package/dist/runtime/components/Chip.d.vue.ts +57 -0
  47. package/dist/runtime/components/Collapsible.d.vue.ts +35 -0
  48. package/dist/runtime/components/ColorPicker.d.vue.ts +48 -0
  49. package/dist/runtime/components/CommandPalette.d.vue.ts +193 -0
  50. package/dist/runtime/components/CommandPalette.vue +5 -4
  51. package/dist/runtime/components/CommandPalette.vue.d.ts +2 -1
  52. package/dist/runtime/components/Container.d.vue.ts +18 -0
  53. package/dist/runtime/components/ContextMenu.d.vue.ts +110 -0
  54. package/dist/runtime/components/ContextMenu.vue +2 -2
  55. package/dist/runtime/components/ContextMenu.vue.d.ts +2 -2
  56. package/dist/runtime/components/ContextMenuContent.d.vue.ts +50 -0
  57. package/dist/runtime/components/ContextMenuContent.vue +2 -2
  58. package/dist/runtime/components/ContextMenuContent.vue.d.ts +2 -2
  59. package/dist/runtime/components/DashboardGroup.d.vue.ts +24 -0
  60. package/dist/runtime/components/DashboardNavbar.d.vue.ts +52 -0
  61. package/dist/runtime/components/DashboardPanel.d.vue.ts +30 -0
  62. package/dist/runtime/components/DashboardResizeHandle.d.vue.ts +18 -0
  63. package/dist/runtime/components/DashboardSearch.d.vue.ts +91 -0
  64. package/dist/runtime/components/DashboardSearch.vue +2 -2
  65. package/dist/runtime/components/DashboardSearchButton.d.vue.ts +59 -0
  66. package/dist/runtime/components/DashboardSearchButton.vue +2 -2
  67. package/dist/runtime/components/DashboardSidebar.d.vue.ts +75 -0
  68. package/dist/runtime/components/DashboardSidebarCollapse.d.vue.ts +19 -0
  69. package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +19 -0
  70. package/dist/runtime/components/DashboardToolbar.d.vue.ts +25 -0
  71. package/dist/runtime/components/Drawer.d.vue.ts +84 -0
  72. package/dist/runtime/components/DropdownMenu.d.vue.ts +120 -0
  73. package/dist/runtime/components/DropdownMenu.vue +2 -2
  74. package/dist/runtime/components/DropdownMenu.vue.d.ts +2 -2
  75. package/dist/runtime/components/DropdownMenuContent.d.vue.ts +56 -0
  76. package/dist/runtime/components/DropdownMenuContent.vue +2 -2
  77. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +2 -2
  78. package/dist/runtime/components/Error.d.vue.ts +47 -0
  79. package/dist/runtime/components/FieldGroup.d.vue.ts +34 -0
  80. package/dist/runtime/components/FileUpload.d.vue.ts +166 -0
  81. package/dist/runtime/components/FileUpload.vue +1 -0
  82. package/dist/runtime/components/Footer.d.vue.ts +29 -0
  83. package/dist/runtime/components/FooterColumns.d.vue.ts +57 -0
  84. package/dist/runtime/components/Form.d.vue.ts +114 -0
  85. package/dist/runtime/components/Form.vue +111 -52
  86. package/dist/runtime/components/Form.vue.d.ts +54 -11
  87. package/dist/runtime/components/FormField.d.vue.ts +61 -0
  88. package/dist/runtime/components/Header.d.vue.ts +68 -0
  89. package/dist/runtime/components/Icon.d.vue.ts +8 -0
  90. package/dist/runtime/components/Input.d.vue.ts +74 -0
  91. package/dist/runtime/components/Input.vue.d.ts +4 -3
  92. package/dist/runtime/components/InputMenu.d.vue.ts +330 -0
  93. package/dist/runtime/components/InputMenu.vue +1 -1
  94. package/dist/runtime/components/InputMenu.vue.d.ts +4 -4
  95. package/dist/runtime/components/InputNumber.d.vue.ts +188 -0
  96. package/dist/runtime/components/InputNumber.vue +2 -2
  97. package/dist/runtime/components/InputNumber.vue.d.ts +0 -2
  98. package/dist/runtime/components/InputTags.d.vue.ts +186 -0
  99. package/dist/runtime/components/Kbd.d.vue.ts +38 -0
  100. package/dist/runtime/components/Link.d.vue.ts +91 -0
  101. package/dist/runtime/components/LinkBase.d.vue.ts +25 -0
  102. package/dist/runtime/components/Main.d.vue.ts +20 -0
  103. package/dist/runtime/components/Marquee.d.vue.ts +32 -0
  104. package/dist/runtime/components/Marquee.vue +1 -1
  105. package/dist/runtime/components/Modal.d.vue.ts +107 -0
  106. package/dist/runtime/components/NavigationMenu.d.vue.ts +171 -0
  107. package/dist/runtime/components/NavigationMenu.vue.d.ts +2 -2
  108. package/dist/runtime/components/OverlayProvider.d.vue.ts +2 -0
  109. package/dist/runtime/components/Page.d.vue.ts +25 -0
  110. package/dist/runtime/components/PageAnchors.d.vue.ts +47 -0
  111. package/dist/runtime/components/PageAside.d.vue.ts +27 -0
  112. package/dist/runtime/components/PageBody.d.vue.ts +18 -0
  113. package/dist/runtime/components/PageCTA.d.vue.ts +56 -0
  114. package/dist/runtime/components/PageCard.d.vue.ts +72 -0
  115. package/dist/runtime/components/PageColumns.d.vue.ts +18 -0
  116. package/dist/runtime/components/PageFeature.d.vue.ts +44 -0
  117. package/dist/runtime/components/PageGrid.d.vue.ts +18 -0
  118. package/dist/runtime/components/PageHeader.d.vue.ts +36 -0
  119. package/dist/runtime/components/PageHero.d.vue.ts +53 -0
  120. package/dist/runtime/components/PageLinks.d.vue.ts +49 -0
  121. package/dist/runtime/components/PageList.d.vue.ts +21 -0
  122. package/dist/runtime/components/PageLogos.d.vue.ts +33 -0
  123. package/dist/runtime/components/PageSection.d.vue.ts +68 -0
  124. package/dist/runtime/components/Pagination.d.vue.ts +118 -0
  125. package/dist/runtime/components/PinInput.d.vue.ts +60 -0
  126. package/dist/runtime/components/Popover.d.vue.ts +71 -0
  127. package/dist/runtime/components/PricingPlan.d.vue.ts +112 -0
  128. package/dist/runtime/components/PricingPlans.d.vue.ts +44 -0
  129. package/dist/runtime/components/PricingTable.d.vue.ts +105 -0
  130. package/dist/runtime/components/Progress.d.vue.ts +66 -0
  131. package/dist/runtime/components/Progress.vue +2 -3
  132. package/dist/runtime/components/RadioGroup.d.vue.ts +99 -0
  133. package/dist/runtime/components/RadioGroup.vue +13 -11
  134. package/dist/runtime/components/RadioGroup.vue.d.ts +17 -13
  135. package/dist/runtime/components/Select.d.vue.ts +254 -0
  136. package/dist/runtime/components/Select.vue +3 -3
  137. package/dist/runtime/components/Select.vue.d.ts +5 -5
  138. package/dist/runtime/components/SelectMenu.d.vue.ts +303 -0
  139. package/dist/runtime/components/SelectMenu.vue.d.ts +4 -4
  140. package/dist/runtime/components/Separator.d.vue.ts +54 -0
  141. package/dist/runtime/components/Skeleton.d.vue.ts +17 -0
  142. package/dist/runtime/components/Slideover.d.vue.ts +108 -0
  143. package/dist/runtime/components/Slider.d.vue.ts +57 -0
  144. package/dist/runtime/components/Stepper.d.vue.ts +87 -0
  145. package/dist/runtime/components/Switch.d.vue.ts +71 -0
  146. package/dist/runtime/components/Table.d.vue.ts +201 -0
  147. package/dist/runtime/components/Table.vue.d.ts +26 -26
  148. package/dist/runtime/components/Tabs.d.vue.ts +99 -0
  149. package/dist/runtime/components/Tabs.vue +10 -3
  150. package/dist/runtime/components/Tabs.vue.d.ts +2 -2
  151. package/dist/runtime/components/Textarea.d.vue.ts +74 -0
  152. package/dist/runtime/components/Timeline.d.vue.ts +71 -0
  153. package/dist/runtime/components/Toast.d.vue.ts +165 -0
  154. package/dist/runtime/components/Toaster.d.vue.ts +44 -0
  155. package/dist/runtime/components/Tooltip.d.vue.ts +57 -0
  156. package/dist/runtime/components/Tree.d.vue.ts +116 -0
  157. package/dist/runtime/components/Tree.vue +68 -40
  158. package/dist/runtime/components/Tree.vue.d.ts +1 -1
  159. package/dist/runtime/components/User.d.vue.ts +47 -0
  160. package/dist/runtime/components/color-mode/ColorModeAvatar.d.vue.ts +7 -0
  161. package/dist/runtime/components/color-mode/ColorModeButton.d.vue.ts +23 -0
  162. package/dist/runtime/components/color-mode/ColorModeImage.d.vue.ts +6 -0
  163. package/dist/runtime/components/color-mode/ColorModeSelect.d.vue.ts +5 -0
  164. package/dist/runtime/components/color-mode/ColorModeSwitch.d.vue.ts +5 -0
  165. package/dist/runtime/components/content/ContentNavigation.d.vue.ts +102 -0
  166. package/dist/runtime/components/content/ContentNavigation.vue +5 -4
  167. package/dist/runtime/components/content/ContentNavigation.vue.d.ts +2 -2
  168. package/dist/runtime/components/content/ContentSearch.d.vue.ts +114 -0
  169. package/dist/runtime/components/content/ContentSearch.vue +2 -2
  170. package/dist/runtime/components/content/ContentSearchButton.d.vue.ts +59 -0
  171. package/dist/runtime/components/content/ContentSearchButton.vue +2 -2
  172. package/dist/runtime/components/content/ContentSurround.d.vue.ts +59 -0
  173. package/dist/runtime/components/content/ContentToc.d.vue.ts +88 -0
  174. package/dist/runtime/components/locale/LocaleSelect.d.vue.ts +15 -0
  175. package/dist/runtime/components/prose/A.d.vue.ts +15 -0
  176. package/dist/runtime/components/prose/Accordion.d.vue.ts +16 -0
  177. package/dist/runtime/components/prose/AccordionItem.d.vue.ts +15 -0
  178. package/dist/runtime/components/prose/Badge.d.vue.ts +13 -0
  179. package/dist/runtime/components/prose/Blockquote.d.vue.ts +13 -0
  180. package/dist/runtime/components/prose/Callout.d.vue.ts +26 -0
  181. package/dist/runtime/components/prose/Card.d.vue.ts +29 -0
  182. package/dist/runtime/components/prose/CardGroup.d.vue.ts +13 -0
  183. package/dist/runtime/components/prose/Code.d.vue.ts +22 -0
  184. package/dist/runtime/components/prose/CodeCollapse.d.vue.ts +47 -0
  185. package/dist/runtime/components/prose/CodeGroup.d.vue.ts +37 -0
  186. package/dist/runtime/components/prose/CodeIcon.d.vue.ts +7 -0
  187. package/dist/runtime/components/prose/CodePreview.d.vue.ts +19 -0
  188. package/dist/runtime/components/prose/CodeTree.d.vue.ts +28 -0
  189. package/dist/runtime/components/prose/CodeTree.vue +38 -31
  190. package/dist/runtime/components/prose/Collapsible.d.vue.ts +39 -0
  191. package/dist/runtime/components/prose/Em.d.vue.ts +13 -0
  192. package/dist/runtime/components/prose/Field.d.vue.ts +39 -0
  193. package/dist/runtime/components/prose/FieldGroup.d.vue.ts +18 -0
  194. package/dist/runtime/components/prose/H1.d.vue.ts +19 -0
  195. package/dist/runtime/components/prose/H2.d.vue.ts +19 -0
  196. package/dist/runtime/components/prose/H3.d.vue.ts +19 -0
  197. package/dist/runtime/components/prose/H4.d.vue.ts +19 -0
  198. package/dist/runtime/components/prose/Hr.d.vue.ts +5 -0
  199. package/dist/runtime/components/prose/Icon.d.vue.ts +6 -0
  200. package/dist/runtime/components/prose/Img.d.vue.ts +21 -0
  201. package/dist/runtime/components/prose/Kbd.d.vue.ts +6 -0
  202. package/dist/runtime/components/prose/Li.d.vue.ts +13 -0
  203. package/dist/runtime/components/prose/Ol.d.vue.ts +13 -0
  204. package/dist/runtime/components/prose/P.d.vue.ts +13 -0
  205. package/dist/runtime/components/prose/Pre.d.vue.ts +26 -0
  206. package/dist/runtime/components/prose/Script.d.vue.ts +5 -0
  207. package/dist/runtime/components/prose/Steps.d.vue.ts +22 -0
  208. package/dist/runtime/components/prose/Strong.d.vue.ts +13 -0
  209. package/dist/runtime/components/prose/Table.d.vue.ts +18 -0
  210. package/dist/runtime/components/prose/Tabs.d.vue.ts +36 -0
  211. package/dist/runtime/components/prose/TabsItem.d.vue.ts +15 -0
  212. package/dist/runtime/components/prose/Tbody.d.vue.ts +13 -0
  213. package/dist/runtime/components/prose/Td.d.vue.ts +13 -0
  214. package/dist/runtime/components/prose/Th.d.vue.ts +13 -0
  215. package/dist/runtime/components/prose/Thead.d.vue.ts +13 -0
  216. package/dist/runtime/components/prose/Tr.d.vue.ts +13 -0
  217. package/dist/runtime/components/prose/Ul.d.vue.ts +13 -0
  218. package/dist/runtime/components/prose/callout/Caution.d.vue.ts +14 -0
  219. package/dist/runtime/components/prose/callout/Note.d.vue.ts +14 -0
  220. package/dist/runtime/components/prose/callout/Tip.d.vue.ts +14 -0
  221. package/dist/runtime/components/prose/callout/Warning.d.vue.ts +14 -0
  222. package/dist/runtime/composables/useFormField.d.ts +1 -0
  223. package/dist/runtime/composables/useFormField.js +1 -0
  224. package/dist/runtime/inertia/components/Link.d.vue.ts +63 -0
  225. package/dist/runtime/inertia/components/LinkBase.d.vue.ts +25 -0
  226. package/dist/runtime/locale/de_ch.d.ts +3 -0
  227. package/dist/runtime/locale/de_ch.js +129 -0
  228. package/dist/runtime/locale/id.js +1 -1
  229. package/dist/runtime/locale/index.d.ts +2 -0
  230. package/dist/runtime/locale/index.js +2 -0
  231. package/dist/runtime/locale/ka.d.ts +3 -0
  232. package/dist/runtime/locale/ka.js +132 -0
  233. package/dist/runtime/types/form.d.ts +9 -8
  234. package/dist/runtime/types/form.js +1 -3
  235. package/dist/runtime/types/index.d.ts +1 -0
  236. package/dist/runtime/types/index.js +1 -0
  237. package/dist/runtime/types/utils.d.ts +7 -3
  238. package/dist/runtime/utils/form.d.ts +2 -0
  239. package/dist/runtime/utils/form.js +28 -0
  240. package/dist/runtime/utils/fuse.d.ts +2 -1
  241. package/dist/runtime/utils/index.d.ts +3 -3
  242. package/dist/runtime/utils/index.js +6 -3
  243. package/dist/runtime/vue/components/Icon.d.vue.ts +6 -0
  244. package/dist/runtime/vue/components/Link.d.vue.ts +93 -0
  245. package/dist/runtime/vue/components/color-mode/ColorModeButton.d.vue.ts +16 -0
  246. package/dist/runtime/vue/components/color-mode/ColorModeSelect.d.vue.ts +5 -0
  247. package/dist/runtime/vue/components/color-mode/ColorModeSwitch.d.vue.ts +5 -0
  248. package/dist/shared/{ui.BEZXPd3d.mjs → ui.Bs5uUhtm.mjs} +17 -12
  249. package/dist/unplugin.mjs +1 -1
  250. package/dist/vite.mjs +1 -1
  251. package/package.json +21 -34
@@ -0,0 +1,19 @@
1
+ import type { ButtonProps } from '../types';
2
+ export interface DashboardSidebarToggleProps extends /** @vue-ignore */ Pick<ButtonProps, 'as' | 'size' | 'disabled' | 'ui'> {
3
+ side?: 'left' | 'right';
4
+ /**
5
+ * @defaultValue 'neutral'
6
+ */
7
+ color?: ButtonProps['color'];
8
+ /**
9
+ * @defaultValue 'ghost'
10
+ */
11
+ variant?: ButtonProps['variant'];
12
+ class?: any;
13
+ }
14
+ declare const _default: import("vue").DefineComponent<DashboardSidebarToggleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardSidebarToggleProps> & Readonly<{}>, {
15
+ color: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral";
16
+ variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
17
+ side: "left" | "right";
18
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import theme from '#build/ui/dashboard-toolbar';
3
+ import type { ComponentConfig } from '../types/tv';
4
+ type DashboardToolbar = ComponentConfig<typeof theme, AppConfig, 'dashboardToolbar'>;
5
+ export interface DashboardToolbarProps {
6
+ /**
7
+ * The element or component this component should render as.
8
+ * @defaultValue 'div'
9
+ */
10
+ as?: any;
11
+ class?: any;
12
+ ui?: DashboardToolbar['slots'];
13
+ }
14
+ export interface DashboardToolbarSlots {
15
+ default(props?: {}): any;
16
+ left(props?: {}): any;
17
+ right(props?: {}): any;
18
+ }
19
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DashboardToolbarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardToolbarProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, DashboardToolbarSlots>;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,84 @@
1
+ import type { DrawerRootProps, DrawerRootEmits } from 'vaul-vue';
2
+ import type { DialogContentProps, DialogContentEmits } from 'reka-ui';
3
+ import type { AppConfig } from '@nuxt/schema';
4
+ import theme from '#build/ui/drawer';
5
+ import type { EmitsToProps } from '../types/utils';
6
+ import type { ComponentConfig } from '../types/tv';
7
+ type Drawer = ComponentConfig<typeof theme, AppConfig, 'drawer'>;
8
+ export interface DrawerProps extends Pick<DrawerRootProps, 'activeSnapPoint' | 'closeThreshold' | 'shouldScaleBackground' | 'setBackgroundColorOnScale' | 'scrollLockTimeout' | 'fixed' | 'dismissible' | 'modal' | 'open' | 'defaultOpen' | 'nested' | 'direction' | 'noBodyStyles' | 'handleOnly' | 'preventScrollRestoration' | 'snapPoints'> {
9
+ /**
10
+ * The element or component this component should render as.
11
+ * @defaultValue 'div'
12
+ */
13
+ as?: any;
14
+ title?: string;
15
+ description?: string;
16
+ /**
17
+ * Whether to inset the drawer from the edges.
18
+ * @defaultValue false
19
+ */
20
+ inset?: boolean;
21
+ /** The content of the drawer. */
22
+ content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DialogContentEmits>>;
23
+ /**
24
+ * Render an overlay behind the drawer.
25
+ * @defaultValue true
26
+ */
27
+ overlay?: boolean;
28
+ /**
29
+ * Render a handle on the drawer.
30
+ * @defaultValue true
31
+ */
32
+ handle?: boolean;
33
+ /**
34
+ * Render the drawer in a portal.
35
+ * @defaultValue true
36
+ */
37
+ portal?: boolean | string | HTMLElement;
38
+ /**
39
+ * Whether the drawer is nested in another drawer.
40
+ * @defaultValue false
41
+ */
42
+ nested?: boolean;
43
+ class?: any;
44
+ ui?: Drawer['slots'];
45
+ }
46
+ export interface DrawerEmits extends DrawerRootEmits {
47
+ }
48
+ export interface DrawerSlots {
49
+ default(props?: {}): any;
50
+ content(props?: {}): any;
51
+ header(props?: {}): any;
52
+ title(props?: {}): any;
53
+ description(props?: {}): any;
54
+ body(props?: {}): any;
55
+ footer(props?: {}): any;
56
+ }
57
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
58
+ close: () => any;
59
+ drag: (percentageDragged: number) => any;
60
+ "update:open": (open: boolean) => any;
61
+ release: (open: boolean) => any;
62
+ "update:activeSnapPoint": (val: string | number) => any;
63
+ animationEnd: (open: boolean) => any;
64
+ }, string, import("vue").PublicProps, Readonly<DrawerProps> & Readonly<{
65
+ onClose?: (() => any) | undefined;
66
+ onDrag?: ((percentageDragged: number) => any) | undefined;
67
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
68
+ onRelease?: ((open: boolean) => any) | undefined;
69
+ "onUpdate:activeSnapPoint"?: ((val: string | number) => any) | undefined;
70
+ onAnimationEnd?: ((open: boolean) => any) | undefined;
71
+ }>, {
72
+ modal: boolean;
73
+ portal: boolean | string | HTMLElement;
74
+ overlay: boolean;
75
+ direction: import("vaul-vue").DrawerDirection;
76
+ handle: boolean;
77
+ dismissible: boolean;
78
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, DrawerSlots>;
79
+ export default _default;
80
+ type __VLS_WithSlots<T, S> = T & {
81
+ new (): {
82
+ $slots: S;
83
+ };
84
+ };
@@ -0,0 +1,120 @@
1
+ import type { DropdownMenuRootProps, DropdownMenuRootEmits, DropdownMenuContentProps, DropdownMenuContentEmits, DropdownMenuArrowProps } from 'reka-ui';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import theme from '#build/ui/dropdown-menu';
4
+ import type { AvatarProps, IconProps, KbdProps, LinkProps } from '../types';
5
+ import type { ArrayOrNested, DynamicSlots, GetItemKeys, MergeTypes, NestedItem, EmitsToProps } from '../types/utils';
6
+ import type { ComponentConfig } from '../types/tv';
7
+ type DropdownMenu = ComponentConfig<typeof theme, AppConfig, 'dropdownMenu'>;
8
+ export interface DropdownMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'custom'> {
9
+ label?: string;
10
+ /**
11
+ * @IconifyIcon
12
+ */
13
+ icon?: IconProps['name'];
14
+ color?: DropdownMenu['variants']['color'];
15
+ avatar?: AvatarProps;
16
+ content?: Omit<DropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DropdownMenuContentEmits>>;
17
+ kbds?: KbdProps['value'][] | KbdProps[];
18
+ /**
19
+ * The item type.
20
+ * @defaultValue 'link'
21
+ */
22
+ type?: 'label' | 'separator' | 'link' | 'checkbox';
23
+ slot?: string;
24
+ loading?: boolean;
25
+ disabled?: boolean;
26
+ checked?: boolean;
27
+ open?: boolean;
28
+ defaultOpen?: boolean;
29
+ children?: ArrayOrNested<DropdownMenuItem>;
30
+ onSelect?(e: Event): void;
31
+ onUpdateChecked?(checked: boolean): void;
32
+ class?: any;
33
+ ui?: Pick<DropdownMenu['slots'], 'item' | 'label' | 'separator' | 'itemLeadingIcon' | 'itemLeadingAvatarSize' | 'itemLeadingAvatar' | 'itemLabel' | 'itemLabelExternalIcon' | 'itemTrailing' | 'itemTrailingIcon' | 'itemTrailingKbds' | 'itemTrailingKbdsSize'>;
34
+ [key: string]: any;
35
+ }
36
+ export interface DropdownMenuProps<T extends ArrayOrNested<DropdownMenuItem> = ArrayOrNested<DropdownMenuItem>> extends Omit<DropdownMenuRootProps, 'dir'> {
37
+ /**
38
+ * @defaultValue 'md'
39
+ */
40
+ size?: DropdownMenu['variants']['size'];
41
+ items?: T;
42
+ /**
43
+ * The icon displayed when an item is checked.
44
+ * @defaultValue appConfig.ui.icons.check
45
+ * @IconifyIcon
46
+ */
47
+ checkedIcon?: IconProps['name'];
48
+ /**
49
+ * The icon displayed when an item is loading.
50
+ * @defaultValue appConfig.ui.icons.loading
51
+ * @IconifyIcon
52
+ */
53
+ loadingIcon?: IconProps['name'];
54
+ /**
55
+ * The icon displayed when the item is an external link.
56
+ * Set to `false` to hide the external icon.
57
+ * @defaultValue appConfig.ui.icons.external
58
+ * @IconifyIcon
59
+ */
60
+ externalIcon?: boolean | IconProps['name'];
61
+ /**
62
+ * The content of the menu.
63
+ * @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
64
+ */
65
+ content?: Omit<DropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'> & Partial<EmitsToProps<DropdownMenuContentEmits>>;
66
+ /**
67
+ * Display an arrow alongside the menu.
68
+ * @defaultValue false
69
+ */
70
+ arrow?: boolean | Omit<DropdownMenuArrowProps, 'as' | 'asChild'>;
71
+ /**
72
+ * Render the menu in a portal.
73
+ * @defaultValue true
74
+ */
75
+ portal?: boolean | string | HTMLElement;
76
+ /**
77
+ * The key used to get the label from the item.
78
+ * @defaultValue 'label'
79
+ */
80
+ labelKey?: GetItemKeys<T>;
81
+ disabled?: boolean;
82
+ class?: any;
83
+ ui?: DropdownMenu['slots'];
84
+ }
85
+ export interface DropdownMenuEmits extends DropdownMenuRootEmits {
86
+ }
87
+ type SlotProps<T extends DropdownMenuItem> = (props: {
88
+ item: T;
89
+ active?: boolean;
90
+ index: number;
91
+ }) => any;
92
+ export type DropdownMenuSlots<A extends ArrayOrNested<DropdownMenuItem> = ArrayOrNested<DropdownMenuItem>, T extends NestedItem<A> = NestedItem<A>> = {
93
+ 'default'(props: {
94
+ open: boolean;
95
+ }): any;
96
+ 'item': SlotProps<T>;
97
+ 'item-leading': SlotProps<T>;
98
+ 'item-label': SlotProps<T>;
99
+ 'item-trailing': SlotProps<T>;
100
+ 'content-top': (props?: {}) => any;
101
+ 'content-bottom': (props?: {}) => any;
102
+ } & DynamicSlots<MergeTypes<T>, 'leading' | 'label' | 'trailing', {
103
+ active?: boolean;
104
+ index: number;
105
+ }>;
106
+ declare const _default: <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<{
107
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
108
+ readonly "onUpdate:open"?: ((payload: boolean) => any) | undefined;
109
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:open"> & DropdownMenuProps<T> & {}> & import("vue").PublicProps;
110
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
111
+ attrs: any;
112
+ slots: DropdownMenuSlots<T, NestedItem<T>>;
113
+ emit: (evt: "update:open", payload: boolean) => void;
114
+ }>) => import("vue").VNode & {
115
+ __ctx?: Awaited<typeof __VLS_setup>;
116
+ };
117
+ export default _default;
118
+ type __VLS_PrettifyLocal<T> = {
119
+ [K in keyof T as K]: T[K];
120
+ } & {};
@@ -34,7 +34,7 @@ const appConfig = useAppConfig();
34
34
  const rootProps = useForwardPropsEmits(reactivePick(props, "defaultOpen", "open", "modal"), emits);
35
35
  const contentProps = toRef(() => defu(props.content, { side: "bottom", sideOffset: 8, collisionPadding: 8 }));
36
36
  const arrowProps = toRef(() => props.arrow);
37
- const proxySlots = omit(slots, ["default"]);
37
+ const getProxySlots = () => omit(slots, ["default"]);
38
38
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dropdownMenu || {} })({
39
39
  size: props.size
40
40
  }));
@@ -58,7 +58,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dropdownMenu
58
58
  :loading-icon="loadingIcon"
59
59
  :external-icon="externalIcon"
60
60
  >
61
- <template v-for="(_, name) in proxySlots" #[name]="slotData">
61
+ <template v-for="(_, name) in getProxySlots()" #[name]="slotData">
62
62
  <slot :name="name" v-bind="slotData" />
63
63
  </template>
64
64
 
@@ -2,7 +2,7 @@ import type { DropdownMenuRootProps, DropdownMenuRootEmits, DropdownMenuContentP
2
2
  import type { AppConfig } from '@nuxt/schema';
3
3
  import theme from '#build/ui/dropdown-menu';
4
4
  import type { AvatarProps, IconProps, KbdProps, LinkProps } from '../types';
5
- import type { ArrayOrNested, DynamicSlots, MergeTypes, NestedItem, EmitsToProps } from '../types/utils';
5
+ import type { ArrayOrNested, DynamicSlots, GetItemKeys, MergeTypes, NestedItem, EmitsToProps } from '../types/utils';
6
6
  import type { ComponentConfig } from '../types/tv';
7
7
  type DropdownMenu = ComponentConfig<typeof theme, AppConfig, 'dropdownMenu'>;
8
8
  export interface DropdownMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'custom'> {
@@ -77,7 +77,7 @@ export interface DropdownMenuProps<T extends ArrayOrNested<DropdownMenuItem> = A
77
77
  * The key used to get the label from the item.
78
78
  * @defaultValue 'label'
79
79
  */
80
- labelKey?: keyof NestedItem<T>;
80
+ labelKey?: GetItemKeys<T>;
81
81
  disabled?: boolean;
82
82
  class?: any;
83
83
  ui?: DropdownMenu['slots'];
@@ -0,0 +1,56 @@
1
+ import { DropdownMenu } from 'reka-ui/namespaced';
2
+ import type { DropdownMenuContentProps as RekaDropdownMenuContentProps } from 'reka-ui';
3
+ import type { AppConfig } from '@nuxt/schema';
4
+ import type theme from '#build/ui/dropdown-menu';
5
+ import type { DropdownMenuItem, DropdownMenuSlots, IconProps } from '../types';
6
+ import type { ArrayOrNested, GetItemKeys, NestedItem, DynamicSlots, MergeTypes } from '../types/utils';
7
+ import type { ComponentConfig } from '../types/tv';
8
+ type DropdownMenu = ComponentConfig<typeof theme, AppConfig, 'dropdownMenu'>;
9
+ interface DropdownMenuContentProps<T extends ArrayOrNested<DropdownMenuItem>> extends Omit<RekaDropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'> {
10
+ items?: T;
11
+ portal?: boolean | string | HTMLElement;
12
+ sub?: boolean;
13
+ labelKey: GetItemKeys<T>;
14
+ /**
15
+ * @IconifyIcon
16
+ */
17
+ checkedIcon?: IconProps['name'];
18
+ /**
19
+ * @IconifyIcon
20
+ */
21
+ loadingIcon?: IconProps['name'];
22
+ /**
23
+ * @IconifyIcon
24
+ */
25
+ externalIcon?: boolean | IconProps['name'];
26
+ class?: any;
27
+ ui: {
28
+ [K in keyof Required<DropdownMenu['slots']>]: (props?: Record<string, any>) => string;
29
+ };
30
+ uiOverride?: DropdownMenu['slots'];
31
+ }
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'> & {
33
+ default(props?: {}): any;
34
+ } & DynamicSlots<MergeTypes<T>, 'leading' | 'label' | 'trailing', {
35
+ active?: boolean;
36
+ index: number;
37
+ }>;
38
+ declare const _default: <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
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
40
+ readonly onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
41
+ readonly onPointerDownOutside?: ((event: import("reka-ui").PointerDownOutsideEvent) => any) | undefined;
42
+ readonly onFocusOutside?: ((event: import("reka-ui").FocusOutsideEvent) => any) | undefined;
43
+ readonly onInteractOutside?: ((event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => any) | undefined;
44
+ readonly onCloseAutoFocus?: ((event: Event) => any) | undefined;
45
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onEscapeKeyDown" | "onPointerDownOutside" | "onFocusOutside" | "onInteractOutside" | "onCloseAutoFocus"> & DropdownMenuContentProps<T> & {}> & import("vue").PublicProps;
46
+ expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
47
+ attrs: any;
48
+ slots: DropdownMenuContentSlots<T, NestedItem<T>>;
49
+ emit: ((evt: "escapeKeyDown", event: KeyboardEvent) => void) & ((evt: "pointerDownOutside", event: import("reka-ui").PointerDownOutsideEvent) => void) & ((evt: "focusOutside", event: import("reka-ui").FocusOutsideEvent) => void) & ((evt: "interactOutside", event: import("reka-ui").PointerDownOutsideEvent | import("reka-ui").FocusOutsideEvent) => void) & ((evt: "closeAutoFocus", event: Event) => void);
50
+ }>) => import("vue").VNode & {
51
+ __ctx?: Awaited<typeof __VLS_setup>;
52
+ };
53
+ export default _default;
54
+ type __VLS_PrettifyLocal<T> = {
55
+ [K in keyof T as K]: T[K];
56
+ } & {};
@@ -54,7 +54,7 @@ const { dir } = useLocale();
54
54
  const appConfig = useAppConfig();
55
55
  const portalProps = usePortal(toRef(() => props.portal));
56
56
  const contentProps = useForwardPropsEmits(reactiveOmit(props, "sub", "items", "portal", "labelKey", "checkedIcon", "loadingIcon", "externalIcon", "class", "ui", "uiOverride"), emits);
57
- const proxySlots = omit(slots, ["default"]);
57
+ const getProxySlots = () => omit(slots, ["default"]);
58
58
  const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate();
59
59
  const childrenIcon = computed(() => dir.value === "rtl" ? appConfig.ui.icons.chevronLeft : appConfig.ui.icons.chevronRight);
60
60
  const groups = computed(
@@ -132,7 +132,7 @@ const groups = computed(
132
132
  :external-icon="externalIcon"
133
133
  v-bind="item.content"
134
134
  >
135
- <template v-for="(_, name) in proxySlots" #[name]="slotData">
135
+ <template v-for="(_, name) in getProxySlots()" #[name]="slotData">
136
136
  <slot :name="name" v-bind="slotData" />
137
137
  </template>
138
138
  </UDropdownMenuContent>
@@ -3,14 +3,14 @@ import type { DropdownMenuContentProps as RekaDropdownMenuContentProps } from 'r
3
3
  import type { AppConfig } from '@nuxt/schema';
4
4
  import type theme from '#build/ui/dropdown-menu';
5
5
  import type { DropdownMenuItem, DropdownMenuSlots, IconProps } from '../types';
6
- import type { ArrayOrNested, NestedItem, DynamicSlots, MergeTypes } from '../types/utils';
6
+ import type { ArrayOrNested, GetItemKeys, NestedItem, DynamicSlots, MergeTypes } from '../types/utils';
7
7
  import type { ComponentConfig } from '../types/tv';
8
8
  type DropdownMenu = ComponentConfig<typeof theme, AppConfig, 'dropdownMenu'>;
9
9
  interface DropdownMenuContentProps<T extends ArrayOrNested<DropdownMenuItem>> extends Omit<RekaDropdownMenuContentProps, 'as' | 'asChild' | 'forceMount'> {
10
10
  items?: T;
11
11
  portal?: boolean | string | HTMLElement;
12
12
  sub?: boolean;
13
- labelKey: keyof NestedItem<T>;
13
+ labelKey: GetItemKeys<T>;
14
14
  /**
15
15
  * @IconifyIcon
16
16
  */
@@ -0,0 +1,47 @@
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import type { NuxtError } from '#app';
3
+ import theme from '#build/ui/error';
4
+ import type { ButtonProps } from '../types';
5
+ import type { ComponentConfig } from '../types/tv';
6
+ type Error = ComponentConfig<typeof theme, AppConfig, 'error'>;
7
+ export interface ErrorProps {
8
+ /**
9
+ * The element or component this component should render as.
10
+ * @defaultValue 'div'
11
+ */
12
+ as?: any;
13
+ error?: Partial<NuxtError & {
14
+ message: string;
15
+ }>;
16
+ /**
17
+ * The URL to redirect to when the error is cleared.
18
+ * @defaultValue '/'
19
+ */
20
+ redirect?: string;
21
+ /**
22
+ * Display a button to clear the error in the links slot.
23
+ * `{ size: 'lg', color: 'primary', variant: 'solid', label: 'Back to home' }`{lang="ts-type"}
24
+ * @defaultValue true
25
+ */
26
+ clear?: boolean | Partial<ButtonProps>;
27
+ class?: any;
28
+ ui?: Error['slots'];
29
+ }
30
+ export interface ErrorSlots {
31
+ default(props?: {}): any;
32
+ statusCode(props?: {}): any;
33
+ statusMessage(props?: {}): any;
34
+ message(props?: {}): any;
35
+ links(props?: {}): any;
36
+ }
37
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ErrorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ErrorProps> & Readonly<{}>, {
38
+ clear: boolean | Partial<ButtonProps>;
39
+ as: any;
40
+ redirect: string;
41
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ErrorSlots>;
42
+ export default _default;
43
+ type __VLS_WithSlots<T, S> = T & {
44
+ new (): {
45
+ $slots: S;
46
+ };
47
+ };
@@ -0,0 +1,34 @@
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import theme from '#build/ui/field-group';
3
+ import type { ComponentConfig } from '../types/tv';
4
+ type FieldGroup = ComponentConfig<typeof theme, AppConfig, 'fieldGroup'>;
5
+ export interface FieldGroupProps {
6
+ /**
7
+ * The element or component this component should render as.
8
+ * @defaultValue 'div'
9
+ */
10
+ as?: any;
11
+ /**
12
+ * @defaultValue 'md'
13
+ */
14
+ size?: FieldGroup['variants']['size'];
15
+ /**
16
+ * The orientation the buttons are laid out.
17
+ * @defaultValue 'horizontal'
18
+ */
19
+ orientation?: FieldGroup['variants']['orientation'];
20
+ class?: any;
21
+ ui?: FieldGroup['slots'];
22
+ }
23
+ export interface FieldGroupSlots {
24
+ default(props?: {}): any;
25
+ }
26
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<FieldGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FieldGroupProps> & Readonly<{}>, {
27
+ orientation: FieldGroup["variants"]["orientation"];
28
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, FieldGroupSlots>;
29
+ export default _default;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,166 @@
1
+ import type { AppConfig } from '@nuxt/schema';
2
+ import type { UseFileDialogReturn } from '@vueuse/core';
3
+ import theme from '#build/ui/file-upload';
4
+ import type { ButtonProps, IconProps } from '../types';
5
+ import type { ComponentConfig } from '../types/tv';
6
+ type FileUpload = ComponentConfig<typeof theme, AppConfig, 'fileUpload'>;
7
+ export interface FileUploadProps<M extends boolean = false> {
8
+ /**
9
+ * The element or component this component should render as.
10
+ * @defaultValue 'div'
11
+ */
12
+ as?: any;
13
+ id?: string;
14
+ name?: string;
15
+ /**
16
+ * The icon to display.
17
+ * @defaultValue appConfig.ui.icons.upload
18
+ * @IconifyIcon
19
+ */
20
+ icon?: IconProps['name'];
21
+ label?: string;
22
+ description?: string;
23
+ /**
24
+ * @defaultValue 'primary'
25
+ */
26
+ color?: FileUpload['variants']['color'];
27
+ /**
28
+ * The `button` variant is only available when `multiple` is `false`.
29
+ * @defaultValue 'area'
30
+ */
31
+ variant?: FileUpload['variants']['variant'];
32
+ /**
33
+ * @defaultValue 'md'
34
+ */
35
+ size?: FileUpload['variants']['size'];
36
+ /**
37
+ * The layout of how files are displayed.
38
+ * Only works when `variant` is `area`.
39
+ * @defaultValue 'list'
40
+ */
41
+ layout?: FileUpload['variants']['layout'];
42
+ /**
43
+ * The position of the files.
44
+ * Only works when `variant` is `area` and when `layout` is `list`.
45
+ * @defaultValue 'outside'
46
+ */
47
+ position?: FileUpload['variants']['position'];
48
+ /** Highlight the ring color like a focus state. */
49
+ highlight?: boolean;
50
+ /**
51
+ * Specifies the allowed file types for the input. Provide a comma-separated list of MIME types or file extensions (e.g., "image/png,application/pdf,.jpg").
52
+ * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/accept
53
+ * @defaultValue '*'
54
+ */
55
+ accept?: string;
56
+ multiple?: M & boolean;
57
+ /**
58
+ * Reset the file input when the dialog is opened.
59
+ * @defaultValue false
60
+ */
61
+ reset?: boolean;
62
+ /**
63
+ * Create a zone that allows the user to drop files onto it.
64
+ * @defaultValue true
65
+ */
66
+ dropzone?: boolean;
67
+ /**
68
+ * Make the dropzone interactive when the user is clicking on it.
69
+ * @defaultValue true
70
+ */
71
+ interactive?: boolean;
72
+ required?: boolean;
73
+ disabled?: boolean;
74
+ /**
75
+ * The icon to display for the file.
76
+ * @defaultValue appConfig.ui.icons.file
77
+ * @IconifyIcon
78
+ */
79
+ fileIcon?: IconProps['name'];
80
+ /**
81
+ * Configure the delete button for the file.
82
+ * When `layout` is `grid`, the default is `{ color: 'neutral', variant: 'solid', size: 'xs' }`{lang="ts-type"}
83
+ * When `layout` is `list`, the default is `{ color: 'neutral', variant: 'link' }`{lang="ts-type"}
84
+ */
85
+ fileDelete?: boolean | Partial<ButtonProps>;
86
+ /**
87
+ * The icon displayed to delete a file.
88
+ * @defaultValue appConfig.ui.icons.close
89
+ * @IconifyIcon
90
+ */
91
+ fileDeleteIcon?: IconProps['name'];
92
+ class?: any;
93
+ ui?: FileUpload['slots'];
94
+ }
95
+ export interface FileUploadEmits {
96
+ change: [event: Event];
97
+ }
98
+ type FileUploadFiles<M> = (M extends true ? File[] : File) | null;
99
+ export interface FileUploadSlots<M extends boolean = false> {
100
+ 'default'(props: {
101
+ open: UseFileDialogReturn['open'];
102
+ removeFile: (index?: number) => void;
103
+ }): any;
104
+ 'leading'(props?: {}): any;
105
+ 'label'(props?: {}): any;
106
+ 'description'(props?: {}): any;
107
+ 'actions'(props: {
108
+ files?: FileUploadFiles<M>;
109
+ open: UseFileDialogReturn['open'];
110
+ removeFile: (index?: number) => void;
111
+ }): any;
112
+ 'files'(props: {
113
+ files?: FileUploadFiles<M>;
114
+ }): any;
115
+ 'files-top'(props: {
116
+ files?: FileUploadFiles<M>;
117
+ open: UseFileDialogReturn['open'];
118
+ removeFile: (index?: number) => void;
119
+ }): any;
120
+ 'files-bottom'(props: {
121
+ files?: FileUploadFiles<M>;
122
+ open: UseFileDialogReturn['open'];
123
+ removeFile: (index?: number) => void;
124
+ }): any;
125
+ 'file'(props: {
126
+ file: File;
127
+ index: number;
128
+ }): any;
129
+ 'file-leading'(props: {
130
+ file: File;
131
+ index: number;
132
+ }): any;
133
+ 'file-name'(props: {
134
+ file: File;
135
+ index: number;
136
+ }): any;
137
+ 'file-size'(props: {
138
+ file: File;
139
+ index: number;
140
+ }): any;
141
+ 'file-trailing'(props: {
142
+ file: File;
143
+ index: number;
144
+ }): any;
145
+ }
146
+ declare const _default: <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<{
147
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
148
+ readonly onChange?: ((event: Event) => any) | undefined;
149
+ readonly "onUpdate:modelValue"?: ((value: (M extends true ? File[] : File) | null | undefined) => any) | undefined;
150
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onChange" | "onUpdate:modelValue"> & (FileUploadProps<M> & {
151
+ modelValue?: (M extends true ? File[] : File) | null;
152
+ }) & {}> & import("vue").PublicProps;
153
+ expose(exposed: import("vue").ShallowUnwrapRef<{
154
+ inputRef: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
155
+ dropzoneRef: import("vue").Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
156
+ }>): void;
157
+ attrs: any;
158
+ slots: FileUploadSlots<M>;
159
+ emit: ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: (M extends true ? File[] : File) | null | undefined) => void);
160
+ }>) => import("vue").VNode & {
161
+ __ctx?: Awaited<typeof __VLS_setup>;
162
+ };
163
+ export default _default;
164
+ type __VLS_PrettifyLocal<T> = {
165
+ [K in keyof T as K]: T[K];
166
+ } & {};
@@ -193,6 +193,7 @@ defineExpose({
193
193
  <component
194
194
  :is="variant === 'button' ? 'button' : 'div'"
195
195
  ref="dropzoneRef"
196
+ :type="variant === 'button' ? 'button' : void 0"
196
197
  :role="variant === 'button' ? void 0 : 'button'"
197
198
  :data-dragging="isDragging"
198
199
  :class="ui.base({ class: props.ui?.base })"