@nuxt/ui 3.0.0-alpha.11 → 3.0.0-alpha.13

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 (174) hide show
  1. package/.nuxt/ui/accordion.ts +2 -2
  2. package/.nuxt/ui/alert.ts +47 -37
  3. package/.nuxt/ui/avatar-group.ts +1 -1
  4. package/.nuxt/ui/avatar.ts +4 -4
  5. package/.nuxt/ui/badge.ts +37 -28
  6. package/.nuxt/ui/breadcrumb.ts +5 -5
  7. package/.nuxt/ui/button.ts +42 -43
  8. package/.nuxt/ui/calendar.ts +15 -15
  9. package/.nuxt/ui/card.ts +27 -1
  10. package/.nuxt/ui/carousel.ts +2 -2
  11. package/.nuxt/ui/checkbox.ts +18 -18
  12. package/.nuxt/ui/chip.ts +8 -8
  13. package/.nuxt/ui/color-picker.ts +2 -2
  14. package/.nuxt/ui/command-palette.ts +12 -12
  15. package/.nuxt/ui/container.ts +1 -1
  16. package/.nuxt/ui/context-menu.ts +32 -32
  17. package/.nuxt/ui/drawer.ts +72 -11
  18. package/.nuxt/ui/dropdown-menu.ts +33 -33
  19. package/.nuxt/ui/form-field.ts +6 -6
  20. package/.nuxt/ui/input-menu.ts +41 -41
  21. package/.nuxt/ui/input-number.ts +20 -20
  22. package/.nuxt/ui/input.ts +23 -23
  23. package/.nuxt/ui/kbd.ts +4 -4
  24. package/.nuxt/ui/link.ts +3 -3
  25. package/.nuxt/ui/modal.ts +5 -5
  26. package/.nuxt/ui/navigation-menu.ts +144 -77
  27. package/.nuxt/ui/pin-input.ts +20 -20
  28. package/.nuxt/ui/popover.ts +2 -2
  29. package/.nuxt/ui/progress.ts +17 -17
  30. package/.nuxt/ui/radio-group.ts +20 -20
  31. package/.nuxt/ui/select-menu.ts +33 -32
  32. package/.nuxt/ui/select.ts +31 -31
  33. package/.nuxt/ui/separator.ts +8 -8
  34. package/.nuxt/ui/skeleton.ts +1 -1
  35. package/.nuxt/ui/slideover.ts +4 -4
  36. package/.nuxt/ui/slider.ts +16 -16
  37. package/.nuxt/ui/stepper.ts +18 -18
  38. package/.nuxt/ui/switch.ts +20 -20
  39. package/.nuxt/ui/table.ts +16 -16
  40. package/.nuxt/ui/tabs.ts +33 -33
  41. package/.nuxt/ui/textarea.ts +23 -23
  42. package/.nuxt/ui/toast.ts +42 -32
  43. package/.nuxt/ui/toaster.ts +4 -4
  44. package/.nuxt/ui/tooltip.ts +2 -2
  45. package/.nuxt/ui.css +90 -0
  46. package/README.md +2 -2
  47. package/cli/package.json +2 -2
  48. package/cli/templates.mjs +7 -7
  49. package/dist/chunks/component-meta.cjs +2590 -2511
  50. package/dist/chunks/component-meta.mjs +2590 -2511
  51. package/dist/client/devtools/200.html +1 -1
  52. package/dist/client/devtools/404.html +1 -1
  53. package/dist/client/devtools/_nuxt/CG6Dc4jp.js +1 -0
  54. package/dist/client/devtools/_nuxt/{Dtz-o9GB.js → DrNJgD08.js} +1 -1
  55. package/dist/client/devtools/_nuxt/{DNZFyo26.js → ElqrUh1r.js} +1 -1
  56. package/dist/client/devtools/_nuxt/builds/latest.json +1 -1
  57. package/dist/client/devtools/_nuxt/builds/meta/255c8d0b-7281-4d74-b4b6-ec96e6721aa0.json +1 -0
  58. package/dist/client/devtools/_nuxt/entry.Hn8drx4g.css +1 -0
  59. package/dist/client/devtools/_nuxt/error-404.Dew7w9Ee.css +1 -0
  60. package/dist/client/devtools/_nuxt/error-500.Dep59i31.css +1 -0
  61. package/dist/client/devtools/_nuxt/mC2e7kOs.js +57 -0
  62. package/dist/client/devtools/index.html +1 -1
  63. package/dist/devtools/runtime/examples/CardExample.vue +3 -3
  64. package/dist/devtools/runtime/examples/CollapsibleExample.vue +1 -1
  65. package/dist/devtools/runtime/examples/ContainerExample.vue +1 -1
  66. package/dist/devtools/runtime/examples/ContextMenuExample.vue +1 -1
  67. package/dist/devtools/runtime/examples/PopoverExample.vue +1 -1
  68. package/dist/devtools/runtime/examples/TooltipExample.vue +1 -1
  69. package/dist/module.cjs +2 -1
  70. package/dist/module.json +1 -1
  71. package/dist/module.mjs +2 -1
  72. package/dist/runtime/components/Accordion.vue +2 -2
  73. package/dist/runtime/components/Alert.vue +15 -12
  74. package/dist/runtime/components/App.vue +3 -3
  75. package/dist/runtime/components/Avatar.vue +31 -10
  76. package/dist/runtime/components/AvatarGroup.vue +2 -2
  77. package/dist/runtime/components/Badge.vue +7 -3
  78. package/dist/runtime/components/Breadcrumb.vue +2 -2
  79. package/dist/runtime/components/Button.vue +2 -2
  80. package/dist/runtime/components/ButtonGroup.vue +2 -2
  81. package/dist/runtime/components/Calendar.vue +6 -3
  82. package/dist/runtime/components/Card.vue +8 -4
  83. package/dist/runtime/components/Carousel.vue +2 -2
  84. package/dist/runtime/components/Checkbox.vue +4 -4
  85. package/dist/runtime/components/Chip.vue +2 -2
  86. package/dist/runtime/components/Collapsible.vue +2 -2
  87. package/dist/runtime/components/ColorPicker.vue +46 -15
  88. package/dist/runtime/components/CommandPalette.vue +48 -41
  89. package/dist/runtime/components/Container.vue +2 -2
  90. package/dist/runtime/components/ContextMenu.vue +10 -2
  91. package/dist/runtime/components/ContextMenuContent.vue +4 -2
  92. package/dist/runtime/components/Drawer.vue +9 -3
  93. package/dist/runtime/components/DropdownMenu.vue +10 -2
  94. package/dist/runtime/components/DropdownMenuContent.vue +4 -2
  95. package/dist/runtime/components/Form.vue +46 -17
  96. package/dist/runtime/components/FormField.vue +12 -6
  97. package/dist/runtime/components/Input.vue +5 -4
  98. package/dist/runtime/components/InputMenu.vue +6 -5
  99. package/dist/runtime/components/InputNumber.vue +10 -6
  100. package/dist/runtime/components/Kbd.vue +2 -2
  101. package/dist/runtime/components/Link.vue +2 -2
  102. package/dist/runtime/components/Modal.vue +17 -3
  103. package/dist/runtime/components/NavigationMenu.vue +110 -67
  104. package/dist/runtime/components/Pagination.vue +2 -2
  105. package/dist/runtime/components/PinInput.vue +5 -4
  106. package/dist/runtime/components/Popover.vue +2 -2
  107. package/dist/runtime/components/Progress.vue +2 -2
  108. package/dist/runtime/components/RadioGroup.vue +4 -4
  109. package/dist/runtime/components/Select.vue +9 -7
  110. package/dist/runtime/components/SelectMenu.vue +67 -64
  111. package/dist/runtime/components/Separator.vue +2 -2
  112. package/dist/runtime/components/Skeleton.vue +2 -2
  113. package/dist/runtime/components/Slideover.vue +17 -3
  114. package/dist/runtime/components/Slider.vue +4 -4
  115. package/dist/runtime/components/Stepper.vue +3 -3
  116. package/dist/runtime/components/Switch.vue +4 -4
  117. package/dist/runtime/components/Table.vue +96 -18
  118. package/dist/runtime/components/Tabs.vue +2 -2
  119. package/dist/runtime/components/Textarea.vue +7 -5
  120. package/dist/runtime/components/Toast.vue +28 -16
  121. package/dist/runtime/components/Toaster.vue +4 -4
  122. package/dist/runtime/components/Tooltip.vue +2 -2
  123. package/dist/runtime/composables/useFormField.d.ts +6 -2
  124. package/dist/runtime/composables/useFormField.js +18 -11
  125. package/dist/runtime/composables/useToast.d.ts +4 -3
  126. package/dist/runtime/composables/useToast.js +20 -6
  127. package/dist/runtime/index.css +1 -1
  128. package/dist/runtime/locale/az.js +54 -0
  129. package/dist/runtime/locale/bn.js +54 -0
  130. package/dist/runtime/locale/es.js +2 -2
  131. package/dist/runtime/locale/he.d.ts +2 -0
  132. package/dist/runtime/locale/he.js +53 -0
  133. package/dist/runtime/locale/hi.d.ts +2 -0
  134. package/dist/runtime/locale/hi.js +54 -0
  135. package/dist/runtime/locale/hu.d.ts +2 -0
  136. package/dist/runtime/locale/hu.js +54 -0
  137. package/dist/runtime/locale/index.d.ts +8 -2
  138. package/dist/runtime/locale/index.js +8 -2
  139. package/dist/runtime/locale/km.d.ts +2 -0
  140. package/dist/runtime/locale/km.js +54 -0
  141. package/dist/runtime/locale/nb_no.d.ts +2 -0
  142. package/dist/runtime/locale/nb_no.js +54 -0
  143. package/dist/runtime/locale/zh_cn.d.ts +2 -0
  144. package/dist/runtime/locale/{zh_hans.js → zh_cn.js} +1 -1
  145. package/dist/runtime/locale/zh_tw.d.ts +2 -0
  146. package/dist/runtime/locale/{zh_hant.js → zh_tw.js} +1 -1
  147. package/dist/runtime/plugins/colors.js +8 -5
  148. package/dist/runtime/types/form.d.ts +21 -12
  149. package/dist/runtime/types/index.d.ts +1 -0
  150. package/dist/runtime/types/index.js +1 -0
  151. package/dist/runtime/types/utils.d.ts +5 -0
  152. package/dist/runtime/utils/form.js +3 -5
  153. package/dist/runtime/utils/tv.js +2 -2
  154. package/dist/runtime/vue/components/Link.vue +77 -18
  155. package/dist/shared/{ui.DCjJwb6l.cjs → ui.C5FzRWM5.cjs} +529 -366
  156. package/dist/shared/{ui.BKsd22-Q.mjs → ui.DCZM2pl8.mjs} +525 -366
  157. package/dist/unplugin.cjs +44 -20
  158. package/dist/unplugin.d.cts +10 -0
  159. package/dist/unplugin.d.mts +10 -0
  160. package/dist/unplugin.d.ts +10 -0
  161. package/dist/unplugin.mjs +43 -19
  162. package/dist/vite.cjs +3 -2
  163. package/dist/vite.d.cts +2 -0
  164. package/dist/vite.d.mts +2 -0
  165. package/dist/vite.d.ts +2 -0
  166. package/dist/vite.mjs +3 -2
  167. package/package.json +67 -41
  168. package/dist/client/devtools/_nuxt/CQ-XZFu7.js +0 -54
  169. package/dist/client/devtools/_nuxt/builds/meta/1f5fbd7b-9d97-480e-9ae4-e02b4ff7018b.json +0 -1
  170. package/dist/client/devtools/_nuxt/entry.qOdop8tq.css +0 -1
  171. package/dist/client/devtools/_nuxt/error-404.D-rS9BDk.css +0 -1
  172. package/dist/client/devtools/_nuxt/error-500.CfcCHs91.css +0 -1
  173. /package/dist/runtime/locale/{zh_hans.d.ts → az.d.ts} +0 -0
  174. /package/dist/runtime/locale/{zh_hant.d.ts → bn.d.ts} +0 -0
package/dist/unplugin.cjs CHANGED
@@ -3,26 +3,27 @@
3
3
  const node_url = require('node:url');
4
4
  const pathe = require('pathe');
5
5
  const unplugin = require('unplugin');
6
- const AutoImport = require('unplugin-auto-import');
7
6
  const defu = require('defu');
8
7
  const tailwind = require('@tailwindcss/vite');
9
- const templates = require('./shared/ui.DCjJwb6l.cjs');
8
+ const templates = require('./shared/ui.C5FzRWM5.cjs');
10
9
  const tinyglobby = require('tinyglobby');
11
10
  const knitwork = require('knitwork');
12
11
  const MagicString = require('magic-string');
13
12
  const mlly = require('mlly');
14
13
  const AutoImportComponents = require('unplugin-vue-components');
14
+ const AutoImport = require('unplugin-auto-import');
15
15
  require('../dist/runtime/utils/index.js');
16
16
  require('scule');
17
17
  require('@nuxt/kit');
18
+ require('tailwindcss/colors');
18
19
 
19
20
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
20
21
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
21
22
 
22
- const AutoImport__default = /*#__PURE__*/_interopDefaultCompat(AutoImport);
23
23
  const tailwind__default = /*#__PURE__*/_interopDefaultCompat(tailwind);
24
24
  const MagicString__default = /*#__PURE__*/_interopDefaultCompat(MagicString);
25
25
  const AutoImportComponents__default = /*#__PURE__*/_interopDefaultCompat(AutoImportComponents);
26
+ const AutoImport__default = /*#__PURE__*/_interopDefaultCompat(AutoImport);
26
27
 
27
28
  function TemplatePlugin(options, appConfig) {
28
29
  const templates$1 = templates.getTemplates(options, appConfig.ui);
@@ -101,11 +102,23 @@ function AppConfigPlugin(options, appConfig) {
101
102
  };
102
103
  }
103
104
 
104
- function ComponentImportPlugin(framework, options) {
105
+ function ComponentImportPlugin(options, meta) {
105
106
  const components = tinyglobby.globSync("**/*.vue", { cwd: pathe.join(runtimeDir, "components") });
106
107
  const componentNames = new Set(components.map((c) => `${options.prefix}${c.replace(/\.vue$/, "")}`));
107
108
  const overrides = tinyglobby.globSync("**/*.vue", { cwd: pathe.join(runtimeDir, "vue/components") });
108
109
  const overrideNames = new Set(overrides.map((c) => `${options.prefix}${c.replace(/\.vue$/, "")}`));
110
+ const pluginOptions = defu.defu(options.components, {
111
+ dts: options.dts ?? true,
112
+ exclude: [/[\\/]node_modules[\\/](?!\.pnpm|@nuxt\/ui)/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
113
+ resolvers: [
114
+ (componentName) => {
115
+ if (overrideNames.has(componentName))
116
+ return { name: "default", from: pathe.join(runtimeDir, "vue/components", `${componentName.slice(options.prefix.length)}.vue`) };
117
+ if (componentNames.has(componentName))
118
+ return { name: "default", from: pathe.join(runtimeDir, "components", `${componentName.slice(options.prefix.length)}.vue`) };
119
+ }
120
+ ]
121
+ });
109
122
  return [
110
123
  /**
111
124
  * This plugin aims to ensure we override certain components with Vue-compatible versions:
@@ -127,18 +140,7 @@ function ComponentImportPlugin(framework, options) {
127
140
  }
128
141
  }
129
142
  },
130
- AutoImportComponents__default[framework]({
131
- dts: options.dts ?? true,
132
- exclude: [/[\\/]node_modules[\\/](?!\.pnpm|@nuxt\/ui)/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
133
- resolvers: [
134
- (componentName) => {
135
- if (overrideNames.has(componentName))
136
- return { name: "default", from: pathe.join(runtimeDir, "vue/components", `${componentName.slice(options.prefix.length)}.vue`) };
137
- if (componentNames.has(componentName))
138
- return { name: "default", from: pathe.join(runtimeDir, "components", `${componentName.slice(options.prefix.length)}.vue`) };
139
- }
140
- ]
141
- })
143
+ AutoImportComponents__default.raw(pluginOptions, meta)
142
144
  ];
143
145
  }
144
146
  const RELATIVE_IMPORT_RE = /^\.{1,2}\//;
@@ -171,6 +173,14 @@ function NuxtEnvironmentPlugin() {
171
173
  };
172
174
  }
173
175
 
176
+ function AutoImportPlugin(options, meta) {
177
+ const pluginOptions = defu.defu(options.autoImport, {
178
+ dts: options.dts ?? true,
179
+ dirs: [pathe.join(runtimeDir, "composables")]
180
+ });
181
+ return AutoImport__default.raw(pluginOptions, meta);
182
+ }
183
+
174
184
  const runtimeDir = pathe.normalize(node_url.fileURLToPath(new URL("./runtime", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('unplugin.cjs', document.baseURI).href)))));
175
185
  const NuxtUIPlugin = unplugin.createUnplugin((_options = {}, meta) => {
176
186
  const options = defu.defu(_options, { fonts: false, devtools: { enabled: false } }, templates.defaultOptions);
@@ -179,13 +189,27 @@ const NuxtUIPlugin = unplugin.createUnplugin((_options = {}, meta) => {
179
189
  const appConfig = defu.defu({ ui: options.ui }, { ui: templates.getDefaultUiConfig(options.theme.colors) });
180
190
  return [
181
191
  NuxtEnvironmentPlugin(),
182
- ...ComponentImportPlugin(meta.framework, options),
183
- AutoImport__default[meta.framework]({ dts: options.dts ?? true, dirs: [pathe.join(runtimeDir, "composables")] }),
192
+ ComponentImportPlugin(options, meta),
193
+ AutoImportPlugin(options, meta),
184
194
  tailwind__default(),
185
195
  PluginsPlugin(options),
186
196
  TemplatePlugin(options, appConfig),
187
- AppConfigPlugin(options, appConfig)
188
- ];
197
+ AppConfigPlugin(options, appConfig),
198
+ {
199
+ name: "nuxt:ui:plugins-duplication-detection",
200
+ vite: {
201
+ configResolved(config) {
202
+ const plugins = config.plugins || [];
203
+ if (plugins.filter((i) => i.name === "unplugin-auto-import").length > 1) {
204
+ throw new Error("[Nuxt UI] Multiple instances of `unplugin-auto-import` detected. Nuxt UI includes `unplugin-auto-import` already, and you can configure it using `autoImport` option in Nuxt UI module options.");
205
+ }
206
+ if (plugins.filter((i) => i.name === "unplugin-vue-components").length > 1) {
207
+ throw new Error("[Nuxt UI] Multiple instances of `unplugin-vue-components` detected. Nuxt UI includes `unplugin-vue-components` already, and you can configure it using `components` option in Nuxt UI module options.");
208
+ }
209
+ }
210
+ }
211
+ }
212
+ ].flat(1);
189
213
  });
190
214
 
191
215
  exports.NuxtUIPlugin = NuxtUIPlugin;
@@ -1,4 +1,6 @@
1
1
  import * as unplugin from 'unplugin';
2
+ import { Options } from 'unplugin-auto-import/types';
3
+ import { Options as Options$1 } from 'unplugin-vue-components/types';
2
4
  import colors from 'tailwindcss/colors';
3
5
  import * as ui from '#build/ui';
4
6
  import { ModuleOptions } from './module.cjs';
@@ -42,6 +44,14 @@ interface NuxtUIOptions extends Omit<ModuleOptions, 'fonts' | 'colorMode'> {
42
44
  * @defaultValue `true`
43
45
  */
44
46
  colorMode?: boolean;
47
+ /**
48
+ * Override options for `unplugin-auto-import`
49
+ */
50
+ autoImport?: Partial<Options>;
51
+ /**
52
+ * Override options for `unplugin-vue-components`
53
+ */
54
+ components?: Partial<Options$1>;
45
55
  }
46
56
  declare const runtimeDir: string;
47
57
  declare const NuxtUIPlugin: unplugin.UnpluginInstance<NuxtUIOptions | undefined, boolean>;
@@ -1,4 +1,6 @@
1
1
  import * as unplugin from 'unplugin';
2
+ import { Options } from 'unplugin-auto-import/types';
3
+ import { Options as Options$1 } from 'unplugin-vue-components/types';
2
4
  import colors from 'tailwindcss/colors';
3
5
  import * as ui from '#build/ui';
4
6
  import { ModuleOptions } from './module.mjs';
@@ -42,6 +44,14 @@ interface NuxtUIOptions extends Omit<ModuleOptions, 'fonts' | 'colorMode'> {
42
44
  * @defaultValue `true`
43
45
  */
44
46
  colorMode?: boolean;
47
+ /**
48
+ * Override options for `unplugin-auto-import`
49
+ */
50
+ autoImport?: Partial<Options>;
51
+ /**
52
+ * Override options for `unplugin-vue-components`
53
+ */
54
+ components?: Partial<Options$1>;
45
55
  }
46
56
  declare const runtimeDir: string;
47
57
  declare const NuxtUIPlugin: unplugin.UnpluginInstance<NuxtUIOptions | undefined, boolean>;
@@ -1,4 +1,6 @@
1
1
  import * as unplugin from 'unplugin';
2
+ import { Options } from 'unplugin-auto-import/types';
3
+ import { Options as Options$1 } from 'unplugin-vue-components/types';
2
4
  import colors from 'tailwindcss/colors';
3
5
  import * as ui from '#build/ui';
4
6
  import { ModuleOptions } from './module.js';
@@ -42,6 +44,14 @@ interface NuxtUIOptions extends Omit<ModuleOptions, 'fonts' | 'colorMode'> {
42
44
  * @defaultValue `true`
43
45
  */
44
46
  colorMode?: boolean;
47
+ /**
48
+ * Override options for `unplugin-auto-import`
49
+ */
50
+ autoImport?: Partial<Options>;
51
+ /**
52
+ * Override options for `unplugin-vue-components`
53
+ */
54
+ components?: Partial<Options$1>;
45
55
  }
46
56
  declare const runtimeDir: string;
47
57
  declare const NuxtUIPlugin: unplugin.UnpluginInstance<NuxtUIOptions | undefined, boolean>;
package/dist/unplugin.mjs CHANGED
@@ -1,18 +1,19 @@
1
1
  import { fileURLToPath } from 'node:url';
2
2
  import { join, normalize } from 'pathe';
3
3
  import { createUnplugin } from 'unplugin';
4
- import AutoImport from 'unplugin-auto-import';
5
4
  import { defu } from 'defu';
6
5
  import tailwind from '@tailwindcss/vite';
7
- import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.BKsd22-Q.mjs';
6
+ import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.DCZM2pl8.mjs';
8
7
  import { globSync } from 'tinyglobby';
9
8
  import { genSafeVariableName } from 'knitwork';
10
9
  import MagicString from 'magic-string';
11
10
  import { resolvePathSync } from 'mlly';
12
11
  import AutoImportComponents from 'unplugin-vue-components';
12
+ import AutoImport from 'unplugin-auto-import';
13
13
  import '../dist/runtime/utils/index.js';
14
14
  import 'scule';
15
15
  import '@nuxt/kit';
16
+ import 'tailwindcss/colors';
16
17
 
17
18
  function TemplatePlugin(options, appConfig) {
18
19
  const templates = getTemplates(options, appConfig.ui);
@@ -91,11 +92,23 @@ function AppConfigPlugin(options, appConfig) {
91
92
  };
92
93
  }
93
94
 
94
- function ComponentImportPlugin(framework, options) {
95
+ function ComponentImportPlugin(options, meta) {
95
96
  const components = globSync("**/*.vue", { cwd: join(runtimeDir, "components") });
96
97
  const componentNames = new Set(components.map((c) => `${options.prefix}${c.replace(/\.vue$/, "")}`));
97
98
  const overrides = globSync("**/*.vue", { cwd: join(runtimeDir, "vue/components") });
98
99
  const overrideNames = new Set(overrides.map((c) => `${options.prefix}${c.replace(/\.vue$/, "")}`));
100
+ const pluginOptions = defu(options.components, {
101
+ dts: options.dts ?? true,
102
+ exclude: [/[\\/]node_modules[\\/](?!\.pnpm|@nuxt\/ui)/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
103
+ resolvers: [
104
+ (componentName) => {
105
+ if (overrideNames.has(componentName))
106
+ return { name: "default", from: join(runtimeDir, "vue/components", `${componentName.slice(options.prefix.length)}.vue`) };
107
+ if (componentNames.has(componentName))
108
+ return { name: "default", from: join(runtimeDir, "components", `${componentName.slice(options.prefix.length)}.vue`) };
109
+ }
110
+ ]
111
+ });
99
112
  return [
100
113
  /**
101
114
  * This plugin aims to ensure we override certain components with Vue-compatible versions:
@@ -117,18 +130,7 @@ function ComponentImportPlugin(framework, options) {
117
130
  }
118
131
  }
119
132
  },
120
- AutoImportComponents[framework]({
121
- dts: options.dts ?? true,
122
- exclude: [/[\\/]node_modules[\\/](?!\.pnpm|@nuxt\/ui)/, /[\\/]\.git[\\/]/, /[\\/]\.nuxt[\\/]/],
123
- resolvers: [
124
- (componentName) => {
125
- if (overrideNames.has(componentName))
126
- return { name: "default", from: join(runtimeDir, "vue/components", `${componentName.slice(options.prefix.length)}.vue`) };
127
- if (componentNames.has(componentName))
128
- return { name: "default", from: join(runtimeDir, "components", `${componentName.slice(options.prefix.length)}.vue`) };
129
- }
130
- ]
131
- })
133
+ AutoImportComponents.raw(pluginOptions, meta)
132
134
  ];
133
135
  }
134
136
  const RELATIVE_IMPORT_RE = /^\.{1,2}\//;
@@ -161,6 +163,14 @@ function NuxtEnvironmentPlugin() {
161
163
  };
162
164
  }
163
165
 
166
+ function AutoImportPlugin(options, meta) {
167
+ const pluginOptions = defu(options.autoImport, {
168
+ dts: options.dts ?? true,
169
+ dirs: [join(runtimeDir, "composables")]
170
+ });
171
+ return AutoImport.raw(pluginOptions, meta);
172
+ }
173
+
164
174
  const runtimeDir = normalize(fileURLToPath(new URL("./runtime", import.meta.url)));
165
175
  const NuxtUIPlugin = createUnplugin((_options = {}, meta) => {
166
176
  const options = defu(_options, { fonts: false, devtools: { enabled: false } }, defaultOptions);
@@ -169,13 +179,27 @@ const NuxtUIPlugin = createUnplugin((_options = {}, meta) => {
169
179
  const appConfig = defu({ ui: options.ui }, { ui: getDefaultUiConfig(options.theme.colors) });
170
180
  return [
171
181
  NuxtEnvironmentPlugin(),
172
- ...ComponentImportPlugin(meta.framework, options),
173
- AutoImport[meta.framework]({ dts: options.dts ?? true, dirs: [join(runtimeDir, "composables")] }),
182
+ ComponentImportPlugin(options, meta),
183
+ AutoImportPlugin(options, meta),
174
184
  tailwind(),
175
185
  PluginsPlugin(options),
176
186
  TemplatePlugin(options, appConfig),
177
- AppConfigPlugin(options, appConfig)
178
- ];
187
+ AppConfigPlugin(options, appConfig),
188
+ {
189
+ name: "nuxt:ui:plugins-duplication-detection",
190
+ vite: {
191
+ configResolved(config) {
192
+ const plugins = config.plugins || [];
193
+ if (plugins.filter((i) => i.name === "unplugin-auto-import").length > 1) {
194
+ throw new Error("[Nuxt UI] Multiple instances of `unplugin-auto-import` detected. Nuxt UI includes `unplugin-auto-import` already, and you can configure it using `autoImport` option in Nuxt UI module options.");
195
+ }
196
+ if (plugins.filter((i) => i.name === "unplugin-vue-components").length > 1) {
197
+ throw new Error("[Nuxt UI] Multiple instances of `unplugin-vue-components` detected. Nuxt UI includes `unplugin-vue-components` already, and you can configure it using `components` option in Nuxt UI module options.");
198
+ }
199
+ }
200
+ }
201
+ }
202
+ ].flat(1);
179
203
  });
180
204
 
181
205
  export { NuxtUIPlugin, runtimeDir };
package/dist/vite.cjs CHANGED
@@ -4,18 +4,19 @@ const unplugin = require('./unplugin.cjs');
4
4
  require('node:url');
5
5
  require('pathe');
6
6
  require('unplugin');
7
- require('unplugin-auto-import');
8
7
  require('defu');
9
8
  require('@tailwindcss/vite');
10
- require('./shared/ui.DCjJwb6l.cjs');
9
+ require('./shared/ui.C5FzRWM5.cjs');
11
10
  require('../dist/runtime/utils/index.js');
12
11
  require('scule');
13
12
  require('@nuxt/kit');
13
+ require('tailwindcss/colors');
14
14
  require('tinyglobby');
15
15
  require('knitwork');
16
16
  require('magic-string');
17
17
  require('mlly');
18
18
  require('unplugin-vue-components');
19
+ require('unplugin-auto-import');
19
20
 
20
21
  const vite = unplugin.NuxtUIPlugin.vite;
21
22
 
package/dist/vite.d.cts CHANGED
@@ -1,6 +1,8 @@
1
1
  import * as vite from 'vite';
2
2
  import { NuxtUIOptions } from './unplugin.cjs';
3
3
  import 'unplugin';
4
+ import 'unplugin-auto-import/types';
5
+ import 'unplugin-vue-components/types';
4
6
  import 'tailwindcss/colors';
5
7
  import '#build/ui';
6
8
  import './module.cjs';
package/dist/vite.d.mts CHANGED
@@ -1,6 +1,8 @@
1
1
  import * as vite from 'vite';
2
2
  import { NuxtUIOptions } from './unplugin.mjs';
3
3
  import 'unplugin';
4
+ import 'unplugin-auto-import/types';
5
+ import 'unplugin-vue-components/types';
4
6
  import 'tailwindcss/colors';
5
7
  import '#build/ui';
6
8
  import './module.mjs';
package/dist/vite.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import * as vite from 'vite';
2
2
  import { NuxtUIOptions } from './unplugin.js';
3
3
  import 'unplugin';
4
+ import 'unplugin-auto-import/types';
5
+ import 'unplugin-vue-components/types';
4
6
  import 'tailwindcss/colors';
5
7
  import '#build/ui';
6
8
  import './module.js';
package/dist/vite.mjs CHANGED
@@ -2,18 +2,19 @@ import { NuxtUIPlugin } from './unplugin.mjs';
2
2
  import 'node:url';
3
3
  import 'pathe';
4
4
  import 'unplugin';
5
- import 'unplugin-auto-import';
6
5
  import 'defu';
7
6
  import '@tailwindcss/vite';
8
- import './shared/ui.BKsd22-Q.mjs';
7
+ import './shared/ui.DCZM2pl8.mjs';
9
8
  import '../dist/runtime/utils/index.js';
10
9
  import 'scule';
11
10
  import '@nuxt/kit';
11
+ import 'tailwindcss/colors';
12
12
  import 'tinyglobby';
13
13
  import 'knitwork';
14
14
  import 'magic-string';
15
15
  import 'mlly';
16
16
  import 'unplugin-vue-components';
17
+ import 'unplugin-auto-import';
17
18
 
18
19
  const vite = NuxtUIPlugin.vite;
19
20
 
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": "3.0.0-alpha.11",
5
- "packageManager": "pnpm@9.15.3",
4
+ "version": "3.0.0-alpha.13",
5
+ "packageManager": "pnpm@10.4.1",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/nuxt/ui.git"
@@ -31,13 +31,18 @@
31
31
  "types": "./vue-plugin.d.ts"
32
32
  },
33
33
  "./runtime/*": "./dist/runtime/*",
34
+ "./utils/*": {
35
+ "types": "./dist/runtime/utils/*.d.ts",
36
+ "import": "./dist/runtime/utils/*.js"
37
+ },
34
38
  "./locale": {
35
39
  "types": "./dist/runtime/locale/index.d.ts",
36
40
  "import": "./dist/runtime/locale/index.js"
37
41
  }
38
42
  },
39
43
  "imports": {
40
- "#build/ui/*": "./.nuxt/ui/*.ts"
44
+ "#build/ui/*": "./.nuxt/ui/*.ts",
45
+ "#build/ui.css": "./.nuxt/ui.css"
41
46
  },
42
47
  "bin": {
43
48
  "nuxt-ui": "./cli/index.mjs"
@@ -47,6 +52,7 @@
47
52
  "types": "./dist/types.d.ts",
48
53
  "files": [
49
54
  ".nuxt/ui",
55
+ ".nuxt/ui.css",
50
56
  "dist",
51
57
  "cli",
52
58
  "vue-plugin.d.ts"
@@ -60,7 +66,7 @@
60
66
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && nuxi prepare docs && nuxi prepare devtools && vite build playground-vue",
61
67
  "devtools": "NUXT_UI_DEVTOOLS_LOCAL=true nuxi dev playground",
62
68
  "devtools:build": "nuxi generate devtools",
63
- "devtools:prepare": "nuxt-component-meta playground --outputDir ../src/devtools/.component-meta/",
69
+ "devtools:prepare": "DEVTOOLS=true nuxt-component-meta playground --outputDir ../src/devtools/.component-meta/",
64
70
  "docs": "DEV=true nuxi dev docs",
65
71
  "docs:build": "nuxi build docs",
66
72
  "docs:prepare": "nuxt-component-meta docs",
@@ -74,23 +80,22 @@
74
80
  },
75
81
  "dependencies": {
76
82
  "@iconify/vue": "^4.3.0",
77
- "@internationalized/date": "^3.6.0",
83
+ "@internationalized/date": "^3.7.0",
78
84
  "@internationalized/number": "^3.6.0",
79
- "@nuxt/devtools-kit": "^1.7.0",
85
+ "@nuxt/devtools-kit": "^2.1.0",
80
86
  "@nuxt/fonts": "^0.10.3",
81
87
  "@nuxt/icon": "^1.10.3",
82
- "@nuxt/kit": "^3.15.1",
83
- "@nuxt/schema": "^3.15.1",
88
+ "@nuxt/kit": "^3.15.4",
89
+ "@nuxt/schema": "^3.15.4",
84
90
  "@nuxtjs/color-mode": "^3.5.2",
85
- "@tailwindcss/postcss": "4.0.0-beta.9",
86
- "@tailwindcss/vite": "4.0.0-beta.9",
87
- "@tanstack/vue-table": "^8.20.5",
88
- "@types/color": "^4.2.0",
89
- "@unhead/vue": "^1.11.16",
90
- "@vueuse/core": "^12.4.0",
91
- "@vueuse/integrations": "^12.4.0",
92
- "color": "^4.2.3",
93
- "consola": "^3.3.3",
91
+ "@tailwindcss/postcss": "^4.0.6",
92
+ "@tailwindcss/vite": "^4.0.6",
93
+ "@tanstack/vue-table": "^8.21.2",
94
+ "@unhead/vue": "^1.11.19",
95
+ "@vueuse/core": "^12.7.0",
96
+ "@vueuse/integrations": "^12.7.0",
97
+ "colortranslator": "^4.1.0",
98
+ "consola": "^3.4.0",
94
99
  "defu": "^6.1.4",
95
100
  "embla-carousel-auto-height": "^8.5.2",
96
101
  "embla-carousel-auto-scroll": "^8.5.2",
@@ -99,46 +104,46 @@
99
104
  "embla-carousel-fade": "^8.5.2",
100
105
  "embla-carousel-vue": "^8.5.2",
101
106
  "embla-carousel-wheel-gestures": "^8.0.1",
102
- "fuse.js": "^7.0.0",
107
+ "fuse.js": "^7.1.0",
103
108
  "get-port-please": "^3.1.2",
104
109
  "knitwork": "^1.2.0",
105
110
  "magic-string": "^0.30.17",
106
111
  "mlly": "^1.7.4",
107
112
  "ohash": "^1.1.4",
108
- "reka-ui": "1.0.0-alpha.8",
109
- "pathe": "^2.0.1",
113
+ "pathe": "^2.0.3",
114
+ "reka-ui": "1.0.0-alpha.10",
110
115
  "scule": "^1.3.0",
111
116
  "sirv": "^3.0.0",
112
- "tailwind-variants": "^0.3.0",
113
- "tailwindcss": "4.0.0-beta.9",
117
+ "tailwind-variants": "^0.3.1",
118
+ "tailwindcss": "^4.0.6",
114
119
  "tinyglobby": "^0.2.10",
115
- "unplugin": "^2.1.2",
116
- "unplugin-auto-import": "^19.0.0",
117
- "unplugin-vue-components": "^28.0.0",
118
- "vaul-vue": "^0.2.0"
120
+ "unplugin": "^2.2.0",
121
+ "unplugin-auto-import": "^19.1.0",
122
+ "unplugin-vue-components": "^28.1.0",
123
+ "vaul-vue": "^0.2.1"
119
124
  },
120
125
  "devDependencies": {
121
- "@nuxt/eslint-config": "^0.7.5",
126
+ "@nuxt/eslint-config": "^1.0.1",
122
127
  "@nuxt/module-builder": "^0.8.4",
123
128
  "@nuxt/test-utils": "^3.15.4",
124
129
  "@release-it/conventional-changelog": "^10.0.0",
125
- "@standard-schema/spec": "1.0.0-rc.0",
130
+ "@standard-schema/spec": "^1.0.0",
126
131
  "@vue/test-utils": "^2.4.6",
127
132
  "embla-carousel": "^8.5.2",
128
- "eslint": "^9.18.0",
129
- "happy-dom": "^15.7.4",
133
+ "eslint": "^9.20.1",
134
+ "happy-dom": "^17.1.0",
130
135
  "joi": "^17.13.3",
131
136
  "knitwork": "^1.2.0",
132
- "nuxt": "^3.15.1",
133
- "nuxt-component-meta": "^0.9.0",
134
- "release-it": "^18.1.1",
137
+ "nuxt": "^3.15.4",
138
+ "nuxt-component-meta": "^0.10.0",
139
+ "release-it": "^18.1.2",
135
140
  "superstruct": "^2.0.2",
136
141
  "valibot": "^0.42.1",
137
- "vitest": "^2.1.8",
142
+ "vitest": "^3.0.5",
138
143
  "vitest-environment-nuxt": "^1.0.1",
139
144
  "vue-tsc": "^2.2.0",
140
145
  "yup": "^1.6.1",
141
- "zod": "^3.24.1"
146
+ "zod": "^3.24.2"
142
147
  },
143
148
  "peerDependencies": {
144
149
  "typescript": "^5.6.3"
@@ -147,12 +152,33 @@
147
152
  "@nuxt/ui": "workspace:*",
148
153
  "chokidar": "3.6.0",
149
154
  "debug": "4.3.7",
150
- "happy-dom": "14.12.3",
151
- "rollup": "^4.24.0",
155
+ "rollup": "4.32.1",
152
156
  "typescript": "5.6.3",
153
157
  "unimport": "3.14.5",
154
- "unplugin": "^2.1.2",
155
- "vite": "^6.0.7",
156
- "vue-tsc": "^2.2.0"
157
- }
158
+ "unplugin": "^2.2.0",
159
+ "vite": "6.0.11",
160
+ "vue": "3.5.13",
161
+ "vue-tsc": "2.2.0"
162
+ },
163
+ "pnpm": {
164
+ "onlyBuiltDependencies": [
165
+ "better-sqlite3"
166
+ ]
167
+ },
168
+ "keywords": [
169
+ "nuxt-ui",
170
+ "nuxt",
171
+ "vue3",
172
+ "tailwindcss",
173
+ "component library",
174
+ "vue",
175
+ "vuejs",
176
+ "vue.js",
177
+ "typescript",
178
+ "vue-components",
179
+ "ui",
180
+ "tailwind",
181
+ "framework",
182
+ "ui-framework"
183
+ ]
158
184
  }