@nuxt/ui 2.21.0 → 2.22.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 (85) hide show
  1. package/README.md +19 -14
  2. package/dist/module.d.mts +6 -1
  3. package/dist/module.json +3 -3
  4. package/dist/module.mjs +6 -12
  5. package/dist/runtime/components/data/Table.vue +19 -24
  6. package/dist/runtime/components/data/Table.vue.d.ts +44 -348
  7. package/dist/runtime/components/elements/Accordion.vue +4 -4
  8. package/dist/runtime/components/elements/Accordion.vue.d.ts +16 -16
  9. package/dist/runtime/components/elements/Alert.vue +7 -7
  10. package/dist/runtime/components/elements/Alert.vue.d.ts +41 -38
  11. package/dist/runtime/components/elements/Avatar.vue.d.ts +2 -2
  12. package/dist/runtime/components/elements/Badge.vue.d.ts +2 -2
  13. package/dist/runtime/components/elements/Button.vue.d.ts +6 -6
  14. package/dist/runtime/components/elements/Carousel.vue +3 -3
  15. package/dist/runtime/components/elements/Carousel.vue.d.ts +22 -22
  16. package/dist/runtime/components/elements/Chip.vue.d.ts +1 -1
  17. package/dist/runtime/components/elements/Dropdown.vue +1 -1
  18. package/dist/runtime/components/elements/Dropdown.vue.d.ts +19 -19
  19. package/dist/runtime/components/elements/Kbd.vue.d.ts +1 -1
  20. package/dist/runtime/components/elements/Link.vue +13 -11
  21. package/dist/runtime/components/elements/Link.vue.d.ts +2 -2
  22. package/dist/runtime/components/elements/Meter.vue +1 -1
  23. package/dist/runtime/components/elements/Meter.vue.d.ts +3 -3
  24. package/dist/runtime/components/elements/Progress.vue +1 -1
  25. package/dist/runtime/components/elements/Progress.vue.d.ts +5 -5
  26. package/dist/runtime/components/forms/Checkbox.vue.d.ts +3 -3
  27. package/dist/runtime/components/forms/Form.vue +8 -30
  28. package/dist/runtime/components/forms/Form.vue.d.ts +7 -8
  29. package/dist/runtime/components/forms/FormGroup.vue.d.ts +2 -2
  30. package/dist/runtime/components/forms/Input.vue +3 -3
  31. package/dist/runtime/components/forms/Input.vue.d.ts +3 -3
  32. package/dist/runtime/components/forms/InputMenu.vue +3 -3
  33. package/dist/runtime/components/forms/InputMenu.vue.d.ts +16 -16
  34. package/dist/runtime/components/forms/Radio.vue.d.ts +3 -3
  35. package/dist/runtime/components/forms/RadioGroup.vue.d.ts +6 -6
  36. package/dist/runtime/components/forms/Range.vue.d.ts +3 -3
  37. package/dist/runtime/components/forms/Select.vue +2 -2
  38. package/dist/runtime/components/forms/Select.vue.d.ts +2 -2
  39. package/dist/runtime/components/forms/SelectMenu.vue +10 -5
  40. package/dist/runtime/components/forms/SelectMenu.vue.d.ts +25 -16
  41. package/dist/runtime/components/forms/Textarea.vue.d.ts +3 -3
  42. package/dist/runtime/components/forms/Toggle.vue.d.ts +2 -2
  43. package/dist/runtime/components/layout/Card.vue.d.ts +1 -1
  44. package/dist/runtime/components/layout/Container.vue.d.ts +1 -1
  45. package/dist/runtime/components/layout/Divider.vue.d.ts +15 -15
  46. package/dist/runtime/components/layout/Skeleton.vue.d.ts +1 -1
  47. package/dist/runtime/components/navigation/Breadcrumb.vue +1 -1
  48. package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +3 -3
  49. package/dist/runtime/components/navigation/CommandPalette.vue +1 -1
  50. package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +33 -33
  51. package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +30 -30
  52. package/dist/runtime/components/navigation/HorizontalNavigation.vue +5 -5
  53. package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +36 -36
  54. package/dist/runtime/components/navigation/Pagination.vue +5 -5
  55. package/dist/runtime/components/navigation/Pagination.vue.d.ts +34 -34
  56. package/dist/runtime/components/navigation/Tabs.vue.d.ts +1 -1
  57. package/dist/runtime/components/navigation/VerticalNavigation.vue +5 -5
  58. package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +58 -58
  59. package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +1 -1
  60. package/dist/runtime/components/overlays/Modal.vue +6 -6
  61. package/dist/runtime/components/overlays/Modal.vue.d.ts +3 -3
  62. package/dist/runtime/components/overlays/Modals.client.vue +5 -7
  63. package/dist/runtime/components/overlays/Modals.client.vue.d.ts +2 -0
  64. package/dist/runtime/components/overlays/Notification.vue +6 -6
  65. package/dist/runtime/components/overlays/Notification.vue.d.ts +45 -42
  66. package/dist/runtime/components/overlays/Notifications.vue.d.ts +71 -67
  67. package/dist/runtime/components/overlays/Popover.vue.d.ts +2 -2
  68. package/dist/runtime/components/overlays/Slideover.vue.d.ts +3 -3
  69. package/dist/runtime/components/overlays/Slideovers.client.vue +5 -7
  70. package/dist/runtime/components/overlays/Slideovers.client.vue.d.ts +2 -0
  71. package/dist/runtime/components/overlays/Tooltip.vue.d.ts +5 -5
  72. package/dist/runtime/composables/useFormGroup.d.ts +1 -1
  73. package/dist/runtime/composables/useShortcuts.d.ts +2 -2
  74. package/dist/runtime/composables/useToast.d.ts +4 -4
  75. package/dist/runtime/ui.config/elements/alert.d.ts +1 -0
  76. package/dist/runtime/ui.config/elements/alert.js +1 -0
  77. package/dist/runtime/ui.config/forms/selectMenu.d.ts +1 -1
  78. package/dist/runtime/ui.config/overlays/notification.d.ts +1 -0
  79. package/dist/runtime/ui.config/overlays/notification.js +1 -0
  80. package/dist/runtime/utils/link.js +4 -2
  81. package/dist/types.d.mts +3 -1
  82. package/package.json +64 -38
  83. package/dist/module.cjs +0 -5
  84. package/dist/module.d.ts +0 -36
  85. package/dist/types.d.ts +0 -1
@@ -114,8 +114,10 @@ export const getNuxtLinkProps = (props) => {
114
114
  }, {});
115
115
  };
116
116
  export const getULinkProps = (props) => {
117
- const keys = [...Object.keys(nuxtLinkProps), ...Object.keys(uLinkProps), "ariaLabel", "title"];
118
- return keys.reduce((acc, key) => {
117
+ const keys = Object.keys(props);
118
+ const ariaKeys = keys.filter((key) => key.startsWith("aria-"));
119
+ const dataKeys = keys.filter((key) => key.startsWith("data-"));
120
+ return [...Object.keys(nuxtLinkProps), ...Object.keys(uLinkProps), ...ariaKeys, ...dataKeys].reduce((acc, key) => {
119
121
  if (props[key] !== void 0) {
120
122
  acc[key] = props[key];
121
123
  }
package/dist/types.d.mts CHANGED
@@ -1 +1,3 @@
1
- export { type ModuleOptions, default } from './module.js'
1
+ export { default } from './module.mjs'
2
+
3
+ export { type ModuleOptions } from './module.mjs'
package/package.json CHANGED
@@ -1,20 +1,29 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
3
  "description": "A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.",
4
- "version": "2.21.0",
5
- "packageManager": "pnpm@9.15.3",
6
- "repository": "nuxt/ui",
7
- "homepage": "https://ui.nuxt.com",
4
+ "version": "2.22.0",
5
+ "packageManager": "pnpm@10.9.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/nuxt/ui.git"
9
+ },
10
+ "homepage": "https://ui2.nuxt.com",
8
11
  "type": "module",
9
12
  "license": "MIT",
10
13
  "exports": {
11
14
  ".": {
12
- "import": "./dist/module.mjs",
13
- "require": "./dist/module.cjs"
15
+ "types": "./dist/module.d.mts",
16
+ "import": "./dist/module.mjs"
17
+ }
18
+ },
19
+ "typesVersions": {
20
+ "*": {
21
+ ".": [
22
+ "./dist/module.d.mts"
23
+ ]
14
24
  }
15
25
  },
16
- "main": "./dist/module.cjs",
17
- "types": "./dist/types.d.ts",
26
+ "main": "./dist/module.mjs",
18
27
  "files": [
19
28
  "dist"
20
29
  ],
@@ -32,57 +41,74 @@
32
41
  "test": "vitest"
33
42
  },
34
43
  "dependencies": {
35
- "@headlessui/tailwindcss": "^0.2.1",
44
+ "@headlessui/tailwindcss": "^0.2.2",
36
45
  "@headlessui/vue": "^1.7.23",
37
46
  "@iconify-json/heroicons": "^1.2.2",
38
- "@nuxt/icon": "^1.10.3",
39
- "@nuxt/kit": "^3.15.1",
47
+ "@nuxt/icon": "^1.12.0",
48
+ "@nuxt/kit": "^3.16.2",
40
49
  "@nuxtjs/color-mode": "^3.5.2",
41
- "@nuxtjs/tailwindcss": "^6.13.1",
50
+ "@nuxtjs/tailwindcss": "^6.13.2",
42
51
  "@popperjs/core": "^2.11.8",
52
+ "@standard-schema/spec": "^1.0.0",
43
53
  "@tailwindcss/aspect-ratio": "^0.4.2",
44
54
  "@tailwindcss/container-queries": "^0.1.1",
45
55
  "@tailwindcss/forms": "^0.5.10",
46
56
  "@tailwindcss/typography": "^0.5.16",
47
- "@vueuse/core": "^12.4.0",
48
- "@vueuse/integrations": "^12.4.0",
49
- "@vueuse/math": "^12.4.0",
57
+ "@vueuse/core": "^13.1.0",
58
+ "@vueuse/integrations": "^13.1.0",
59
+ "@vueuse/math": "^13.1.0",
50
60
  "defu": "^6.1.4",
51
- "fuse.js": "^7.0.0",
52
- "ohash": "^1.1.4",
53
- "pathe": "^2.0.1",
61
+ "fuse.js": "^7.1.0",
62
+ "ohash": "^2.0.11",
63
+ "pathe": "^2.0.3",
54
64
  "scule": "^1.3.0",
55
65
  "tailwind-merge": "^2.6.0",
56
66
  "tailwindcss": "^3.4.17"
57
67
  },
58
68
  "devDependencies": {
59
- "@nuxt/eslint-config": "^0.7.5",
60
- "@nuxt/module-builder": "^0.8.4",
61
- "@nuxt/test-utils": "^3.15.4",
62
- "@release-it/conventional-changelog": "^10.0.0",
69
+ "@nuxt/eslint-config": "^1.3.0",
70
+ "@nuxt/module-builder": "^1.0.1",
71
+ "@nuxt/test-utils": "^3.17.2",
72
+ "@release-it/conventional-changelog": "^10.0.1",
63
73
  "@vue/test-utils": "^2.4.6",
64
- "eslint": "^9.18.0",
65
- "happy-dom": "^14.12.3",
66
- "joi": "^17.13.3",
67
- "nuxt": "^3.15.1",
68
- "release-it": "^18.1.1",
69
- "superstruct": "^2.0.2",
70
- "typescript": "^5.6.3",
71
- "valibot": "^0.42.1",
72
- "valibot30": "npm:valibot@0.30.0",
73
- "valibot31": "npm:valibot@0.31.0",
74
- "vitest": "^2.1.8",
74
+ "eslint": "^9.25.0",
75
+ "happy-dom": "^17.4.4",
76
+ "nuxt": "^3.16.2",
77
+ "release-it": "^19.0.1",
78
+ "typescript": "^5.8.3",
79
+ "vitest": "^3.1.1",
75
80
  "vitest-environment-nuxt": "^1.0.1",
76
- "vue-tsc": "^2.1.10",
77
- "yup": "^1.6.1",
78
- "zod": "^3.24.1"
81
+ "vue-tsc": "^2.1.10"
82
+ },
83
+ "peerDependencies": {
84
+ "joi": "^17.13.0",
85
+ "superstruct": "^2.0.0",
86
+ "valibot": "^1.0.0",
87
+ "yup": "^1.6.0",
88
+ "zod": "^3.24.0"
89
+ },
90
+ "peerDependenciesMeta": {
91
+ "joi": {
92
+ "optional": true
93
+ },
94
+ "valibot": {
95
+ "optional": true
96
+ },
97
+ "superstruct": {
98
+ "optional": true
99
+ },
100
+ "yup": {
101
+ "optional": true
102
+ },
103
+ "zod": {
104
+ "optional": true
105
+ }
79
106
  },
80
107
  "resolutions": {
81
108
  "@nuxt/ui": "workspace:*",
82
109
  "@nuxt/content": "2.13.2",
83
110
  "@nuxtjs/mdc": "0.9.0",
84
111
  "chokidar": "3.6.0",
85
- "vue-tsc": "2.1.10",
86
- "typescript": "5.6.3"
112
+ "vue-tsc": "2.1.10"
87
113
  }
88
114
  }
package/dist/module.cjs DELETED
@@ -1,5 +0,0 @@
1
- module.exports = function(...args) {
2
- return import('./module.mjs').then(m => m.default.call(this, ...args))
3
- }
4
- const _meta = module.exports.meta = require('./module.json')
5
- module.exports.getMeta = () => Promise.resolve(_meta)
package/dist/module.d.ts DELETED
@@ -1,36 +0,0 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
- import { ConfigExtension, DefaultClassGroupIds, DefaultThemeGroupIds } from 'tailwind-merge';
3
- import * as config from '../dist/runtime/ui.config/index.js';
4
- import { Strategy, DeepPartial } from '../dist/runtime/types/index.js';
5
-
6
- type UI = {
7
- primary?: string;
8
- gray?: string;
9
- colors?: string[];
10
- strategy?: Strategy;
11
- tailwindMerge?: ConfigExtension<DefaultClassGroupIds, DefaultThemeGroupIds>;
12
- [key: string]: any;
13
- } & DeepPartial<typeof config, string | number | boolean>;
14
- declare module '@nuxt/schema' {
15
- interface AppConfigInput {
16
- ui?: UI;
17
- }
18
- }
19
- interface ModuleOptions {
20
- /**
21
- * @default 'u'
22
- */
23
- prefix?: string;
24
- /**
25
- * @default false
26
- */
27
- global?: boolean;
28
- safelistColors?: string[];
29
- /**
30
- * Disables the global css styles added by the module.
31
- */
32
- disableGlobalStyles?: boolean;
33
- }
34
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
35
-
36
- export { type ModuleOptions, _default as default };
package/dist/types.d.ts DELETED
@@ -1 +0,0 @@
1
- export { type ModuleOptions, default } from './module'