@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.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 };