@nuxt/ui 3.0.1 → 3.1.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 (228) hide show
  1. package/.nuxt/ui/accordion.ts +25 -4
  2. package/.nuxt/ui/alert.ts +52 -31
  3. package/.nuxt/ui/avatar-group.ts +24 -3
  4. package/.nuxt/ui/avatar.ts +26 -5
  5. package/.nuxt/ui/badge.ts +56 -35
  6. package/.nuxt/ui/breadcrumb.ts +28 -7
  7. package/.nuxt/ui/button-group.ts +23 -2
  8. package/.nuxt/ui/button.ts +66 -45
  9. package/.nuxt/ui/calendar.ts +39 -18
  10. package/.nuxt/ui/card.ts +28 -7
  11. package/.nuxt/ui/carousel.ts +29 -8
  12. package/.nuxt/ui/checkbox-group.ts +82 -0
  13. package/.nuxt/ui/checkbox.ts +163 -29
  14. package/.nuxt/ui/chip.ts +31 -10
  15. package/.nuxt/ui/collapsible.ts +23 -2
  16. package/.nuxt/ui/color-picker.ts +26 -5
  17. package/.nuxt/ui/command-palette.ts +37 -16
  18. package/.nuxt/ui/container.ts +24 -3
  19. package/.nuxt/ui/context-menu.ts +56 -35
  20. package/.nuxt/ui/drawer.ts +33 -12
  21. package/.nuxt/ui/dropdown-menu.ts +57 -36
  22. package/.nuxt/ui/form-field.ts +29 -8
  23. package/.nuxt/ui/form.ts +23 -2
  24. package/.nuxt/ui/index.ts +1 -0
  25. package/.nuxt/ui/input-menu.ts +65 -44
  26. package/.nuxt/ui/input-number.ts +43 -22
  27. package/.nuxt/ui/input.ts +46 -25
  28. package/.nuxt/ui/kbd.ts +27 -6
  29. package/.nuxt/ui/link.ts +26 -5
  30. package/.nuxt/ui/modal.ts +28 -7
  31. package/.nuxt/ui/navigation-menu.ts +103 -84
  32. package/.nuxt/ui/pagination.ts +23 -2
  33. package/.nuxt/ui/pin-input.ts +43 -22
  34. package/.nuxt/ui/popover.ts +25 -4
  35. package/.nuxt/ui/progress.ts +40 -19
  36. package/.nuxt/ui/radio-group.ts +273 -37
  37. package/.nuxt/ui/select-menu.ts +59 -35
  38. package/.nuxt/ui/select.ts +55 -34
  39. package/.nuxt/ui/separator.ts +31 -10
  40. package/.nuxt/ui/skeleton.ts +24 -3
  41. package/.nuxt/ui/slideover.ts +27 -6
  42. package/.nuxt/ui/slider.ts +39 -18
  43. package/.nuxt/ui/stepper.ts +41 -20
  44. package/.nuxt/ui/switch.ts +44 -23
  45. package/.nuxt/ui/table.ts +38 -17
  46. package/.nuxt/ui/tabs.ts +55 -34
  47. package/.nuxt/ui/textarea.ts +63 -37
  48. package/.nuxt/ui/toast.ts +47 -26
  49. package/.nuxt/ui/toaster.ts +23 -2
  50. package/.nuxt/ui/tooltip.ts +25 -4
  51. package/.nuxt/ui/tree.ts +41 -20
  52. package/.nuxt/ui.css +56 -12
  53. package/README.md +11 -0
  54. package/cli/templates.mjs +18 -17
  55. package/dist/module.d.mts +2 -1
  56. package/dist/module.json +5 -5
  57. package/dist/module.mjs +11 -7
  58. package/dist/runtime/components/Accordion.vue +36 -92
  59. package/dist/runtime/components/Accordion.vue.d.ts +91 -0
  60. package/dist/runtime/components/Alert.vue +37 -100
  61. package/dist/runtime/components/Alert.vue.d.ts +96 -0
  62. package/dist/runtime/components/App.vue +28 -34
  63. package/dist/runtime/components/App.vue.d.ts +24 -0
  64. package/dist/runtime/components/Avatar.vue +47 -78
  65. package/dist/runtime/components/Avatar.vue.d.ts +60 -0
  66. package/dist/runtime/components/AvatarGroup.vue +40 -77
  67. package/dist/runtime/components/AvatarGroup.vue.d.ts +40 -0
  68. package/dist/runtime/components/Badge.vue +33 -62
  69. package/dist/runtime/components/Badge.vue.d.ts +62 -0
  70. package/dist/runtime/components/Breadcrumb.vue +36 -88
  71. package/dist/runtime/components/Breadcrumb.vue.d.ts +82 -0
  72. package/dist/runtime/components/Button.vue +96 -105
  73. package/dist/runtime/components/Button.vue.d.ts +73 -0
  74. package/dist/runtime/components/ButtonGroup.vue +20 -46
  75. package/dist/runtime/components/ButtonGroup.vue.d.ts +55 -0
  76. package/dist/runtime/components/Calendar.vue +73 -127
  77. package/dist/runtime/components/Calendar.vue.d.ts +107 -0
  78. package/dist/runtime/components/Card.vue +18 -40
  79. package/dist/runtime/components/Card.vue.d.ts +38 -0
  80. package/dist/runtime/components/Carousel.vue +112 -230
  81. package/dist/runtime/components/Carousel.vue.d.ts +120 -0
  82. package/dist/runtime/components/Checkbox.vue +52 -93
  83. package/dist/runtime/components/Checkbox.vue.d.ts +76 -0
  84. package/dist/runtime/components/CheckboxGroup.vue +121 -0
  85. package/dist/runtime/components/CheckboxGroup.vue.d.ts +75 -0
  86. package/dist/runtime/components/Chip.vue +26 -69
  87. package/dist/runtime/components/Chip.vue.d.ts +71 -0
  88. package/dist/runtime/components/Collapsible.vue +22 -41
  89. package/dist/runtime/components/Collapsible.vue.d.ts +50 -0
  90. package/dist/runtime/components/ColorPicker.vue +111 -197
  91. package/dist/runtime/components/ColorPicker.vue.d.ts +63 -0
  92. package/dist/runtime/components/CommandPalette.vue +94 -234
  93. package/dist/runtime/components/CommandPalette.vue.d.ts +173 -0
  94. package/dist/runtime/components/Container.vue +15 -28
  95. package/dist/runtime/components/Container.vue.d.ts +27 -0
  96. package/dist/runtime/components/ContextMenu.vue +32 -119
  97. package/dist/runtime/components/ContextMenu.vue.d.ts +127 -0
  98. package/dist/runtime/components/ContextMenuContent.vue +71 -72
  99. package/dist/runtime/components/ContextMenuContent.vue.d.ts +105 -0
  100. package/dist/runtime/components/Drawer.vue +49 -87
  101. package/dist/runtime/components/Drawer.vue.d.ts +88 -0
  102. package/dist/runtime/components/DropdownMenu.vue +37 -129
  103. package/dist/runtime/components/DropdownMenu.vue.d.ts +141 -0
  104. package/dist/runtime/components/DropdownMenuContent.vue +76 -79
  105. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +55 -0
  106. package/dist/runtime/components/Form.vue +135 -219
  107. package/dist/runtime/components/Form.vue.d.ts +66 -0
  108. package/dist/runtime/components/FormField.vue +36 -77
  109. package/dist/runtime/components/FormField.vue.d.ts +70 -0
  110. package/dist/runtime/components/Icon.vue +12 -19
  111. package/dist/runtime/components/Icon.vue.d.ts +17 -0
  112. package/dist/runtime/components/Input.vue +82 -140
  113. package/dist/runtime/components/Input.vue.d.ts +91 -0
  114. package/dist/runtime/components/InputMenu.vue +193 -302
  115. package/dist/runtime/components/InputMenu.vue.d.ts +312 -0
  116. package/dist/runtime/components/InputNumber.vue +71 -133
  117. package/dist/runtime/components/InputNumber.vue.d.ts +193 -0
  118. package/dist/runtime/components/Kbd.vue +20 -46
  119. package/dist/runtime/components/Kbd.vue.d.ts +55 -0
  120. package/dist/runtime/components/Link.vue +98 -173
  121. package/dist/runtime/components/Link.vue.d.ts +124 -0
  122. package/dist/runtime/components/LinkBase.vue +33 -41
  123. package/dist/runtime/components/LinkBase.vue.d.ts +48 -0
  124. package/dist/runtime/components/Modal.vue +53 -116
  125. package/dist/runtime/components/Modal.vue.d.ts +109 -0
  126. package/dist/runtime/components/NavigationMenu.vue +78 -186
  127. package/dist/runtime/components/NavigationMenu.vue.d.ts +159 -0
  128. package/dist/runtime/components/OverlayProvider.vue +14 -18
  129. package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
  130. package/dist/runtime/components/Pagination.vue +46 -140
  131. package/dist/runtime/components/Pagination.vue.d.ts +143 -0
  132. package/dist/runtime/components/PinInput.vue +61 -78
  133. package/dist/runtime/components/PinInput.vue.d.ts +68 -0
  134. package/dist/runtime/components/Popover.vue +47 -84
  135. package/dist/runtime/components/Popover.vue.d.ts +80 -0
  136. package/dist/runtime/components/Progress.vue +70 -131
  137. package/dist/runtime/components/Progress.vue.d.ts +97 -0
  138. package/dist/runtime/components/RadioGroup.vue +75 -126
  139. package/dist/runtime/components/RadioGroup.vue.d.ts +88 -0
  140. package/dist/runtime/components/Select.vue +115 -202
  141. package/dist/runtime/components/Select.vue.d.ts +139 -0
  142. package/dist/runtime/components/SelectMenu.vue +167 -281
  143. package/dist/runtime/components/SelectMenu.vue.d.ts +184 -0
  144. package/dist/runtime/components/Separator.vue +29 -71
  145. package/dist/runtime/components/Separator.vue.d.ts +75 -0
  146. package/dist/runtime/components/Skeleton.vue +21 -23
  147. package/dist/runtime/components/Skeleton.vue.d.ts +26 -0
  148. package/dist/runtime/components/Slideover.vue +53 -120
  149. package/dist/runtime/components/Slideover.vue.d.ts +111 -0
  150. package/dist/runtime/components/Slider.vue +46 -84
  151. package/dist/runtime/components/Slider.vue.d.ts +71 -0
  152. package/dist/runtime/components/Stepper.vue +44 -113
  153. package/dist/runtime/components/Stepper.vue.d.ts +89 -0
  154. package/dist/runtime/components/Switch.vue +45 -93
  155. package/dist/runtime/components/Switch.vue.d.ts +73 -0
  156. package/dist/runtime/components/Table.vue +165 -264
  157. package/dist/runtime/components/Table.vue.d.ts +183 -0
  158. package/dist/runtime/components/Tabs.vue +40 -105
  159. package/dist/runtime/components/Tabs.vue.d.ts +104 -0
  160. package/dist/runtime/components/Textarea.vue +113 -158
  161. package/dist/runtime/components/Textarea.vue.d.ts +95 -0
  162. package/dist/runtime/components/Toast.vue +49 -110
  163. package/dist/runtime/components/Toast.vue.d.ts +95 -0
  164. package/dist/runtime/components/Toaster.vue +70 -107
  165. package/dist/runtime/components/Toaster.vue.d.ts +63 -0
  166. package/dist/runtime/components/Tooltip.vue +38 -65
  167. package/dist/runtime/components/Tooltip.vue.d.ts +65 -0
  168. package/dist/runtime/components/Tree.vue +57 -150
  169. package/dist/runtime/components/Tree.vue.d.ts +128 -0
  170. package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
  171. package/dist/runtime/composables/defineShortcuts.js +0 -1
  172. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  173. package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
  174. package/dist/runtime/composables/useFormField.d.ts +2 -2
  175. package/dist/runtime/composables/useFormField.js +1 -1
  176. package/dist/runtime/composables/useOverlay.d.ts +16 -8
  177. package/dist/runtime/composables/useOverlay.js +14 -6
  178. package/dist/runtime/composables/usePortal.d.ts +6 -0
  179. package/dist/runtime/composables/usePortal.js +17 -0
  180. package/dist/runtime/index.css +1 -1
  181. package/dist/runtime/inertia/components/Link.vue +146 -0
  182. package/dist/runtime/inertia/components/Link.vue.d.ts +92 -0
  183. package/dist/runtime/inertia/stubs.d.ts +43 -0
  184. package/dist/runtime/inertia/stubs.js +82 -0
  185. package/dist/runtime/locale/bg.d.ts +3 -0
  186. package/dist/runtime/locale/bg.js +54 -0
  187. package/dist/runtime/locale/hy.d.ts +3 -0
  188. package/dist/runtime/locale/hy.js +54 -0
  189. package/dist/runtime/locale/index.d.ts +6 -1
  190. package/dist/runtime/locale/index.js +6 -1
  191. package/dist/runtime/locale/kk.d.ts +3 -0
  192. package/dist/runtime/locale/kk.js +54 -0
  193. package/dist/runtime/locale/tj.d.ts +3 -0
  194. package/dist/runtime/locale/tj.js +54 -0
  195. package/dist/runtime/locale/ug_cn.d.ts +3 -0
  196. package/dist/runtime/locale/ug_cn.js +55 -0
  197. package/dist/runtime/types/form.d.ts +5 -1
  198. package/dist/runtime/types/index.d.ts +2 -0
  199. package/dist/runtime/types/index.js +2 -0
  200. package/dist/runtime/types/utils.d.ts +70 -10
  201. package/dist/runtime/utils/index.d.ts +1 -0
  202. package/dist/runtime/utils/index.js +3 -0
  203. package/dist/runtime/utils/link.d.ts +4 -27
  204. package/dist/runtime/utils/link.js +32 -1
  205. package/dist/runtime/utils/tv.js +2 -2
  206. package/dist/runtime/vue/components/Icon.vue +7 -8
  207. package/dist/runtime/vue/components/Icon.vue.d.ts +14 -0
  208. package/dist/runtime/vue/components/Link.vue +118 -199
  209. package/dist/runtime/vue/components/Link.vue.d.ts +124 -0
  210. package/dist/runtime/vue/stubs.d.ts +5 -0
  211. package/dist/runtime/vue/stubs.js +11 -2
  212. package/dist/shared/{ui.BCaWD5Ek.mjs → ui.D7lOOabO.mjs} +623 -364
  213. package/dist/types.d.mts +5 -1
  214. package/dist/unplugin.d.mts +6 -1
  215. package/dist/unplugin.mjs +25 -4
  216. package/dist/vite.mjs +1 -1
  217. package/package.json +122 -64
  218. package/dist/module.cjs +0 -62
  219. package/dist/module.d.cts +0 -44
  220. package/dist/module.d.ts +0 -44
  221. package/dist/shared/ui.C6uTSFTI.cjs +0 -3555
  222. package/dist/types.d.ts +0 -1
  223. package/dist/unplugin.cjs +0 -232
  224. package/dist/unplugin.d.cts +0 -61
  225. package/dist/unplugin.d.ts +0 -61
  226. package/dist/vite.cjs +0 -23
  227. package/dist/vite.d.cts +0 -15
  228. package/dist/vite.d.ts +0 -15
package/dist/types.d.mts CHANGED
@@ -1 +1,5 @@
1
- export { type ModuleOptions, default } from './module.js'
1
+ export { default } from './module.mjs'
2
+
3
+ export { type ModuleOptions } from './module.mjs'
4
+
5
+ export * from '../dist/runtime/types/index.js'
@@ -54,8 +54,13 @@ interface NuxtUIOptions extends Omit<ModuleOptions, 'fonts' | 'colorMode'> {
54
54
  * Override options for `unplugin-vue-components`
55
55
  */
56
56
  components?: Partial<Options$1>;
57
+ /**
58
+ * Enables compatibility layer for InertiaJS
59
+ */
60
+ inertia?: boolean;
57
61
  }
58
62
  declare const runtimeDir: string;
59
63
  declare const NuxtUIPlugin: unplugin.UnpluginInstance<NuxtUIOptions | undefined, boolean>;
60
64
 
61
- export { type NuxtUIOptions, NuxtUIPlugin, runtimeDir };
65
+ export { NuxtUIPlugin, runtimeDir };
66
+ export type { NuxtUIOptions };
package/dist/unplugin.mjs CHANGED
@@ -3,7 +3,7 @@ import { join, normalize } from 'pathe';
3
3
  import { createUnplugin } from 'unplugin';
4
4
  import { defu } from 'defu';
5
5
  import tailwind from '@tailwindcss/vite';
6
- import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.BCaWD5Ek.mjs';
6
+ import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.D7lOOabO.mjs';
7
7
  import { globSync } from 'tinyglobby';
8
8
  import { genSafeVariableName } from 'knitwork';
9
9
  import MagicString from 'magic-string';
@@ -100,6 +100,19 @@ function AppConfigPlugin(options, appConfig) {
100
100
  return `
101
101
  export default ${JSON.stringify(appConfig)}
102
102
  `;
103
+ },
104
+ vite: {
105
+ config() {
106
+ return {
107
+ test: {
108
+ server: {
109
+ deps: {
110
+ inline: ["@nuxt/ui"]
111
+ }
112
+ }
113
+ }
114
+ };
115
+ }
103
116
  }
104
117
  };
105
118
  }
@@ -109,6 +122,8 @@ function ComponentImportPlugin(options, meta) {
109
122
  const componentNames = new Set(components.map((c) => `${options.prefix}${c.replace(/\.vue$/, "")}`));
110
123
  const overrides = globSync("**/*.vue", { cwd: join(runtimeDir, "vue/components") });
111
124
  const overrideNames = new Set(overrides.map((c) => `${options.prefix}${c.replace(/\.vue$/, "")}`));
125
+ const inertiaOverrides = globSync("**/*.vue", { cwd: join(runtimeDir, "inertia/components") });
126
+ const inertiaOverrideNames = new Set(inertiaOverrides.map((c) => `${options.prefix}${c.replace(/\.vue$/, "")}`));
112
127
  const pluginOptions = defu(options.components, {
113
128
  dts: options.dts ?? true,
114
129
  exclude: [
@@ -118,6 +133,9 @@ function ComponentImportPlugin(options, meta) {
118
133
  ],
119
134
  resolvers: [
120
135
  (componentName) => {
136
+ if (options.inertia && inertiaOverrideNames.has(componentName)) {
137
+ return { name: "default", from: join(runtimeDir, "inertia/components", `${componentName.slice(options.prefix.length)}.vue`) };
138
+ }
121
139
  if (overrideNames.has(componentName))
122
140
  return { name: "default", from: join(runtimeDir, "vue/components", `${componentName.slice(options.prefix.length)}.vue`) };
123
141
  if (componentNames.has(componentName))
@@ -141,6 +159,9 @@ function ComponentImportPlugin(options, meta) {
141
159
  return;
142
160
  }
143
161
  const filename = id.match(/([^/]+)\.vue$/)?.[1];
162
+ if (filename && options.inertia && inertiaOverrideNames.has(`${options.prefix}${filename}`)) {
163
+ return join(runtimeDir, "inertia/components", `${filename}.vue`);
164
+ }
144
165
  if (filename && overrideNames.has(`${options.prefix}${filename}`)) {
145
166
  return join(runtimeDir, "vue/components", `${filename}.vue`);
146
167
  }
@@ -151,8 +172,8 @@ function ComponentImportPlugin(options, meta) {
151
172
  }
152
173
  const RELATIVE_IMPORT_RE = /^\.{1,2}\//;
153
174
 
154
- function NuxtEnvironmentPlugin() {
155
- const stubPath = resolvePathSync("../runtime/vue/stubs", { extensions: [".ts", ".mjs", ".js"], url: import.meta.url });
175
+ function NuxtEnvironmentPlugin(options) {
176
+ const stubPath = resolvePathSync(options.inertia ? "../runtime/inertia/stubs" : "../runtime/vue/stubs", { extensions: [".ts", ".mjs", ".js"], url: import.meta.url });
156
177
  return {
157
178
  name: "nuxt:ui",
158
179
  enforce: "pre",
@@ -194,7 +215,7 @@ const NuxtUIPlugin = createUnplugin((_options = {}, meta) => {
194
215
  options.theme.colors = resolveColors(options.theme.colors);
195
216
  const appConfig = defu({ ui: options.ui, colorMode: options.colorMode }, { ui: getDefaultUiConfig(options.theme.colors) });
196
217
  return [
197
- NuxtEnvironmentPlugin(),
218
+ NuxtEnvironmentPlugin(options),
198
219
  ComponentImportPlugin(options, meta),
199
220
  AutoImportPlugin(options, meta),
200
221
  tailwind(),
package/dist/vite.mjs CHANGED
@@ -4,7 +4,7 @@ import 'pathe';
4
4
  import 'unplugin';
5
5
  import 'defu';
6
6
  import '@tailwindcss/vite';
7
- import './shared/ui.BCaWD5Ek.mjs';
7
+ import './shared/ui.D7lOOabO.mjs';
8
8
  import '../dist/runtime/utils/index.js';
9
9
  import 'scule';
10
10
  import '@nuxt/kit';
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.1",
5
- "packageManager": "pnpm@10.6.5",
4
+ "version": "3.1.0",
5
+ "packageManager": "pnpm@10.9.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/nuxt/ui.git"
@@ -12,20 +12,17 @@
12
12
  "license": "MIT",
13
13
  "exports": {
14
14
  ".": {
15
- "types": "./dist/module.d.ts",
15
+ "types": "./dist/module.d.mts",
16
16
  "style": "./dist/runtime/index.css",
17
- "import": "./dist/module.mjs",
18
- "require": "./dist/module.cjs"
17
+ "import": "./dist/module.mjs"
19
18
  },
20
19
  "./unplugin": {
21
- "types": "./dist/unplugin.d.ts",
22
- "import": "./dist/unplugin.mjs",
23
- "require": "./dist/unplugin.cjs"
20
+ "types": "./dist/unplugin.d.mts",
21
+ "import": "./dist/unplugin.mjs"
24
22
  },
25
23
  "./vite": {
26
- "types": "./dist/vite.d.ts",
27
- "import": "./dist/vite.mjs",
28
- "require": "./dist/vite.cjs"
24
+ "types": "./dist/vite.d.mts",
25
+ "import": "./dist/vite.mjs"
29
26
  },
30
27
  "./vue-plugin": {
31
28
  "types": "./vue-plugin.d.ts"
@@ -33,6 +30,10 @@
33
30
  "./runtime/*": "./dist/runtime/*",
34
31
  "./components/*": "./dist/runtime/components/*",
35
32
  "./composables/*": "./dist/runtime/composables/*",
33
+ "./utils": {
34
+ "types": "./dist/runtime/utils/index.d.ts",
35
+ "import": "./dist/runtime/utils/index.js"
36
+ },
36
37
  "./utils/*": {
37
38
  "types": "./dist/runtime/utils/*.d.ts",
38
39
  "import": "./dist/runtime/utils/*.js"
@@ -42,6 +43,40 @@
42
43
  "import": "./dist/runtime/locale/index.js"
43
44
  }
44
45
  },
46
+ "typesVersions": {
47
+ "*": {
48
+ ".": [
49
+ "./dist/module.d.mts"
50
+ ],
51
+ "unplugin": [
52
+ "./dist/unplugin.d.mts"
53
+ ],
54
+ "vite": [
55
+ "./dist/vite.d.mts"
56
+ ],
57
+ "vue-plugin": [
58
+ "./vue-plugin.d.ts"
59
+ ],
60
+ "runtime/*": [
61
+ "./dist/runtime/*"
62
+ ],
63
+ "components/*": [
64
+ "./dist/runtime/components/*"
65
+ ],
66
+ "composables/*": [
67
+ "./dist/runtime/composables/*"
68
+ ],
69
+ "utils": [
70
+ "./dist/runtime/utils/index.d.ts"
71
+ ],
72
+ "utils/*": [
73
+ "./dist/runtime/utils/*.d.ts"
74
+ ],
75
+ "locale": [
76
+ "./dist/runtime/locale/index.d.ts"
77
+ ]
78
+ }
79
+ },
45
80
  "imports": {
46
81
  "#build/ui/*": "./.nuxt/ui/*.ts",
47
82
  "#build/ui.css": "./.nuxt/ui.css"
@@ -50,8 +85,7 @@
50
85
  "nuxt-ui": "./cli/index.mjs"
51
86
  },
52
87
  "style": "./dist/runtime/index.css",
53
- "main": "./dist/module.cjs",
54
- "types": "./dist/types.d.ts",
88
+ "main": "./dist/module.mjs",
55
89
  "files": [
56
90
  ".nuxt/ui",
57
91
  ".nuxt/ui.css",
@@ -62,100 +96,124 @@
62
96
  "scripts": {
63
97
  "build": "nuxt-module-build build",
64
98
  "prepack": "pnpm build",
65
- "dev": "DEV=true nuxi dev playground",
66
- "dev:vue": "DEV=true vite playground-vue",
99
+ "dev": "nuxi dev playground",
67
100
  "dev:build": "nuxi build playground",
101
+ "dev:vue": "vite playground-vue",
102
+ "dev:vue:build": "vite build playground-vue",
68
103
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && nuxi prepare docs && vite build playground-vue",
69
- "docs": "DEV=true nuxi dev docs",
70
- "docs:build": "NODE_OPTIONS='--max-old-space-size=8192' nuxi build docs",
104
+ "docs": "nuxi dev docs",
105
+ "docs:build": "nuxi build docs",
71
106
  "docs:prepare": "nuxt-component-meta docs",
72
107
  "lint": "eslint .",
73
108
  "lint:fix": "eslint . --fix",
74
109
  "typecheck": "vue-tsc --noEmit && nuxi typecheck playground && nuxi typecheck docs && cd playground-vue && vue-tsc --noEmit",
75
110
  "test": "vitest",
76
111
  "test:vue": "vitest -c vitest.vue.config.ts",
77
- "test:vue:build": "vite build playground-vue",
78
112
  "release": "release-it"
79
113
  },
80
114
  "dependencies": {
81
115
  "@iconify/vue": "^4.3.0",
82
- "@internationalized/date": "^3.7.0",
83
- "@internationalized/number": "^3.6.0",
84
- "@nuxt/fonts": "^0.11.0",
85
- "@nuxt/icon": "^1.11.0",
86
- "@nuxt/kit": "^3.16.1",
87
- "@nuxt/schema": "^3.16.1",
116
+ "@internationalized/date": "^3.8.0",
117
+ "@internationalized/number": "^3.6.1",
118
+ "@nuxt/fonts": "^0.11.1",
119
+ "@nuxt/icon": "^1.12.0",
120
+ "@nuxt/kit": "^3.16.2",
121
+ "@nuxt/schema": "^3.16.2",
88
122
  "@nuxtjs/color-mode": "^3.5.2",
89
- "@tailwindcss/postcss": "^4.0.15",
90
- "@tailwindcss/vite": "^4.0.15",
91
- "@tanstack/vue-table": "^8.21.2",
92
- "@unhead/vue": "^2.0.0-rc.13",
93
- "@vueuse/core": "^13.0.0",
94
- "@vueuse/integrations": "^13.0.0",
123
+ "@standard-schema/spec": "^1.0.0",
124
+ "@tailwindcss/postcss": "^4.1.4",
125
+ "@tailwindcss/vite": "^4.1.4",
126
+ "@tanstack/vue-table": "^8.21.3",
127
+ "@unhead/vue": "^2.0.8",
128
+ "@vueuse/core": "^13.1.0",
129
+ "@vueuse/integrations": "^13.1.0",
95
130
  "colortranslator": "^4.1.0",
96
131
  "consola": "^3.4.2",
97
132
  "defu": "^6.1.4",
98
- "embla-carousel-auto-height": "^8.5.2",
99
- "embla-carousel-auto-scroll": "^8.5.2",
100
- "embla-carousel-autoplay": "^8.5.2",
101
- "embla-carousel-class-names": "^8.5.2",
102
- "embla-carousel-fade": "^8.5.2",
103
- "embla-carousel-vue": "^8.5.2",
104
- "embla-carousel-wheel-gestures": "^8.0.1",
133
+ "embla-carousel-auto-height": "^8.6.0",
134
+ "embla-carousel-auto-scroll": "^8.6.0",
135
+ "embla-carousel-autoplay": "^8.6.0",
136
+ "embla-carousel-class-names": "^8.6.0",
137
+ "embla-carousel-fade": "^8.6.0",
138
+ "embla-carousel-vue": "^8.6.0",
139
+ "embla-carousel-wheel-gestures": "^8.0.2",
105
140
  "fuse.js": "^7.1.0",
141
+ "hookable": "^5.5.3",
106
142
  "knitwork": "^1.2.0",
107
143
  "magic-string": "^0.30.17",
108
144
  "mlly": "^1.7.4",
109
145
  "ohash": "^2.0.11",
110
146
  "pathe": "^2.0.3",
111
- "reka-ui": "^2.1.0",
147
+ "reka-ui": "^2.2.0",
112
148
  "scule": "^1.3.0",
113
149
  "tailwind-variants": "^1.0.0",
114
- "tailwindcss": "^4.0.15",
115
- "tinyglobby": "^0.2.12",
116
- "unplugin": "^2.2.1",
117
- "unplugin-auto-import": "^19.1.1",
118
- "unplugin-vue-components": "^28.4.1",
119
- "vaul-vue": "^0.4.1",
120
- "vue": "^3.5.13",
121
- "vue-router": "^4.5.0"
150
+ "tailwindcss": "^4.1.4",
151
+ "tinyglobby": "^0.2.13",
152
+ "unplugin": "^2.3.2",
153
+ "unplugin-auto-import": "^19.1.2",
154
+ "unplugin-vue-components": "^28.5.0",
155
+ "vaul-vue": "^0.4.1"
122
156
  },
123
157
  "devDependencies": {
124
- "@nuxt/eslint-config": "^1.2.0",
125
- "@nuxt/module-builder": "^0.8.4",
158
+ "@nuxt/eslint-config": "^1.3.0",
159
+ "@nuxt/module-builder": "^1.0.1",
126
160
  "@nuxt/test-utils": "^3.17.2",
127
- "@release-it/conventional-changelog": "^10.0.0",
128
- "@standard-schema/spec": "^1.0.0",
161
+ "@release-it/conventional-changelog": "^10.0.1",
129
162
  "@vue/test-utils": "^2.4.6",
130
- "embla-carousel": "^8.5.2",
131
- "eslint": "^9.22.0",
163
+ "embla-carousel": "^8.6.0",
164
+ "eslint": "^9.25.1",
132
165
  "happy-dom": "^17.4.4",
133
- "joi": "^17.13.3",
134
- "nuxt": "^3.16.1",
135
- "release-it": "^18.1.2",
136
- "superstruct": "^2.0.2",
137
- "valibot": "^1.0.0",
138
- "vitest": "^3.0.9",
166
+ "nuxt": "^3.16.2",
167
+ "release-it": "^19.0.1",
168
+ "vitest": "^3.1.2",
139
169
  "vitest-environment-nuxt": "^1.0.1",
140
- "vue-tsc": "^2.2.0",
141
- "yup": "^1.6.1",
142
- "zod": "^3.24.2"
170
+ "vue-tsc": "^2.2.0"
143
171
  },
144
172
  "peerDependencies": {
145
- "typescript": "^5.6.3"
173
+ "@inertiajs/vue3": "^2.0.7",
174
+ "joi": "^17.13.0",
175
+ "superstruct": "^2.0.0",
176
+ "typescript": "^5.6.3",
177
+ "valibot": "^1.0.0",
178
+ "vue-router": "^4.5.0",
179
+ "yup": "^1.6.0",
180
+ "zod": "^3.24.0"
181
+ },
182
+ "peerDependenciesMeta": {
183
+ "@inertiajs/vue3": {
184
+ "optional": true
185
+ },
186
+ "joi": {
187
+ "optional": true
188
+ },
189
+ "valibot": {
190
+ "optional": true
191
+ },
192
+ "superstruct": {
193
+ "optional": true
194
+ },
195
+ "vue-router": {
196
+ "optional": true
197
+ },
198
+ "yup": {
199
+ "optional": true
200
+ },
201
+ "zod": {
202
+ "optional": true
203
+ }
146
204
  },
147
205
  "resolutions": {
148
206
  "@nuxt/ui": "workspace:*",
149
207
  "chokidar": "3.6.0",
150
208
  "debug": "4.3.7",
151
209
  "rollup": "4.34.9",
152
- "typescript": "5.6.3",
153
- "unplugin": "^2.2.1",
210
+ "unplugin": "^2.3.2",
154
211
  "vue-tsc": "2.2.0"
155
212
  },
156
213
  "pnpm": {
157
214
  "onlyBuiltDependencies": [
158
215
  "better-sqlite3",
216
+ "puppeteer",
159
217
  "sharp"
160
218
  ],
161
219
  "ignoredBuiltDependencies": [
package/dist/module.cjs DELETED
@@ -1,62 +0,0 @@
1
- 'use strict';
2
-
3
- const defu = require('defu');
4
- const kit = require('@nuxt/kit');
5
- const templates = require('./shared/ui.C6uTSFTI.cjs');
6
- require('../dist/runtime/utils/index.js');
7
- require('node:url');
8
- require('scule');
9
- require('tailwindcss/colors');
10
-
11
- var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
12
- const module$1 = kit.defineNuxtModule({
13
- meta: {
14
- name: "ui",
15
- configKey: "ui",
16
- compatibility: {
17
- nuxt: ">=3.16.0"
18
- },
19
- docs: "https://ui.nuxt.com/getting-started/installation/nuxt"
20
- },
21
- defaults: templates.defaultOptions,
22
- async setup(options, nuxt) {
23
- const { resolve } = kit.createResolver((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('module.cjs', document.baseURI).href)));
24
- options.theme = options.theme || {};
25
- options.theme.colors = templates.resolveColors(options.theme.colors);
26
- nuxt.options.ui = options;
27
- nuxt.options.alias["#ui"] = resolve("./runtime");
28
- nuxt.options.appConfig.ui = defu.defu(nuxt.options.appConfig.ui || {}, templates.getDefaultUiConfig(options.theme.colors));
29
- nuxt.options.app.rootAttrs = nuxt.options.app.rootAttrs || {};
30
- nuxt.options.app.rootAttrs.class = [nuxt.options.app.rootAttrs.class, "isolate"].filter(Boolean).join(" ");
31
- if (nuxt.options.builder === "@nuxt/vite-builder") {
32
- const plugin = await import('@tailwindcss/vite').then((r) => r.default);
33
- kit.addVitePlugin(plugin());
34
- } else {
35
- nuxt.options.postcss.plugins["@tailwindcss/postcss"] = {};
36
- }
37
- async function registerModule(name, key, options2) {
38
- if (!kit.hasNuxtModule(name)) {
39
- await kit.installModule(name, options2);
40
- } else {
41
- nuxt.options[key] = defu.defu(nuxt.options[key], options2);
42
- }
43
- }
44
- await registerModule("@nuxt/icon", "icon", { cssLayer: "components" });
45
- if (options.fonts) {
46
- await registerModule("@nuxt/fonts", "fonts", { experimental: { processCSSVariables: true } });
47
- }
48
- if (options.colorMode) {
49
- await registerModule("@nuxtjs/color-mode", "colorMode", { classSuffix: "", disableTransition: true });
50
- }
51
- kit.addPlugin({ src: resolve("./runtime/plugins/colors") });
52
- kit.addComponentsDir({
53
- path: resolve("./runtime/components"),
54
- prefix: options.prefix,
55
- pathPrefix: false
56
- });
57
- kit.addImportsDir(resolve("./runtime/composables"));
58
- templates.addTemplates(options, nuxt, resolve);
59
- }
60
- });
61
-
62
- module.exports = module$1;
package/dist/module.d.cts DELETED
@@ -1,44 +0,0 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
- export * from '../dist/runtime/types/index.js';
3
-
4
- interface ModuleOptions {
5
- /**
6
- * Prefix for components
7
- * @defaultValue `U`
8
- * @link https://ui.nuxt.com/getting-started/installation/nuxt#prefix
9
- */
10
- prefix?: string;
11
- /**
12
- * Enable or disable `@nuxt/fonts` module
13
- * @defaultValue `true`
14
- * @link https://ui.nuxt.com/getting-started/installation/nuxt#fonts
15
- */
16
- fonts?: boolean;
17
- /**
18
- * Enable or disable `@nuxtjs/color-mode` module
19
- * @defaultValue `true`
20
- * @link https://ui.nuxt.com/getting-started/installation/nuxt#colormode
21
- */
22
- colorMode?: boolean;
23
- /**
24
- * Customize how the theme is generated
25
- * @link https://ui.nuxt.com/getting-started/theme
26
- */
27
- theme?: {
28
- /**
29
- * Define the color aliases available for components
30
- * @defaultValue `['primary', 'secondary', 'success', 'info', 'warning', 'error']`
31
- * @link https://ui.nuxt.com/getting-started/installation/nuxt#themecolors
32
- */
33
- colors?: string[];
34
- /**
35
- * Enable or disable transitions on components
36
- * @defaultValue `true`
37
- * @link https://ui.nuxt.com/getting-started/installation/nuxt#themetransitions
38
- */
39
- transitions?: boolean;
40
- };
41
- }
42
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
43
-
44
- export { type ModuleOptions, _default as default };
package/dist/module.d.ts DELETED
@@ -1,44 +0,0 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
- export * from '../dist/runtime/types/index.js';
3
-
4
- interface ModuleOptions {
5
- /**
6
- * Prefix for components
7
- * @defaultValue `U`
8
- * @link https://ui.nuxt.com/getting-started/installation/nuxt#prefix
9
- */
10
- prefix?: string;
11
- /**
12
- * Enable or disable `@nuxt/fonts` module
13
- * @defaultValue `true`
14
- * @link https://ui.nuxt.com/getting-started/installation/nuxt#fonts
15
- */
16
- fonts?: boolean;
17
- /**
18
- * Enable or disable `@nuxtjs/color-mode` module
19
- * @defaultValue `true`
20
- * @link https://ui.nuxt.com/getting-started/installation/nuxt#colormode
21
- */
22
- colorMode?: boolean;
23
- /**
24
- * Customize how the theme is generated
25
- * @link https://ui.nuxt.com/getting-started/theme
26
- */
27
- theme?: {
28
- /**
29
- * Define the color aliases available for components
30
- * @defaultValue `['primary', 'secondary', 'success', 'info', 'warning', 'error']`
31
- * @link https://ui.nuxt.com/getting-started/installation/nuxt#themecolors
32
- */
33
- colors?: string[];
34
- /**
35
- * Enable or disable transitions on components
36
- * @defaultValue `true`
37
- * @link https://ui.nuxt.com/getting-started/installation/nuxt#themetransitions
38
- */
39
- transitions?: boolean;
40
- };
41
- }
42
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
43
-
44
- export { type ModuleOptions, _default as default };