@nuxt/ui 4.11.0 → 4.11.2
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.
- package/README.md +3 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/Accordion.d.vue.ts +1 -1
- package/dist/runtime/components/Accordion.vue.d.ts +1 -1
- package/dist/runtime/components/Breadcrumb.d.vue.ts +1 -1
- package/dist/runtime/components/Breadcrumb.vue.d.ts +1 -1
- package/dist/runtime/components/Carousel.d.vue.ts +7 -7
- package/dist/runtime/components/Carousel.vue.d.ts +7 -7
- package/dist/runtime/components/ChatMessages.d.vue.ts +2 -2
- package/dist/runtime/components/ChatMessages.vue.d.ts +2 -2
- package/dist/runtime/components/CheckboxGroup.d.vue.ts +1 -1
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +1 -1
- package/dist/runtime/components/CommandPalette.d.vue.ts +1 -1
- package/dist/runtime/components/CommandPalette.vue.d.ts +1 -1
- package/dist/runtime/components/ContextMenu.d.vue.ts +1 -1
- package/dist/runtime/components/ContextMenu.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardNavbar.vue +1 -1
- package/dist/runtime/components/DropdownMenu.d.vue.ts +1 -1
- package/dist/runtime/components/DropdownMenu.vue.d.ts +1 -1
- package/dist/runtime/components/FooterColumns.d.vue.ts +1 -1
- package/dist/runtime/components/FooterColumns.vue.d.ts +1 -1
- package/dist/runtime/components/Form.vue +2 -2
- package/dist/runtime/components/Input.vue +5 -5
- package/dist/runtime/components/InputDate.vue +12 -6
- package/dist/runtime/components/InputMenu.d.vue.ts +1 -1
- package/dist/runtime/components/InputMenu.vue +18 -7
- package/dist/runtime/components/InputMenu.vue.d.ts +1 -1
- package/dist/runtime/components/InputNumber.vue +8 -5
- package/dist/runtime/components/InputTime.vue +12 -6
- package/dist/runtime/components/Link.vue +61 -7
- package/dist/runtime/components/LinkBase.vue +3 -1
- package/dist/runtime/components/Listbox.d.vue.ts +1 -1
- package/dist/runtime/components/Listbox.vue.d.ts +1 -1
- package/dist/runtime/components/NavigationMenu.d.vue.ts +1 -1
- package/dist/runtime/components/NavigationMenu.vue +10 -10
- package/dist/runtime/components/NavigationMenu.vue.d.ts +1 -1
- package/dist/runtime/components/PageAnchors.d.vue.ts +1 -1
- package/dist/runtime/components/PageAnchors.vue.d.ts +1 -1
- package/dist/runtime/components/PageLinks.d.vue.ts +1 -1
- package/dist/runtime/components/PageLinks.vue.d.ts +1 -1
- package/dist/runtime/components/PinInput.d.vue.ts +3 -1
- package/dist/runtime/components/PinInput.vue +15 -7
- package/dist/runtime/components/PinInput.vue.d.ts +3 -1
- package/dist/runtime/components/ProgressGroup.d.vue.ts +1 -1
- package/dist/runtime/components/ProgressGroup.vue.d.ts +1 -1
- package/dist/runtime/components/RadioGroup.d.vue.ts +1 -1
- package/dist/runtime/components/RadioGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Select.d.vue.ts +3 -1
- package/dist/runtime/components/Select.vue +2 -0
- package/dist/runtime/components/Select.vue.d.ts +3 -1
- package/dist/runtime/components/SelectMenu.d.vue.ts +4 -1
- package/dist/runtime/components/SelectMenu.vue +24 -4
- package/dist/runtime/components/SelectMenu.vue.d.ts +4 -1
- package/dist/runtime/components/Slider.vue +1 -1
- package/dist/runtime/components/Splitter.d.vue.ts +1 -1
- package/dist/runtime/components/Splitter.vue.d.ts +1 -1
- package/dist/runtime/components/Stepper.d.vue.ts +1 -1
- package/dist/runtime/components/Stepper.vue.d.ts +1 -1
- package/dist/runtime/components/Table.vue +29 -7
- package/dist/runtime/components/Tabs.d.vue.ts +1 -1
- package/dist/runtime/components/Tabs.vue.d.ts +1 -1
- package/dist/runtime/components/Textarea.vue +5 -5
- package/dist/runtime/components/Timeline.d.vue.ts +1 -1
- package/dist/runtime/components/Timeline.vue.d.ts +1 -1
- package/dist/runtime/components/Toaster.vue +1 -1
- package/dist/runtime/components/Tree.d.vue.ts +1 -1
- package/dist/runtime/components/Tree.vue +1 -1
- package/dist/runtime/components/Tree.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeSelect.vue +1 -0
- package/dist/runtime/components/content/ContentNavigation.d.vue.ts +1 -1
- package/dist/runtime/components/content/ContentNavigation.vue.d.ts +1 -1
- package/dist/runtime/components/content/ContentSurround.d.vue.ts +1 -1
- package/dist/runtime/components/content/ContentSurround.vue.d.ts +1 -1
- package/dist/runtime/components/content/ContentToc.d.vue.ts +1 -1
- package/dist/runtime/components/content/ContentToc.vue.d.ts +1 -1
- package/dist/runtime/components/locale/LocaleSelect.vue +1 -0
- package/dist/runtime/components/prose/CodeTree.vue +31 -18
- package/dist/runtime/composables/useForwardProps.js +2 -2
- package/dist/runtime/composables/useResizable.js +1 -1
- package/dist/runtime/utils/form.d.ts +1 -1
- package/dist/runtime/utils/form.js +3 -1
- package/dist/runtime/utils/prefetch.d.ts +5 -0
- package/dist/runtime/utils/prefetch.js +45 -0
- package/dist/runtime/utils/search.js +8 -6
- package/dist/runtime/utils/virtualizer.d.ts +1 -1
- package/dist/runtime/utils/virtualizer.js +9 -11
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +1 -0
- package/dist/runtime/vue/overrides/inertia/LinkBase.vue +3 -1
- package/dist/shared/{ui.DNq7CNkE.mjs → ui.oNygBd3N.mjs} +40 -12
- package/dist/unplugin.d.mts +2 -1
- package/dist/unplugin.mjs +22 -10
- package/dist/vite.mjs +1 -1
- package/package.json +79 -83
- package/cli/commands/make/component.mjs +0 -86
- package/cli/commands/make/index.mjs +0 -14
- package/cli/commands/make/locale.mjs +0 -93
- package/cli/index.mjs +0 -15
- package/cli/package.json +0 -13
- package/cli/templates.mjs +0 -256
- package/cli/utils.mjs +0 -50
|
@@ -23,11 +23,13 @@ function onClickWrapper(e) {
|
|
|
23
23
|
e.preventDefault();
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
+
const results = [];
|
|
26
27
|
if (props.onClick) {
|
|
27
28
|
for (const onClick of Array.isArray(props.onClick) ? props.onClick : [props.onClick]) {
|
|
28
|
-
onClick(e);
|
|
29
|
+
results.push(onClick(e));
|
|
29
30
|
}
|
|
30
31
|
}
|
|
32
|
+
return Promise.all(results);
|
|
31
33
|
}
|
|
32
34
|
</script>
|
|
33
35
|
|
|
@@ -581,6 +581,9 @@ const fieldGroup$1 = {
|
|
|
581
581
|
horizontal: "inline-flex -space-x-px",
|
|
582
582
|
vertical: "flex flex-col -space-y-px"
|
|
583
583
|
}
|
|
584
|
+
},
|
|
585
|
+
defaultVariants: {
|
|
586
|
+
size: "md"
|
|
584
587
|
}
|
|
585
588
|
};
|
|
586
589
|
|
|
@@ -1753,7 +1756,7 @@ const checkbox = (options) => ({
|
|
|
1753
1756
|
root: ""
|
|
1754
1757
|
},
|
|
1755
1758
|
card: {
|
|
1756
|
-
root: [`border border-
|
|
1759
|
+
root: [`border border-default rounded-lg ${hover}bg-elevated/50`, options.theme.transitions && "transition-colors"]
|
|
1757
1760
|
}
|
|
1758
1761
|
},
|
|
1759
1762
|
indicator: {
|
|
@@ -1952,10 +1955,14 @@ const checkboxGroup = (options) => ({
|
|
|
1952
1955
|
neutral: {}
|
|
1953
1956
|
},
|
|
1954
1957
|
variant: {
|
|
1955
|
-
list: {
|
|
1956
|
-
|
|
1958
|
+
list: {
|
|
1959
|
+
fieldset: "flex-wrap"
|
|
1960
|
+
},
|
|
1961
|
+
card: {
|
|
1962
|
+
fieldset: "flex-wrap"
|
|
1963
|
+
},
|
|
1957
1964
|
table: {
|
|
1958
|
-
item: [`border border-
|
|
1965
|
+
item: [`border border-default ${hover}bg-elevated/50`, options.theme.transitions && "transition-colors"]
|
|
1959
1966
|
}
|
|
1960
1967
|
},
|
|
1961
1968
|
size: {
|
|
@@ -3647,6 +3654,14 @@ const inputMenu = (options) => {
|
|
|
3647
3654
|
tagsInput: "flex-1 border-0 bg-transparent placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"
|
|
3648
3655
|
},
|
|
3649
3656
|
variants: {
|
|
3657
|
+
// `root` and `base` are the same element in `multiple` mode, so the
|
|
3658
|
+
// `group-*` rounding utilities inherited from `input` never match there.
|
|
3659
|
+
// Keep the `group` marker here and pick the right rounding in
|
|
3660
|
+
// `compoundVariants` depending on `multiple`.
|
|
3661
|
+
fieldGroup: {
|
|
3662
|
+
horizontal: () => ({ root: fieldGroupVariantWithRoot.fieldGroup.horizontal.root }),
|
|
3663
|
+
vertical: () => ({ root: fieldGroupVariantWithRoot.fieldGroup.vertical.root })
|
|
3664
|
+
},
|
|
3650
3665
|
virtualize: {
|
|
3651
3666
|
true: {
|
|
3652
3667
|
viewport: "p-1 isolate"
|
|
@@ -3727,6 +3742,22 @@ const inputMenu = (options) => {
|
|
|
3727
3742
|
}
|
|
3728
3743
|
},
|
|
3729
3744
|
compoundVariants: [{
|
|
3745
|
+
multiple: false,
|
|
3746
|
+
fieldGroup: "horizontal",
|
|
3747
|
+
class: { base: fieldGroupVariantWithRoot.fieldGroup.horizontal.base }
|
|
3748
|
+
}, {
|
|
3749
|
+
multiple: false,
|
|
3750
|
+
fieldGroup: "vertical",
|
|
3751
|
+
class: { base: fieldGroupVariantWithRoot.fieldGroup.vertical.base }
|
|
3752
|
+
}, {
|
|
3753
|
+
multiple: true,
|
|
3754
|
+
fieldGroup: "horizontal",
|
|
3755
|
+
class: { base: fieldGroupVariant.fieldGroup.horizontal }
|
|
3756
|
+
}, {
|
|
3757
|
+
multiple: true,
|
|
3758
|
+
fieldGroup: "vertical",
|
|
3759
|
+
class: { base: fieldGroupVariant.fieldGroup.vertical }
|
|
3760
|
+
}, {
|
|
3730
3761
|
variant: "soft",
|
|
3731
3762
|
multiple: true,
|
|
3732
3763
|
class: "has-focus:bg-elevated has-focus-visible:outline-3"
|
|
@@ -5794,13 +5825,15 @@ const radioGroup = (options) => ({
|
|
|
5794
5825
|
},
|
|
5795
5826
|
variant: {
|
|
5796
5827
|
list: {
|
|
5828
|
+
fieldset: "flex-wrap",
|
|
5797
5829
|
item: ""
|
|
5798
5830
|
},
|
|
5799
5831
|
card: {
|
|
5800
|
-
|
|
5832
|
+
fieldset: "flex-wrap",
|
|
5833
|
+
item: [`border border-default rounded-lg ${hover}bg-elevated/50`, options.theme.transitions && "transition-colors"]
|
|
5801
5834
|
},
|
|
5802
5835
|
table: {
|
|
5803
|
-
item: [`border border-
|
|
5836
|
+
item: [`border border-default ${hover}bg-elevated/50`, options.theme.transitions && "transition-colors"]
|
|
5804
5837
|
}
|
|
5805
5838
|
},
|
|
5806
5839
|
orientation: {
|
|
@@ -6085,7 +6118,6 @@ const select = (options) => {
|
|
|
6085
6118
|
}),
|
|
6086
6119
|
size: {
|
|
6087
6120
|
xs: {
|
|
6088
|
-
base: "px-2 py-1 text-xs gap-1",
|
|
6089
6121
|
label: "p-1 text-[10px]/3 gap-1",
|
|
6090
6122
|
item: "p-1 text-xs gap-1",
|
|
6091
6123
|
itemLeadingIcon: "size-4",
|
|
@@ -6096,7 +6128,6 @@ const select = (options) => {
|
|
|
6096
6128
|
empty: "p-2 text-xs"
|
|
6097
6129
|
},
|
|
6098
6130
|
sm: {
|
|
6099
|
-
base: "px-2.5 py-1.5 text-xs gap-1.5",
|
|
6100
6131
|
label: "p-1.5 text-[10px]/3 gap-1.5",
|
|
6101
6132
|
item: "p-1.5 text-xs gap-1.5",
|
|
6102
6133
|
itemLeadingIcon: "size-4",
|
|
@@ -6107,7 +6138,6 @@ const select = (options) => {
|
|
|
6107
6138
|
empty: "p-2.5 text-xs"
|
|
6108
6139
|
},
|
|
6109
6140
|
md: {
|
|
6110
|
-
base: "px-2.5 py-1.5 text-sm gap-1.5",
|
|
6111
6141
|
label: "p-1.5 text-xs gap-1.5",
|
|
6112
6142
|
item: "p-1.5 text-sm gap-1.5",
|
|
6113
6143
|
itemLeadingIcon: "size-5",
|
|
@@ -6118,7 +6148,6 @@ const select = (options) => {
|
|
|
6118
6148
|
empty: "p-2.5 text-sm"
|
|
6119
6149
|
},
|
|
6120
6150
|
lg: {
|
|
6121
|
-
base: "px-3 py-2 text-sm gap-2",
|
|
6122
6151
|
label: "p-2 text-xs gap-2",
|
|
6123
6152
|
item: "p-2 text-sm gap-2",
|
|
6124
6153
|
itemLeadingIcon: "size-5",
|
|
@@ -6129,7 +6158,6 @@ const select = (options) => {
|
|
|
6129
6158
|
empty: "p-3 text-sm"
|
|
6130
6159
|
},
|
|
6131
6160
|
xl: {
|
|
6132
|
-
base: "px-3 py-2 text-base gap-2",
|
|
6133
6161
|
label: "p-2 text-sm gap-2",
|
|
6134
6162
|
item: "p-2 text-base gap-2",
|
|
6135
6163
|
itemLeadingIcon: "size-6",
|
|
@@ -7004,7 +7032,7 @@ const table$1 = (options) => ({
|
|
|
7004
7032
|
base: "min-w-full overflow-clip",
|
|
7005
7033
|
caption: "sr-only",
|
|
7006
7034
|
thead: "relative",
|
|
7007
|
-
tbody: "isolate [&>tr]:data-[selectable=true]:hover:bg-elevated/50 [&>tr]:data-[selectable=true]:outline-primary/25 [&>tr]:data-[selectable=true]:focus-visible:outline-3 divide-y divide-default",
|
|
7035
|
+
tbody: "isolate [&>tr]:data-[selectable=true]:hover:bg-elevated/50 [&>tr]:data-[selectable=true]:outline-primary/25 [&>tr]:data-[selectable=true]:focus-visible:outline-3 [&>tr]:data-[selectable=true]:-outline-offset-3 divide-y divide-default",
|
|
7008
7036
|
tfoot: "relative",
|
|
7009
7037
|
tr: "data-[selected=true]:bg-elevated/50",
|
|
7010
7038
|
th: "px-4 py-3.5 text-sm text-highlighted text-start font-semibold [&:has([role=checkbox])]:pe-0",
|
package/dist/unplugin.d.mts
CHANGED
|
@@ -123,7 +123,8 @@ interface NuxtUIOptions extends Omit<ModuleOptions, 'fonts' | 'colorMode' | 'con
|
|
|
123
123
|
root?: string;
|
|
124
124
|
}
|
|
125
125
|
declare const runtimeDir: string;
|
|
126
|
+
declare const runtimeUrl: string;
|
|
126
127
|
declare const NuxtUIPlugin: unplugin.UnpluginInstance<NuxtUIOptions | undefined, boolean>;
|
|
127
128
|
|
|
128
|
-
export { NuxtUIPlugin, runtimeDir };
|
|
129
|
+
export { NuxtUIPlugin, runtimeDir, runtimeUrl };
|
|
129
130
|
export type { NuxtUIOptions };
|
package/dist/unplugin.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { fileURLToPath } from 'node:url';
|
|
1
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
2
2
|
import { join, normalize, relative } from 'pathe';
|
|
3
3
|
import { createUnplugin } from 'unplugin';
|
|
4
4
|
import { defu } from 'defu';
|
|
5
5
|
import tailwind from '@tailwindcss/vite';
|
|
6
|
-
import { e as getTemplates, h as resolveExtraScanDirs, b as detectUsedComponents, f as publicComposables, g as getClientBundleIcons, p as parseIconName, d as defaultOptions, r as resolveColors, c as getDefaultConfig } from './shared/ui.
|
|
6
|
+
import { e as getTemplates, h as resolveExtraScanDirs, b as detectUsedComponents, f as publicComposables, g as getClientBundleIcons, p as parseIconName, d as defaultOptions, r as resolveColors, c as getDefaultConfig } from './shared/ui.oNygBd3N.mjs';
|
|
7
7
|
import fs from 'node:fs';
|
|
8
8
|
import path from 'node:path';
|
|
9
9
|
import { consola } from 'consola';
|
|
@@ -99,11 +99,11 @@ function TemplatePlugin(options, appConfig, componentDir) {
|
|
|
99
99
|
|
|
100
100
|
function PluginsPlugin(options) {
|
|
101
101
|
const plugins = globSync(["**/*", "!*.d.ts"], { cwd: join(runtimeDir, "plugins"), absolute: true });
|
|
102
|
-
plugins.unshift(resolvePathSync("
|
|
103
|
-
plugins.unshift(resolvePathSync("
|
|
104
|
-
plugins.unshift(resolvePathSync("
|
|
102
|
+
plugins.unshift(resolvePathSync("./vue/plugins/router", { extensions: [".ts", ".mjs", ".js"], url: runtimeUrl }));
|
|
103
|
+
plugins.unshift(resolvePathSync("./vue/plugins/head", { extensions: [".ts", ".mjs", ".js"], url: runtimeUrl }));
|
|
104
|
+
plugins.unshift(resolvePathSync("./vue/plugins/icons", { extensions: [".ts", ".mjs", ".js"], url: runtimeUrl }));
|
|
105
105
|
if (options.colorMode) {
|
|
106
|
-
plugins.push(resolvePathSync("
|
|
106
|
+
plugins.push(resolvePathSync("./vue/plugins/color-mode", { extensions: [".ts", ".mjs", ".js"], url: runtimeUrl }));
|
|
107
107
|
}
|
|
108
108
|
const proseComponents = options.prose || options.mdc ? globSync(["**/*.vue"], { cwd: join(runtimeDir, "components/prose"), absolute: true }) : [];
|
|
109
109
|
return {
|
|
@@ -222,7 +222,8 @@ function createComponentSource(cwd, prefix, ignore = []) {
|
|
|
222
222
|
const relativePath = paths.get(componentName);
|
|
223
223
|
if (!relativePath) return;
|
|
224
224
|
return join(cwd, relativePath);
|
|
225
|
-
}
|
|
225
|
+
},
|
|
226
|
+
resolvePath: (relativePath) => files.includes(relativePath) ? join(cwd, relativePath) : void 0
|
|
226
227
|
};
|
|
227
228
|
}
|
|
228
229
|
function ComponentImportPlugin(options, meta) {
|
|
@@ -239,6 +240,7 @@ function ComponentImportPlugin(options, meta) {
|
|
|
239
240
|
colorModeIgnore
|
|
240
241
|
);
|
|
241
242
|
const overrideSources = [routerOverrides[routerMode], unpluginComponents].filter((s) => !!s);
|
|
243
|
+
const componentsDir = `${join(runtimeDir, "components")}/`;
|
|
242
244
|
const internalResolverPlugin = {
|
|
243
245
|
/**
|
|
244
246
|
* This plugin aims to ensure we override certain components with Vue-compatible versions:
|
|
@@ -247,6 +249,15 @@ function ComponentImportPlugin(options, meta) {
|
|
|
247
249
|
name: "nuxt:ui:components",
|
|
248
250
|
enforce: "pre",
|
|
249
251
|
resolveId(id, importer) {
|
|
252
|
+
const normalizedId = normalize(id);
|
|
253
|
+
const packagePath = normalizedId.match(PACKAGE_IMPORT_RE)?.[1] ?? (normalizedId.startsWith(componentsDir) && normalizedId.endsWith(".vue") ? normalizedId.slice(componentsDir.length) : void 0);
|
|
254
|
+
if (packagePath) {
|
|
255
|
+
for (const source of overrideSources) {
|
|
256
|
+
const resolved = source.resolvePath(packagePath);
|
|
257
|
+
if (resolved) return resolved;
|
|
258
|
+
}
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
250
261
|
if (!importer || !normalize(importer).includes(runtimeDir)) {
|
|
251
262
|
return;
|
|
252
263
|
}
|
|
@@ -303,11 +314,11 @@ function ComponentImportPlugin(options, meta) {
|
|
|
303
314
|
];
|
|
304
315
|
}
|
|
305
316
|
const RELATIVE_IMPORT_RE = /^\.{1,2}\//;
|
|
317
|
+
const PACKAGE_IMPORT_RE = /(?:^|\/node_modules\/)@nuxt\/ui\/(?:dist\/)?(?:runtime\/)?components\/(.+\.vue)$/;
|
|
306
318
|
|
|
307
319
|
function NuxtEnvironmentPlugin(options) {
|
|
308
320
|
const routerMode = resolveRouterMode(options);
|
|
309
|
-
const
|
|
310
|
-
const stubPath = resolvePathSync(stubsPath, { extensions: [".ts", ".mjs", ".js"], url: import.meta.url });
|
|
321
|
+
const stubPath = resolvePathSync(`./vue/stubs/${routerMode}`, { extensions: [".ts", ".mjs", ".js"], url: runtimeUrl });
|
|
311
322
|
return {
|
|
312
323
|
name: "nuxt:ui",
|
|
313
324
|
enforce: "pre",
|
|
@@ -443,6 +454,7 @@ function IconsPlugin(options, appConfig) {
|
|
|
443
454
|
}
|
|
444
455
|
|
|
445
456
|
const runtimeDir = normalize(fileURLToPath(new URL("./runtime", import.meta.url)));
|
|
457
|
+
const runtimeUrl = pathToFileURL(`${runtimeDir}/`).href;
|
|
446
458
|
const NuxtUIPlugin = createUnplugin((_options = {}, meta) => {
|
|
447
459
|
const options = defu(_options, { fonts: false }, defaultOptions);
|
|
448
460
|
options.theme = options.theme || {};
|
|
@@ -475,4 +487,4 @@ const NuxtUIPlugin = createUnplugin((_options = {}, meta) => {
|
|
|
475
487
|
].flat(1);
|
|
476
488
|
});
|
|
477
489
|
|
|
478
|
-
export { NuxtUIPlugin, runtimeDir };
|
|
490
|
+
export { NuxtUIPlugin, runtimeDir, runtimeUrl };
|
package/dist/vite.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/ui",
|
|
3
3
|
"description": "A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.",
|
|
4
|
-
"version": "4.11.
|
|
5
|
-
"packageManager": "pnpm@11.22.0",
|
|
4
|
+
"version": "4.11.2",
|
|
6
5
|
"repository": {
|
|
7
6
|
"type": "git",
|
|
8
7
|
"url": "git+https://github.com/nuxt/ui.git"
|
|
@@ -93,9 +92,6 @@
|
|
|
93
92
|
"imports": {
|
|
94
93
|
"#build/ui.css": "./.nuxt/ui.static.css"
|
|
95
94
|
},
|
|
96
|
-
"bin": {
|
|
97
|
-
"nuxt-ui": "./cli/index.mjs"
|
|
98
|
-
},
|
|
99
95
|
"style": "./dist/runtime/index.css",
|
|
100
96
|
"main": "./dist/module.mjs",
|
|
101
97
|
"sideEffects": [
|
|
@@ -104,39 +100,15 @@
|
|
|
104
100
|
"files": [
|
|
105
101
|
".nuxt/ui.static.css",
|
|
106
102
|
"dist",
|
|
107
|
-
"cli",
|
|
108
103
|
"vue-plugin.d.ts"
|
|
109
104
|
],
|
|
110
|
-
"scripts": {
|
|
111
|
-
"build": "nuxt-module-build build",
|
|
112
|
-
"prepack": "pnpm build",
|
|
113
|
-
"dev": "nuxt dev playgrounds/nuxt --uiDev",
|
|
114
|
-
"dev:build": "nuxt build playgrounds/nuxt",
|
|
115
|
-
"dev:vue": "pnpm --filter './playgrounds/vue' dev -- --uiDev",
|
|
116
|
-
"dev:vue:build": "pnpm --filter './playgrounds/vue' build",
|
|
117
|
-
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playgrounds/nuxt && nuxt prepare docs && pnpm dev:vue:build",
|
|
118
|
-
"repl": "pnpm --filter './playgrounds/repl' dev",
|
|
119
|
-
"repl:bundle": "pnpm --filter './playgrounds/repl' bundle",
|
|
120
|
-
"repl:build": "pnpm --filter './playgrounds/repl' build",
|
|
121
|
-
"repl:prepare": "nuxt-module-build build --stub && mkdir -p .nuxt && echo '{\"compilerOptions\":{}}' > .nuxt/tsconfig.json",
|
|
122
|
-
"docs": "nuxt dev docs --uiDev",
|
|
123
|
-
"docs:build": "nuxt build docs",
|
|
124
|
-
"lint": "eslint .",
|
|
125
|
-
"lint:fix": "eslint . --fix",
|
|
126
|
-
"typecheck": "vue-tsc --noEmit && nuxt typecheck playgrounds/nuxt && nuxt typecheck docs && cd playgrounds/vue && vue-tsc --noEmit",
|
|
127
|
-
"test": "vitest",
|
|
128
|
-
"test:vue": "vitest --project vue",
|
|
129
|
-
"test:nuxt": "vitest --project nuxt",
|
|
130
|
-
"bench": "vitest bench --project vue",
|
|
131
|
-
"release": "release-it"
|
|
132
|
-
},
|
|
133
105
|
"dependencies": {
|
|
134
106
|
"@floating-ui/dom": "^1.8.0",
|
|
135
|
-
"@iconify/vue": "^5.0.
|
|
136
|
-
"@internationalized/date": "^3.12.
|
|
137
|
-
"@internationalized/number": "^3.6.
|
|
107
|
+
"@iconify/vue": "^5.0.2",
|
|
108
|
+
"@internationalized/date": "^3.12.4",
|
|
109
|
+
"@internationalized/number": "^3.6.8",
|
|
138
110
|
"@nuxt/fonts": "^0.14.0",
|
|
139
|
-
"@nuxt/icon": "^2.5.
|
|
111
|
+
"@nuxt/icon": "^2.5.1",
|
|
140
112
|
"@nuxt/kit": "^4.5.2",
|
|
141
113
|
"@nuxt/schema": "^4.5.2",
|
|
142
114
|
"@nuxtjs/color-mode": "^4.0.1",
|
|
@@ -144,25 +116,25 @@
|
|
|
144
116
|
"@tailwindcss/postcss": "^4.3.3",
|
|
145
117
|
"@tailwindcss/vite": "^4.3.3",
|
|
146
118
|
"@tanstack/vue-table": "^8.21.3",
|
|
147
|
-
"@tanstack/vue-virtual": "^3.13.
|
|
148
|
-
"@tiptap/core": "^3.
|
|
149
|
-
"@tiptap/extension-bubble-menu": "^3.
|
|
150
|
-
"@tiptap/extension-code": "^3.
|
|
151
|
-
"@tiptap/extension-collaboration": "^3.
|
|
152
|
-
"@tiptap/extension-drag-handle": "^3.
|
|
153
|
-
"@tiptap/extension-drag-handle-vue-3": "^3.
|
|
154
|
-
"@tiptap/extension-floating-menu": "^3.
|
|
155
|
-
"@tiptap/extension-horizontal-rule": "^3.
|
|
156
|
-
"@tiptap/extension-image": "^3.
|
|
157
|
-
"@tiptap/extension-mention": "^3.
|
|
158
|
-
"@tiptap/extension-node-range": "^3.
|
|
159
|
-
"@tiptap/extension-placeholder": "^3.
|
|
160
|
-
"@tiptap/markdown": "^3.
|
|
161
|
-
"@tiptap/pm": "^3.
|
|
162
|
-
"@tiptap/starter-kit": "^3.
|
|
163
|
-
"@tiptap/suggestion": "^3.
|
|
164
|
-
"@tiptap/vue-3": "^3.
|
|
165
|
-
"@unhead/vue": "^3.
|
|
119
|
+
"@tanstack/vue-virtual": "^3.13.39",
|
|
120
|
+
"@tiptap/core": "^3.31.3",
|
|
121
|
+
"@tiptap/extension-bubble-menu": "^3.31.3",
|
|
122
|
+
"@tiptap/extension-code": "^3.31.3",
|
|
123
|
+
"@tiptap/extension-collaboration": "^3.31.3",
|
|
124
|
+
"@tiptap/extension-drag-handle": "^3.31.3",
|
|
125
|
+
"@tiptap/extension-drag-handle-vue-3": "^3.31.3",
|
|
126
|
+
"@tiptap/extension-floating-menu": "^3.31.3",
|
|
127
|
+
"@tiptap/extension-horizontal-rule": "^3.31.3",
|
|
128
|
+
"@tiptap/extension-image": "^3.31.3",
|
|
129
|
+
"@tiptap/extension-mention": "^3.31.3",
|
|
130
|
+
"@tiptap/extension-node-range": "^3.31.3",
|
|
131
|
+
"@tiptap/extension-placeholder": "^3.31.3",
|
|
132
|
+
"@tiptap/markdown": "^3.31.3",
|
|
133
|
+
"@tiptap/pm": "^3.31.3",
|
|
134
|
+
"@tiptap/starter-kit": "^3.31.3",
|
|
135
|
+
"@tiptap/suggestion": "^3.31.3",
|
|
136
|
+
"@tiptap/vue-3": "^3.31.3",
|
|
137
|
+
"@unhead/vue": "^3.4.1",
|
|
166
138
|
"@vueuse/core": "^14.4.0",
|
|
167
139
|
"@vueuse/integrations": "^14.4.0",
|
|
168
140
|
"@vueuse/shared": "^14.4.0",
|
|
@@ -177,53 +149,54 @@
|
|
|
177
149
|
"embla-carousel-vue": "^8.6.0",
|
|
178
150
|
"embla-carousel-wheel-gestures": "^8.1.0",
|
|
179
151
|
"fuse.js": "^7.5.0",
|
|
180
|
-
"hookable": "^6.1.
|
|
152
|
+
"hookable": "^6.1.2",
|
|
181
153
|
"knitwork": "^1.3.0",
|
|
182
|
-
"magic-string": "^1.
|
|
154
|
+
"magic-string": "^1.4.1",
|
|
183
155
|
"mlly": "^1.8.2",
|
|
184
|
-
"motion-v": "^2.4.
|
|
156
|
+
"motion-v": "^2.4.4",
|
|
185
157
|
"ohash": "^2.0.12",
|
|
186
158
|
"pathe": "^2.0.3",
|
|
187
|
-
"reka-ui": "2.10.
|
|
159
|
+
"reka-ui": "2.10.4",
|
|
188
160
|
"scule": "^1.3.0",
|
|
189
|
-
"tailwind-merge": "^3.
|
|
161
|
+
"tailwind-merge": "^3.7.0",
|
|
190
162
|
"tailwind-variants": "^3.2.2",
|
|
191
163
|
"tailwindcss": "^4.3.3",
|
|
192
164
|
"tinyglobby": "^0.2.17",
|
|
193
165
|
"ufo": "^1.6.4",
|
|
194
|
-
"unplugin": "^3.
|
|
166
|
+
"unplugin": "^3.4.0",
|
|
195
167
|
"unplugin-auto-import": "^21.1.0",
|
|
196
168
|
"unplugin-vue-components": "^32.1.0",
|
|
197
169
|
"vaul-vue": "0.4.1",
|
|
198
|
-
"vue-component-type-helpers": "^3.3.
|
|
170
|
+
"vue-component-type-helpers": "^3.3.11"
|
|
199
171
|
},
|
|
200
172
|
"devDependencies": {
|
|
201
173
|
"@codspeed/vitest-plugin": "^5.7.1",
|
|
202
174
|
"@nuxt/eslint-config": "^1.17.0",
|
|
203
175
|
"@nuxt/module-builder": "^1.0.3",
|
|
204
|
-
"@nuxt/test-utils": "^4.
|
|
205
|
-
"@release-it/conventional-changelog": "^12.0.
|
|
176
|
+
"@nuxt/test-utils": "^4.3.2",
|
|
177
|
+
"@release-it/conventional-changelog": "^12.0.2",
|
|
206
178
|
"@tanstack/table-core": "^8.21.3",
|
|
207
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
208
|
-
"@vue/test-utils": "^2.
|
|
209
|
-
"ai": "^7.0.
|
|
179
|
+
"@vitejs/plugin-vue": "^6.0.9",
|
|
180
|
+
"@vue/test-utils": "^2.5.1",
|
|
181
|
+
"ai": "^7.0.107",
|
|
210
182
|
"embla-carousel": "^8.6.0",
|
|
211
|
-
"eslint": "^10.
|
|
212
|
-
"
|
|
183
|
+
"eslint": "^10.11.0",
|
|
184
|
+
"eslint-plugin-better-tailwindcss": "^4.7.0",
|
|
185
|
+
"happy-dom": "^20.14.5",
|
|
213
186
|
"nuxt": "^4.5.2",
|
|
214
|
-
"release-it": "^21.0
|
|
187
|
+
"release-it": "^21.1.0",
|
|
215
188
|
"unbuild": "^3.6.1",
|
|
216
|
-
"vitest": "^4.1.
|
|
189
|
+
"vitest": "^4.1.11",
|
|
217
190
|
"vitest-axe": "^0.1.0",
|
|
218
191
|
"vitest-environment-nuxt": "^2.0.0",
|
|
219
|
-
"vue": "^3.5.
|
|
220
|
-
"vue-tsc": "^3.3.
|
|
192
|
+
"vue": "^3.5.43",
|
|
193
|
+
"vue-tsc": "^3.3.11"
|
|
221
194
|
},
|
|
222
195
|
"peerDependencies": {
|
|
223
|
-
"@inertiajs/vue3": "^2.0.7 || ^3
|
|
224
|
-
"@internationalized/date": "^3
|
|
225
|
-
"@internationalized/number": "^3
|
|
226
|
-
"@nuxt/content": "^3
|
|
196
|
+
"@inertiajs/vue3": "^2.0.7 || ^3",
|
|
197
|
+
"@internationalized/date": "^3",
|
|
198
|
+
"@internationalized/number": "^3",
|
|
199
|
+
"@nuxt/content": "^3",
|
|
227
200
|
"@tiptap/core": "^3",
|
|
228
201
|
"@tiptap/extension-bubble-menu": "^3",
|
|
229
202
|
"@tiptap/extension-code": "^3",
|
|
@@ -242,14 +215,14 @@
|
|
|
242
215
|
"@tiptap/suggestion": "^3",
|
|
243
216
|
"@tiptap/vue-3": "^3",
|
|
244
217
|
"ai": "^6 || ^7",
|
|
245
|
-
"joi": "^18
|
|
246
|
-
"superstruct": "^2
|
|
247
|
-
"tailwindcss": "^4
|
|
248
|
-
"typescript": "^5.6.3 || ^6
|
|
249
|
-
"valibot": "^1
|
|
250
|
-
"vue-router": "^4.5.0 || ^5
|
|
218
|
+
"joi": "^18",
|
|
219
|
+
"superstruct": "^2",
|
|
220
|
+
"tailwindcss": "^4",
|
|
221
|
+
"typescript": "^5.6.3 || ^6 || ^7",
|
|
222
|
+
"valibot": "^1",
|
|
223
|
+
"vue-router": "^4.5.0 || ^5",
|
|
251
224
|
"yup": "^1.7.0",
|
|
252
|
-
"zod": "^3.24.0 || ^4
|
|
225
|
+
"zod": "^3.24.0 || ^4"
|
|
253
226
|
},
|
|
254
227
|
"peerDependenciesMeta": {
|
|
255
228
|
"@inertiajs/vue3": {
|
|
@@ -301,5 +274,28 @@
|
|
|
301
274
|
"tailwind",
|
|
302
275
|
"framework",
|
|
303
276
|
"ui-framework"
|
|
304
|
-
]
|
|
305
|
-
|
|
277
|
+
],
|
|
278
|
+
"scripts": {
|
|
279
|
+
"build": "nuxt-module-build build",
|
|
280
|
+
"cli": "node ./cli/index.mjs",
|
|
281
|
+
"dev": "nuxt dev playgrounds/nuxt --uiDev",
|
|
282
|
+
"dev:build": "nuxt build playgrounds/nuxt",
|
|
283
|
+
"dev:vue": "pnpm --filter './playgrounds/vue' dev -- --uiDev",
|
|
284
|
+
"dev:vue:build": "pnpm --filter './playgrounds/vue' build",
|
|
285
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playgrounds/nuxt && nuxt prepare docs && pnpm dev:vue:build",
|
|
286
|
+
"repl": "pnpm --filter './playgrounds/repl' dev",
|
|
287
|
+
"repl:bundle": "pnpm --filter './playgrounds/repl' bundle",
|
|
288
|
+
"repl:build": "pnpm --filter './playgrounds/repl' build",
|
|
289
|
+
"repl:prepare": "nuxt-module-build build --stub && mkdir -p .nuxt && echo '{\"compilerOptions\":{}}' > .nuxt/tsconfig.json",
|
|
290
|
+
"docs": "nuxt dev docs --uiDev",
|
|
291
|
+
"docs:build": "nuxt build docs",
|
|
292
|
+
"lint": "eslint .",
|
|
293
|
+
"lint:fix": "eslint . --fix",
|
|
294
|
+
"typecheck": "vue-tsc --noEmit && nuxt typecheck playgrounds/nuxt && nuxt typecheck docs && cd playgrounds/vue && vue-tsc --noEmit",
|
|
295
|
+
"test": "vitest",
|
|
296
|
+
"test:vue": "vitest --project vue",
|
|
297
|
+
"test:nuxt": "vitest --project nuxt",
|
|
298
|
+
"bench": "vitest bench --project vue",
|
|
299
|
+
"release": "release-it"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { existsSync, promises as fsp } from 'node:fs'
|
|
2
|
-
import { resolve } from 'pathe'
|
|
3
|
-
import { defineCommand } from 'citty'
|
|
4
|
-
import { consola } from 'consola'
|
|
5
|
-
import { splitByCase, upperFirst, camelCase, kebabCase } from 'scule'
|
|
6
|
-
import { appendFile, appendThemeDefault, sortFile } from '../../utils.mjs'
|
|
7
|
-
import templates from '../../templates.mjs'
|
|
8
|
-
|
|
9
|
-
export default defineCommand({
|
|
10
|
-
meta: {
|
|
11
|
-
name: 'component',
|
|
12
|
-
description: 'Make a new component.'
|
|
13
|
-
},
|
|
14
|
-
args: {
|
|
15
|
-
name: {
|
|
16
|
-
type: 'positional',
|
|
17
|
-
required: true,
|
|
18
|
-
description: 'Name of the component.'
|
|
19
|
-
},
|
|
20
|
-
primitive: {
|
|
21
|
-
type: 'boolean',
|
|
22
|
-
description: 'Create a primitive component.'
|
|
23
|
-
},
|
|
24
|
-
prose: {
|
|
25
|
-
type: 'boolean',
|
|
26
|
-
description: 'Create a prose component.'
|
|
27
|
-
},
|
|
28
|
-
content: {
|
|
29
|
-
type: 'boolean',
|
|
30
|
-
description: 'Create a content component.'
|
|
31
|
-
},
|
|
32
|
-
template: {
|
|
33
|
-
type: 'string',
|
|
34
|
-
description: 'Only generate template.'
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
async setup({ args }) {
|
|
38
|
-
const name = args.name
|
|
39
|
-
if (!name) {
|
|
40
|
-
consola.error('`name` argument is missing!')
|
|
41
|
-
process.exit(1)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const path = resolve('.')
|
|
45
|
-
|
|
46
|
-
for (const template of Object.keys(templates)) {
|
|
47
|
-
if (args.template && template !== args.template) {
|
|
48
|
-
continue
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const { filename, contents } = templates[template](args)
|
|
52
|
-
if (!contents) {
|
|
53
|
-
continue
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const filePath = resolve(path, filename)
|
|
57
|
-
|
|
58
|
-
if (existsSync(filePath)) {
|
|
59
|
-
consola.error(`🚨 ${filePath} already exists!`)
|
|
60
|
-
continue
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
await fsp.writeFile(filePath, contents.trim() + '\n')
|
|
64
|
-
|
|
65
|
-
consola.success(`🪄 Generated ${filePath}!`)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (args.template) {
|
|
69
|
-
return
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const themePath = resolve(path, `src/theme/${args.prose ? 'prose/' : ''}${args.content ? 'content/' : ''}index.ts`)
|
|
73
|
-
await appendFile(themePath, `export { default as ${camelCase(name)} } from './${kebabCase(name)}'`)
|
|
74
|
-
await sortFile(themePath)
|
|
75
|
-
|
|
76
|
-
if (!args.prose) {
|
|
77
|
-
const typesPath = resolve(path, 'src/runtime/types/index.ts')
|
|
78
|
-
const pascal = splitByCase(name).map(p => upperFirst(p)).join('')
|
|
79
|
-
await appendFile(typesPath, `export * from '../components/${args.content ? 'content/' : ''}${pascal}.vue'`)
|
|
80
|
-
await sortFile(typesPath)
|
|
81
|
-
|
|
82
|
-
const useComponentPropsPath = resolve(path, 'src/runtime/composables/useComponentProps.ts')
|
|
83
|
-
await appendThemeDefault(useComponentPropsPath, camelCase(name), `${pascal}Props`)
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { defineCommand } from 'citty'
|
|
2
|
-
import component from './component.mjs'
|
|
3
|
-
import locale from './locale.mjs'
|
|
4
|
-
|
|
5
|
-
export default defineCommand({
|
|
6
|
-
meta: {
|
|
7
|
-
name: 'make',
|
|
8
|
-
description: 'Commands to create new Nuxt UI entities.'
|
|
9
|
-
},
|
|
10
|
-
subCommands: {
|
|
11
|
-
component,
|
|
12
|
-
locale
|
|
13
|
-
}
|
|
14
|
-
})
|