Skip to content

Commit

Permalink
Merge branch 'v3' into issue-2923
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoRCD authored Dec 18, 2024
2 parents 8cea4e0 + 6974f23 commit 45ef842
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/content/1.getting-started/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Learn how to install and configure Nuxt UI in a Vue project in the **Vue install
We want to be transparent: migrating from Nuxt UI v2 to v3 will require significant effort. While we've maintained core concepts and components, Nuxt UI v3 has been rebuilt from the ground up, resulting in a new library with enhanced capabilities.

Key points to consider:

- A comprehensive migration guide will be available in the coming weeks.
- Review the new documentation and components carefully before attempting to upgrade.
- If you encounter any issues, please report them on our [GitHub repository](https://github.com/nuxt/ui/issues).
Expand Down
1 change: 1 addition & 0 deletions docs/content/1.getting-started/2.installation/1.nuxt.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export default defineNuxtConfig({
css: ['~/assets/css/main.css']
})
```

::

::callout{icon="i-simple-icons-visualstudiocode"}
Expand Down
2 changes: 2 additions & 0 deletions docs/content/1.getting-started/2.installation/2.vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Nuxt UI registers `unplugin-auto-import` and `unplugin-vue-components`, which wi
auto-imports.d.ts
components.d.ts
```

::

#### Use the Nuxt UI Vue plugin in your `main.ts`
Expand Down Expand Up @@ -107,6 +108,7 @@ app.use(ui)

app.mount('#app')
```

::

::callout{icon="i-simple-icons-visualstudiocode"}
Expand Down
40 changes: 40 additions & 0 deletions docs/content/1.getting-started/3.theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Tailwind CSS v4 takes a CSS-first configuration approach, you now customize your
::module-only
#ui
:::div

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui";
Expand All @@ -36,10 +37,12 @@ Tailwind CSS v4 takes a CSS-first configuration approach, you now customize your
--color-green-950: #052E16;
}
```

:::

#ui-pro
:::div

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui-pro";
Expand All @@ -62,6 +65,7 @@ Tailwind CSS v4 takes a CSS-first configuration approach, you now customize your
--color-green-950: #052E16;
}
```

:::
::

Expand All @@ -80,22 +84,26 @@ This can be useful when writing Tailwind classes in markdown files with [`@nuxt/
::module-only
#ui
:::div

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui";

@source "../content";
```

:::

#ui-pro
:::div

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui-pro";

@source "../content";
```

:::
::

Expand All @@ -110,22 +118,26 @@ You can use the `@plugin` directive to import Tailwind CSS plugins.
::module-only
#ui
:::div

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui";

@plugin "@tailwindcss/typography";
```

:::

#ui-pro
:::div

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui-pro";

@plugin "@tailwindcss/typography";
```

:::
::

Expand Down Expand Up @@ -172,6 +184,7 @@ export default defineAppConfig({
}
})
```

::

#vue
Expand All @@ -197,6 +210,7 @@ export default defineConfig({
]
})
```

::

::
Expand Down Expand Up @@ -240,6 +254,7 @@ export default defineNuxtConfig({
}
})
```

:::

#vue
Expand Down Expand Up @@ -267,6 +282,7 @@ export default defineConfig({
]
})
```

:::
::

Expand All @@ -278,6 +294,7 @@ However, you can generate these classes using Tailwind's `@theme` directive, all
::module-only
#ui
:::div{class="*:!mb-0 *:!mt-2.5"}

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui";
Expand All @@ -296,10 +313,12 @@ However, you can generate these classes using Tailwind's `@theme` directive, all
--color-primary-950: var(--ui-color-primary-950);
}
```

:::

#ui-pro
:::div{class="*:!mb-0 *:!mt-2.5"}

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui-pro";
Expand All @@ -318,6 +337,7 @@ However, you can generate these classes using Tailwind's `@theme` directive, all
--color-primary-950: var(--ui-color-primary-950);
}
```

:::
::

Expand Down Expand Up @@ -367,6 +387,7 @@ You can change which shade is used for each color on light and dark mode:
::module-only
#ui
:::div{class="*:!mb-0 *:!mt-2.5"}

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui";
Expand All @@ -379,10 +400,12 @@ You can change which shade is used for each color on light and dark mode:
--ui-primary: var(--ui-color-primary-200);
}
```

:::

#ui-pro
:::div{class="*:!mb-0 *:!mt-2.5"}

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui-pro";
Expand All @@ -395,6 +418,7 @@ You can change which shade is used for each color on light and dark mode:
--ui-primary: var(--ui-color-primary-200);
}
```

:::
::

Expand Down Expand Up @@ -486,6 +510,7 @@ body {
@apply antialiased text-[var(--ui-text)] bg-[var(--ui-bg)];
}
```

::

::tip
Expand All @@ -494,6 +519,7 @@ You can customize these CSS variables to tailor the appearance of your applicati
::module-only
#ui
:::div{class="*:!mb-0 *:!mt-2.5"}

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui";
Expand All @@ -508,10 +534,12 @@ You can customize these CSS variables to tailor the appearance of your applicati
--ui-border: var(--ui-color-neutral-900);
}
```

:::

#ui-pro
:::div{class="*:!mb-0 *:!mt-2.5"}

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui-pro";
Expand All @@ -526,6 +554,7 @@ You can customize these CSS variables to tailor the appearance of your applicati
--ui-border: var(--ui-color-neutral-900);
}
```

:::
::

Expand All @@ -551,6 +580,7 @@ You can customize the default radius value using the default Tailwind CSS variab
::module-only
#ui
:::div{class="*:!mb-0 *:!mt-2.5"}

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui";
Expand All @@ -559,10 +589,12 @@ You can customize the default radius value using the default Tailwind CSS variab
--ui-radius: var(--radius-sm);
}
```

:::

#ui-pro
:::div{class="*:!mb-0 *:!mt-2.5"}

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui-pro";
Expand All @@ -571,6 +603,7 @@ You can customize the default radius value using the default Tailwind CSS variab
--ui-radius: var(--radius-sm);
}
```

:::
::

Expand All @@ -592,6 +625,7 @@ You can customize the default container width using the default Tailwind CSS var
::module-only
#ui
:::div{class="*:!mb-0 *:!mt-2.5"}

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui";
Expand All @@ -604,10 +638,12 @@ You can customize the default container width using the default Tailwind CSS var
--ui-container: var(--container-8xl);
}
```

:::

#ui-pro
:::div{class="*:!mb-0 *:!mt-2.5"}

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui-pro";
Expand All @@ -620,6 +656,7 @@ You can customize the default container width using the default Tailwind CSS var
--ui-container: var(--container-8xl);
}
```

:::
::

Expand Down Expand Up @@ -758,6 +795,7 @@ You can explore the theme for each component in two ways:

- Check the `Theme` section in the documentation of each individual component.
- Browse the source code directly in the GitHub repository at [`v3/src/theme`](https://github.com/nuxt/ui/tree/v3/src/theme).

::

### Config
Expand All @@ -780,6 +818,7 @@ export default defineAppConfig({
}
})
```

::

#vue
Expand Down Expand Up @@ -808,6 +847,7 @@ export default defineConfig({
]
})
```

::

::
Expand Down
2 changes: 1 addition & 1 deletion docs/content/1.getting-started/4.icons/1.nuxt.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ props:
::

::note
You can use any name from the https://icones.js.org collection.
You can use any name from the <https://icones.js.org> collection.
::

### Component Props
Expand Down
2 changes: 1 addition & 1 deletion docs/content/1.getting-started/4.icons/2.vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ props:
::

::note
You can use any name from the https://icones.js.org collection.
You can use any name from the <https://icones.js.org> collection.
::

### Component Props
Expand Down
4 changes: 4 additions & 0 deletions docs/content/1.getting-started/5.fonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Nuxt UI automatically registers the [`@nuxt/fonts`](https://github.com/nuxt/font
::module-only
#ui
:::div

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui";
Expand All @@ -24,10 +25,12 @@ Nuxt UI automatically registers the [`@nuxt/fonts`](https://github.com/nuxt/font
--font-sans: 'Public Sans', sans-serif;
}
```

:::

#ui-pro
:::div

```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui-pro";
Expand All @@ -36,6 +39,7 @@ Nuxt UI automatically registers the [`@nuxt/fonts`](https://github.com/nuxt/font
--font-sans: 'Public Sans', sans-serif;
}
```

:::
::

Expand Down
2 changes: 2 additions & 0 deletions docs/content/1.getting-started/7.i18n/1.nuxt.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ const locale = defineLocale({

::tip
Look at the `code` parameter, there you need to pass the iso code of the language. Example:

* `hi` Hindi (language)
* `de-AT`: German (language) as used in Austria (region)

::

### Dynamic locale
Expand Down
2 changes: 2 additions & 0 deletions docs/content/1.getting-started/7.i18n/2.vue.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ const locale = defineLocale({

::tip
Look at the `code` parameter, there you need to pass the iso code of the language. Example:

* `hi` Hindi (language)
* `de-AT`: German (language) as used in Austria (region)

::

### Dynamic locale
Expand Down
Loading

0 comments on commit 45ef842

Please sign in to comment.