@nuxt/ui 3.0.2 → 3.1.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 (221) hide show
  1. package/.nuxt/ui/accordion.ts +2 -2
  2. package/.nuxt/ui/alert.ts +29 -29
  3. package/.nuxt/ui/avatar-group.ts +1 -1
  4. package/.nuxt/ui/avatar.ts +3 -3
  5. package/.nuxt/ui/badge.ts +33 -33
  6. package/.nuxt/ui/breadcrumb.ts +5 -5
  7. package/.nuxt/ui/button.ts +43 -43
  8. package/.nuxt/ui/calendar.ts +17 -17
  9. package/.nuxt/ui/card.ts +5 -5
  10. package/.nuxt/ui/carousel.ts +6 -6
  11. package/.nuxt/ui/checkbox-group.ts +61 -0
  12. package/.nuxt/ui/checkbox.ts +140 -27
  13. package/.nuxt/ui/chip.ts +8 -8
  14. package/.nuxt/ui/color-picker.ts +3 -3
  15. package/.nuxt/ui/command-palette.ts +14 -14
  16. package/.nuxt/ui/context-menu.ts +33 -33
  17. package/.nuxt/ui/drawer.ts +10 -10
  18. package/.nuxt/ui/dropdown-menu.ts +34 -34
  19. package/.nuxt/ui/form-field.ts +6 -6
  20. package/.nuxt/ui/index.ts +1 -0
  21. package/.nuxt/ui/input-menu.ts +42 -42
  22. package/.nuxt/ui/input-number.ts +20 -20
  23. package/.nuxt/ui/input.ts +23 -23
  24. package/.nuxt/ui/kbd.ts +4 -4
  25. package/.nuxt/ui/link.ts +3 -3
  26. package/.nuxt/ui/modal.ts +5 -5
  27. package/.nuxt/ui/navigation-menu.ts +78 -80
  28. package/.nuxt/ui/pin-input.ts +20 -20
  29. package/.nuxt/ui/popover.ts +2 -2
  30. package/.nuxt/ui/progress.ts +17 -17
  31. package/.nuxt/ui/radio-group.ts +250 -35
  32. package/.nuxt/ui/select-menu.ts +36 -33
  33. package/.nuxt/ui/select.ts +32 -32
  34. package/.nuxt/ui/separator.ts +8 -8
  35. package/.nuxt/ui/skeleton.ts +1 -1
  36. package/.nuxt/ui/slideover.ts +4 -4
  37. package/.nuxt/ui/slider.ts +16 -16
  38. package/.nuxt/ui/stepper.ts +18 -18
  39. package/.nuxt/ui/switch.ts +20 -20
  40. package/.nuxt/ui/table.ts +15 -15
  41. package/.nuxt/ui/tabs.ts +32 -32
  42. package/.nuxt/ui/textarea.ts +40 -35
  43. package/.nuxt/ui/toast.ts +24 -24
  44. package/.nuxt/ui/tooltip.ts +2 -2
  45. package/.nuxt/ui/tree.ts +18 -18
  46. package/.nuxt/ui.css +63 -12
  47. package/README.md +15 -0
  48. package/cli/templates.mjs +18 -17
  49. package/dist/module.json +5 -5
  50. package/dist/module.mjs +12 -7
  51. package/dist/runtime/components/Accordion.vue +36 -93
  52. package/dist/runtime/components/Accordion.vue.d.ts +75 -0
  53. package/dist/runtime/components/Alert.vue +37 -100
  54. package/dist/runtime/components/Alert.vue.d.ts +81 -0
  55. package/dist/runtime/components/App.vue +28 -34
  56. package/dist/runtime/components/App.vue.d.ts +24 -0
  57. package/dist/runtime/components/Avatar.vue +42 -75
  58. package/dist/runtime/components/Avatar.vue.d.ts +39 -0
  59. package/dist/runtime/components/AvatarGroup.vue +40 -77
  60. package/dist/runtime/components/AvatarGroup.vue.d.ts +31 -0
  61. package/dist/runtime/components/Badge.vue +33 -62
  62. package/dist/runtime/components/Badge.vue.d.ts +41 -0
  63. package/dist/runtime/components/Breadcrumb.vue +37 -90
  64. package/dist/runtime/components/Breadcrumb.vue.d.ts +64 -0
  65. package/dist/runtime/components/Button.vue +95 -104
  66. package/dist/runtime/components/Button.vue.d.ts +48 -0
  67. package/dist/runtime/components/ButtonGroup.vue +20 -46
  68. package/dist/runtime/components/ButtonGroup.vue.d.ts +34 -0
  69. package/dist/runtime/components/Calendar.vue +67 -150
  70. package/dist/runtime/components/Calendar.vue.d.ts +111 -0
  71. package/dist/runtime/components/Card.vue +18 -40
  72. package/dist/runtime/components/Card.vue.d.ts +29 -0
  73. package/dist/runtime/components/Carousel.vue +112 -234
  74. package/dist/runtime/components/Carousel.vue.d.ts +122 -0
  75. package/dist/runtime/components/Checkbox.vue +52 -93
  76. package/dist/runtime/components/Checkbox.vue.d.ts +73 -0
  77. package/dist/runtime/components/CheckboxGroup.vue +121 -0
  78. package/dist/runtime/components/CheckboxGroup.vue.d.ts +78 -0
  79. package/dist/runtime/components/Chip.vue +26 -69
  80. package/dist/runtime/components/Chip.vue.d.ts +57 -0
  81. package/dist/runtime/components/Collapsible.vue +22 -41
  82. package/dist/runtime/components/Collapsible.vue.d.ts +35 -0
  83. package/dist/runtime/components/ColorPicker.vue +111 -197
  84. package/dist/runtime/components/ColorPicker.vue.d.ts +48 -0
  85. package/dist/runtime/components/CommandPalette.vue +96 -237
  86. package/dist/runtime/components/CommandPalette.vue.d.ts +161 -0
  87. package/dist/runtime/components/Container.vue +15 -28
  88. package/dist/runtime/components/Container.vue.d.ts +18 -0
  89. package/dist/runtime/components/ContextMenu.vue +34 -133
  90. package/dist/runtime/components/ContextMenu.vue.d.ts +107 -0
  91. package/dist/runtime/components/ContextMenuContent.vue +73 -81
  92. package/dist/runtime/components/ContextMenuContent.vue.d.ts +65 -0
  93. package/dist/runtime/components/Drawer.vue +49 -83
  94. package/dist/runtime/components/Drawer.vue.d.ts +78 -0
  95. package/dist/runtime/components/DropdownMenu.vue +39 -142
  96. package/dist/runtime/components/DropdownMenu.vue.d.ts +117 -0
  97. package/dist/runtime/components/DropdownMenuContent.vue +78 -88
  98. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +68 -0
  99. package/dist/runtime/components/Form.vue +135 -220
  100. package/dist/runtime/components/Form.vue.d.ts +69 -0
  101. package/dist/runtime/components/FormField.vue +35 -77
  102. package/dist/runtime/components/FormField.vue.d.ts +61 -0
  103. package/dist/runtime/components/Icon.vue +12 -19
  104. package/dist/runtime/components/Icon.vue.d.ts +8 -0
  105. package/dist/runtime/components/Input.vue +82 -140
  106. package/dist/runtime/components/Input.vue.d.ts +76 -0
  107. package/dist/runtime/components/InputMenu.vue +185 -332
  108. package/dist/runtime/components/InputMenu.vue.d.ts +324 -0
  109. package/dist/runtime/components/InputNumber.vue +71 -133
  110. package/dist/runtime/components/InputNumber.vue.d.ts +182 -0
  111. package/dist/runtime/components/Kbd.vue +20 -46
  112. package/dist/runtime/components/Kbd.vue.d.ts +34 -0
  113. package/dist/runtime/components/Link.vue +98 -176
  114. package/dist/runtime/components/Link.vue.d.ts +93 -0
  115. package/dist/runtime/components/LinkBase.vue +33 -42
  116. package/dist/runtime/components/LinkBase.vue.d.ts +25 -0
  117. package/dist/runtime/components/Modal.vue +53 -116
  118. package/dist/runtime/components/Modal.vue.d.ts +93 -0
  119. package/dist/runtime/components/NavigationMenu.vue +77 -209
  120. package/dist/runtime/components/NavigationMenu.vue.d.ts +139 -0
  121. package/dist/runtime/components/OverlayProvider.vue +14 -18
  122. package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
  123. package/dist/runtime/components/Pagination.vue +46 -140
  124. package/dist/runtime/components/Pagination.vue.d.ts +119 -0
  125. package/dist/runtime/components/PinInput.vue +61 -78
  126. package/dist/runtime/components/PinInput.vue.d.ts +57 -0
  127. package/dist/runtime/components/Popover.vue +47 -84
  128. package/dist/runtime/components/Popover.vue.d.ts +63 -0
  129. package/dist/runtime/components/Progress.vue +70 -131
  130. package/dist/runtime/components/Progress.vue.d.ts +66 -0
  131. package/dist/runtime/components/RadioGroup.vue +70 -132
  132. package/dist/runtime/components/RadioGroup.vue.d.ts +91 -0
  133. package/dist/runtime/components/Select.vue +110 -224
  134. package/dist/runtime/components/Select.vue.d.ts +145 -0
  135. package/dist/runtime/components/SelectMenu.vue +161 -310
  136. package/dist/runtime/components/SelectMenu.vue.d.ts +196 -0
  137. package/dist/runtime/components/Separator.vue +29 -71
  138. package/dist/runtime/components/Separator.vue.d.ts +54 -0
  139. package/dist/runtime/components/Skeleton.vue +21 -23
  140. package/dist/runtime/components/Skeleton.vue.d.ts +17 -0
  141. package/dist/runtime/components/Slideover.vue +53 -120
  142. package/dist/runtime/components/Slideover.vue.d.ts +94 -0
  143. package/dist/runtime/components/Slider.vue +46 -84
  144. package/dist/runtime/components/Slider.vue.d.ts +52 -0
  145. package/dist/runtime/components/Stepper.vue +45 -115
  146. package/dist/runtime/components/Stepper.vue.d.ts +83 -0
  147. package/dist/runtime/components/Switch.vue +45 -93
  148. package/dist/runtime/components/Switch.vue.d.ts +70 -0
  149. package/dist/runtime/components/Table.vue +163 -267
  150. package/dist/runtime/components/Table.vue.d.ts +183 -0
  151. package/dist/runtime/components/Tabs.vue +41 -107
  152. package/dist/runtime/components/Tabs.vue.d.ts +88 -0
  153. package/dist/runtime/components/Textarea.vue +113 -158
  154. package/dist/runtime/components/Textarea.vue.d.ts +78 -0
  155. package/dist/runtime/components/Toast.vue +49 -110
  156. package/dist/runtime/components/Toast.vue.d.ts +157 -0
  157. package/dist/runtime/components/Toaster.vue +70 -107
  158. package/dist/runtime/components/Toaster.vue.d.ts +38 -0
  159. package/dist/runtime/components/Tooltip.vue +38 -65
  160. package/dist/runtime/components/Tooltip.vue.d.ts +50 -0
  161. package/dist/runtime/components/Tree.vue +59 -166
  162. package/dist/runtime/components/Tree.vue.d.ts +111 -0
  163. package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
  164. package/dist/runtime/composables/defineShortcuts.js +6 -0
  165. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  166. package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
  167. package/dist/runtime/composables/useFormField.d.ts +2 -2
  168. package/dist/runtime/composables/useKbd.d.ts +1 -0
  169. package/dist/runtime/composables/useKbd.js +4 -3
  170. package/dist/runtime/composables/useOverlay.d.ts +14 -8
  171. package/dist/runtime/composables/useOverlay.js +20 -7
  172. package/dist/runtime/composables/usePortal.d.ts +6 -0
  173. package/dist/runtime/composables/usePortal.js +17 -0
  174. package/dist/runtime/index.css +1 -1
  175. package/dist/runtime/inertia/components/Link.vue +146 -0
  176. package/dist/runtime/inertia/components/Link.vue.d.ts +63 -0
  177. package/dist/runtime/inertia/stubs.d.ts +43 -0
  178. package/dist/runtime/inertia/stubs.js +82 -0
  179. package/dist/runtime/locale/bg.d.ts +3 -0
  180. package/dist/runtime/locale/bg.js +54 -0
  181. package/dist/runtime/locale/index.d.ts +5 -1
  182. package/dist/runtime/locale/index.js +5 -1
  183. package/dist/runtime/locale/kk.d.ts +3 -0
  184. package/dist/runtime/locale/kk.js +54 -0
  185. package/dist/runtime/locale/tj.d.ts +3 -0
  186. package/dist/runtime/locale/tj.js +54 -0
  187. package/dist/runtime/locale/ug_cn.d.ts +3 -0
  188. package/dist/runtime/locale/ug_cn.js +55 -0
  189. package/dist/runtime/types/form.d.ts +4 -1
  190. package/dist/runtime/types/index.d.ts +1 -0
  191. package/dist/runtime/types/index.js +1 -0
  192. package/dist/runtime/types/tv.d.ts +53 -0
  193. package/dist/runtime/types/tv.js +0 -0
  194. package/dist/runtime/types/utils.d.ts +7 -17
  195. package/dist/runtime/types/utils.js +1 -0
  196. package/dist/runtime/utils/link.d.ts +3 -3
  197. package/dist/runtime/utils/link.js +1 -0
  198. package/dist/runtime/utils/tv.js +2 -2
  199. package/dist/runtime/vue/components/Icon.vue +7 -8
  200. package/dist/runtime/vue/components/Icon.vue.d.ts +5 -0
  201. package/dist/runtime/vue/components/Link.vue +118 -202
  202. package/dist/runtime/vue/components/Link.vue.d.ts +93 -0
  203. package/dist/runtime/vue/stubs.d.ts +2 -2
  204. package/dist/shared/{ui.BkNUP964.mjs → ui.CbtTMMzt.mjs} +631 -366
  205. package/dist/types.d.mts +3 -5
  206. package/dist/unplugin.d.mts +6 -2
  207. package/dist/unplugin.mjs +25 -4
  208. package/dist/vite.d.mts +1 -1
  209. package/dist/vite.mjs +2 -2
  210. package/package.json +96 -54
  211. package/dist/module.cjs +0 -62
  212. package/dist/module.d.cts +0 -45
  213. package/dist/module.d.ts +0 -45
  214. package/dist/shared/ui.BL-XB3u1.cjs +0 -3555
  215. package/dist/types.d.ts +0 -7
  216. package/dist/unplugin.cjs +0 -232
  217. package/dist/unplugin.d.cts +0 -62
  218. package/dist/unplugin.d.ts +0 -62
  219. package/dist/vite.cjs +0 -23
  220. package/dist/vite.d.cts +0 -15
  221. package/dist/vite.d.ts +0 -15
package/dist/types.d.mts CHANGED
@@ -1,7 +1,5 @@
1
- import type { NuxtModule } from '@nuxt/schema'
1
+ export { default } from './module.mjs'
2
2
 
3
- import type { default as Module } from './module.js'
3
+ export { type ModuleOptions } from './module.mjs'
4
4
 
5
- export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
-
7
- export { default } from './module.js'
5
+ export * from '../dist/runtime/types/index.js'
@@ -4,7 +4,7 @@ import { Options as Options$1 } from 'unplugin-vue-components/types';
4
4
  import colors from 'tailwindcss/colors';
5
5
  import * as ui from '#build/ui';
6
6
  import { ModuleOptions } from './module.mjs';
7
- import { DeepPartial } from '../dist/runtime/types/utils.js';
7
+ import { TVConfig } from '../dist/runtime/types/tv.js';
8
8
  import '@nuxt/schema';
9
9
  import '../dist/runtime/types/index.js';
10
10
 
@@ -36,7 +36,7 @@ type AppConfigUI = {
36
36
  neutral?: NeutralColor;
37
37
  };
38
38
  icons?: Partial<typeof _default>;
39
- } & DeepPartial<typeof ui>;
39
+ } & TVConfig<typeof ui>;
40
40
  interface NuxtUIOptions extends Omit<ModuleOptions, 'fonts' | 'colorMode'> {
41
41
  /** Whether to generate declaration files for auto-imported components. */
42
42
  dts?: boolean;
@@ -54,6 +54,10 @@ 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>;
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.BkNUP964.mjs';
6
+ import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.CbtTMMzt.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.d.mts CHANGED
@@ -8,7 +8,7 @@ import '#build/ui';
8
8
  import './module.mjs';
9
9
  import '@nuxt/schema';
10
10
  import '../dist/runtime/types/index.js';
11
- import '../dist/runtime/types/utils.js';
11
+ import '../dist/runtime/types/tv.js';
12
12
 
13
13
  declare const _default: (options?: NuxtUIOptions | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
14
14
 
package/dist/vite.mjs CHANGED
@@ -4,13 +4,13 @@ import 'pathe';
4
4
  import 'unplugin';
5
5
  import 'defu';
6
6
  import '@tailwindcss/vite';
7
- import './shared/ui.BkNUP964.mjs';
7
+ import './shared/ui.CbtTMMzt.mjs';
8
8
  import '../dist/runtime/utils/index.js';
9
9
  import 'scule';
10
10
  import '@nuxt/kit';
11
11
  import 'tailwindcss/colors';
12
- import 'tinyglobby';
13
12
  import 'knitwork';
13
+ import 'tinyglobby';
14
14
  import 'magic-string';
15
15
  import 'mlly';
16
16
  import 'unplugin-vue-components';
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.2",
5
- "packageManager": "pnpm@10.7.0",
4
+ "version": "3.1.1",
5
+ "packageManager": "pnpm@10.10.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,13 +96,13 @@
62
96
  "scripts": {
63
97
  "build": "nuxt-module-build build",
64
98
  "prepack": "pnpm build",
65
- "dev": "DEV=true nuxi dev playground",
99
+ "dev": "nuxi dev playground --uiDev",
66
100
  "dev:build": "nuxi build playground",
67
- "dev:vue": "DEV=true vite playground-vue",
101
+ "dev:vue": "vite playground-vue -- --uiDev",
68
102
  "dev:vue:build": "vite build playground-vue",
69
103
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground && nuxi prepare docs && vite build playground-vue",
70
- "docs": "DEV=true nuxi dev docs",
71
- "docs:build": "NODE_OPTIONS='--max-old-space-size=8192' nuxi build docs",
104
+ "docs": "nuxi dev docs --uiDev",
105
+ "docs:build": "nuxi build docs",
72
106
  "docs:prepare": "nuxt-component-meta docs",
73
107
  "lint": "eslint .",
74
108
  "lint:fix": "eslint . --fix",
@@ -79,30 +113,30 @@
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.2",
119
+ "@nuxt/icon": "^1.12.0",
120
+ "@nuxt/kit": "^3.17.1",
121
+ "@nuxt/schema": "^3.17.1",
88
122
  "@nuxtjs/color-mode": "^3.5.2",
89
123
  "@standard-schema/spec": "^1.0.0",
90
- "@tailwindcss/postcss": "^4.0.17",
91
- "@tailwindcss/vite": "^4.0.17",
92
- "@tanstack/vue-table": "^8.21.2",
93
- "@unhead/vue": "^2.0.2",
94
- "@vueuse/core": "^13.0.0",
95
- "@vueuse/integrations": "^13.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",
96
130
  "colortranslator": "^4.1.0",
97
131
  "consola": "^3.4.2",
98
132
  "defu": "^6.1.4",
99
- "embla-carousel-auto-height": "^8.5.2",
100
- "embla-carousel-auto-scroll": "^8.5.2",
101
- "embla-carousel-autoplay": "^8.5.2",
102
- "embla-carousel-class-names": "^8.5.2",
103
- "embla-carousel-fade": "^8.5.2",
104
- "embla-carousel-vue": "^8.5.2",
105
- "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",
106
140
  "fuse.js": "^7.1.0",
107
141
  "hookable": "^5.5.3",
108
142
  "knitwork": "^1.2.0",
@@ -110,42 +144,46 @@
110
144
  "mlly": "^1.7.4",
111
145
  "ohash": "^2.0.11",
112
146
  "pathe": "^2.0.3",
113
- "reka-ui": "^2.1.1",
147
+ "reka-ui": "^2.2.0",
114
148
  "scule": "^1.3.0",
115
149
  "tailwind-variants": "^1.0.0",
116
- "tailwindcss": "^4.0.17",
117
- "tinyglobby": "^0.2.12",
118
- "unplugin": "^2.2.2",
150
+ "tailwindcss": "^4.1.4",
151
+ "tinyglobby": "^0.2.13",
152
+ "unplugin": "^2.3.2",
119
153
  "unplugin-auto-import": "^19.1.2",
120
- "unplugin-vue-components": "^28.4.1",
154
+ "unplugin-vue-components": "^28.5.0",
121
155
  "vaul-vue": "^0.4.1",
122
- "vue": "^3.5.13",
123
- "vue-router": "^4.5.0"
156
+ "vue-component-type-helpers": "^2.2.10"
124
157
  },
125
158
  "devDependencies": {
126
- "@nuxt/eslint-config": "^1.2.0",
127
- "@nuxt/module-builder": "^0.8.4",
159
+ "@nuxt/eslint-config": "^1.3.0",
160
+ "@nuxt/module-builder": "^1.0.1",
128
161
  "@nuxt/test-utils": "^3.17.2",
129
- "@release-it/conventional-changelog": "^10.0.0",
162
+ "@release-it/conventional-changelog": "^10.0.1",
130
163
  "@vue/test-utils": "^2.4.6",
131
- "embla-carousel": "^8.5.2",
132
- "eslint": "^9.23.0",
164
+ "embla-carousel": "^8.6.0",
165
+ "eslint": "^9.25.1",
133
166
  "happy-dom": "^17.4.4",
134
- "nuxt": "^3.16.1",
135
- "release-it": "^18.1.2",
136
- "vitest": "^3.0.9",
167
+ "nuxt": "^3.17.1",
168
+ "release-it": "^19.0.1",
169
+ "vitest": "^3.1.2",
137
170
  "vitest-environment-nuxt": "^1.0.1",
138
- "vue-tsc": "^2.2.0"
171
+ "vue-tsc": "^2.2.10"
139
172
  },
140
173
  "peerDependencies": {
174
+ "@inertiajs/vue3": "^2.0.7",
141
175
  "joi": "^17.13.0",
142
176
  "superstruct": "^2.0.0",
143
177
  "typescript": "^5.6.3",
144
178
  "valibot": "^1.0.0",
179
+ "vue-router": "^4.5.0",
145
180
  "yup": "^1.6.0",
146
181
  "zod": "^3.24.0"
147
182
  },
148
183
  "peerDependenciesMeta": {
184
+ "@inertiajs/vue3": {
185
+ "optional": true
186
+ },
149
187
  "joi": {
150
188
  "optional": true
151
189
  },
@@ -155,6 +193,9 @@
155
193
  "superstruct": {
156
194
  "optional": true
157
195
  },
196
+ "vue-router": {
197
+ "optional": true
198
+ },
158
199
  "yup": {
159
200
  "optional": true
160
201
  },
@@ -167,12 +208,13 @@
167
208
  "chokidar": "3.6.0",
168
209
  "debug": "4.3.7",
169
210
  "rollup": "4.34.9",
170
- "unplugin": "^2.2.2",
171
- "vue-tsc": "2.2.0"
211
+ "unimport": "4.1.1",
212
+ "unplugin": "^2.3.2"
172
213
  },
173
214
  "pnpm": {
174
215
  "onlyBuiltDependencies": [
175
216
  "better-sqlite3",
217
+ "puppeteer",
176
218
  "sharp"
177
219
  ],
178
220
  "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.BL-XB3u1.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,45 +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 { _default as default };
45
- export type { ModuleOptions };
package/dist/module.d.ts DELETED
@@ -1,45 +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 { _default as default };
45
- export type { ModuleOptions };