Skip to content

Commit fc2729c

Browse files
committed
upgrade to nuxt ui v3.0.0
1 parent 12f6285 commit fc2729c

File tree

8 files changed

+29
-56
lines changed

8 files changed

+29
-56
lines changed

nuxt.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// https://nuxt.com/docs/api/configuration/nuxt-config
22
export default defineNuxtConfig({
3-
compatibilityDate: '2025-01-23',
3+
compatibilityDate: '2025-03-13',
44
rootDir: 'nuxt/',
55

66
future: {

nuxt/app/assets/css/main.css

+1-23
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,15 @@
1-
@import "tailwindcss";
1+
@import "tailwindcss" theme(static);
22
@import "@nuxt/ui";
33

44
:root {
55
--ui-radius: var(--radius-sm);
66
}
77

8-
@theme {
9-
--color-primary-50: var(--ui-color-primary-50);
10-
--color-primary-100: var(--ui-color-primary-100);
11-
--color-primary-200: var(--ui-color-primary-200);
12-
--color-primary-300: var(--ui-color-primary-300);
13-
--color-primary-400: var(--ui-color-primary-400);
14-
--color-primary-500: var(--ui-color-primary-500);
15-
--color-primary-600: var(--ui-color-primary-600);
16-
--color-primary-700: var(--ui-color-primary-700);
17-
--color-primary-800: var(--ui-color-primary-800);
18-
--color-primary-900: var(--ui-color-primary-900);
19-
--color-primary-950: var(--ui-color-primary-950);
20-
}
21-
228
@layer base {
239
#__nuxt {
2410
@apply min-h-screen flex flex-col;
2511
}
2612

27-
html {
28-
@apply text-neutral-800 dark:bg-gray-900;
29-
}
30-
31-
html.dark {
32-
@apply text-neutral-50 bg-gray-900;
33-
}
34-
3513
button, a, [role="button"] {
3614
@apply transition-colors;
3715
}

nuxt/app/components/app/Header.vue

+1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ const isSideOpen = ref(false);
189189
<ULink class="cursor-pointer">
190190
<UAvatar
191191
icon="i-heroicons-user"
192+
class="rounded-lg"
192193
size="md"
193194
:src="$storage(auth.user.avatar)"
194195
:alt="auth.user.name"

nuxt/app/components/auth/Login.vue

+4-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ onBeforeUnmount(() => window.removeEventListener("message", handleMessage));
114114
<UInput v-model="state.password" type="password" class="w-full" placeholder="••••••••" />
115115
</UFormField>
116116

117-
<UTooltip :delay-duration="0" text="for 1 month" :content="{ side: 'right' }">
118-
<UCheckbox v-model="state.remember" label="Remember me" class="inline-flex" />
117+
<UTooltip :delay-duration="0" text="for 1 month" :content="{ side: 'right', align: 'center' }">
118+
<div class="inline-flex">
119+
<UCheckbox v-model="state.remember" label="Remember me" class="inline-flex" />
120+
</div>
119121
</UTooltip>
120122

121123
<div class="flex items-center justify-end space-x-4">

nuxt/app/components/input/UploadImage.vue

+7-5
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,17 @@ const onSelect = async (e: any) => {
6565
<div class="relative flex">
6666
<UAvatar
6767
:src="$storage(value)"
68-
width="80"
69-
height="80"
68+
icon="i-heroicons-user"
7069
img-class="object-cover"
71-
class="w-20 h-20"
70+
class="w-20 h-20 rounded-xl"
71+
size="3xl"
7272
/>
7373

7474
<UTooltip
7575
text="Upload"
7676
class="absolute top-0 end-0 -m-2"
77-
:content="{ side: 'right' }"
77+
:delay-duration="0"
78+
:content="{ side: 'right', align: 'center' }"
7879
>
7980
<UButton
8081
type="button"
@@ -90,7 +91,8 @@ const onSelect = async (e: any) => {
9091
<UTooltip
9192
text="Delete"
9293
class="absolute bottom-0 end-0 -m-2"
93-
:content="{ side: 'right' }"
94+
:delay-duration="0"
95+
:content="{ side: 'right', align: 'center' }"
9496
>
9597
<UButton
9698
type="button"

nuxt/app/components/modal/Demo.vue

-13
This file was deleted.

nuxt/app/pages/index.vue

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
<script setup lang="ts">
2-
import { ModalDemo } from '#components'
3-
4-
const modal = useModal();
52
const router = useRouter();
63
const auth = useAuthStore();
74
8-
function openDemoModal() {
9-
modal.open(ModalDemo)
10-
}
5+
const open = ref(false);
116
127
useSeoMeta({
138
title: 'Home',
@@ -21,7 +16,15 @@ useSeoMeta({
2116
<div class="font-bold text-lg leading-tight tracking-tighter mb-4">Demo</div>
2217

2318
<div class="flex gap-3">
24-
<UButton label="Modal" @click="openDemoModal" color="neutral" variant="soft" />
19+
<UModal v-model:open="open" title="Welcome to LaravelNuxt" >
20+
<UButton label="Modal" color="neutral" variant="soft" />
21+
<template #body>
22+
<USkeleton class="w-full h-60" />
23+
</template>
24+
<template #footer>
25+
<UButton @click="open = false" label="Close" color="neutral" variant="soft" />
26+
</template>
27+
</UModal>
2528
<UButton label="404 page" color="neutral" @click="router.push('/404')" variant="soft" />
2629
</div>
2730
</UCard>

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
"api": "php artisan octane:start --watch"
1414
},
1515
"devDependencies": {
16-
"@nuxt/devtools": "^1.7.0",
16+
"@nuxt/devtools": "^2.3.0",
1717
"@nuxt/image": "^1.9.0",
18-
"@nuxt/ui": "^3.0.0-alpha.11",
19-
"@pinia/nuxt": "^0.9.0",
18+
"@nuxt/ui": "^3.0.0",
19+
"@pinia/nuxt": "^0.10.1",
2020
"chokidar": "^4.0.3",
2121
"dayjs-nuxt": "^2.1.11",
22-
"nuxt": "^3.15.3",
23-
"nuxt-security": "^2.1.5",
22+
"nuxt": "^3.16.0",
23+
"nuxt-security": "^2.2.0",
2424
"vue": "^3.5.13",
2525
"vue-router": "^4.5.0"
2626
}

0 commit comments

Comments
 (0)