Skip to content

Update Prettier config to include tailwindStylesheet path #112

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
Open
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
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"printWidth": 150,
"plugins": ["prettier-plugin-organize-imports", "prettier-plugin-tailwindcss"],
"tailwindFunctions": ["clsx", "cn"],
"tailwindStylesheet": "resources/css/app.css",
"tabWidth": 4,
"overrides": [
{
Expand Down
8 changes: 4 additions & 4 deletions resources/js/components/app-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function AppHeader({ breadcrumbs = [] }: AppHeaderProps) {
const getInitials = useInitials();
return (
<>
<div className="border-sidebar-border/80 border-b">
<div className="border-b border-sidebar-border/80">
<div className="mx-auto flex h-16 items-center px-4 md:max-w-7xl">
{/* Mobile Menu */}
<div className="lg:hidden">
Expand All @@ -58,7 +58,7 @@ export function AppHeader({ breadcrumbs = [] }: AppHeaderProps) {
<Menu className="h-5 w-5" />
</Button>
</SheetTrigger>
<SheetContent side="left" className="bg-sidebar flex h-full w-64 flex-col items-stretch justify-between">
<SheetContent side="left" className="flex h-full w-64 flex-col items-stretch justify-between bg-sidebar">
<SheetTitle className="sr-only">Navigation Menu</SheetTitle>
<SheetHeader className="flex justify-start text-left">
<AppLogoIcon className="h-6 w-6 fill-current text-black dark:text-white" />
Expand Down Expand Up @@ -138,7 +138,7 @@ export function AppHeader({ breadcrumbs = [] }: AppHeaderProps) {
href={item.href}
target="_blank"
rel="noopener noreferrer"
className="group text-accent-foreground ring-offset-background hover:bg-accent hover:text-accent-foreground focus-visible:ring-ring ml-1 inline-flex h-9 w-9 items-center justify-center rounded-md bg-transparent p-0 text-sm font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50"
className="group ml-1 inline-flex h-9 w-9 items-center justify-center rounded-md bg-transparent p-0 text-sm font-medium text-accent-foreground ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50"
>
<span className="sr-only">{item.title}</span>
{item.icon && <Icon iconNode={item.icon} className="size-5 opacity-80 group-hover:opacity-100" />}
Expand Down Expand Up @@ -171,7 +171,7 @@ export function AppHeader({ breadcrumbs = [] }: AppHeaderProps) {
</div>
</div>
{breadcrumbs.length > 1 && (
<div className="border-sidebar-border/70 flex w-full border-b">
<div className="flex w-full border-b border-sidebar-border/70">
<div className="mx-auto flex h-12 w-full items-center justify-start px-4 text-neutral-500 md:max-w-7xl">
<Breadcrumbs breadcrumbs={breadcrumbs} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/app-logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import AppLogoIcon from './app-logo-icon';
export default function AppLogo() {
return (
<>
<div className="bg-sidebar-primary text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-md">
<div className="flex aspect-square size-8 items-center justify-center rounded-md bg-sidebar-primary text-sidebar-primary-foreground">
<AppLogoIcon className="size-5 fill-current text-white dark:text-black" />
</div>
<div className="ml-1 grid flex-1 text-left text-sm">
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/app-sidebar-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { type BreadcrumbItem as BreadcrumbItemType } from '@/types';

export function AppSidebarHeader({ breadcrumbs = [] }: { breadcrumbs?: BreadcrumbItemType[] }) {
return (
<header className="border-sidebar-border/50 flex h-16 shrink-0 items-center gap-2 border-b px-6 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 md:px-4">
<header className="flex h-16 shrink-0 items-center gap-2 border-b border-sidebar-border/50 px-6 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12 md:px-4">
<div className="flex items-center gap-2">
<SidebarTrigger className="-ml-1" />
<Breadcrumbs breadcrumbs={breadcrumbs} />
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/heading-small.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default function HeadingSmall({ title, description }: { title: string; de
return (
<header>
<h3 className="mb-0.5 text-base font-medium">{title}</h3>
{description && <p className="text-muted-foreground text-sm">{description}</p>}
{description && <p className="text-sm text-muted-foreground">{description}</p>}
</header>
);
}
2 changes: 1 addition & 1 deletion resources/js/components/heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default function Heading({ title, description }: { title: string; descrip
return (
<div className="mb-8 space-y-0.5">
<h2 className="text-xl font-semibold tracking-tight">{title}</h2>
{description && <p className="text-muted-foreground text-sm">{description}</p>}
{description && <p className="text-sm text-muted-foreground">{description}</p>}
</div>
);
}
5 changes: 1 addition & 4 deletions resources/js/components/nav-main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ export function NavMain({ items = [] }: { items: NavItem[] }) {
<SidebarMenu>
{items.map((item) => (
<SidebarMenuItem key={item.title}>
<SidebarMenuButton
asChild isActive={item.href === page.url}
tooltip={{ children: item.title }}
>
<SidebarMenuButton asChild isActive={item.href === page.url} tooltip={{ children: item.title }}>
<Link href={item.href} prefetch>
{item.icon && <item.icon />}
<span>{item.title}</span>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/nav-user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function NavUser() {
<SidebarMenuItem>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<SidebarMenuButton size="lg" className="text-sidebar-accent-foreground data-[state=open]:bg-sidebar-accent group">
<SidebarMenuButton size="lg" className="group text-sidebar-accent-foreground data-[state=open]:bg-sidebar-accent">
<UserInfo user={auth.user} />
<ChevronsUpDown className="ml-auto size-4" />
</SidebarMenuButton>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/user-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function UserInfo({ user, showEmail = false }: { user: User; showEmail?:
</Avatar>
<div className="grid flex-1 text-left text-sm leading-tight">
<span className="truncate font-medium">{user.name}</span>
{showEmail && <span className="text-muted-foreground truncate text-xs">{user.email}</span>}
{showEmail && <span className="truncate text-xs text-muted-foreground">{user.email}</span>}
</div>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion resources/js/layouts/auth/auth-card-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function AuthCardLayout({
description?: string;
}>) {
return (
<div className="bg-muted flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10">
<div className="flex min-h-svh flex-col items-center justify-center gap-6 bg-muted p-6 md:p-10">
<div className="flex w-full max-w-md flex-col gap-6">
<Link href={route('home')} className="flex items-center gap-2 self-center font-medium">
<div className="flex h-9 w-9 items-center justify-center">
Expand Down
4 changes: 2 additions & 2 deletions resources/js/layouts/auth/auth-simple-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface AuthLayoutProps {

export default function AuthSimpleLayout({ children, title, description }: PropsWithChildren<AuthLayoutProps>) {
return (
<div className="bg-background flex min-h-svh flex-col items-center justify-center gap-6 p-6 md:p-10">
<div className="flex min-h-svh flex-col items-center justify-center gap-6 bg-background p-6 md:p-10">
<div className="w-full max-w-sm">
<div className="flex flex-col gap-8">
<div className="flex flex-col items-center gap-4">
Expand All @@ -23,7 +23,7 @@ export default function AuthSimpleLayout({ children, title, description }: Props

<div className="space-y-2 text-center">
<h1 className="text-xl font-medium">{title}</h1>
<p className="text-muted-foreground text-center text-sm">{description}</p>
<p className="text-center text-sm text-muted-foreground">{description}</p>
</div>
</div>
{children}
Expand Down
4 changes: 2 additions & 2 deletions resources/js/layouts/auth/auth-split-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function AuthSplitLayout({ children, title, description }: PropsW

return (
<div className="relative grid h-dvh flex-col items-center justify-center px-8 sm:px-0 lg:max-w-none lg:grid-cols-2 lg:px-0">
<div className="bg-muted relative hidden h-full flex-col p-10 text-white lg:flex dark:border-r">
<div className="relative hidden h-full flex-col bg-muted p-10 text-white lg:flex dark:border-r">
<div className="absolute inset-0 bg-zinc-900" />
<Link href={route('home')} className="relative z-20 flex items-center text-lg font-medium">
<AppLogoIcon className="mr-2 size-8 fill-current text-white" />
Expand All @@ -35,7 +35,7 @@ export default function AuthSplitLayout({ children, title, description }: PropsW
</Link>
<div className="flex flex-col items-start gap-2 text-left sm:items-center sm:text-center">
<h1 className="text-xl font-medium">{title}</h1>
<p className="text-muted-foreground text-sm text-balance">{description}</p>
<p className="text-sm text-balance text-muted-foreground">{description}</p>
</div>
{children}
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/pages/auth/forgot-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function ForgotPassword({ status }: { status?: string }) {
</div>
</form>

<div className="text-muted-foreground space-x-1 text-center text-sm">
<div className="space-x-1 text-center text-sm text-muted-foreground">
<span>Or, return to</span>
<TextLink href={route('login')}>log in</TextLink>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/pages/auth/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default function Login({ status, canResetPassword }: LoginProps) {
</Button>
</div>

<div className="text-muted-foreground text-center text-sm">
<div className="text-center text-sm text-muted-foreground">
Don't have an account?{' '}
<TextLink href={route('register')} tabIndex={5}>
Sign up
Expand Down
2 changes: 1 addition & 1 deletion resources/js/pages/auth/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default function Register() {
</Button>
</div>

<div className="text-muted-foreground text-center text-sm">
<div className="text-center text-sm text-muted-foreground">
Already have an account?{' '}
<TextLink href={route('login')} tabIndex={6}>
Log in
Expand Down
8 changes: 4 additions & 4 deletions resources/js/pages/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ export default function Dashboard() {
<Head title="Dashboard" />
<div className="flex h-full flex-1 flex-col gap-4 rounded-xl p-4">
<div className="grid auto-rows-min gap-4 md:grid-cols-3">
<div className="border-sidebar-border/70 dark:border-sidebar-border relative aspect-video overflow-hidden rounded-xl border">
<div className="relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border">
<PlaceholderPattern className="absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20" />
</div>
<div className="border-sidebar-border/70 dark:border-sidebar-border relative aspect-video overflow-hidden rounded-xl border">
<div className="relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border">
<PlaceholderPattern className="absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20" />
</div>
<div className="border-sidebar-border/70 dark:border-sidebar-border relative aspect-video overflow-hidden rounded-xl border">
<div className="relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border">
<PlaceholderPattern className="absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20" />
</div>
</div>
<div className="border-sidebar-border/70 dark:border-sidebar-border relative min-h-[100vh] flex-1 overflow-hidden rounded-xl border md:min-h-min">
<div className="relative min-h-[100vh] flex-1 overflow-hidden rounded-xl border border-sidebar-border/70 md:min-h-min dark:border-sidebar-border">
<PlaceholderPattern className="absolute inset-0 size-full stroke-neutral-900/20 dark:stroke-neutral-100/20" />
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/pages/settings/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const breadcrumbs: BreadcrumbItem[] = [
type ProfileForm = {
name: string;
email: string;
}
};

export default function Profile({ mustVerifyEmail, status }: { mustVerifyEmail: boolean; status?: string }) {
const { auth } = usePage<SharedData>().props;
Expand Down Expand Up @@ -84,7 +84,7 @@ export default function Profile({ mustVerifyEmail, status }: { mustVerifyEmail:

{mustVerifyEmail && auth.user.email_verified_at === null && (
<div>
<p className="text-muted-foreground -mt-4 text-sm">
<p className="-mt-4 text-sm text-muted-foreground">
Your email address is unverified.{' '}
<Link
href={route('verification.send')}
Expand Down