@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.ts DELETED
@@ -1 +0,0 @@
1
- export { type ModuleOptions, default } from './module'
package/dist/unplugin.cjs DELETED
@@ -1,232 +0,0 @@
1
- 'use strict';
2
-
3
- const node_url = require('node:url');
4
- const pathe = require('pathe');
5
- const unplugin = require('unplugin');
6
- const defu = require('defu');
7
- const tailwind = require('@tailwindcss/vite');
8
- const templates = require('./shared/ui.C6uTSFTI.cjs');
9
- const tinyglobby = require('tinyglobby');
10
- const knitwork = require('knitwork');
11
- const MagicString = require('magic-string');
12
- const mlly = require('mlly');
13
- const AutoImportComponents = require('unplugin-vue-components');
14
- const AutoImport = require('unplugin-auto-import');
15
- require('../dist/runtime/utils/index.js');
16
- require('scule');
17
- require('@nuxt/kit');
18
- require('tailwindcss/colors');
19
-
20
- var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
21
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
22
-
23
- const tailwind__default = /*#__PURE__*/_interopDefaultCompat(tailwind);
24
- const MagicString__default = /*#__PURE__*/_interopDefaultCompat(MagicString);
25
- const AutoImportComponents__default = /*#__PURE__*/_interopDefaultCompat(AutoImportComponents);
26
- const AutoImport__default = /*#__PURE__*/_interopDefaultCompat(AutoImport);
27
-
28
- function TemplatePlugin(options, appConfig) {
29
- const templates$1 = templates.getTemplates(options, appConfig.ui);
30
- const templateKeys = new Set(templates$1.map((t) => `#build/${t.filename}`));
31
- return {
32
- name: "nuxt:ui:templates",
33
- enforce: "pre",
34
- resolveId(id) {
35
- if (templateKeys.has(id + ".ts")) {
36
- return id.replace("#build/", "virtual:nuxt-ui-templates/") + ".ts";
37
- }
38
- },
39
- loadInclude: (id) => templateKeys.has(id.replace("virtual:nuxt-ui-templates/", "#build/")),
40
- load(id) {
41
- id = id.replace("virtual:nuxt-ui-templates/", "#build/");
42
- return templates$1.find((t) => `#build/${t.filename}` === id).getContents({});
43
- }
44
- };
45
- }
46
-
47
- function PluginsPlugin(options) {
48
- const plugins = tinyglobby.globSync(["**/*", "!*.d.ts"], { cwd: pathe.join(runtimeDir, "plugins"), absolute: true });
49
- plugins.unshift(mlly.resolvePathSync("../runtime/vue/plugins/head", { extensions: [".ts", ".mjs", ".js"], url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('unplugin.cjs', document.baseURI).href)) }));
50
- if (options.colorMode) {
51
- plugins.push(mlly.resolvePathSync("../runtime/vue/plugins/color-mode", { extensions: [".ts", ".mjs", ".js"], url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('unplugin.cjs', document.baseURI).href)) }));
52
- }
53
- return {
54
- name: "nuxt:ui:plugins",
55
- enforce: "pre",
56
- resolveId(id) {
57
- if (id === "@nuxt/ui/vue-plugin") {
58
- return "virtual:nuxt-ui-plugins";
59
- }
60
- },
61
- transform(code, id) {
62
- if (plugins.some((p) => id.startsWith(p)) && code.includes("import.meta.client")) {
63
- const s = new MagicString__default(code);
64
- s.replaceAll("import.meta.client", "true");
65
- if (s.hasChanged()) {
66
- return {
67
- code: s.toString(),
68
- map: s.generateMap({ hires: true })
69
- };
70
- }
71
- }
72
- },
73
- loadInclude: (id) => id === "virtual:nuxt-ui-plugins",
74
- load() {
75
- return `
76
- ${plugins.map((p) => `import ${knitwork.genSafeVariableName(p)} from "${p}"`).join("\n")}
77
- export default {
78
- install (app) {
79
- ${plugins.map((p) => ` app.use(${knitwork.genSafeVariableName(p)})`).join("\n")}
80
- }
81
- }
82
- `;
83
- },
84
- // Argument Vite specific configuration
85
- vite: {
86
- config() {
87
- return {
88
- // Opt-out Nuxt UI from Vite's pre-bundling,
89
- // as we need Vite's pipeline to resolve imports like `#imports`
90
- optimizeDeps: {
91
- exclude: ["@nuxt/ui"]
92
- }
93
- };
94
- }
95
- }
96
- };
97
- }
98
-
99
- function AppConfigPlugin(options, appConfig) {
100
- return {
101
- name: "nuxt:ui:app-config",
102
- enforce: "pre",
103
- resolveId(id) {
104
- if (id === "#build/app.config") {
105
- return "virtual:nuxt-ui-app-config";
106
- }
107
- },
108
- loadInclude: (id) => id === "virtual:nuxt-ui-app-config",
109
- load() {
110
- return `
111
- export default ${JSON.stringify(appConfig)}
112
- `;
113
- }
114
- };
115
- }
116
-
117
- function ComponentImportPlugin(options, meta) {
118
- const components = tinyglobby.globSync("**/*.vue", { cwd: pathe.join(runtimeDir, "components") });
119
- const componentNames = new Set(components.map((c) => `${options.prefix}${c.replace(/\.vue$/, "")}`));
120
- const overrides = tinyglobby.globSync("**/*.vue", { cwd: pathe.join(runtimeDir, "vue/components") });
121
- const overrideNames = new Set(overrides.map((c) => `${options.prefix}${c.replace(/\.vue$/, "")}`));
122
- const pluginOptions = defu.defu(options.components, {
123
- dts: options.dts ?? true,
124
- exclude: [
125
- /[\\/]node_modules[\\/](?!\.pnpm|@nuxt\/ui|@compodium\/examples)/,
126
- /[\\/]\.git[\\/]/,
127
- /[\\/]\.nuxt[\\/]/
128
- ],
129
- resolvers: [
130
- (componentName) => {
131
- if (overrideNames.has(componentName))
132
- return { name: "default", from: pathe.join(runtimeDir, "vue/components", `${componentName.slice(options.prefix.length)}.vue`) };
133
- if (componentNames.has(componentName))
134
- return { name: "default", from: pathe.join(runtimeDir, "components", `${componentName.slice(options.prefix.length)}.vue`) };
135
- }
136
- ]
137
- });
138
- return [
139
- /**
140
- * This plugin aims to ensure we override certain components with Vue-compatible versions:
141
- * <UIcon> and <ULink> currently.
142
- */
143
- {
144
- name: "nuxt:ui:components",
145
- enforce: "pre",
146
- resolveId(id, importer) {
147
- if (!importer || !pathe.normalize(importer).includes(runtimeDir)) {
148
- return;
149
- }
150
- if (!RELATIVE_IMPORT_RE.test(id)) {
151
- return;
152
- }
153
- const filename = id.match(/([^/]+)\.vue$/)?.[1];
154
- if (filename && overrideNames.has(`${options.prefix}${filename}`)) {
155
- return pathe.join(runtimeDir, "vue/components", `${filename}.vue`);
156
- }
157
- }
158
- },
159
- AutoImportComponents__default.raw(pluginOptions, meta)
160
- ];
161
- }
162
- const RELATIVE_IMPORT_RE = /^\.{1,2}\//;
163
-
164
- function NuxtEnvironmentPlugin() {
165
- const stubPath = mlly.resolvePathSync("../runtime/vue/stubs", { extensions: [".ts", ".mjs", ".js"], url: (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('unplugin.cjs', document.baseURI).href)) });
166
- return {
167
- name: "nuxt:ui",
168
- enforce: "pre",
169
- resolveId(id) {
170
- if (id === "#imports") {
171
- return stubPath;
172
- }
173
- },
174
- transformInclude(id) {
175
- return pathe.normalize(id).includes(runtimeDir);
176
- },
177
- transform(code) {
178
- if (code.includes("import.meta.client")) {
179
- const s = new MagicString__default(code);
180
- s.replaceAll("import.meta.client", "true");
181
- if (s.hasChanged()) {
182
- return {
183
- code: s.toString(),
184
- map: s.generateMap({ hires: true })
185
- };
186
- }
187
- }
188
- }
189
- };
190
- }
191
-
192
- function AutoImportPlugin(options, meta) {
193
- const pluginOptions = defu.defu(options.autoImport, {
194
- dts: options.dts ?? true,
195
- dirs: [pathe.join(runtimeDir, "composables"), pathe.join(runtimeDir, "vue/composables")]
196
- });
197
- return AutoImport__default.raw(pluginOptions, meta);
198
- }
199
-
200
- const runtimeDir = pathe.normalize(node_url.fileURLToPath(new URL("./runtime", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('unplugin.cjs', document.baseURI).href)))));
201
- const NuxtUIPlugin = unplugin.createUnplugin((_options = {}, meta) => {
202
- const options = defu.defu(_options, { fonts: false }, templates.defaultOptions);
203
- options.theme = options.theme || {};
204
- options.theme.colors = templates.resolveColors(options.theme.colors);
205
- const appConfig = defu.defu({ ui: options.ui, colorMode: options.colorMode }, { ui: templates.getDefaultUiConfig(options.theme.colors) });
206
- return [
207
- NuxtEnvironmentPlugin(),
208
- ComponentImportPlugin(options, meta),
209
- AutoImportPlugin(options, meta),
210
- tailwind__default(),
211
- PluginsPlugin(options),
212
- TemplatePlugin(options, appConfig),
213
- AppConfigPlugin(options, appConfig),
214
- {
215
- name: "nuxt:ui:plugins-duplication-detection",
216
- vite: {
217
- configResolved(config) {
218
- const plugins = config.plugins || [];
219
- if (plugins.filter((i) => i.name === "unplugin-auto-import").length > 1) {
220
- throw new Error("[Nuxt UI] Multiple instances of `unplugin-auto-import` detected. Nuxt UI includes `unplugin-auto-import` already, and you can configure it using `autoImport` option in Nuxt UI module options.");
221
- }
222
- if (plugins.filter((i) => i.name === "unplugin-vue-components").length > 1) {
223
- throw new Error("[Nuxt UI] Multiple instances of `unplugin-vue-components` detected. Nuxt UI includes `unplugin-vue-components` already, and you can configure it using `components` option in Nuxt UI module options.");
224
- }
225
- }
226
- }
227
- }
228
- ].flat(1);
229
- });
230
-
231
- exports.NuxtUIPlugin = NuxtUIPlugin;
232
- exports.runtimeDir = runtimeDir;
@@ -1,61 +0,0 @@
1
- import * as unplugin from 'unplugin';
2
- import { Options } from 'unplugin-auto-import/types';
3
- import { Options as Options$1 } from 'unplugin-vue-components/types';
4
- import colors from 'tailwindcss/colors';
5
- import * as ui from '#build/ui';
6
- import { ModuleOptions } from './module.cjs';
7
- import { DeepPartial } from '../dist/runtime/types/utils.js';
8
- import '@nuxt/schema';
9
- import '../dist/runtime/types/index.js';
10
-
11
- declare const _default: {
12
- arrowLeft: string;
13
- arrowRight: string;
14
- check: string;
15
- chevronDoubleLeft: string;
16
- chevronDoubleRight: string;
17
- chevronDown: string;
18
- chevronLeft: string;
19
- chevronRight: string;
20
- chevronUp: string;
21
- close: string;
22
- ellipsis: string;
23
- external: string;
24
- folder: string;
25
- folderOpen: string;
26
- loading: string;
27
- minus: string;
28
- plus: string;
29
- search: string;
30
- };
31
-
32
- type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone';
33
- type Color = Exclude<keyof typeof colors, 'inherit' | 'current' | 'transparent' | 'black' | 'white' | NeutralColor> | (string & {});
34
- type AppConfigUI = {
35
- colors?: Record<string, Color> & {
36
- neutral?: NeutralColor;
37
- };
38
- icons?: Partial<typeof _default>;
39
- } & DeepPartial<typeof ui>;
40
- interface NuxtUIOptions extends Omit<ModuleOptions, 'fonts' | 'colorMode'> {
41
- /** Whether to generate declaration files for auto-imported components. */
42
- dts?: boolean;
43
- ui?: AppConfigUI;
44
- /**
45
- * Enable or disable `@vueuse/core` color-mode integration
46
- * @defaultValue `true`
47
- */
48
- colorMode?: boolean;
49
- /**
50
- * Override options for `unplugin-auto-import`
51
- */
52
- autoImport?: Partial<Options>;
53
- /**
54
- * Override options for `unplugin-vue-components`
55
- */
56
- components?: Partial<Options$1>;
57
- }
58
- declare const runtimeDir: string;
59
- declare const NuxtUIPlugin: unplugin.UnpluginInstance<NuxtUIOptions | undefined, boolean>;
60
-
61
- export { type NuxtUIOptions, NuxtUIPlugin, runtimeDir };
@@ -1,61 +0,0 @@
1
- import * as unplugin from 'unplugin';
2
- import { Options } from 'unplugin-auto-import/types';
3
- import { Options as Options$1 } from 'unplugin-vue-components/types';
4
- import colors from 'tailwindcss/colors';
5
- import * as ui from '#build/ui';
6
- import { ModuleOptions } from './module.js';
7
- import { DeepPartial } from '../dist/runtime/types/utils.js';
8
- import '@nuxt/schema';
9
- import '../dist/runtime/types/index.js';
10
-
11
- declare const _default: {
12
- arrowLeft: string;
13
- arrowRight: string;
14
- check: string;
15
- chevronDoubleLeft: string;
16
- chevronDoubleRight: string;
17
- chevronDown: string;
18
- chevronLeft: string;
19
- chevronRight: string;
20
- chevronUp: string;
21
- close: string;
22
- ellipsis: string;
23
- external: string;
24
- folder: string;
25
- folderOpen: string;
26
- loading: string;
27
- minus: string;
28
- plus: string;
29
- search: string;
30
- };
31
-
32
- type NeutralColor = 'slate' | 'gray' | 'zinc' | 'neutral' | 'stone';
33
- type Color = Exclude<keyof typeof colors, 'inherit' | 'current' | 'transparent' | 'black' | 'white' | NeutralColor> | (string & {});
34
- type AppConfigUI = {
35
- colors?: Record<string, Color> & {
36
- neutral?: NeutralColor;
37
- };
38
- icons?: Partial<typeof _default>;
39
- } & DeepPartial<typeof ui>;
40
- interface NuxtUIOptions extends Omit<ModuleOptions, 'fonts' | 'colorMode'> {
41
- /** Whether to generate declaration files for auto-imported components. */
42
- dts?: boolean;
43
- ui?: AppConfigUI;
44
- /**
45
- * Enable or disable `@vueuse/core` color-mode integration
46
- * @defaultValue `true`
47
- */
48
- colorMode?: boolean;
49
- /**
50
- * Override options for `unplugin-auto-import`
51
- */
52
- autoImport?: Partial<Options>;
53
- /**
54
- * Override options for `unplugin-vue-components`
55
- */
56
- components?: Partial<Options$1>;
57
- }
58
- declare const runtimeDir: string;
59
- declare const NuxtUIPlugin: unplugin.UnpluginInstance<NuxtUIOptions | undefined, boolean>;
60
-
61
- export { type NuxtUIOptions, NuxtUIPlugin, runtimeDir };
package/dist/vite.cjs DELETED
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- const unplugin = require('./unplugin.cjs');
4
- require('node:url');
5
- require('pathe');
6
- require('unplugin');
7
- require('defu');
8
- require('@tailwindcss/vite');
9
- require('./shared/ui.C6uTSFTI.cjs');
10
- require('../dist/runtime/utils/index.js');
11
- require('scule');
12
- require('@nuxt/kit');
13
- require('tailwindcss/colors');
14
- require('tinyglobby');
15
- require('knitwork');
16
- require('magic-string');
17
- require('mlly');
18
- require('unplugin-vue-components');
19
- require('unplugin-auto-import');
20
-
21
- const vite = unplugin.NuxtUIPlugin.vite;
22
-
23
- module.exports = vite;
package/dist/vite.d.cts DELETED
@@ -1,15 +0,0 @@
1
- import * as vite from 'vite';
2
- import { NuxtUIOptions } from './unplugin.cjs';
3
- import 'unplugin';
4
- import 'unplugin-auto-import/types';
5
- import 'unplugin-vue-components/types';
6
- import 'tailwindcss/colors';
7
- import '#build/ui';
8
- import './module.cjs';
9
- import '@nuxt/schema';
10
- import '../dist/runtime/types/index.js';
11
- import '../dist/runtime/types/utils.js';
12
-
13
- declare const _default: (options?: NuxtUIOptions | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
14
-
15
- export { NuxtUIOptions, _default as default };
package/dist/vite.d.ts DELETED
@@ -1,15 +0,0 @@
1
- import * as vite from 'vite';
2
- import { NuxtUIOptions } from './unplugin.js';
3
- import 'unplugin';
4
- import 'unplugin-auto-import/types';
5
- import 'unplugin-vue-components/types';
6
- import 'tailwindcss/colors';
7
- import '#build/ui';
8
- import './module.js';
9
- import '@nuxt/schema';
10
- import '../dist/runtime/types/index.js';
11
- import '../dist/runtime/types/utils.js';
12
-
13
- declare const _default: (options?: NuxtUIOptions | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
14
-
15
- export { NuxtUIOptions, _default as default };