@nuxt/ui 2.18.0 → 2.18.1

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 (78) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +2 -2
  3. package/dist/runtime/components/data/Table.vue +4 -1
  4. package/dist/runtime/components/data/Table.vue.d.ts +10 -10
  5. package/dist/runtime/components/elements/Accordion.vue +2 -1
  6. package/dist/runtime/components/elements/Accordion.vue.d.ts +1 -1
  7. package/dist/runtime/components/elements/Alert.vue +3 -1
  8. package/dist/runtime/components/elements/Alert.vue.d.ts +2 -2
  9. package/dist/runtime/components/elements/Avatar.vue +1 -1
  10. package/dist/runtime/components/elements/Avatar.vue.d.ts +9 -9
  11. package/dist/runtime/components/elements/AvatarGroup.d.ts +3 -3
  12. package/dist/runtime/components/elements/Badge.vue.d.ts +3 -3
  13. package/dist/runtime/components/elements/Button.vue +2 -1
  14. package/dist/runtime/components/elements/Button.vue.d.ts +6 -6
  15. package/dist/runtime/components/elements/ButtonGroup.d.ts +3 -3
  16. package/dist/runtime/components/elements/Carousel.vue.d.ts +1 -1
  17. package/dist/runtime/components/elements/Chip.vue.d.ts +3 -3
  18. package/dist/runtime/components/elements/Dropdown.vue +3 -1
  19. package/dist/runtime/components/elements/Dropdown.vue.d.ts +3 -3
  20. package/dist/runtime/components/elements/Icon.vue +30 -0
  21. package/dist/runtime/components/elements/Icon.vue.d.ts +47 -0
  22. package/dist/runtime/components/elements/Kbd.vue.d.ts +1 -1
  23. package/dist/runtime/components/elements/Link.vue.d.ts +3 -3
  24. package/dist/runtime/components/elements/Meter.vue +1 -1
  25. package/dist/runtime/components/elements/Meter.vue.d.ts +3 -3
  26. package/dist/runtime/components/elements/MeterGroup.d.ts +4 -4
  27. package/dist/runtime/components/elements/MeterGroup.js +1 -1
  28. package/dist/runtime/components/elements/Progress.vue.d.ts +3 -3
  29. package/dist/runtime/components/forms/Checkbox.vue.d.ts +6 -6
  30. package/dist/runtime/components/forms/Form.vue.d.ts +1 -1
  31. package/dist/runtime/components/forms/FormGroup.vue.d.ts +6 -6
  32. package/dist/runtime/components/forms/Input.vue +1 -1
  33. package/dist/runtime/components/forms/Input.vue.d.ts +7 -7
  34. package/dist/runtime/components/forms/InputMenu.vue +2 -1
  35. package/dist/runtime/components/forms/InputMenu.vue.d.ts +13 -13
  36. package/dist/runtime/components/forms/Radio.vue.d.ts +8 -8
  37. package/dist/runtime/components/forms/RadioGroup.vue.d.ts +6 -6
  38. package/dist/runtime/components/forms/Range.vue.d.ts +4 -4
  39. package/dist/runtime/components/forms/Select.vue +1 -1
  40. package/dist/runtime/components/forms/Select.vue.d.ts +6 -6
  41. package/dist/runtime/components/forms/SelectMenu.vue +2 -1
  42. package/dist/runtime/components/forms/SelectMenu.vue.d.ts +11 -11
  43. package/dist/runtime/components/forms/Textarea.vue.d.ts +8 -8
  44. package/dist/runtime/components/forms/Toggle.vue +1 -1
  45. package/dist/runtime/components/forms/Toggle.vue.d.ts +3 -3
  46. package/dist/runtime/components/layout/Card.vue.d.ts +2 -2
  47. package/dist/runtime/components/layout/Container.vue.d.ts +2 -2
  48. package/dist/runtime/components/layout/Divider.vue +2 -1
  49. package/dist/runtime/components/layout/Divider.vue.d.ts +4 -4
  50. package/dist/runtime/components/layout/Skeleton.vue.d.ts +2 -2
  51. package/dist/runtime/components/navigation/Breadcrumb.vue +2 -1
  52. package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +1 -1
  53. package/dist/runtime/components/navigation/CommandPalette.vue +2 -1
  54. package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +12 -12
  55. package/dist/runtime/components/navigation/CommandPaletteGroup.vue +3 -1
  56. package/dist/runtime/components/navigation/HorizontalNavigation.vue +4 -1
  57. package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +1 -1
  58. package/dist/runtime/components/navigation/Pagination.vue.d.ts +2 -2
  59. package/dist/runtime/components/navigation/Tabs.vue.d.ts +2 -2
  60. package/dist/runtime/components/navigation/VerticalNavigation.vue +5 -1
  61. package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +1 -1
  62. package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +1 -1
  63. package/dist/runtime/components/overlays/Modal.vue.d.ts +1 -1
  64. package/dist/runtime/components/overlays/Notification.vue +3 -1
  65. package/dist/runtime/components/overlays/Notification.vue.d.ts +4 -4
  66. package/dist/runtime/components/overlays/Notifications.vue.d.ts +3 -3
  67. package/dist/runtime/components/overlays/Popover.vue.d.ts +3 -3
  68. package/dist/runtime/components/overlays/Slideover.vue.d.ts +2 -2
  69. package/dist/runtime/components/overlays/Tooltip.vue.d.ts +1 -1
  70. package/dist/runtime/composables/usePopper.d.ts +3 -3
  71. package/dist/runtime/composables/useToast.d.ts +2 -2
  72. package/dist/runtime/types/alert.d.ts +1 -1
  73. package/dist/runtime/types/command-palette.d.ts +2 -2
  74. package/dist/runtime/types/dropdown.d.ts +1 -1
  75. package/dist/runtime/types/horizontal-navigation.d.ts +1 -1
  76. package/dist/runtime/types/notification.d.ts +3 -3
  77. package/dist/runtime/types/vertical-navigation.d.ts +1 -1
  78. package/package.json +3 -4
@@ -74,7 +74,7 @@ declare const config: {
74
74
  };
75
75
  declare const _default: import("vue").DefineComponent<{
76
76
  modelValue: {
77
- type: (ObjectConstructor | NumberConstructor | StringConstructor | ArrayConstructor)[];
77
+ type: (StringConstructor | NumberConstructor | ObjectConstructor | ArrayConstructor)[];
78
78
  default: any;
79
79
  };
80
80
  by: {
@@ -247,8 +247,8 @@ declare const _default: import("vue").DefineComponent<{
247
247
  key: string;
248
248
  active?: string;
249
249
  inactive?: string;
250
- search?: Function;
251
- filter?: Function;
250
+ search?: (...args: any[]) => any[] | Promise<any[]>;
251
+ filter?: (...args: any[]) => Command[];
252
252
  static?: Boolean;
253
253
  })[]>;
254
254
  comboboxInput: import("vue").Ref<ComponentPublicInstance<HTMLInputElement>>;
@@ -264,7 +264,7 @@ declare const _default: import("vue").DefineComponent<{
264
264
  onClear: () => void;
265
265
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:modelValue")[], "close" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
266
266
  modelValue: {
267
- type: (ObjectConstructor | NumberConstructor | StringConstructor | ArrayConstructor)[];
267
+ type: (StringConstructor | NumberConstructor | ObjectConstructor | ArrayConstructor)[];
268
268
  default: any;
269
269
  };
270
270
  by: {
@@ -361,27 +361,27 @@ declare const _default: import("vue").DefineComponent<{
361
361
  onClose?: (...args: any[]) => any;
362
362
  "onUpdate:modelValue"?: (...args: any[]) => any;
363
363
  }, {
364
+ class: any;
364
365
  ui: {};
365
366
  icon: string;
366
- class: any;
367
367
  closeButton: Button;
368
- modelValue: string | number | unknown[] | Record<string, any>;
368
+ modelValue: string | number | Record<string, any> | unknown[];
369
369
  loading: boolean;
370
370
  loadingIcon: string;
371
+ emptyState: {
372
+ icon: string;
373
+ label: string;
374
+ queryLabel: string;
375
+ };
376
+ by: string;
371
377
  multiple: boolean;
372
378
  placeholder: string;
373
379
  nullable: boolean;
374
- by: string;
375
380
  selectedIcon: string;
376
381
  debounce: number;
377
382
  searchable: boolean;
378
383
  groupAttribute: string;
379
384
  commandAttribute: string;
380
- emptyState: {
381
- icon: string;
382
- label: string;
383
- queryLabel: string;
384
- };
385
385
  groups: Group[];
386
386
  autoselect: boolean;
387
387
  autoclear: boolean;
@@ -72,7 +72,9 @@
72
72
  <script>
73
73
  import { computed, defineComponent } from "vue";
74
74
  import { ComboboxOption as HComboboxOption, provideUseId } from "@headlessui/vue";
75
- import { UIcon, UAvatar, UKbd } from "#components";
75
+ import UIcon from "../elements/Icon.vue";
76
+ import UAvatar from "../elements/Avatar.vue";
77
+ import UKbd from "../elements/Kbd.vue";
76
78
  import { useId } from "#imports";
77
79
  export default defineComponent({
78
80
  components: {
@@ -54,7 +54,10 @@
54
54
  <script>
55
55
  import { toRef, defineComponent, computed } from "vue";
56
56
  import { twMerge, twJoin } from "tailwind-merge";
57
- import { UIcon, UAvatar, UBadge, ULink } from "#components";
57
+ import UIcon from "../elements/Icon.vue";
58
+ import UAvatar from "../elements/Avatar.vue";
59
+ import UBadge from "../elements/Badge.vue";
60
+ import ULink from "../elements/Link.vue";
58
61
  import { useUI } from "../../composables/useUI";
59
62
  import { mergeConfig, getULinkProps } from "../../utils";
60
63
  import appConfig from "#build/app.config";
@@ -92,8 +92,8 @@ declare const _default: import("vue").DefineComponent<{
92
92
  default: () => {};
93
93
  };
94
94
  }>>, {
95
- ui: {};
96
95
  class: any;
96
+ ui: {};
97
97
  links: HorizontalNavigationLink[] | HorizontalNavigationLink[][];
98
98
  }, {}>;
99
99
  export default _default;
@@ -241,10 +241,10 @@ declare const _default: import("vue").DefineComponent<{
241
241
  "onUpdate:modelValue"?: (...args: any[]) => any;
242
242
  }, {
243
243
  size: ButtonSize;
244
- ui: {};
244
+ class: any;
245
245
  to: (page: number) => RouteLocationRaw;
246
246
  disabled: boolean;
247
- class: any;
247
+ ui: {};
248
248
  max: number;
249
249
  prevButton: Button;
250
250
  nextButton: Button;
@@ -153,10 +153,10 @@ declare const _default: import("vue").DefineComponent<{
153
153
  onChange?: (...args: any[]) => any;
154
154
  "onUpdate:modelValue"?: (...args: any[]) => any;
155
155
  }, {
156
- orientation: "horizontal" | "vertical";
157
- ui: {};
158
156
  class: any;
157
+ ui: {};
159
158
  content: boolean;
159
+ orientation: "horizontal" | "vertical";
160
160
  modelValue: number;
161
161
  unmount: boolean;
162
162
  items: TabItem[];
@@ -55,7 +55,11 @@
55
55
  <script>
56
56
  import { toRef, defineComponent, computed } from "vue";
57
57
  import { twMerge, twJoin } from "tailwind-merge";
58
- import { UIcon, UAvatar, UBadge, ULink, UDivider } from "#components";
58
+ import UIcon from "../elements/Icon.vue";
59
+ import UAvatar from "../elements/Avatar.vue";
60
+ import UBadge from "../elements/Badge.vue";
61
+ import ULink from "../elements/Link.vue";
62
+ import UDivider from "../layout/Divider.vue";
59
63
  import { useUI } from "../../composables/useUI";
60
64
  import { mergeConfig, getULinkProps } from "../../utils";
61
65
  import appConfig from "#build/app.config";
@@ -106,8 +106,8 @@ declare const _default: import("vue").DefineComponent<{
106
106
  default: () => {};
107
107
  };
108
108
  }>>, {
109
- ui: {};
110
109
  class: any;
110
+ ui: {};
111
111
  links: VerticalNavigationLink[] | VerticalNavigationLink[][];
112
112
  }, {}>;
113
113
  export default _default;
@@ -118,8 +118,8 @@ declare const _default: import("vue").DefineComponent<{
118
118
  onClose?: (...args: any[]) => any;
119
119
  "onUpdate:modelValue"?: (...args: any[]) => any;
120
120
  }, {
121
- ui: {};
122
121
  class: any;
122
+ ui: {};
123
123
  popper: PopperOptions;
124
124
  modelValue: boolean;
125
125
  }, {}>;
@@ -154,8 +154,8 @@ declare const _default: import("vue").DefineComponent<{
154
154
  "onClose-prevented"?: (...args: any[]) => any;
155
155
  "onAfter-leave"?: (...args: any[]) => any;
156
156
  }, {
157
- ui: {};
158
157
  class: any;
158
+ ui: {};
159
159
  transition: boolean;
160
160
  appear: boolean;
161
161
  overlay: boolean;
@@ -45,7 +45,9 @@
45
45
  <script>
46
46
  import { ref, computed, toRef, onMounted, onUnmounted, watch, watchEffect, defineComponent } from "vue";
47
47
  import { twMerge, twJoin } from "tailwind-merge";
48
- import { UIcon, UAvatar, UButton } from "#components";
48
+ import UIcon from "../elements/Icon.vue";
49
+ import UAvatar from "../elements/Avatar.vue";
50
+ import UButton from "../elements/Button.vue";
49
51
  import { useUI } from "../../composables/useUI";
50
52
  import { useTimer } from "../../composables/useTimer";
51
53
  import { mergeConfig } from "../../utils";
@@ -51,7 +51,7 @@ declare const config: {
51
51
  };
52
52
  declare const _default: import("vue").DefineComponent<{
53
53
  id: {
54
- type: (NumberConstructor | StringConstructor)[];
54
+ type: (StringConstructor | NumberConstructor)[];
55
55
  required: true;
56
56
  };
57
57
  title: {
@@ -167,7 +167,7 @@ declare const _default: import("vue").DefineComponent<{
167
167
  twMerge: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
168
168
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
169
169
  id: {
170
- type: (NumberConstructor | StringConstructor)[];
170
+ type: (StringConstructor | NumberConstructor)[];
171
171
  required: true;
172
172
  };
173
173
  title: {
@@ -220,11 +220,11 @@ declare const _default: import("vue").DefineComponent<{
220
220
  }>> & {
221
221
  onClose?: (...args: any[]) => any;
222
222
  }, {
223
+ class: any;
223
224
  ui: {};
224
225
  color: NotificationColor;
225
- icon: string;
226
226
  avatar: any;
227
- class: any;
227
+ icon: string;
228
228
  title: string;
229
229
  description: string;
230
230
  closeButton: Button;
@@ -37,8 +37,8 @@ declare const _default: import("vue").DefineComponent<{
37
37
  closeButton?: import("../../types").Button;
38
38
  timeout?: number;
39
39
  actions?: import("../../types").NotificationAction[];
40
- click?: Function;
41
- callback?: Function;
40
+ click?: (...args: any[]) => void;
41
+ callback?: (...args: any[]) => void;
42
42
  color?: import("../../types").NotificationColor;
43
43
  ui?: any;
44
44
  };
@@ -60,7 +60,7 @@ declare const _default: import("vue").DefineComponent<{
60
60
  default: () => {};
61
61
  };
62
62
  }>>, {
63
- ui: {};
64
63
  class: any;
64
+ ui: {};
65
65
  }, {}>;
66
66
  export default _default;
@@ -207,12 +207,12 @@ declare const _default: import("vue").DefineComponent<{
207
207
  }>> & {
208
208
  "onUpdate:open"?: (...args: any[]) => any;
209
209
  }, {
210
- ui: {};
211
- disabled: boolean;
210
+ mode: "click" | "hover";
212
211
  class: any;
212
+ disabled: boolean;
213
+ ui: {};
213
214
  popper: PopperOptions;
214
215
  overlay: boolean;
215
- mode: "click" | "hover";
216
216
  open: boolean;
217
217
  openDelay: number;
218
218
  closeDelay: number;
@@ -110,7 +110,7 @@ declare const _default: import("vue").DefineComponent<{
110
110
  }, string>>;
111
111
  isOpen: WritableComputedRef<boolean>;
112
112
  transitionClass: import("vue").ComputedRef<{}>;
113
- sideType: import("vue").ComputedRef<"horizontal" | "vertical" | "right">;
113
+ sideType: import("vue").ComputedRef<"right" | "horizontal" | "vertical">;
114
114
  onAfterLeave: () => void;
115
115
  close: (value: boolean) => void;
116
116
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:modelValue" | "close-prevented" | "after-leave")[], "close" | "update:modelValue" | "close-prevented" | "after-leave", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -155,8 +155,8 @@ declare const _default: import("vue").DefineComponent<{
155
155
  "onClose-prevented"?: (...args: any[]) => any;
156
156
  "onAfter-leave"?: (...args: any[]) => any;
157
157
  }, {
158
- ui: {};
159
158
  class: any;
159
+ ui: {};
160
160
  transition: boolean;
161
161
  appear: boolean;
162
162
  overlay: boolean;
@@ -153,9 +153,9 @@ declare const _default: import("vue").DefineComponent<{
153
153
  default: () => {};
154
154
  };
155
155
  }>>, {
156
+ class: any;
156
157
  ui: {};
157
158
  shortcuts: string[];
158
- class: any;
159
159
  popper: PopperOptions;
160
160
  text: string;
161
161
  openDelay: number;
@@ -197,15 +197,15 @@ export declare function usePopper({ locked, overflowPadding, offsetDistance, off
197
197
  y: number;
198
198
  x: number;
199
199
  };
200
- auto?: {
200
+ right?: {
201
201
  y: number;
202
202
  x: number;
203
203
  };
204
- right?: {
204
+ left?: {
205
205
  y: number;
206
206
  x: number;
207
207
  };
208
- left?: {
208
+ auto?: {
209
209
  y: number;
210
210
  x: number;
211
211
  };
@@ -9,8 +9,8 @@ export declare function useToast(): {
9
9
  closeButton?: import("../types").Button;
10
10
  timeout?: number;
11
11
  actions?: import("../types").NotificationAction[];
12
- click?: Function;
13
- callback?: Function;
12
+ click?: (...args: any[]) => void;
13
+ callback?: (...args: any[]) => void;
14
14
  color?: import("../types").NotificationColor;
15
15
  ui?: any;
16
16
  };
@@ -6,5 +6,5 @@ import type { AppConfig } from 'nuxt/schema';
6
6
  export type AlertColor = keyof typeof alert.color | ExtractDeepKey<AppConfig, ['ui', 'alert', 'color']> | typeof colors[number];
7
7
  export type AlertVariant = keyof typeof alert.variant | ExtractDeepKey<AppConfig, ['ui', 'alert', 'variant']> | NestedKeyOf<typeof alert.color> | NestedKeyOf<ExtractDeepObject<AppConfig, ['ui', 'alert', 'color']>>;
8
8
  export interface AlertAction extends Button {
9
- click?: Function;
9
+ click?: (...args: any[]) => void;
10
10
  }
@@ -20,8 +20,8 @@ export interface Group {
20
20
  active?: string;
21
21
  inactive?: string;
22
22
  commands?: Command[];
23
- search?: Function;
24
- filter?: Function;
23
+ search?: (...args: any[]) => any[] | Promise<any[]>;
24
+ filter?: (...args: any[]) => Command[];
25
25
  static?: Boolean;
26
26
  [key: string]: any;
27
27
  }
@@ -10,5 +10,5 @@ export interface DropdownItem extends NuxtLinkProps {
10
10
  shortcuts?: string[];
11
11
  disabled?: boolean;
12
12
  class?: string;
13
- click?: Function;
13
+ click?: (...args: any[]) => void;
14
14
  }
@@ -7,6 +7,6 @@ export interface HorizontalNavigationLink extends Link {
7
7
  icon?: string;
8
8
  iconClass?: string;
9
9
  avatar?: Avatar;
10
- click?: Function;
10
+ click?: (...args: any[]) => void;
11
11
  badge?: string | number | Badge;
12
12
  }
@@ -3,7 +3,7 @@ import type { Button } from './button.js';
3
3
  import colors from '#ui-colors';
4
4
  export type NotificationColor = 'gray' | typeof colors[number];
5
5
  export interface NotificationAction extends Button {
6
- click?: Function;
6
+ click?: (...args: any[]) => void;
7
7
  }
8
8
  export interface Notification {
9
9
  id: string;
@@ -14,8 +14,8 @@ export interface Notification {
14
14
  closeButton?: Button;
15
15
  timeout: number;
16
16
  actions?: NotificationAction[];
17
- click?: Function;
18
- callback?: Function;
17
+ click?: (...args: any[]) => void;
18
+ callback?: (...args: any[]) => void;
19
19
  color?: NotificationColor;
20
20
  ui?: any;
21
21
  }
@@ -7,6 +7,6 @@ export interface VerticalNavigationLink extends Link {
7
7
  icon?: string;
8
8
  iconClass?: string;
9
9
  avatar?: Avatar;
10
- click?: Function;
10
+ click?: (...args: any[]) => void;
11
11
  badge?: string | number | Badge;
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
- "version": "2.18.0",
3
+ "version": "2.18.1",
4
4
  "packageManager": "pnpm@9.5.0",
5
5
  "repository": "nuxt/ui",
6
6
  "homepage": "https://ui.nuxt.com",
@@ -74,13 +74,12 @@
74
74
  "valibot31": "npm:valibot@0.31.0",
75
75
  "vitest": "^2.0.3",
76
76
  "vitest-environment-nuxt": "^1.0.0",
77
- "vue-tsc": "^2.0.26",
77
+ "vue-tsc": "^2.0.29",
78
78
  "yup": "^1.4.0",
79
79
  "zod": "^3.23.8"
80
80
  },
81
81
  "resolutions": {
82
82
  "@nuxt/ui": "workspace:*",
83
- "nuxt-component-meta": "0.6.4",
84
- "vue-tsc": "2.0.26"
83
+ "nuxt-component-meta": "0.6.4"
85
84
  }
86
85
  }