@nuxt/ui 3.0.2 → 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 (220) 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 +23 -2
  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 +102 -83
  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 +43 -22
  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.json +5 -5
  56. package/dist/module.mjs +11 -7
  57. package/dist/runtime/components/Accordion.vue +36 -93
  58. package/dist/runtime/components/Accordion.vue.d.ts +91 -0
  59. package/dist/runtime/components/Alert.vue +37 -100
  60. package/dist/runtime/components/Alert.vue.d.ts +96 -0
  61. package/dist/runtime/components/App.vue +28 -34
  62. package/dist/runtime/components/App.vue.d.ts +24 -0
  63. package/dist/runtime/components/Avatar.vue +42 -75
  64. package/dist/runtime/components/Avatar.vue.d.ts +60 -0
  65. package/dist/runtime/components/AvatarGroup.vue +40 -77
  66. package/dist/runtime/components/AvatarGroup.vue.d.ts +40 -0
  67. package/dist/runtime/components/Badge.vue +33 -62
  68. package/dist/runtime/components/Badge.vue.d.ts +62 -0
  69. package/dist/runtime/components/Breadcrumb.vue +37 -90
  70. package/dist/runtime/components/Breadcrumb.vue.d.ts +82 -0
  71. package/dist/runtime/components/Button.vue +95 -104
  72. package/dist/runtime/components/Button.vue.d.ts +73 -0
  73. package/dist/runtime/components/ButtonGroup.vue +20 -46
  74. package/dist/runtime/components/ButtonGroup.vue.d.ts +55 -0
  75. package/dist/runtime/components/Calendar.vue +67 -150
  76. package/dist/runtime/components/Calendar.vue.d.ts +107 -0
  77. package/dist/runtime/components/Card.vue +18 -40
  78. package/dist/runtime/components/Card.vue.d.ts +38 -0
  79. package/dist/runtime/components/Carousel.vue +112 -234
  80. package/dist/runtime/components/Carousel.vue.d.ts +120 -0
  81. package/dist/runtime/components/Checkbox.vue +52 -93
  82. package/dist/runtime/components/Checkbox.vue.d.ts +76 -0
  83. package/dist/runtime/components/CheckboxGroup.vue +121 -0
  84. package/dist/runtime/components/CheckboxGroup.vue.d.ts +75 -0
  85. package/dist/runtime/components/Chip.vue +26 -69
  86. package/dist/runtime/components/Chip.vue.d.ts +71 -0
  87. package/dist/runtime/components/Collapsible.vue +22 -41
  88. package/dist/runtime/components/Collapsible.vue.d.ts +50 -0
  89. package/dist/runtime/components/ColorPicker.vue +111 -197
  90. package/dist/runtime/components/ColorPicker.vue.d.ts +63 -0
  91. package/dist/runtime/components/CommandPalette.vue +96 -237
  92. package/dist/runtime/components/CommandPalette.vue.d.ts +173 -0
  93. package/dist/runtime/components/Container.vue +15 -28
  94. package/dist/runtime/components/Container.vue.d.ts +27 -0
  95. package/dist/runtime/components/ContextMenu.vue +34 -133
  96. package/dist/runtime/components/ContextMenu.vue.d.ts +127 -0
  97. package/dist/runtime/components/ContextMenuContent.vue +73 -81
  98. package/dist/runtime/components/ContextMenuContent.vue.d.ts +105 -0
  99. package/dist/runtime/components/Drawer.vue +49 -83
  100. package/dist/runtime/components/Drawer.vue.d.ts +88 -0
  101. package/dist/runtime/components/DropdownMenu.vue +39 -142
  102. package/dist/runtime/components/DropdownMenu.vue.d.ts +141 -0
  103. package/dist/runtime/components/DropdownMenuContent.vue +78 -88
  104. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +55 -0
  105. package/dist/runtime/components/Form.vue +135 -220
  106. package/dist/runtime/components/Form.vue.d.ts +66 -0
  107. package/dist/runtime/components/FormField.vue +35 -77
  108. package/dist/runtime/components/FormField.vue.d.ts +70 -0
  109. package/dist/runtime/components/Icon.vue +12 -19
  110. package/dist/runtime/components/Icon.vue.d.ts +17 -0
  111. package/dist/runtime/components/Input.vue +82 -140
  112. package/dist/runtime/components/Input.vue.d.ts +91 -0
  113. package/dist/runtime/components/InputMenu.vue +185 -332
  114. package/dist/runtime/components/InputMenu.vue.d.ts +312 -0
  115. package/dist/runtime/components/InputNumber.vue +71 -133
  116. package/dist/runtime/components/InputNumber.vue.d.ts +193 -0
  117. package/dist/runtime/components/Kbd.vue +20 -46
  118. package/dist/runtime/components/Kbd.vue.d.ts +55 -0
  119. package/dist/runtime/components/Link.vue +98 -176
  120. package/dist/runtime/components/Link.vue.d.ts +124 -0
  121. package/dist/runtime/components/LinkBase.vue +33 -42
  122. package/dist/runtime/components/LinkBase.vue.d.ts +48 -0
  123. package/dist/runtime/components/Modal.vue +53 -116
  124. package/dist/runtime/components/Modal.vue.d.ts +109 -0
  125. package/dist/runtime/components/NavigationMenu.vue +77 -209
  126. package/dist/runtime/components/NavigationMenu.vue.d.ts +159 -0
  127. package/dist/runtime/components/OverlayProvider.vue +14 -18
  128. package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
  129. package/dist/runtime/components/Pagination.vue +46 -140
  130. package/dist/runtime/components/Pagination.vue.d.ts +143 -0
  131. package/dist/runtime/components/PinInput.vue +61 -78
  132. package/dist/runtime/components/PinInput.vue.d.ts +68 -0
  133. package/dist/runtime/components/Popover.vue +47 -84
  134. package/dist/runtime/components/Popover.vue.d.ts +80 -0
  135. package/dist/runtime/components/Progress.vue +70 -131
  136. package/dist/runtime/components/Progress.vue.d.ts +97 -0
  137. package/dist/runtime/components/RadioGroup.vue +70 -132
  138. package/dist/runtime/components/RadioGroup.vue.d.ts +88 -0
  139. package/dist/runtime/components/Select.vue +110 -224
  140. package/dist/runtime/components/Select.vue.d.ts +139 -0
  141. package/dist/runtime/components/SelectMenu.vue +161 -310
  142. package/dist/runtime/components/SelectMenu.vue.d.ts +184 -0
  143. package/dist/runtime/components/Separator.vue +29 -71
  144. package/dist/runtime/components/Separator.vue.d.ts +75 -0
  145. package/dist/runtime/components/Skeleton.vue +21 -23
  146. package/dist/runtime/components/Skeleton.vue.d.ts +26 -0
  147. package/dist/runtime/components/Slideover.vue +53 -120
  148. package/dist/runtime/components/Slideover.vue.d.ts +111 -0
  149. package/dist/runtime/components/Slider.vue +46 -84
  150. package/dist/runtime/components/Slider.vue.d.ts +71 -0
  151. package/dist/runtime/components/Stepper.vue +45 -115
  152. package/dist/runtime/components/Stepper.vue.d.ts +89 -0
  153. package/dist/runtime/components/Switch.vue +45 -93
  154. package/dist/runtime/components/Switch.vue.d.ts +73 -0
  155. package/dist/runtime/components/Table.vue +163 -267
  156. package/dist/runtime/components/Table.vue.d.ts +183 -0
  157. package/dist/runtime/components/Tabs.vue +41 -107
  158. package/dist/runtime/components/Tabs.vue.d.ts +104 -0
  159. package/dist/runtime/components/Textarea.vue +113 -158
  160. package/dist/runtime/components/Textarea.vue.d.ts +95 -0
  161. package/dist/runtime/components/Toast.vue +49 -110
  162. package/dist/runtime/components/Toast.vue.d.ts +95 -0
  163. package/dist/runtime/components/Toaster.vue +70 -107
  164. package/dist/runtime/components/Toaster.vue.d.ts +63 -0
  165. package/dist/runtime/components/Tooltip.vue +38 -65
  166. package/dist/runtime/components/Tooltip.vue.d.ts +65 -0
  167. package/dist/runtime/components/Tree.vue +59 -166
  168. package/dist/runtime/components/Tree.vue.d.ts +128 -0
  169. package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
  170. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  171. package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
  172. package/dist/runtime/composables/useFormField.d.ts +2 -2
  173. package/dist/runtime/composables/useOverlay.d.ts +14 -7
  174. package/dist/runtime/composables/useOverlay.js +14 -6
  175. package/dist/runtime/composables/usePortal.d.ts +6 -0
  176. package/dist/runtime/composables/usePortal.js +17 -0
  177. package/dist/runtime/index.css +1 -1
  178. package/dist/runtime/inertia/components/Link.vue +146 -0
  179. package/dist/runtime/inertia/components/Link.vue.d.ts +92 -0
  180. package/dist/runtime/inertia/stubs.d.ts +43 -0
  181. package/dist/runtime/inertia/stubs.js +82 -0
  182. package/dist/runtime/locale/bg.d.ts +3 -0
  183. package/dist/runtime/locale/bg.js +54 -0
  184. package/dist/runtime/locale/index.d.ts +5 -1
  185. package/dist/runtime/locale/index.js +5 -1
  186. package/dist/runtime/locale/kk.d.ts +3 -0
  187. package/dist/runtime/locale/kk.js +54 -0
  188. package/dist/runtime/locale/tj.d.ts +3 -0
  189. package/dist/runtime/locale/tj.js +54 -0
  190. package/dist/runtime/locale/ug_cn.d.ts +3 -0
  191. package/dist/runtime/locale/ug_cn.js +55 -0
  192. package/dist/runtime/types/form.d.ts +4 -1
  193. package/dist/runtime/types/index.d.ts +1 -0
  194. package/dist/runtime/types/index.js +1 -0
  195. package/dist/runtime/types/utils.d.ts +47 -7
  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 +14 -0
  201. package/dist/runtime/vue/components/Link.vue +118 -202
  202. package/dist/runtime/vue/components/Link.vue.d.ts +124 -0
  203. package/dist/runtime/vue/stubs.d.ts +2 -2
  204. package/dist/shared/{ui.BkNUP964.mjs → ui.D7lOOabO.mjs} +621 -362
  205. package/dist/types.d.mts +3 -5
  206. package/dist/unplugin.d.mts +4 -0
  207. package/dist/unplugin.mjs +25 -4
  208. package/dist/vite.mjs +1 -1
  209. package/package.json +94 -53
  210. package/dist/module.cjs +0 -62
  211. package/dist/module.d.cts +0 -45
  212. package/dist/module.d.ts +0 -45
  213. package/dist/shared/ui.BL-XB3u1.cjs +0 -3555
  214. package/dist/types.d.ts +0 -7
  215. package/dist/unplugin.cjs +0 -232
  216. package/dist/unplugin.d.cts +0 -62
  217. package/dist/unplugin.d.ts +0 -62
  218. package/dist/vite.cjs +0 -23
  219. package/dist/vite.d.cts +0 -15
  220. 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'
@@ -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.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.BkNUP964.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.2",
5
- "packageManager": "pnpm@10.7.0",
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,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",
66
100
  "dev:build": "nuxi build playground",
67
- "dev:vue": "DEV=true vite playground-vue",
101
+ "dev:vue": "vite playground-vue",
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",
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.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
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,45 @@
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",
121
- "vaul-vue": "^0.4.1",
122
- "vue": "^3.5.13",
123
- "vue-router": "^4.5.0"
154
+ "unplugin-vue-components": "^28.5.0",
155
+ "vaul-vue": "^0.4.1"
124
156
  },
125
157
  "devDependencies": {
126
- "@nuxt/eslint-config": "^1.2.0",
127
- "@nuxt/module-builder": "^0.8.4",
158
+ "@nuxt/eslint-config": "^1.3.0",
159
+ "@nuxt/module-builder": "^1.0.1",
128
160
  "@nuxt/test-utils": "^3.17.2",
129
- "@release-it/conventional-changelog": "^10.0.0",
161
+ "@release-it/conventional-changelog": "^10.0.1",
130
162
  "@vue/test-utils": "^2.4.6",
131
- "embla-carousel": "^8.5.2",
132
- "eslint": "^9.23.0",
163
+ "embla-carousel": "^8.6.0",
164
+ "eslint": "^9.25.1",
133
165
  "happy-dom": "^17.4.4",
134
- "nuxt": "^3.16.1",
135
- "release-it": "^18.1.2",
136
- "vitest": "^3.0.9",
166
+ "nuxt": "^3.16.2",
167
+ "release-it": "^19.0.1",
168
+ "vitest": "^3.1.2",
137
169
  "vitest-environment-nuxt": "^1.0.1",
138
170
  "vue-tsc": "^2.2.0"
139
171
  },
140
172
  "peerDependencies": {
173
+ "@inertiajs/vue3": "^2.0.7",
141
174
  "joi": "^17.13.0",
142
175
  "superstruct": "^2.0.0",
143
176
  "typescript": "^5.6.3",
144
177
  "valibot": "^1.0.0",
178
+ "vue-router": "^4.5.0",
145
179
  "yup": "^1.6.0",
146
180
  "zod": "^3.24.0"
147
181
  },
148
182
  "peerDependenciesMeta": {
183
+ "@inertiajs/vue3": {
184
+ "optional": true
185
+ },
149
186
  "joi": {
150
187
  "optional": true
151
188
  },
@@ -155,6 +192,9 @@
155
192
  "superstruct": {
156
193
  "optional": true
157
194
  },
195
+ "vue-router": {
196
+ "optional": true
197
+ },
158
198
  "yup": {
159
199
  "optional": true
160
200
  },
@@ -167,12 +207,13 @@
167
207
  "chokidar": "3.6.0",
168
208
  "debug": "4.3.7",
169
209
  "rollup": "4.34.9",
170
- "unplugin": "^2.2.2",
210
+ "unplugin": "^2.3.2",
171
211
  "vue-tsc": "2.2.0"
172
212
  },
173
213
  "pnpm": {
174
214
  "onlyBuiltDependencies": [
175
215
  "better-sqlite3",
216
+ "puppeteer",
176
217
  "sharp"
177
218
  ],
178
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.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 };