@nuxt/ui 3.0.0-alpha.2 → 3.0.0-alpha.4
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 +30 -51
- package/cli/commands/init.mjs +1 -1
- package/cli/templates.mjs +1 -1
- package/dist/module.d.mts +5 -5
- package/dist/module.d.ts +5 -5
- package/dist/module.json +1 -1
- package/dist/module.mjs +117 -89
- package/dist/runtime/components/Accordion.vue +2 -0
- package/dist/runtime/components/Alert.vue +2 -2
- package/dist/runtime/components/Breadcrumb.vue +2 -0
- package/dist/runtime/components/CommandPalette.vue +12 -2
- package/dist/runtime/components/ContextMenu.vue +2 -0
- package/dist/runtime/components/Drawer.vue +15 -7
- package/dist/runtime/components/DropdownMenu.vue +2 -0
- package/dist/runtime/components/InputMenu.vue +3 -1
- package/dist/runtime/components/NavigationMenu.vue +2 -0
- package/dist/runtime/components/Pagination.vue +10 -5
- package/dist/runtime/components/Progress.vue +2 -0
- package/dist/runtime/components/SelectMenu.vue +14 -7
- package/dist/runtime/components/Tabs.vue +2 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
- package/dist/runtime/composables/useFormField.d.ts +3 -3
- package/dist/runtime/composables/useModal.d.ts +2 -2
- package/dist/runtime/composables/useSlideover.d.ts +2 -2
- package/dist/runtime/composables/useToast.d.ts +1 -1
- package/dist/runtime/types/form.d.ts +1 -1
- package/dist/runtime/types/index.d.ts +42 -42
- package/dist/runtime/utils/form.d.ts +1 -1
- package/dist/runtime/utils/link.d.ts +3 -1
- package/dist/runtime/utils/link.js +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,93 +1,72 @@
|
|
|
1
1
|
[](https://ui.nuxt.com)
|
|
2
2
|
|
|
3
|
-
# Nuxt UI
|
|
3
|
+
# Nuxt UI v3
|
|
4
4
|
|
|
5
5
|
[![npm version][npm-version-src]][npm-version-href]
|
|
6
6
|
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
7
7
|
[![License][license-src]][license-href]
|
|
8
8
|
[![Nuxt][nuxt-src]][nuxt-href]
|
|
9
9
|
|
|
10
|
-
Nuxt UI
|
|
10
|
+
We're thrilled to introduce Nuxt UI v3, a significant upgrade to our UI library that delivers extensive improvements and robust new capabilities. This major update harnesses the combined strengths of [Radix Vue](https://www.radix-vue.com/), [Tailwind CSS v4](https://tailwindcss.com/blog/tailwindcss-v4-alpha), and [Tailwind Variants](https://www.tailwind-variants.org/) to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Installation
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
1. Install the Nuxt UI v3 alpha package:
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- Support for LTR and RTL languages
|
|
20
|
-
- Keyboard shortcuts
|
|
21
|
-
- Bundled icons
|
|
22
|
-
- Fully typed
|
|
23
|
-
- [Figma Kit](https://www.figma.com/community/file/1288455405058138934)
|
|
16
|
+
```bash [pnpm]
|
|
17
|
+
pnpm add @nuxt/ui@next
|
|
18
|
+
```
|
|
24
19
|
|
|
25
|
-
|
|
20
|
+
```bash [yarn]
|
|
21
|
+
yarn add @nuxt/ui@next
|
|
22
|
+
```
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
```bash [npm]
|
|
25
|
+
npm install @nuxt/ui@next
|
|
26
|
+
```
|
|
28
27
|
|
|
29
|
-
```bash
|
|
30
|
-
|
|
31
|
-
npm install @nuxt/ui
|
|
32
|
-
# yarn
|
|
33
|
-
yarn add @nuxt/ui
|
|
34
|
-
# pnpm
|
|
35
|
-
pnpm add @nuxt/ui
|
|
36
|
-
# bun
|
|
37
|
-
bun add @nuxt/ui
|
|
28
|
+
```bash [bun]
|
|
29
|
+
bun add @nuxt/ui@next
|
|
38
30
|
```
|
|
39
31
|
|
|
40
|
-
|
|
32
|
+
> [!WARNING]
|
|
33
|
+
> Make sure you have `typescript` installed in your dev dependencies.
|
|
34
|
+
|
|
35
|
+
2. Register the Nuxt UI module in your `nuxt.config.ts`:
|
|
41
36
|
|
|
42
|
-
```
|
|
37
|
+
```ts [nuxt.config.ts]
|
|
43
38
|
export default defineNuxtConfig({
|
|
44
|
-
modules: [
|
|
45
|
-
'@nuxt/ui'
|
|
46
|
-
]
|
|
39
|
+
modules: ['@nuxt/ui']
|
|
47
40
|
})
|
|
48
41
|
```
|
|
49
42
|
|
|
50
|
-
|
|
43
|
+
3. Import Tailwind and Nuxt UI in your `app.vue` or in your [CSS](https://nuxt.com/docs/getting-started/styling#the-css-property):
|
|
51
44
|
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"@nuxt/ui": "npm:@nuxt/ui-edge@latest"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
45
|
+
```css [main.css]
|
|
46
|
+
@import "tailwindcss";
|
|
47
|
+
@import "@nuxt/ui";
|
|
58
48
|
```
|
|
59
49
|
|
|
60
50
|
## Documentation
|
|
61
51
|
|
|
62
|
-
Visit https://
|
|
52
|
+
Visit https://ui3.nuxt.com to explore the documentation.
|
|
63
53
|
|
|
64
54
|
## Credits
|
|
65
55
|
|
|
66
56
|
- [nuxt/nuxt](https://github.com/nuxt/nuxt)
|
|
57
|
+
- [nuxt/icon](https://github.com/nuxt/icon)
|
|
58
|
+
- [nuxt/fonts](https://github.com/nuxt/fonts)
|
|
67
59
|
- [nuxt-modules/color-mode](https://github.com/nuxt-modules/color-mode)
|
|
68
|
-
- [
|
|
60
|
+
- [radix-vue/radix-vue](https://github.com/radix-vue/radix-vue)
|
|
69
61
|
- [tailwindlabs/tailwindcss](https://github.com/tailwindlabs/tailwindcss)
|
|
70
|
-
- [tailwindlabs/headlessui](https://github.com/tailwindlabs/headlessui)
|
|
71
62
|
- [vueuse/vueuse](https://github.com/vueuse/vueuse)
|
|
72
|
-
- [egoist/tailwindcss-icons](https://github.com/egoist/tailwindcss-icons)
|
|
73
|
-
|
|
74
|
-
## Contributing
|
|
75
|
-
|
|
76
|
-
Thank you for considering contributing to Nuxt UI. Here are a few ways you can get involved:
|
|
77
|
-
|
|
78
|
-
- Reporting Bugs: If you come across any bugs or issues, please check out the reporting bugs guide to learn how to submit a bug report.
|
|
79
|
-
- Suggestions: Have any thoughts to enhance Nuxt UI? We'd love to hear them! Check out the [contribution guide](https://ui.nuxt.com/getting-started/contributing) to share your suggestions.
|
|
80
|
-
|
|
81
|
-
## Local Development
|
|
82
|
-
|
|
83
|
-
Follow the docs to [Set up your local development environment](https://ui.nuxt.com/getting-started/contributing#_2-local-development-setup) and contribute.
|
|
84
63
|
|
|
85
64
|
## License
|
|
86
65
|
|
|
87
66
|
Licensed under the [MIT license](https://github.com/nuxt/ui/blob/dev/LICENSE.md).
|
|
88
67
|
|
|
89
68
|
<!-- Badges -->
|
|
90
|
-
[npm-version-src]: https://img.shields.io/npm/v/@nuxt/ui/
|
|
69
|
+
[npm-version-src]: https://img.shields.io/npm/v/@nuxt/ui/next.svg?style=flat&colorA=18181B&colorB=28CF8D
|
|
91
70
|
[npm-version-href]: https://npmjs.com/package/@nuxt/ui
|
|
92
71
|
|
|
93
72
|
[npm-downloads-src]: https://img.shields.io/npm/dm/@nuxt/ui.svg?style=flat&colorA=18181B&colorB=28CF8D
|
package/cli/commands/init.mjs
CHANGED
|
@@ -75,7 +75,7 @@ export default defineCommand({
|
|
|
75
75
|
await sortFile(themePath)
|
|
76
76
|
|
|
77
77
|
if (!args.prose) {
|
|
78
|
-
const typesPath = resolve(path, 'src/runtime/types/index.
|
|
78
|
+
const typesPath = resolve(path, 'src/runtime/types/index.ts')
|
|
79
79
|
await appendFile(typesPath, `export * from '../components/${args.content ? 'content/' : ''}${splitByCase(name).map(p => upperFirst(p)).join('')}.vue'`)
|
|
80
80
|
await sortFile(typesPath)
|
|
81
81
|
}
|
package/cli/templates.mjs
CHANGED
package/dist/module.d.mts
CHANGED
|
@@ -7,17 +7,17 @@ interface ModuleOptions {
|
|
|
7
7
|
* @defaultValue U
|
|
8
8
|
*/
|
|
9
9
|
prefix?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Colors to generate classes for (based on TailwindCSS colors)
|
|
12
|
-
* @defaultValue ['red', 'orange', 'amber', 'yellow', 'lime', 'green', 'emerald', 'teal', 'cyan', 'sky', 'blue', 'indigo', 'violet', 'purple', 'fuchsia', 'pink', 'rose']
|
|
13
|
-
*/
|
|
14
|
-
colors?: string[];
|
|
15
10
|
/**
|
|
16
11
|
* Enable or disable `@nuxt/fonts` module
|
|
17
12
|
* @defaultValue true
|
|
18
13
|
*/
|
|
19
14
|
fonts?: boolean;
|
|
20
15
|
theme?: {
|
|
16
|
+
/**
|
|
17
|
+
* Colors to generate classes for (defaults to TailwindCSS colors)
|
|
18
|
+
* @defaultValue ['red', 'orange', 'amber', 'yellow', 'lime', 'green', 'emerald', 'teal', 'cyan', 'sky', 'blue', 'indigo', 'violet', 'purple', 'fuchsia', 'pink', 'rose']
|
|
19
|
+
*/
|
|
20
|
+
colors?: string[];
|
|
21
21
|
/**
|
|
22
22
|
* Enable or disable transitions on components
|
|
23
23
|
* @defaultValue true
|
package/dist/module.d.ts
CHANGED
|
@@ -7,17 +7,17 @@ interface ModuleOptions {
|
|
|
7
7
|
* @defaultValue U
|
|
8
8
|
*/
|
|
9
9
|
prefix?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Colors to generate classes for (based on TailwindCSS colors)
|
|
12
|
-
* @defaultValue ['red', 'orange', 'amber', 'yellow', 'lime', 'green', 'emerald', 'teal', 'cyan', 'sky', 'blue', 'indigo', 'violet', 'purple', 'fuchsia', 'pink', 'rose']
|
|
13
|
-
*/
|
|
14
|
-
colors?: string[];
|
|
15
10
|
/**
|
|
16
11
|
* Enable or disable `@nuxt/fonts` module
|
|
17
12
|
* @defaultValue true
|
|
18
13
|
*/
|
|
19
14
|
fonts?: boolean;
|
|
20
15
|
theme?: {
|
|
16
|
+
/**
|
|
17
|
+
* Colors to generate classes for (defaults to TailwindCSS colors)
|
|
18
|
+
* @defaultValue ['red', 'orange', 'amber', 'yellow', 'lime', 'green', 'emerald', 'teal', 'cyan', 'sky', 'blue', 'indigo', 'violet', 'purple', 'fuchsia', 'pink', 'rose']
|
|
19
|
+
*/
|
|
20
|
+
colors?: string[];
|
|
21
21
|
/**
|
|
22
22
|
* Enable or disable transitions on components
|
|
23
23
|
* @defaultValue true
|