@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.
Files changed (32) hide show
  1. package/README.md +30 -51
  2. package/cli/commands/init.mjs +1 -1
  3. package/cli/templates.mjs +1 -1
  4. package/dist/module.d.mts +5 -5
  5. package/dist/module.d.ts +5 -5
  6. package/dist/module.json +1 -1
  7. package/dist/module.mjs +117 -89
  8. package/dist/runtime/components/Accordion.vue +2 -0
  9. package/dist/runtime/components/Alert.vue +2 -2
  10. package/dist/runtime/components/Breadcrumb.vue +2 -0
  11. package/dist/runtime/components/CommandPalette.vue +12 -2
  12. package/dist/runtime/components/ContextMenu.vue +2 -0
  13. package/dist/runtime/components/Drawer.vue +15 -7
  14. package/dist/runtime/components/DropdownMenu.vue +2 -0
  15. package/dist/runtime/components/InputMenu.vue +3 -1
  16. package/dist/runtime/components/NavigationMenu.vue +2 -0
  17. package/dist/runtime/components/Pagination.vue +10 -5
  18. package/dist/runtime/components/Progress.vue +2 -0
  19. package/dist/runtime/components/SelectMenu.vue +14 -7
  20. package/dist/runtime/components/Tabs.vue +2 -0
  21. package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
  22. package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
  23. package/dist/runtime/composables/useFormField.d.ts +3 -3
  24. package/dist/runtime/composables/useModal.d.ts +2 -2
  25. package/dist/runtime/composables/useSlideover.d.ts +2 -2
  26. package/dist/runtime/composables/useToast.d.ts +1 -1
  27. package/dist/runtime/types/form.d.ts +1 -1
  28. package/dist/runtime/types/index.d.ts +42 -42
  29. package/dist/runtime/utils/form.d.ts +1 -1
  30. package/dist/runtime/utils/link.d.ts +3 -1
  31. package/dist/runtime/utils/link.js +1 -1
  32. package/package.json +7 -7
package/README.md CHANGED
@@ -1,93 +1,72 @@
1
1
  [![nuxt-ui.png](https://repository-images.githubusercontent.com/428329515/43fec891-9030-4601-8233-5d45ba5c6013)](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 is a module that provides a set of Vue components and composables built with [Tailwind CSS](https://tailwindcss.com/) and [Headless UI](https://headlessui.dev/) to help you build beautiful and accessible user interfaces.
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
- Its goal is to provide everything related to UI when building a Nuxt app. This includes components, icons, colors, dark mode but also keyboard shortcuts.
12
+ ## Installation
13
13
 
14
- ## Features
14
+ 1. Install the Nuxt UI v3 alpha package:
15
15
 
16
- - Built with [Headless UI](https://headlessui.dev/) and [Tailwind CSS](https://tailwindcss.com/)
17
- - HMR support through Nuxt App Config
18
- - Dark mode support
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
- Read more on [ui.nuxt.com](https://ui.nuxt.com)
20
+ ```bash [yarn]
21
+ yarn add @nuxt/ui@next
22
+ ```
26
23
 
27
- ## Installation
24
+ ```bash [npm]
25
+ npm install @nuxt/ui@next
26
+ ```
28
27
 
29
- ```bash
30
- # npm
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
- Then, register the module in your `nuxt.config.ts`:
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
- ```js
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
- If you want latest updates, please use `@nuxt/ui-edge` in your `package.json`:
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
- ```json
53
- {
54
- "devDependencies": {
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://ui.nuxt.com to explore the documentation.
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
- - [nuxt-modules/tailwindcss](https://github.com/nuxt-modules/tailwindcss)
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/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
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
@@ -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.d.ts')
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
@@ -5,7 +5,7 @@ const playground = ({ name, pro }) => {
5
5
  const kebabName = kebabCase(name)
6
6
 
7
7
  return {
8
- filename: `playground/pages/components/${kebabName}.vue`,
8
+ filename: `playground/app/pages/components/${kebabName}.vue`,
9
9
  contents: pro
10
10
  ? undefined
11
11
  : `
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
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.13.1"
6
6
  },
7
- "version": "3.0.0-alpha.2",
7
+ "version": "3.0.0-alpha.4",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"