@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.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { NuxtModule } from '@nuxt/schema'
2
-
3
- import type { default as Module } from './module'
4
-
5
- export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
-
7
- export { 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.BL-XB3u1.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,62 +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 { NuxtUIPlugin, runtimeDir };
62
- export type { NuxtUIOptions };
@@ -1,62 +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 { NuxtUIPlugin, runtimeDir };
62
- export type { NuxtUIOptions };
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.BL-XB3u1.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 };