[Snyk] Upgrade @nuxt/ui from 2.22.0 to 3.1.0 #131
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade @nuxt/ui from 2.22.0 to 3.1.0.
ℹ️ 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.
The recommended version is 22 versions ahead of your current version.
The recommended version was released 23 days ago.
Release notes
Package name: @nuxt/ui
✨ 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:+ <div class="text-primary">
- <div class="bg-(--ui-error)">
+ <div class="bg-error">
+ <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">
rounded-*utilities to use our--ui-radiusCSS variable, making it easier to maintain consistent border radius across your application: https://ui.nuxt.com/getting-started/theme#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">
🧩 New Components and Features
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>
cardandtablevariants for more flexible layouts: https://ui.nuxt.com/components/radio-group#variantimport 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: trueoption in yourvite.config.ts:import vue from '@ vitejs/plugin-vue'
import ui from '@ nuxt/ui/vite'
export default defineConfig({
plugins: [
vue(),
ui({
inertia: true
})
]
})
This automatically replaces
RouterLinkwithInertiaLinkin 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.tschanges, this was only working when reloading the page previously.🚨 Breaking Changes
.open()(#3829) (f3098df)This PR changes
.open()to return an overlay instance with aresultpromise property instead of returning the promise directly, providing more flexibility:+ const instance = modal.open({ count: count.value })
+ const result = await instance.result
</script>
🚀 Features
portalprop (#3688) (29fa462)selectevent (#3678) (22edfd7)content-topandcontent-bottomslots (#3886) (1a46394)attachprop to opt-out of nested form attachement (#3939) (1a0d7a3)resetSearchTermOnSelect(cea881a), closes #3782stepSnapping&disableWheelChangeprops (#3731) (f5e6284)close:preventevent (#3958) (f486423)rounded-*utilities (#3906) (f9737c8).open()(#3829) (f3098df)autofocus/autofocus-delayprops (0456670), closes #3717cardandtablevariants (#3178) (4d138ad)onSelectfield in items (8640831)trandtd(#3866) (80dfa88)list-leadingandlist-trailingslots (#3837) (3447a06)autoresize-delayprop (06414d3), closes #3730icon,loading, etc. props to match Input (cb193f1)resize-noneclass withautoresizeprop (ffafd81)🐛 Bug Fixes
divinstead ofh3for header tag (75e4792), closes #3963@ nuxt/module-builderupgrade (#3855) (39c861a)transform-originin popper content (#3919) (01d8dc7)any(#3741) (97274f1)onSelectevents (#3735) (f25fed5)disableditems to be selected (8435a0f), closes #3474valueKeystring case (9ca213b), closes #3949 #3331value(#3779) (52a97e2)changeon multiple item removal (9d2fed1), closes #3756downloadproperty (#3879) (47cdc2e)sm:w-autocontent slot (abe0859), closes #3788iconandcontentslots (1d45980), closes #3785datareactivity (#3967) (6e27304)colspantoth(#3926) (122e8ac)ClassValueinuiprop (eea1415), closes #3860🌐 Locales
👋 New Contributors
Full Changelog: v3.0.2...v3.1.0
🚀 Features
emptyprop (afff54f)🐛 Bug Fixes
$attrsto default slot (#3712) (88f349d)focus:outline-noneinstead offocus:outline-hidden(c231fe5), closes #3658group.idas key (bc61d29)w-fullclass (df00149)@ __NO_SIDE_EFFECTS__(82e2665)fadeFromIndexprop proxy (f7604e5)helptoaria-describedbyattribute (#3691) (20c3392)searchTermonupdate:open(3074632), closes #3620aria-currentlikeNuxtLink/RouterLink(c531d02)active="true"binding on html (d73768b)aria-*&data-*attrs (ade16b7)onClick(370054b), closes #3631z-indexon viewport (0095d89), closes #3654captionslot (4ebb94c)focus:outline-hiddenclass (1769d5e)openmethod type to infer close emit return type (#3716) (bd99c2d)nuxtApp.hooks&useRuntimeHook(23bfeb9)🌐 Locales
👋 New Contributors
Full Changelog: v3.0.1...v3.0.2
✨ Highlights
theme(static)(#3630) (ecff9ab)You no longer need to use
theme(static)when importingtailwindcss! 🎉However, you might still need this when using Tailwind CSS variables in your code explicitly like this for example:
🚨 Breaking Changes
zodandvalibot(#3617) (9a4bb34)We now rely on standard-schema for Form validation with
valibotandzod. Make sure to upgrade to[email protected]/[email protected]if you use them in your app.vaul-vue(f401766)We've updated to
[email protected]which powers the Drawer component. There's no longer ahandleslot, the themehandleslot has changed a bit with some important values but you have access to ahandle-onlyprop now: https://ui.nuxt.com/components/drawer#handle-only🚀 Features
contentprop (5dec0e1)🐛 Bug Fixes
anyfromproxySlots(#3623) (764c41a)theme(static)(#3630) (ecff9ab)disabledon items (fe0bd83), closes nuxt/ui-pro#911@ selectis used (#3580) (e80cc15)@ compodium/examplesin auto-imports paths (#3585) (cc504b8)@ nuxt/ui-pro(#3603) (dec2730)🌐 Locales
👋 New Contribut...
Summary by Sourcery
Chores: