Skip to content

Tailwind v4, Vite v6, Fixes #27

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

Merged
merged 2 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Vue SPA w/ PrimeVue & Laravel Breeze API Starter Kit

![Static Badge](<https://img.shields.io/badge/Vue.js%20-%20v3.5%20-%20rgb(66%20184%20131)>) ![Static Badge](https://img.shields.io/badge/PrimeVue%20-%20v4%20-%20rgb(16%20185%20129)) ![Static Badge](https://img.shields.io/badge/Tailwind%20CSS%20-%20v4%20-%20%230284c7)

A [PrimeVue](https://primevue.org/) SPA starter kit meant for use with a [Laravel Breeze](https://laravel.com/docs/master/starter-kits#laravel-breeze) API stack backend.

An alternative to using the [Laravel, Inertia.js, & PrimeVue Starter Kit](https://github.com/connorabbas/laravel-inertia-primevue).
Expand Down
2,196 changes: 862 additions & 1,334 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,26 @@
"@eslint/js": "^9.18.0",
"@primevue/auto-import-resolver": "^4.2.5",
"@primevue/themes": "^4.2.5",
"@tailwindcss/vite": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.19.1",
"@vitejs/plugin-vue": "^5.0.5",
"@vueuse/core": "^12.2.0",
"autoprefixer": "^10.4.19",
"axios": "^1.7.2",
"eslint": "^9.18.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-vue": "^9.32.0",
"nprogress": "^0.2.0",
"pinia": "^2.1.7",
"postcss": "^8.4.39",
"postcss-import": "^16.1.0",
"primeicons": "^7.0.0",
"primevue": "^4.2.5",
"tailwindcss": "^3.4.4",
"tailwindcss": "^4.0.0",
"tailwindcss-primeui": "^0.3.4",
"typescript": "^5.7.3",
"typescript-eslint": "^8.19.1",
"unplugin-vue-components": "^0.27.4",
"vite": "^5.3.1",
"vite": "^6.0",
"vue": "^3.5.0",
"vue-router": "^4.4.0"
}
}
}
6 changes: 0 additions & 6 deletions postcss.config.js

This file was deleted.

1 change: 1 addition & 0 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import './assets/css/app.css';
import './assets/css/tailwind.css';
import 'nprogress/nprogress.css';
import 'primeicons/primeicons.css';

Expand Down
24 changes: 10 additions & 14 deletions src/assets/css/app.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
@import "custom.css";
@import "custom-preflight.css" layer(tailwind-base);

@layer tailwind-base, primevue, tailwind-utilities;
html {
/* font size will determine the component/utility scaling */
font-size: 14px;
}

@layer tailwind-utilities {
@tailwind components;
@tailwind utilities;
body {
margin: 0 !important;
padding: 0 !important;
}

@layer components {
.dynamic-bg {
@apply bg-surface-0 dark:bg-surface-900;
}
.dynamic-border {
@apply border-surface-200 dark:border-surface-800;
}
#nprogress .bar {
background: var(--p-primary-500) !important;
z-index: 9999999 !important;
}
14 changes: 0 additions & 14 deletions src/assets/css/custom.css

This file was deleted.

22 changes: 22 additions & 0 deletions src/assets/css/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@layer tailwind-theme, tailwind-base, primevue, tailwind-utilities;

@import 'tailwindcss/theme.css' layer(tailwind-theme);
@import './custom-preflight.css' layer(tailwind-base);
/* @import "tailwindcss/preflight.css" layer(tailwind-base); */
@import 'tailwindcss/utilities.css' layer(tailwind-utilities);

@plugin 'tailwindcss-primeui';

@custom-variant dark (&:where(.dark, .dark *));

@theme {
--font-sans: Inter, sans-serif;
}

@utility dynamic-bg {
@apply bg-surface-0 dark:bg-surface-900;
}

@utility dynamic-border {
@apply border-surface-200 dark:border-surface-800;
}
2 changes: 1 addition & 1 deletion src/components/Container.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defineProps({
</script>

<template>
<div :class="[{ 'max-w-screen-xl mx-auto': !fluid }, spacedMobile ? 'px-4' : 'px-0', 'md:px-8']">
<div :class="[{ 'max-w-(--breakpoint-2xl) mx-auto': !fluid }, spacedMobile ? 'px-4' : 'px-0', 'md:px-8']">
<slot />
</div>
</template>
2 changes: 1 addition & 1 deletion src/components/PrimeVue/LinksMenuBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ defineExpose({
custom
>
<!-- add if using 'nora' preset theme -->
<!-- hover:text-primary-100 hover:dark:text-primary-950 -->
<!-- hover:text-primary-100 dark:hover:text-primary-950 -->
<a
:href="href"
v-bind="props.action"
Expand Down
2 changes: 1 addition & 1 deletion src/components/PrimeVue/LinksPanelMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
custom
>
<!-- add if using 'nora' preset theme -->
<!-- hover:text-primary-100 hover:dark:text-primary-950 -->
<!-- hover:text-primary-100 dark:hover:text-primary-950 -->
<a
class="flex items-center cursor-pointer no-underline px-4 py-2"
:class="item.active ? 'font-bold text-primary' : 'text-surface-700 dark:text-surface-0'"
Expand Down
8 changes: 4 additions & 4 deletions src/layouts/AuthenticatedLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ watchEffect(() => {
<div class="min-h-screen">
<nav
class="dynamic-bg border-b"
:class="$slots.header ? 'dynamic-border' : 'shadow'"
:class="$slots.header ? 'dynamic-border' : 'shadow-sm'"
>
<!-- Primary Navigation Menu -->
<Container>
Expand Down Expand Up @@ -131,10 +131,10 @@ watchEffect(() => {
appendTo="#user-menu-append"
:model="userMenuItems"
popup
class="shadow"
class="shadow-sm"
:pt="{
root: {
class: '!left-auto !top-0 right-0',
class: 'left-auto! top-0! right-0',
},
}"
/>
Expand Down Expand Up @@ -216,7 +216,7 @@ watchEffect(() => {
<!-- Page Heading -->
<header
v-if="$slots.header"
class="dynamic-bg shadow"
class="dynamic-bg shadow-sm"
>
<Container>
<div class="py-6">
Expand Down
10 changes: 3 additions & 7 deletions src/views/auth/ForgotPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ onMounted(() => {
<Message
severity="success"
:closable="false"
class="shadow"
class="shadow-sm"
>
{{ flashMessages.success }}
</Message>
Expand All @@ -62,12 +62,8 @@ onMounted(() => {
class="space-y-6"
@submit.prevent="submit"
>
<div class="space-y-2">
<label
for="email"
class="block mb-2"
>Email</label
>
<div class="flex flex-col gap-2">
<label for="email">Email</label>
<InputText
id="email"
ref="email-input"
Expand Down
18 changes: 5 additions & 13 deletions src/views/auth/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ onMounted(() => {
<Message
severity="success"
:closable="false"
class="shadow"
class="shadow-sm"
>
{{ flashMessages.success }}
</Message>
Expand All @@ -69,12 +69,8 @@ onMounted(() => {
class="space-y-6"
@submit.prevent="submit"
>
<div class="space-y-2">
<label
for="email"
class="block mb-2"
>Email</label
>
<div class="flex flex-col gap-2">
<label for="email">Email</label>
<InputText
id="email"
ref="email-input"
Expand All @@ -88,12 +84,8 @@ onMounted(() => {
<InputErrors :errors="validationErrors.email" />
</div>

<div class="space-y-2">
<label
for="password"
class="block mb-2"
>Password</label
>
<div class="flex flex-col gap-2">
<label for="password">Password</label>
<InputText
id="password"
v-model="formData.password"
Expand Down
32 changes: 8 additions & 24 deletions src/views/auth/Register.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,8 @@ onMounted(() => {
class="space-y-6"
@submit.prevent="submit"
>
<div class="space-y-2">
<label
for="name"
class="block mb-2"
>Name</label
>
<div class="flex flex-col gap-2">
<label for="name">Name</label>
<InputText
id="name"
ref="name-input"
Expand All @@ -66,12 +62,8 @@ onMounted(() => {
<InputErrors :errors="validationErrors?.name" />
</div>

<div class="space-y-2">
<label
for="email"
class="block mb-2"
>Email</label
>
<div class="flex flex-col gap-2">
<label for="email">Email</label>
<InputText
id="email"
v-model="formData.email"
Expand All @@ -84,12 +76,8 @@ onMounted(() => {
<InputErrors :errors="validationErrors?.email" />
</div>

<div class="space-y-2">
<label
for="password"
class="block mb-2"
>Password</label
>
<div class="flex flex-col gap-2">
<label for="password">Password</label>
<InputText
id="password"
v-model="formData.password"
Expand All @@ -102,12 +90,8 @@ onMounted(() => {
<InputErrors :errors="validationErrors?.password" />
</div>

<div class="space-y-2">
<label
for="password_confirmation"
class="block mb-2"
>Confirm Password</label
>
<div class="flex flex-col gap-2">
<label for="password_confirmation">Confirm Password</label>
<InputText
id="password_confirmation"
v-model="formData.password_confirmation"
Expand Down
24 changes: 6 additions & 18 deletions src/views/auth/ResetPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,8 @@ onMounted(() => {
class="space-y-6"
@submit.prevent="submit"
>
<div class="space-y-2">
<label
for="email"
class="block mb-2"
>Email</label
>
<div class="flex flex-col gap-2">
<label for="email">Email</label>
<InputText
id="email"
ref="email-input"
Expand All @@ -78,12 +74,8 @@ onMounted(() => {
<InputErrors :errors="validationErrors?.email" />
</div>

<div class="space-y-2">
<label
for="password"
class="block mb-2"
>New Password</label
>
<div class="flex flex-col gap-2">
<label for="password">New Password</label>
<InputText
id="password"
v-model="formData.password"
Expand All @@ -96,12 +88,8 @@ onMounted(() => {
<InputErrors :errors="validationErrors?.password" />
</div>

<div class="space-y-2">
<label
for="password_confirmation"
class="block mb-2"
>Confirm New Password</label
>
<div class="flex flex-col gap-2">
<label for="password_confirmation">Confirm New Password</label>
<InputText
id="password_confirmation"
v-model="formData.password_confirmation"
Expand Down
2 changes: 1 addition & 1 deletion src/views/auth/VerifyEmail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const submit = () => {
<Message
severity="success"
:closable="false"
class="shadow"
class="shadow-sm"
>
A new verification link has been sent to the email address you provided during registration.
</Message>
Expand Down
5 changes: 3 additions & 2 deletions src/views/profile/partials/DeleteUserForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ function focusPasswordInput() {
<Dialog
v-model:visible="modalOpen"
:draggable="false"
:dismissableMask="true"
position="center"
modal
header="Are you sure you want to delete your account?"
:style="{ width: '40rem' }"
modal
@show="focusPasswordInput"
>
<div class="mb-6">
Expand All @@ -56,7 +57,7 @@ function focusPasswordInput() {
</p>
</div>

<div class="space-y-2">
<div class="flex flex-col gap-2">
<InputText
id="password"
ref="password-input"
Expand Down
Loading
Loading