@nuxt/ui 4.10.0 → 4.11.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 (117) hide show
  1. package/.nuxt/ui.static.css +11 -11
  2. package/README.md +1 -0
  3. package/cli/commands/make/locale.mjs +40 -11
  4. package/cli/templates.mjs +2 -2
  5. package/dist/module.d.mts +1 -1
  6. package/dist/module.json +2 -2
  7. package/dist/module.mjs +5 -2
  8. package/dist/runtime/components/AuthForm.d.vue.ts +7 -7
  9. package/dist/runtime/components/AuthForm.vue.d.ts +7 -7
  10. package/dist/runtime/components/Button.vue +11 -2
  11. package/dist/runtime/components/Carousel.d.vue.ts +6 -6
  12. package/dist/runtime/components/Carousel.vue.d.ts +6 -6
  13. package/dist/runtime/components/ChatMessages.d.vue.ts +2 -2
  14. package/dist/runtime/components/ChatMessages.vue.d.ts +2 -2
  15. package/dist/runtime/components/ChatPromptSubmit.d.vue.ts +2 -2
  16. package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +2 -2
  17. package/dist/runtime/components/Checkbox.d.vue.ts +1 -1
  18. package/dist/runtime/components/Checkbox.vue +12 -6
  19. package/dist/runtime/components/Checkbox.vue.d.ts +1 -1
  20. package/dist/runtime/components/CheckboxGroup.d.vue.ts +6 -0
  21. package/dist/runtime/components/CheckboxGroup.vue +10 -4
  22. package/dist/runtime/components/CheckboxGroup.vue.d.ts +6 -0
  23. package/dist/runtime/components/Editor.vue +4 -1
  24. package/dist/runtime/components/Error.d.vue.ts +1 -1
  25. package/dist/runtime/components/Error.vue.d.ts +1 -1
  26. package/dist/runtime/components/FileUpload.vue +17 -10
  27. package/dist/runtime/components/Form.vue +1 -1
  28. package/dist/runtime/components/Input.vue +12 -7
  29. package/dist/runtime/components/InputDate.vue +12 -8
  30. package/dist/runtime/components/InputMenu.vue +25 -11
  31. package/dist/runtime/components/InputNumber.vue +22 -14
  32. package/dist/runtime/components/InputRating.vue +10 -7
  33. package/dist/runtime/components/InputTags.vue +12 -7
  34. package/dist/runtime/components/InputTime.vue +12 -7
  35. package/dist/runtime/components/Link.vue +61 -7
  36. package/dist/runtime/components/Listbox.vue +10 -6
  37. package/dist/runtime/components/Modal.vue +12 -5
  38. package/dist/runtime/components/NavigationMenu.vue +10 -10
  39. package/dist/runtime/components/PinInput.vue +13 -8
  40. package/dist/runtime/components/Popover.vue +0 -1
  41. package/dist/runtime/components/PricingTable.d.vue.ts +1 -1
  42. package/dist/runtime/components/PricingTable.vue.d.ts +1 -1
  43. package/dist/runtime/components/Progress.d.vue.ts +2 -1
  44. package/dist/runtime/components/Progress.vue +5 -6
  45. package/dist/runtime/components/Progress.vue.d.ts +2 -1
  46. package/dist/runtime/components/ProgressGroup.d.vue.ts +91 -0
  47. package/dist/runtime/components/ProgressGroup.vue +99 -0
  48. package/dist/runtime/components/ProgressGroup.vue.d.ts +91 -0
  49. package/dist/runtime/components/RadioGroup.d.vue.ts +7 -1
  50. package/dist/runtime/components/RadioGroup.vue +14 -5
  51. package/dist/runtime/components/RadioGroup.vue.d.ts +7 -1
  52. package/dist/runtime/components/Select.d.vue.ts +2 -0
  53. package/dist/runtime/components/Select.vue +23 -8
  54. package/dist/runtime/components/Select.vue.d.ts +2 -0
  55. package/dist/runtime/components/SelectMenu.d.vue.ts +3 -0
  56. package/dist/runtime/components/SelectMenu.vue +35 -14
  57. package/dist/runtime/components/SelectMenu.vue.d.ts +3 -0
  58. package/dist/runtime/components/Slider.vue +15 -8
  59. package/dist/runtime/components/Splitter.d.vue.ts +266 -0
  60. package/dist/runtime/components/Splitter.vue +99 -0
  61. package/dist/runtime/components/Splitter.vue.d.ts +266 -0
  62. package/dist/runtime/components/Switch.vue +8 -4
  63. package/dist/runtime/components/Table.vue +5 -5
  64. package/dist/runtime/components/Textarea.vue +17 -7
  65. package/dist/runtime/components/Theme.d.vue.ts +1 -1
  66. package/dist/runtime/components/Theme.vue +4 -3
  67. package/dist/runtime/components/Theme.vue.d.ts +1 -1
  68. package/dist/runtime/components/Tree.vue +1 -1
  69. package/dist/runtime/components/color-mode/ColorModeSelect.vue +1 -0
  70. package/dist/runtime/components/content/ContentNavigation.vue +8 -1
  71. package/dist/runtime/components/content/ContentToc.vue +4 -1
  72. package/dist/runtime/components/locale/LocaleSelect.vue +1 -0
  73. package/dist/runtime/components/prose/CodeTree.vue +31 -18
  74. package/dist/runtime/composables/useComponentProps.d.ts +1 -1
  75. package/dist/runtime/composables/useComponentProps.js +6 -0
  76. package/dist/runtime/composables/useFormField.d.ts +10 -4
  77. package/dist/runtime/composables/useFormField.js +10 -3
  78. package/dist/runtime/keyframes.css +1 -1
  79. package/dist/runtime/locale/da.js +1 -1
  80. package/dist/runtime/locale/de_at.js +7 -0
  81. package/dist/runtime/locale/de_ch.js +1 -1
  82. package/dist/runtime/locale/eu.js +1 -1
  83. package/dist/runtime/locale/fi.js +1 -1
  84. package/dist/runtime/locale/he.js +1 -1
  85. package/dist/runtime/locale/hi.js +1 -1
  86. package/dist/runtime/locale/index.d.ts +2 -1
  87. package/dist/runtime/locale/index.js +2 -1
  88. package/dist/runtime/locale/is.js +1 -1
  89. package/dist/runtime/locale/lb.js +1 -1
  90. package/dist/runtime/locale/tg.d.ts +3 -0
  91. package/dist/runtime/locale/{tj.js → tg.js} +1 -1
  92. package/dist/runtime/locale/ur.js +1 -1
  93. package/dist/runtime/types/form.d.ts +1 -1
  94. package/dist/runtime/types/html.d.ts +3 -1
  95. package/dist/runtime/types/index.d.ts +2 -0
  96. package/dist/runtime/types/index.js +2 -0
  97. package/dist/runtime/types/theme.d.ts +2 -0
  98. package/dist/runtime/types/tv.d.ts +6 -2
  99. package/dist/runtime/utils/form.d.ts +1 -1
  100. package/dist/runtime/utils/form.js +3 -1
  101. package/dist/runtime/utils/link-keys.d.ts +1 -0
  102. package/dist/runtime/utils/link-keys.js +40 -0
  103. package/dist/runtime/utils/link.d.ts +2 -1
  104. package/dist/runtime/utils/link.js +2 -40
  105. package/dist/runtime/utils/prefetch.d.ts +5 -0
  106. package/dist/runtime/utils/prefetch.js +45 -0
  107. package/dist/runtime/utils/search.js +11 -18
  108. package/dist/runtime/utils/tv.d.ts +1 -1
  109. package/dist/runtime/utils/tv.js +103 -25
  110. package/dist/runtime/vue/components/Icon.vue +5 -2
  111. package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +1 -0
  112. package/dist/shared/{ui.XkBrgXFP.mjs → ui.DCJ9twx8.mjs} +597 -220
  113. package/dist/unplugin.d.mts +1 -1
  114. package/dist/unplugin.mjs +22 -6
  115. package/dist/vite.mjs +4 -4
  116. package/package.json +54 -53
  117. /package/dist/runtime/locale/{tj.d.ts → de_at.d.ts} +0 -0
@@ -64,7 +64,7 @@ type AppConfigUI = {
64
64
  icons?: Partial<typeof _default>;
65
65
  prefix?: string;
66
66
  } & TVConfig<typeof ui>;
67
- interface NuxtUIOptions extends Omit<ModuleOptions, 'fonts' | 'colorMode' | 'content' | 'experimental'> {
67
+ interface NuxtUIOptions extends Omit<ModuleOptions, 'fonts' | 'colorMode' | 'content'> {
68
68
  /** Whether to generate declaration files for auto-imported components. */
69
69
  dts?: boolean;
70
70
  ui?: AppConfigUI;
package/dist/unplugin.mjs CHANGED
@@ -3,16 +3,16 @@ import { join, normalize, relative } from 'pathe';
3
3
  import { createUnplugin } from 'unplugin';
4
4
  import { defu } from 'defu';
5
5
  import tailwind from '@tailwindcss/vite';
6
- import { c as getTemplates, e as publicComposables, g as getClientBundleIcons, p as parseIconName, d as defaultOptions, r as resolveColors, b as getDefaultConfig } from './shared/ui.XkBrgXFP.mjs';
6
+ import { e as getTemplates, h as resolveExtraScanDirs, b as detectUsedComponents, f as publicComposables, g as getClientBundleIcons, p as parseIconName, d as defaultOptions, r as resolveColors, c as getDefaultConfig } from './shared/ui.DCJ9twx8.mjs';
7
7
  import fs from 'node:fs';
8
8
  import path from 'node:path';
9
+ import { consola } from 'consola';
9
10
  import MagicString from 'magic-string';
10
11
  import { genSafeVariableName } from 'knitwork';
11
12
  import { resolvePathSync } from 'mlly';
12
13
  import { globSync } from 'tinyglobby';
13
14
  import AutoImportComponents from 'unplugin-vue-components';
14
15
  import AutoImport from 'unplugin-auto-import';
15
- import { consola } from 'consola';
16
16
  import { IconUsageScanner, resolveBundleIcons, generateClientBundleCode, collectionNames } from '@nuxt/icon/utils';
17
17
  import '../dist/runtime/utils/index.js';
18
18
  import 'scule';
@@ -20,8 +20,9 @@ import 'tailwindcss/colors';
20
20
  import '@nuxt/kit';
21
21
  import 'node:fs/promises';
22
22
 
23
- function TemplatePlugin(options, appConfig) {
24
- const templates = getTemplates(options, appConfig.ui);
23
+ function TemplatePlugin(options, appConfig, componentDir) {
24
+ const vue = {};
25
+ const templates = getTemplates(options, appConfig.ui, void 0, void 0, vue);
25
26
  const templateKeys = new Set(templates.map((t) => `#build/${t.filename}`));
26
27
  async function writeTemplates(root) {
27
28
  const map = {};
@@ -60,7 +61,22 @@ function TemplatePlugin(options, appConfig) {
60
61
  enforce: "pre",
61
62
  vite: {
62
63
  async config(config) {
63
- const alias = await writeTemplates(path.resolve(options.root || config.root || "."));
64
+ const root = path.resolve(options.root || config.root || ".");
65
+ if (options.experimental?.componentDetection && componentDir) {
66
+ const dirs = resolveExtraScanDirs(root, options.scanPackages, options.components ? options.components.dirs : void 0);
67
+ vue.detectedComponents = await detectUsedComponents(
68
+ [root, ...dirs],
69
+ options.prefix,
70
+ componentDir,
71
+ Array.isArray(options.experimental.componentDetection) ? options.experimental.componentDetection : void 0
72
+ );
73
+ if (vue.detectedComponents?.size) {
74
+ consola.success(`Nuxt UI detected ${vue.detectedComponents.size} components in use (including dependencies)`);
75
+ } else {
76
+ consola.info("Nuxt UI detected no components in use, including all components");
77
+ }
78
+ }
79
+ const alias = await writeTemplates(root);
64
80
  return {
65
81
  resolve: {
66
82
  alias
@@ -440,7 +456,7 @@ const NuxtUIPlugin = createUnplugin((_options = {}, meta) => {
440
456
  tailwind(),
441
457
  IconsPlugin(options, appConfig),
442
458
  PluginsPlugin(options),
443
- TemplatePlugin(options, appConfig),
459
+ TemplatePlugin(options, appConfig, join(runtimeDir, "components")),
444
460
  AppConfigPlugin(options, appConfig),
445
461
  {
446
462
  name: "nuxt:ui:plugins-duplication-detection",
package/dist/vite.mjs CHANGED
@@ -4,21 +4,21 @@ import 'pathe';
4
4
  import 'unplugin';
5
5
  import 'defu';
6
6
  import '@tailwindcss/vite';
7
- import './shared/ui.XkBrgXFP.mjs';
7
+ import './shared/ui.DCJ9twx8.mjs';
8
8
  import '../dist/runtime/utils/index.js';
9
9
  import 'scule';
10
10
  import 'knitwork';
11
11
  import 'tailwindcss/colors';
12
12
  import '@nuxt/kit';
13
+ import 'node:fs';
13
14
  import 'node:fs/promises';
15
+ import 'consola';
14
16
  import 'tinyglobby';
15
- import 'node:fs';
17
+ import 'mlly';
16
18
  import 'node:path';
17
19
  import 'magic-string';
18
- import 'mlly';
19
20
  import 'unplugin-vue-components';
20
21
  import 'unplugin-auto-import';
21
- import 'consola';
22
22
  import '@nuxt/icon/utils';
23
23
 
24
24
  const vite = NuxtUIPlugin.vite;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@nuxt/ui",
3
3
  "description": "A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.",
4
- "version": "4.10.0",
5
- "packageManager": "pnpm@11.13.0",
4
+ "version": "4.11.1",
5
+ "packageManager": "pnpm@11.25.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/nuxt/ui.git"
@@ -133,39 +133,39 @@
133
133
  "dependencies": {
134
134
  "@floating-ui/dom": "^1.8.0",
135
135
  "@iconify/vue": "^5.0.1",
136
- "@internationalized/date": "^3.12.2",
137
- "@internationalized/number": "^3.6.7",
136
+ "@internationalized/date": "^3.12.4",
137
+ "@internationalized/number": "^3.6.8",
138
138
  "@nuxt/fonts": "^0.14.0",
139
- "@nuxt/icon": "^2.3.1",
140
- "@nuxt/kit": "^4.4.8",
141
- "@nuxt/schema": "^4.4.8",
139
+ "@nuxt/icon": "^2.5.1",
140
+ "@nuxt/kit": "^4.5.2",
141
+ "@nuxt/schema": "^4.5.2",
142
142
  "@nuxtjs/color-mode": "^4.0.1",
143
143
  "@standard-schema/spec": "^1.1.0",
144
- "@tailwindcss/postcss": "^4.3.2",
145
- "@tailwindcss/vite": "^4.3.2",
144
+ "@tailwindcss/postcss": "^4.3.3",
145
+ "@tailwindcss/vite": "^4.3.3",
146
146
  "@tanstack/vue-table": "^8.21.3",
147
- "@tanstack/vue-virtual": "^3.13.32",
148
- "@tiptap/core": "^3.27.3",
149
- "@tiptap/extension-bubble-menu": "^3.27.3",
150
- "@tiptap/extension-code": "^3.27.3",
151
- "@tiptap/extension-collaboration": "^3.27.3",
152
- "@tiptap/extension-drag-handle": "^3.27.3",
153
- "@tiptap/extension-drag-handle-vue-3": "^3.27.3",
154
- "@tiptap/extension-floating-menu": "^3.27.3",
155
- "@tiptap/extension-horizontal-rule": "^3.27.3",
156
- "@tiptap/extension-image": "^3.27.3",
157
- "@tiptap/extension-mention": "^3.27.3",
158
- "@tiptap/extension-node-range": "^3.27.3",
159
- "@tiptap/extension-placeholder": "^3.27.3",
160
- "@tiptap/markdown": "^3.27.3",
161
- "@tiptap/pm": "^3.27.3",
162
- "@tiptap/starter-kit": "^3.27.3",
163
- "@tiptap/suggestion": "^3.27.3",
164
- "@tiptap/vue-3": "^3.27.3",
165
- "@unhead/vue": "^2.1.15",
166
- "@vueuse/core": "^14.3.0",
167
- "@vueuse/integrations": "^14.3.0",
168
- "@vueuse/shared": "^14.3.0",
147
+ "@tanstack/vue-virtual": "^3.13.36",
148
+ "@tiptap/core": "^3.31.3",
149
+ "@tiptap/extension-bubble-menu": "^3.31.3",
150
+ "@tiptap/extension-code": "^3.31.3",
151
+ "@tiptap/extension-collaboration": "^3.31.3",
152
+ "@tiptap/extension-drag-handle": "^3.31.3",
153
+ "@tiptap/extension-drag-handle-vue-3": "^3.31.3",
154
+ "@tiptap/extension-floating-menu": "^3.31.3",
155
+ "@tiptap/extension-horizontal-rule": "^3.31.3",
156
+ "@tiptap/extension-image": "^3.31.3",
157
+ "@tiptap/extension-mention": "^3.31.3",
158
+ "@tiptap/extension-node-range": "^3.31.3",
159
+ "@tiptap/extension-placeholder": "^3.31.3",
160
+ "@tiptap/markdown": "^3.31.3",
161
+ "@tiptap/pm": "^3.31.3",
162
+ "@tiptap/starter-kit": "^3.31.3",
163
+ "@tiptap/suggestion": "^3.31.3",
164
+ "@tiptap/vue-3": "^3.31.3",
165
+ "@unhead/vue": "^3.4.0",
166
+ "@vueuse/core": "^14.4.0",
167
+ "@vueuse/integrations": "^14.4.0",
168
+ "@vueuse/shared": "^14.4.0",
169
169
  "colortranslator": "^5.0.0",
170
170
  "consola": "^3.4.2",
171
171
  "defu": "^6.1.7",
@@ -179,44 +179,45 @@
179
179
  "fuse.js": "^7.5.0",
180
180
  "hookable": "^6.1.1",
181
181
  "knitwork": "^1.3.0",
182
- "magic-string": "^0.30.21",
182
+ "magic-string": "^1.2.3",
183
183
  "mlly": "^1.8.2",
184
- "motion-v": "^2.3.0",
185
- "ohash": "^2.0.11",
184
+ "motion-v": "^2.4.2",
185
+ "ohash": "^2.0.12",
186
186
  "pathe": "^2.0.3",
187
- "reka-ui": "2.10.1",
187
+ "reka-ui": "2.10.4",
188
188
  "scule": "^1.3.0",
189
189
  "tailwind-merge": "^3.6.0",
190
190
  "tailwind-variants": "^3.2.2",
191
- "tailwindcss": "^4.3.2",
191
+ "tailwindcss": "^4.3.3",
192
192
  "tinyglobby": "^0.2.17",
193
193
  "ufo": "^1.6.4",
194
194
  "unplugin": "^3.3.0",
195
- "unplugin-auto-import": "^21.0.0",
195
+ "unplugin-auto-import": "^21.1.0",
196
196
  "unplugin-vue-components": "^32.1.0",
197
197
  "vaul-vue": "0.4.1",
198
- "vue-component-type-helpers": "^3.3.7"
198
+ "vue-component-type-helpers": "^3.3.11"
199
199
  },
200
200
  "devDependencies": {
201
- "@nuxt/eslint-config": "^1.16.0",
202
- "@nuxt/module-builder": "^1.0.2",
203
- "@nuxt/test-utils": "^4.0.2",
204
- "@release-it/conventional-changelog": "^11.0.1",
201
+ "@codspeed/vitest-plugin": "^5.7.1",
202
+ "@nuxt/eslint-config": "^1.17.0",
203
+ "@nuxt/module-builder": "^1.0.3",
204
+ "@nuxt/test-utils": "^4.2.0",
205
+ "@release-it/conventional-changelog": "^12.0.0",
205
206
  "@tanstack/table-core": "^8.21.3",
206
- "@vitejs/plugin-vue": "^6.0.7",
207
- "@vue/test-utils": "^2.4.11",
208
- "ai": "^7.0.26",
207
+ "@vitejs/plugin-vue": "^6.0.8",
208
+ "@vue/test-utils": "^2.5.0",
209
+ "ai": "^7.0.93",
209
210
  "embla-carousel": "^8.6.0",
210
- "eslint": "^10.7.0",
211
- "happy-dom": "^20.10.6",
212
- "nuxt": "^4.4.8",
213
- "release-it": "^20.2.1",
211
+ "eslint": "^10.10.0",
212
+ "happy-dom": "^20.14.0",
213
+ "nuxt": "^4.5.2",
214
+ "release-it": "^21.0.2",
214
215
  "unbuild": "^3.6.1",
215
- "vitest": "^4.1.10",
216
+ "vitest": "^4.1.11",
216
217
  "vitest-axe": "^0.1.0",
217
218
  "vitest-environment-nuxt": "^2.0.0",
218
- "vue": "^3.5.39",
219
- "vue-tsc": "^3.3.7"
219
+ "vue": "^3.5.42",
220
+ "vue-tsc": "^3.3.11"
220
221
  },
221
222
  "peerDependencies": {
222
223
  "@inertiajs/vue3": "^2.0.7 || ^3.0.0",
@@ -244,7 +245,7 @@
244
245
  "joi": "^18.0.0",
245
246
  "superstruct": "^2.0.0",
246
247
  "tailwindcss": "^4.0.0",
247
- "typescript": "^5.6.3 || ^6.0.0",
248
+ "typescript": "^5.6.3 || ^6.0.0 || ^7.0.0",
248
249
  "valibot": "^1.0.0",
249
250
  "vue-router": "^4.5.0 || ^5.0.0",
250
251
  "yup": "^1.7.0",
File without changes