Skip to content

[Snyk] Upgrade @nuxt/ui from 2.22.0 to 3.1.3 #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nerdy-tech-com-gitub
Copy link
Owner

@nerdy-tech-com-gitub nerdy-tech-com-gitub commented Jul 15, 2025

snyk-top-banner

Snyk has created this PR to upgrade @nuxt/ui from 2.22.0 to 3.1.3.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


⚠️ Warning: This PR contains major version upgrade(s), and may be a breaking change.

  • The recommended version is 25 versions ahead of your current version.

  • The recommended version was released 2 months ago.

Release notes
Package name: @nuxt/ui
  • 3.1.3 - 2025-05-26

    🚨 Breaking Changes

    • NavigationMenu: revert new collapsible field

    In previous patch, we introduced a new collapsible field in items to display children in collapsed state as well as making the parent element respect its link attributes. However, it didn't feel right so we removed it in favor of 1e2a10b, 9cf9f25 and f2682fd.

    1. Parent items now respect their link attributes and clicking the trailing icon arrow expand/collapse its children.
    2. You can force a parent to behave like before (without link attributes) using type: 'trigger'.
    3. When collapsed, you can use the popover / tooltip props or item fields:

    🚀 Features

    • Modal/Slideover: add after:enter event (#4187) (d9e9fea)
    • NavigationMenu: add tooltip and popover props (f2682fd), closes #4186
    • NavigationMenu: add trigger type in items (9cf9f25)
    • NavigationMenu: handle vertical orientation with Accordion instead of Collapsible (1e2a10b), closes #4072 #3911
    • Popover: add anchor slot (#4119) (473513c)

    🐛 Bug Fixes

    • CheckboxGroup/RadioGroup: variant table borders in RTL mode (#4192) (43d281f)
    • CommandPalette: add presentation role to viewport (2ba94db)
    • ContextMenu/DropdownMenu: wrap groups in a viewport (dcf34a7), closes #3315
    • Drawer: improve title & description accessibility (41087d4), closes #4199
    • icons: update loading icon (#4163) (fe4e1f8)
    • Input/Textarea: define model modifiers types (#4195) (3243fb8)
    • InputMenu/Select/SelectMenu: manual viewport to display scrollbars (f95abf8), closes #4069
    • NavigationMenu: incorrect hover when disabled and active (d0be599)
    • NavigationMenu: only display tooltip when collapsed (44f536f)
    • NavigationMenu: revert new collapsible field (3c78e2f)
    • Textarea: missing imports (#4207) (6aab62e)
    • theme: define old-neutral color as static (#4193) (dae9f0b)
    • Tooltip: increase padding for consistency (0634a75)

    🌐 Locales

    👋 New Contributors

    Full Changelog: v3.1.2...v3.1.3

  • 3.1.2 - 2025-05-15

    🚀 Features

    🐛 Bug Fixes

    • Badge/Button: handle zero value in label correctly (#4108) (f244d15)
    • ButtonGroup: add z-index on focused element (204953b)
    • Calendar: wrong color for today date with neutral color (7d51a9e), closes #4084 #3629
    • Checkbox/RadioGroup: render correct element without variant (f2fd778), closes #3998
    • CheckboxGroup: relative UCheckbox import (7551a85), closes #4090
    • ColorPicker: make thumb touch draggable (#4101) (cc20a26)
    • components: class should have priority over ui prop (e6e510b)
    • FormField: block form field injection after use (#4150) (d79da9d)
    • FormField: use div for error and help slots (459a041)
    • inertia: link always render as anchor tag (#3989) (e81464a)
    • inertia: make useAppConfig reactive (12303a8)
    • Input/Textarea: handle generic types (3c8d6cd), closes nuxt/ui-pro#887
    • InputNumber: handle inside button group (2e4c308), closes #4155
    • Link: consistent behavior between nuxt, vue and inertia (#4134) (67da90a)
    • module: configure @ nuxt/fonts with default weights (276268d)
    • NavigationMenu: arrow position conflict (#4137) (0dc4678)
    • Select: support more primitive types in value field (#4105) (09b4699)
    • Slider: handle generic types (d7a4d02)
    • Stepper: use div tag for title & description (a57844e), closes #4096
    • Tabs: prevent trigger truncate without parent width (06e5689), closes #4056
    • Tabs: set focus:outline-none with link variant (999a0f8)
    • templates: dont write unused variants in theme files (d3df3bb)
    • Toaster: allow base slot override (c63d2f3)
    • vue: make useAppConfig reactive (869c070), closes #3952

    🌐 Locales

    👋 New Contributors

    Full Changelog: v3.1.1...v3.1.2

  • 3.1.1 - 2025-05-02

    🚀 Features

    • useOverlay: add closeAll method (#3984) (ac4c194)
    • useOverlay: add isOpen method to check overlay state (#4041) (a4f3f6d)

    🐛 Bug Fixes

    • Calendar: add place-items-center to grid row (#4034) (8dfdd63)
    • defineShortcuts: bring back meta to ctrl convert on non macos platforms (f3b8b17), closes #3869 #3318
    • module: support nuxt-nightly (#3996) (bc0a296)
    • NavigationMenu: remove sm:w-auto from content slot (aebf0b3), closes #3987
    • RadioGroup: improve items value field type (#3995) (195773e)
    • templates: put back args to watch in dev (#4033) (c5bdec0)
    • theme: add missing border-bg / divide-bg utilities (82b5f32)
    • theme: add missing ring-offset-* utilities (#3992) (e5df026)
    • theme: define default shades for named tailwindcss colors (8acf3c5), closes #3977
    • theme: improve app config types for ui object (591d59f), closes #3579
    • theme: use @ theme inline to properly reference css variables (6131871), closes #4018
    • useOverlay: improve types and docs (#4012) (39e29fc)

    👋 New Contributors

    Full Changelog: v3.1.0...v3.1.1

  • 3.1.0 - 2025-04-24

    ✨ Highlights

    🎨 Improved Utility Classes

    We've enhanced the utility class system to make it more intuitive and easier to use. While CSS variables provided flexibility, writing classes like text-(--ui-text-muted) proved cumbersome. We've introduced three major improvements:

    • Default Color Shades (#3916): New utility classes for default color shades that automatically map to our design system variables. These shades automatically adapt to your color scheme and can be configured for both light and dark modes: https://ui.nuxt.com/getting-started/theme#colors
    - <div class="text-(--ui-primary)">
    + <div class="text-primary">

- <div class="bg-(--ui-error)">
+ <div class="bg-error">

  • Neutral Color Utilities (#3629): New utility classes for text, background, border, ring, divide and outline colors that map to our design system variables. These utilities work with opacity modifiers and automatically adapt to your color mode: https://ui.nuxt.com/getting-started/theme#neutral
- <div class="text-(--ui-text-muted)">
+ <div class="text-muted">

- <div class="border-(--ui-border)">
+ <div class="border-default">

- <div class="bg-(--ui-bg-elevated)/50">
+ <div class="bg-elevated/50">

- <div class="rounded-(--ui-radius)">
+ <div class="rounded-sm">

- <div class="rounded-[calc(var(--ui-radius)*1.5)]">
+ <div class="rounded-md">

- <div class="rounded-[calc(var(--ui-radius)*2)]">
+ <div class="rounded-lg">

These changes are fully backward compatible - existing CSS variable-based classes will continue to work while providing a more ergonomic alternative for new code.

🧩 New Components and Features

script setup lang="ts">
import type { CheckboxGroupItem, CheckboxGroupValue } from '@ nuxt/ui'

const items = ref<CheckboxGroupItem[]>(['System', 'Light', 'Dark'])
const value = ref<CheckboxGroupValue[]>(['System'])
</script>

<template>
<UCheckboxGroup v-model="value" :items="items" />
</template>

script setup lang="ts">
import type { RadioGroupItem, RadioGroupValue } from '@ nuxt/ui'

const items = ref<RadioGroupItem[]>(['System', 'Light', 'Dark'])
const value = ref<RadioGroupValue>('System')
</script>

<template>
<URadioGroup v-model="value" variant="table" :items="items" />
</template>

🌉 Inertia.js Integration

The Vue version now includes built-in support for Inertia.js. Enable it with the inertia: true option in your vite.config.ts:

import { defineConfig } from 'vite'
import vue from '@ vitejs/plugin-vue'
import ui from '@ nuxt/ui/vite'

export default defineConfig({
plugins: [
vue(),
ui({
inertia: true
})
]
})

This automatically replaces RouterLink with InertiaLink in all components, providing seamless integration with your Inertia.js applications: https://ui.nuxt.com/getting-started/installation/vue#inertia

⚡ Module Builder Update

The module has been updated to use nuxt/[email protected], bringing improved build performance and better TypeScript support.

Following this change, we've refactored how component types are handled which brings full HMR support with app.config.ts changes, this was only working when reloading the page previously.

🚨 Breaking Changes

  • OverlayProvider: return an overlay instance from .open() (#3829) (f3098df)

This PR changes .open() to return an overlay instance with a result promise property instead of returning the promise directly, providing more flexibility:

- const result = await modal.open({ count: count.value })
+ const instance = modal.open({ count: count.value })
+ const result = await instance.result
</script>

🚀 Features

  • App: add global portal prop (#3688) (29fa462)
  • Carousel: add select event (#3678) (22edfd7)
  • CheckboxGroup: new component (#3862) (9c3d53a)
  • components: add new content-top and content-bottom slots (#3886) (1a46394)
  • Form: add attach prop to opt-out of nested form attachement (#3939) (1a0d7a3)
  • Form: export loading state (#3861) (fdee252)
  • InputMenu/SelectMenu: handle resetSearchTermOnSelect (cea881a), closes #3782
  • InputNumber: add support for stepSnapping & disableWheelChange props (#3731) (f5e6284)
  • Modal/Popover/Slideover: add close:prevent event (#3958) (f486423)
  • module: define default color shades (#3916) (7ac7aa9)
  • module: define neutral utilities (#3629) (d49e0da)
  • module: dynamic rounded-* utilities (#3906) (f9737c8)
  • OverlayProvider: return an overlay instance from .open() (#3829) (f3098df)
  • PinInput: add autofocus / autofocus-delay props (0456670), closes #3717
  • RadioGroup: add card and table variants (#3178) (4d138ad)
  • Select: handle onSelect field in items (8640831)
  • Table: conditionally apply classes to tr and td (#3866) (80dfa88)
  • Tabs: add list-leading and list-trailing slots (#3837) (3447a06)
  • Textarea: add autoresize-delay prop (06414d3), closes #3730
  • Textarea: add icon, loading, etc. props to match Input (cb193f1)
  • Textarea: add resize-none class with autoresize prop (ffafd81)
  • unplugin: routing support for inertia (#3845) (d059efc)

🐛 Bug Fixes

  • Accordion: use div instead of h3 for header tag (75e4792), closes #3963
  • Alert/Toast: display actions when using slots (5086363), closes #3950
  • Carousel: move arrows inside container on mobile (d339dcb), closes #3813
  • CommandPalette: consistent alignement with other components (d25265c)
  • CommandPalette: increase input font size to avoid zoom (d227a10)
  • CommandPalette: prevent hover background on disabled items (ba534f1)
  • components: refactor types after @ nuxt/module-builder upgrade (#3855) (39c861a)
  • components: respect transform-origin in popper content (#3919) (01d8dc7)
  • ContextMenu/DropdownMenu: handle RTL mode (#3744) (1ae5cc0)
  • ContextMenuContent/DropdownMenuContent: remove unwanted any (#3741) (97274f1)
  • Form: input and output type inference (#3938) (f429498)
  • Form: loses focus on submit (#3796) (8e78eb1)
  • InputMenu/SelectMenu: correctly call onSelect events (#3735) (f25fed5)
  • InputMenu/SelectMenu: prevent disabled items to be selected (8435a0f), closes #3474
  • InputMenu/SelectMenu: remove valueKey string case (9ca213b), closes #3949 #3331
  • InputMenu/SelectMenu: support arbitrary value (#3779) (52a97e2)
  • InputMenu: emit change on multiple item removal (9d2fed1), closes #3756
  • Link: proxy download property (#3879) (47cdc2e)
  • NavigationMenu: add sm:w-auto content slot (abe0859), closes #3788
  • Skeleton: improve accessibility (#3613) (3484832)
  • Stepper: ui prop override on icon and content slots (1d45980), closes #3785
  • Table: improve data reactivity (#3967) (6e27304)
  • Table: pass header colspan to th (#3926) (122e8ac)
  • Tree: simplify reusable template types (#3836) (3deed4c)
  • types: allow color identifiers with dashes (#3896) (e5a1e26)
  • types: handle ClassValue in ui prop (eea1415), closes #3860
  • types: improve dynamic slots (Summary by Sourcery

    Chores:

    • Bump @nuxt/ui from 2.x to 3.1.3 in devDependencies

Snyk has created this PR to upgrade @nuxt/ui from 2.22.0 to 3.1.3.

See this package in npm:
@nuxt/ui

See this project in Snyk:
https://app.snyk.io/org/nerds-github/project/ef708957-d107-4807-bb9b-ffb67ea15337?utm_source=github&utm_medium=referral&page=upgrade-pr
Copy link

sourcery-ai bot commented Jul 15, 2025

Reviewer's Guide

This PR bumps the @nuxt/ui dependency in the dashboard project from v2.15.2 to v3.1.3, aligning with Snyk’s recommended major version upgrade.

Class diagram for OverlayProvider breaking change in @nuxt/ui v3.x

classDiagram
  class OverlayProvider {
    +open(options): OverlayInstance
  }
  class OverlayInstance {
    +result: Promise
  }
  OverlayProvider -- OverlayInstance : open() returns
Loading

File-Level Changes

Change Details Files
Upgrade @nuxt/ui dependency
  • Update @nuxt/ui version in devDependencies to ^3.1.3
dashboard/package.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants