diff --git a/.gitignore b/.gitignore index 1c9cf7942..5d9c41e82 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.phpunit.cache +/bootstrap/ssr /node_modules /public/build /public/hot diff --git a/bootstrap/ssr/ssr-manifest.json b/bootstrap/ssr/ssr-manifest.json deleted file mode 100644 index 9b5074084..000000000 --- a/bootstrap/ssr/ssr-manifest.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "resources/js/components/app-header.tsx": [], - "resources/js/components/app-shell.tsx": [], - "resources/js/components/app-sidebar.tsx": [], - "resources/js/components/appearance-tabs.tsx": [], - "resources/js/components/application-logo.tsx": [], - "resources/js/components/delete-user.tsx": [], - "resources/js/components/heading-small.tsx": [], - "resources/js/components/heading.tsx": [], - "resources/js/components/input-error.tsx": [], - "resources/js/components/nav-footer.tsx": [], - "resources/js/components/nav-main.tsx": [], - "resources/js/components/nav-user.tsx": [], - "resources/js/components/text-link.tsx": [], - "resources/js/components/ui/avatar.tsx": [], - "resources/js/components/ui/breadcrumb.tsx": [], - "resources/js/components/ui/button.tsx": [], - "resources/js/components/ui/dialog.tsx": [], - "resources/js/components/ui/dropdown-menu.tsx": [], - "resources/js/components/ui/input.tsx": [], - "resources/js/components/ui/label.tsx": [], - "resources/js/components/ui/separator.tsx": [], - "resources/js/components/ui/sheet.tsx": [], - "resources/js/components/ui/sidebar.tsx": [], - "resources/js/components/ui/skeleton.tsx": [], - "resources/js/components/ui/tooltip.tsx": [], - "resources/js/hooks/use-appearance.tsx": [], - "resources/js/hooks/use-mobile.tsx": [], - "resources/js/layouts/app-layout.tsx": [], - "resources/js/layouts/auth-layout.tsx": [], - "resources/js/layouts/auth/auth-simple-layout.tsx": [], - "resources/js/layouts/settings/layout.tsx": [], - "resources/js/lib/utils.ts": [], - "resources/js/pages/auth/confirm-password.tsx": [], - "resources/js/pages/auth/forgot-password.tsx": [], - "resources/js/pages/auth/login.tsx": [], - "resources/js/pages/auth/register.tsx": [], - "resources/js/pages/auth/reset-password.tsx": [], - "resources/js/pages/auth/verify-email.tsx": [], - "resources/js/pages/dashboard.tsx": [], - "resources/js/pages/settings/appearance.tsx": [], - "resources/js/pages/settings/password.tsx": [], - "resources/js/pages/settings/profile.tsx": [], - "resources/js/pages/welcome.tsx": [], - "resources/js/ssr.jsx": [] -} diff --git a/bootstrap/ssr/ssr.js b/bootstrap/ssr/ssr.js deleted file mode 100644 index 584e33eb4..000000000 --- a/bootstrap/ssr/ssr.js +++ /dev/null @@ -1,2745 +0,0 @@ -import { Transition } from '@headlessui/react'; -import { createInertiaApp, Head, Link, useForm, usePage } from '@inertiajs/react'; -import createServer from '@inertiajs/react/server'; -import * as AvatarPrimitive from '@radix-ui/react-avatar'; -import * as SheetPrimitive from '@radix-ui/react-dialog'; -import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'; -import * as LabelPrimitive from '@radix-ui/react-label'; -import * as SeparatorPrimitive from '@radix-ui/react-separator'; -import { Slot } from '@radix-ui/react-slot'; -import * as TooltipPrimitive from '@radix-ui/react-tooltip'; -import { cva } from 'class-variance-authority'; -import { clsx } from 'clsx'; -import { - BookOpenText, - Check, - ChevronRight, - ChevronsUpDown, - Circle, - FolderGit2, - LayoutDashboard, - LoaderCircle, - LogOut, - Monitor, - Moon, - PanelLeft, - Settings, - Sun, - X, -} from 'lucide-react'; -import * as React from 'react'; -import { Fragment as Fragment$1, useEffect, useRef, useState } from 'react'; -import ReactDOMServer from 'react-dom/server'; -import { Fragment, jsx, jsxs } from 'react/jsx-runtime'; -import { twMerge } from 'tailwind-merge'; -function InputError({ message, className = '', ...props }) { - return message - ? /* @__PURE__ */ jsx('p', { ...props, className: 'text-sm text-red-600 dark:text-red-400 ' + className, children: message }) - : null; -} -function cn(...inputs) { - return twMerge(clsx(inputs)); -} -const buttonVariants = cva( - 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', - { - variants: { - variant: { - default: 'bg-primary text-primary-foreground hover:bg-primary/90', - destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90', - outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground', - secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80', - ghost: 'hover:bg-accent hover:text-accent-foreground', - link: 'text-primary underline-offset-4 hover:underline', - }, - size: { - default: 'h-10 px-4 py-2', - sm: 'h-9 rounded-md px-3', - lg: 'h-11 rounded-md px-8', - icon: 'h-10 w-10', - }, - }, - defaultVariants: { - variant: 'default', - size: 'default', - }, - }, -); -const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : 'button'; - return /* @__PURE__ */ jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props }); -}); -Button.displayName = 'Button'; -const Input = React.forwardRef(({ className, type, ...props }, ref) => { - return /* @__PURE__ */ jsx('input', { - type, - className: cn( - 'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', - className, - ), - ref, - ...props, - }); -}); -Input.displayName = 'Input'; -function ApplicationLogo(props) { - return /* @__PURE__ */ jsx('svg', { - ...props, - viewBox: '0 0 316 316', - xmlns: 'http://www.w3.org/2000/svg', - children: /* @__PURE__ */ jsx('path', { - d: 'M305.8 81.125C305.77 80.995 305.69 80.885 305.65 80.755C305.56 80.525 305.49 80.285 305.37 80.075C305.29 79.935 305.17 79.815 305.07 79.685C304.94 79.515 304.83 79.325 304.68 79.175C304.55 79.045 304.39 78.955 304.25 78.845C304.09 78.715 303.95 78.575 303.77 78.475L251.32 48.275C249.97 47.495 248.31 47.495 246.96 48.275L194.51 78.475C194.33 78.575 194.19 78.725 194.03 78.845C193.89 78.955 193.73 79.045 193.6 79.175C193.45 79.325 193.34 79.515 193.21 79.685C193.11 79.815 192.99 79.935 192.91 80.075C192.79 80.285 192.71 80.525 192.63 80.755C192.58 80.875 192.51 80.995 192.48 81.125C192.38 81.495 192.33 81.875 192.33 82.265V139.625L148.62 164.795V52.575C148.62 52.185 148.57 51.805 148.47 51.435C148.44 51.305 148.36 51.195 148.32 51.065C148.23 50.835 148.16 50.595 148.04 50.385C147.96 50.245 147.84 50.125 147.74 49.995C147.61 49.825 147.5 49.635 147.35 49.485C147.22 49.355 147.06 49.265 146.92 49.155C146.76 49.025 146.62 48.885 146.44 48.785L93.99 18.585C92.64 17.805 90.98 17.805 89.63 18.585L37.18 48.785C37 48.885 36.86 49.035 36.7 49.155C36.56 49.265 36.4 49.355 36.27 49.485C36.12 49.635 36.01 49.825 35.88 49.995C35.78 50.125 35.66 50.245 35.58 50.385C35.46 50.595 35.38 50.835 35.3 51.065C35.25 51.185 35.18 51.305 35.15 51.435C35.05 51.805 35 52.185 35 52.575V232.235C35 233.795 35.84 235.245 37.19 236.025L142.1 296.425C142.33 296.555 142.58 296.635 142.82 296.725C142.93 296.765 143.04 296.835 143.16 296.865C143.53 296.965 143.9 297.015 144.28 297.015C144.66 297.015 145.03 296.965 145.4 296.865C145.5 296.835 145.59 296.775 145.69 296.745C145.95 296.655 146.21 296.565 146.45 296.435L251.36 236.035C252.72 235.255 253.55 233.815 253.55 232.245V174.885L303.81 145.945C305.17 145.165 306 143.725 306 142.155V82.265C305.95 81.875 305.89 81.495 305.8 81.125ZM144.2 227.205L100.57 202.515L146.39 176.135L196.66 147.195L240.33 172.335L208.29 190.625L144.2 227.205ZM244.75 114.995V164.795L226.39 154.225L201.03 139.625V89.825L219.39 100.395L244.75 114.995ZM249.12 57.105L292.81 82.265L249.12 107.425L205.43 82.265L249.12 57.105ZM114.49 184.425L96.13 194.995V85.305L121.49 70.705L139.85 60.135V169.815L114.49 184.425ZM91.76 27.425L135.45 52.585L91.76 77.745L48.07 52.585L91.76 27.425ZM43.67 60.135L62.03 70.705L87.39 85.305V202.545V202.555V202.565C87.39 202.735 87.44 202.895 87.46 203.055C87.49 203.265 87.49 203.485 87.55 203.695V203.705C87.6 203.875 87.69 204.035 87.76 204.195C87.84 204.375 87.89 204.575 87.99 204.745C87.99 204.745 87.99 204.755 88 204.755C88.09 204.905 88.22 205.035 88.33 205.175C88.45 205.335 88.55 205.495 88.69 205.635L88.7 205.645C88.82 205.765 88.98 205.855 89.12 205.965C89.28 206.085 89.42 206.225 89.59 206.325C89.6 206.325 89.6 206.325 89.61 206.335C89.62 206.335 89.62 206.345 89.63 206.345L139.87 234.775V285.065L43.67 229.705V60.135ZM244.75 229.705L148.58 285.075V234.775L219.8 194.115L244.75 179.875V229.705ZM297.2 139.625L253.49 164.795V114.995L278.85 100.395L297.21 89.825V139.625H297.2Z', - }), - }); -} -function AuthSimpleLayout({ children, title, description }) { - return /* @__PURE__ */ jsx('div', { - className: 'flex min-h-svh flex-col items-center justify-center gap-6 bg-background p-6 md:p-10', - children: /* @__PURE__ */ jsx('div', { - className: 'w-full max-w-sm', - children: /* @__PURE__ */ jsxs('div', { - className: 'flex flex-col gap-6', - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'flex flex-col items-center gap-2', - children: [ - /* @__PURE__ */ jsxs(Link, { - href: route('home'), - className: 'flex flex-col items-center gap-2 font-medium', - children: [ - /* @__PURE__ */ jsx('div', { - className: 'flex h-10 w-10 items-center justify-center rounded-md', - children: /* @__PURE__ */ jsx(ApplicationLogo, { - className: 'size-10 fill-current text-black dark:text-white', - }), - }), - /* @__PURE__ */ jsx('span', { className: 'sr-only', children: title }), - ], - }), - /* @__PURE__ */ jsx('h1', { className: 'text-xl font-bold', children: title }), - /* @__PURE__ */ jsx('p', { className: 'text-center text-sm', children: description }), - ], - }), - children, - ], - }), - }), - }); -} -function AuthLayout({ - children, - ...props - // Collect all other props passed to this component -}) { - return /* @__PURE__ */ jsx(AuthSimpleLayout, { ...props, children }); -} -function ConfirmPassword() { - const { data, setData, post, processing, errors, reset } = useForm({ - password: '', - }); - const submit = (e) => { - e.preventDefault(); - post(route('password.confirm'), { - onFinish: () => reset('password'), - }); - }; - return /* @__PURE__ */ jsxs(AuthLayout, { - title: 'Confirm Your Password', - description: 'This is a secure area of the application. Please confirm your password before continuing', - children: [ - /* @__PURE__ */ jsx(Head, { title: 'Confirm Password' }), - /* @__PURE__ */ jsx('form', { - onSubmit: submit, - children: /* @__PURE__ */ jsxs('div', { - class: 'space-y-6', - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Input, { - id: 'password', - type: 'password', - name: 'password', - placeholder: 'Password', - autoComplete: 'current-password', - value: data.password, - autoFocus: true, - onChange: (e) => setData('password', e.target.value), - }), - /* @__PURE__ */ jsx(InputError, { message: errors.password }), - ], - }), - /* @__PURE__ */ jsx('div', { - className: 'flex items-center', - children: /* @__PURE__ */ jsxs(Button, { - className: 'w-full', - disabled: processing, - children: [ - processing && /* @__PURE__ */ jsx(LoaderCircle, { className: 'h-4 w-4 animate-spin' }), - 'Confirm Password', - ], - }), - }), - ], - }), - }), - ], - }); -} -const __vite_glob_0_0 = /* @__PURE__ */ Object.freeze( - /* @__PURE__ */ Object.defineProperty( - { - __proto__: null, - default: ConfirmPassword, - }, - Symbol.toStringTag, - { value: 'Module' }, - ), -); -function TextLink({ className = '', children, ...props }) { - return /* @__PURE__ */ jsx(Link, { - className: `underline decoration-neutral-400 underline-offset-2 duration-300 ease-out hover:decoration-neutral-700 ${className}`, - ...props, - children, - }); -} -const labelVariants = cva('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70'); -const Label = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }), -); -Label.displayName = LabelPrimitive.Root.displayName; -function ForgotPassword({ status }) { - const { data, setData, post, processing, errors } = useForm({ - email: '', - }); - const submit = (e) => { - e.preventDefault(); - post(route('password.email')); - }; - return /* @__PURE__ */ jsxs(AuthLayout, { - title: 'Forgot Password', - description: 'Enter your email to receive a password reset link', - children: [ - /* @__PURE__ */ jsx(Head, { title: 'Forgot Password' }), - status && /* @__PURE__ */ jsx('div', { className: 'mb-4 text-sm font-medium text-green-600', children: status }), - /* @__PURE__ */ jsxs('div', { - className: 'space-y-6', - children: [ - /* @__PURE__ */ jsxs('form', { - onSubmit: submit, - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'email', children: 'Email Address' }), - /* @__PURE__ */ jsx(Input, { - id: 'email', - type: 'email', - name: 'email', - autoComplete: 'off', - value: data.email, - autoFocus: true, - onChange: (e) => setData('email', e.target.value), - }), - /* @__PURE__ */ jsx(InputError, { message: errors.email, className: 'mt-2' }), - ], - }), - /* @__PURE__ */ jsx('div', { - className: 'my-6 flex items-center justify-start', - children: /* @__PURE__ */ jsxs(Button, { - className: 'w-full', - disabled: processing, - children: [ - processing && /* @__PURE__ */ jsx(LoaderCircle, { className: 'h-4 w-4 animate-spin' }), - 'Email Password Reset Link', - ], - }), - }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'space-x-1 text-center text-sm', - children: [ - /* @__PURE__ */ jsx('span', { children: 'Or, return to the' }), - /* @__PURE__ */ jsx(TextLink, { href: route('login'), children: 'login page' }), - ], - }), - ], - }), - ], - }); -} -const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze( - /* @__PURE__ */ Object.defineProperty( - { - __proto__: null, - default: ForgotPassword, - }, - Symbol.toStringTag, - { value: 'Module' }, - ), -); -function Login({ status, canResetPassword }) { - const { data, setData, post, processing, errors, reset } = useForm({ - email: '', - password: '', - remember: false, - }); - const submit = (e) => { - e.preventDefault(); - post(route('login'), { - onFinish: () => reset('password'), - }); - }; - return /* @__PURE__ */ jsxs(AuthLayout, { - title: 'Log in to your account', - description: 'Enter your email and password below to log in', - children: [ - /* @__PURE__ */ jsx(Head, { title: 'Log in' }), - status && /* @__PURE__ */ jsx('div', { className: 'mb-4 text-center text-sm font-medium text-green-600', children: status }), - /* @__PURE__ */ jsxs('form', { - className: 'flex flex-col gap-6', - onSubmit: submit, - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-6', - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'email', children: 'Email Address' }), - /* @__PURE__ */ jsx(Input, { - id: 'email', - type: 'email', - required: true, - autoFocus: true, - tabIndex: 1, - autoComplete: 'email', - value: data.email, - onChange: (e) => setData('email', e.target.value), - }), - /* @__PURE__ */ jsx(InputError, { message: errors.email }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'flex items-center', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'password', children: 'Password' }), - canResetPassword && - /* @__PURE__ */ jsx(TextLink, { - href: route('password.request'), - className: 'ml-auto text-sm', - tabIndex: 5, - children: 'Forgot your password?', - }), - ], - }), - /* @__PURE__ */ jsx(Input, { - id: 'password', - type: 'password', - required: true, - tabIndex: 2, - autoComplete: 'current-password', - value: data.password, - onChange: (e) => setData('password', e.target.value), - }), - /* @__PURE__ */ jsx(InputError, { message: errors.password }), - ], - }), - /* @__PURE__ */ jsxs(Button, { - type: 'submit', - className: 'w-full', - tabIndex: 3, - disabled: processing, - children: [processing && /* @__PURE__ */ jsx(LoaderCircle, { className: 'h-4 w-4 animate-spin' }), 'Log In'], - }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'text-center text-sm', - children: [ - "Don't have an account?", - ' ', - /* @__PURE__ */ jsx(TextLink, { href: route('register'), tabIndex: 4, children: 'Sign up' }), - ], - }), - ], - }), - ], - }); -} -const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze( - /* @__PURE__ */ Object.defineProperty( - { - __proto__: null, - default: Login, - }, - Symbol.toStringTag, - { value: 'Module' }, - ), -); -function Register() { - const { data, setData, post, processing, errors, reset } = useForm({ - name: '', - email: '', - password: '', - password_confirmation: '', - }); - const submit = (e) => { - e.preventDefault(); - post(route('register'), { - onFinish: () => reset('password', 'password_confirmation'), - }); - }; - return /* @__PURE__ */ jsxs(AuthLayout, { - title: 'Create an account', - description: 'Enter your information below to create your account', - children: [ - /* @__PURE__ */ jsx(Head, { title: 'Register' }), - /* @__PURE__ */ jsxs('form', { - className: 'flex flex-col gap-6', - onSubmit: submit, - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-6', - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'name', children: 'Name' }), - /* @__PURE__ */ jsx(Input, { - id: 'name', - type: 'text', - required: true, - autoFocus: true, - tabIndex: 1, - autoComplete: 'name', - value: data.name, - onChange: (e) => setData('name', e.target.value), - disabled: processing, - }), - /* @__PURE__ */ jsx(InputError, { message: errors.name, className: 'mt-2' }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'email', children: 'Email address' }), - /* @__PURE__ */ jsx(Input, { - id: 'email', - type: 'email', - required: true, - tabIndex: 2, - autoComplete: 'email', - value: data.email, - onChange: (e) => setData('email', e.target.value), - disabled: processing, - }), - /* @__PURE__ */ jsx(InputError, { message: errors.email }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'password', children: 'Password' }), - /* @__PURE__ */ jsx(Input, { - id: 'password', - type: 'password', - required: true, - tabIndex: 3, - autoComplete: 'new-password', - value: data.password, - onChange: (e) => setData('password', e.target.value), - disabled: processing, - }), - /* @__PURE__ */ jsx(InputError, { message: errors.password }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'password_confirmation', children: 'Confirm password' }), - /* @__PURE__ */ jsx(Input, { - id: 'password_confirmation', - type: 'password', - required: true, - tabIndex: 4, - autoComplete: 'new-password', - value: data.password_confirmation, - onChange: (e) => setData('password_confirmation', e.target.value), - disabled: processing, - }), - /* @__PURE__ */ jsx(InputError, { message: errors.password_confirmation }), - ], - }), - /* @__PURE__ */ jsxs(Button, { - type: 'submit', - className: 'w-full', - tabIndex: 5, - disabled: processing, - children: [processing && /* @__PURE__ */ jsx(LoaderCircle, { className: 'h-4 w-4 animate-spin' }), 'Create Account'], - }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'text-center text-sm', - children: [ - 'Already have an account?', - ' ', - /* @__PURE__ */ jsx(TextLink, { href: route('login'), tabIndex: 6, children: 'Log in' }), - ], - }), - ], - }), - ], - }); -} -const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze( - /* @__PURE__ */ Object.defineProperty( - { - __proto__: null, - default: Register, - }, - Symbol.toStringTag, - { value: 'Module' }, - ), -); -function ResetPassword({ token, email }) { - const { data, setData, post, processing, errors, reset } = useForm({ - token, - email, - password: '', - password_confirmation: '', - }); - const submit = (e) => { - e.preventDefault(); - post(route('password.store'), { - onFinish: () => reset('password', 'password_confirmation'), - }); - }; - return /* @__PURE__ */ jsxs(AuthLayout, { - title: 'Reset Password', - description: 'Please enter your new password below', - children: [ - /* @__PURE__ */ jsx(Head, { title: 'Reset Password' }), - /* @__PURE__ */ jsx('form', { - onSubmit: submit, - children: /* @__PURE__ */ jsxs('div', { - className: 'grid gap-6', - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'email', children: 'Email' }), - /* @__PURE__ */ jsx(Input, { - id: 'email', - type: 'email', - name: 'email', - autoComplete: 'email', - value: data.email, - className: 'mt-1 block w-full', - readOnly: true, - onChange: (e) => setData('email', e.target.value), - }), - /* @__PURE__ */ jsx(InputError, { message: errors.email, className: 'mt-2' }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'password', children: 'Password' }), - /* @__PURE__ */ jsx(Input, { - id: 'password', - type: 'password', - name: 'password', - autoComplete: 'new-password', - value: data.password, - className: 'mt-1 block w-full', - autoFocus: true, - onChange: (e) => setData('password', e.target.value), - }), - /* @__PURE__ */ jsx(InputError, { message: errors.password, className: 'mt-2' }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'password_confirmation', children: 'Confirm Password' }), - /* @__PURE__ */ jsx(Input, { - id: 'password_confirmation', - type: 'password', - name: 'password_confirmation', - autoComplete: 'new-password', - value: data.password_confirmation, - className: 'mt-1 block w-full', - onChange: (e) => setData('password_confirmation', e.target.value), - }), - /* @__PURE__ */ jsx(InputError, { message: errors.password_confirmation, className: 'mt-2' }), - ], - }), - /* @__PURE__ */ jsxs(Button, { - type: 'submit', - className: 'w-full', - disabled: processing, - children: [processing && /* @__PURE__ */ jsx(LoaderCircle, { className: 'h-4 w-4 animate-spin' }), 'Reset Password'], - }), - ], - }), - }), - ], - }); -} -const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze( - /* @__PURE__ */ Object.defineProperty( - { - __proto__: null, - default: ResetPassword, - }, - Symbol.toStringTag, - { value: 'Module' }, - ), -); -function VerifyEmail({ status }) { - const { post, processing } = useForm({}); - const submit = (e) => { - e.preventDefault(); - post(route('verification.send')); - }; - return /* @__PURE__ */ jsxs(AuthLayout, { - children: [ - /* @__PURE__ */ jsx(Head, { title: 'Email Verification' }), - /* @__PURE__ */ jsx('div', { - className: 'mb-4 text-sm text-gray-600', - children: - "Thanks for signing up! Before getting started, could you verify your email address by clicking on the link we just emailed to you? If you didn't receive the email, we will gladly send you another", - }), - status === 'verification-link-sent' && - /* @__PURE__ */ jsx('div', { - className: 'mb-4 text-sm font-medium text-green-600', - children: 'A new verification link has been sent to the email address you provided during registration', - }), - /* @__PURE__ */ jsx('form', { - onSubmit: submit, - children: /* @__PURE__ */ jsxs('div', { - className: 'mt-4 flex items-center justify-between', - children: [ - /* @__PURE__ */ jsxs(Button, { - disabled: processing, - children: [ - processing && /* @__PURE__ */ jsx(LoaderCircle, { className: 'h-4 w-4 animate-spin' }), - 'Resend Verification Email', - ], - }), - /* @__PURE__ */ jsx(Link, { - href: route('logout'), - method: 'post', - as: 'button', - className: - 'rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2', - children: 'Log Out', - }), - ], - }), - }), - ], - }); -} -const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze( - /* @__PURE__ */ Object.defineProperty( - { - __proto__: null, - default: VerifyEmail, - }, - Symbol.toStringTag, - { value: 'Module' }, - ), -); -const Breadcrumb = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx('nav', { ref, 'aria-label': 'breadcrumb', ...props })); -Breadcrumb.displayName = 'Breadcrumb'; -const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx('ol', { - ref, - className: cn('flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5', className), - ...props, - }), -); -BreadcrumbList.displayName = 'BreadcrumbList'; -const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx('li', { ref, className: cn('inline-flex items-center gap-1.5', className), ...props }), -); -BreadcrumbItem.displayName = 'BreadcrumbItem'; -const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => { - const Comp = asChild ? Slot : 'a'; - return /* @__PURE__ */ jsx(Comp, { ref, className: cn('transition-colors hover:text-foreground', className), ...props }); -}); -BreadcrumbLink.displayName = 'BreadcrumbLink'; -const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx('span', { - ref, - role: 'link', - 'aria-disabled': 'true', - 'aria-current': 'page', - className: cn('font-normal text-foreground', className), - ...props, - }), -); -BreadcrumbPage.displayName = 'BreadcrumbPage'; -const BreadcrumbSeparator = ({ children, className, ...props }) => - /* @__PURE__ */ jsx('li', { - role: 'presentation', - 'aria-hidden': 'true', - className: cn('[&>svg]:h-3.5 [&>svg]:w-3.5', className), - ...props, - children: children ?? /* @__PURE__ */ jsx(ChevronRight, {}), - }); -BreadcrumbSeparator.displayName = 'BreadcrumbSeparator'; -const Separator = React.forwardRef(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => - /* @__PURE__ */ jsx(SeparatorPrimitive.Root, { - ref, - decorative, - orientation, - className: cn('shrink-0 bg-border', orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]', className), - ...props, - }), -); -Separator.displayName = SeparatorPrimitive.Root.displayName; -const Sheet = SheetPrimitive.Root; -const SheetPortal = SheetPrimitive.Portal; -const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx(SheetPrimitive.Overlay, { - className: cn( - 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0', - className, - ), - ...props, - ref, - }), -); -SheetOverlay.displayName = SheetPrimitive.Overlay.displayName; -const sheetVariants = cva( - 'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500', - { - variants: { - side: { - top: 'inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top', - bottom: 'inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom', - left: 'inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm', - right: 'inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm', - }, - }, - defaultVariants: { - side: 'right', - }, - }, -); -const SheetContent = React.forwardRef(({ side = 'right', className, children, ...props }, ref) => - /* @__PURE__ */ jsxs(SheetPortal, { - children: [ - /* @__PURE__ */ jsx(SheetOverlay, {}), - /* @__PURE__ */ jsxs(SheetPrimitive.Content, { - ref, - className: cn(sheetVariants({ side }), className), - ...props, - children: [ - children, - /* @__PURE__ */ jsxs(SheetPrimitive.Close, { - className: - 'absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary', - children: [ - /* @__PURE__ */ jsx(X, { className: 'h-4 w-4' }), - /* @__PURE__ */ jsx('span', { className: 'sr-only', children: 'Close' }), - ], - }), - ], - }), - ], - }), -); -SheetContent.displayName = SheetPrimitive.Content.displayName; -const SheetTitle = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx(SheetPrimitive.Title, { ref, className: cn('text-lg font-semibold text-foreground', className), ...props }), -); -SheetTitle.displayName = SheetPrimitive.Title.displayName; -const SheetDescription = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx(SheetPrimitive.Description, { ref, className: cn('text-sm text-muted-foreground', className), ...props }), -); -SheetDescription.displayName = SheetPrimitive.Description.displayName; -function Skeleton({ className, ...props }) { - return /* @__PURE__ */ jsx('div', { className: cn('animate-pulse rounded-md bg-muted', className), ...props }); -} -const TooltipProvider = TooltipPrimitive.Provider; -const Tooltip = TooltipPrimitive.Root; -const TooltipTrigger = TooltipPrimitive.Trigger; -const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => - /* @__PURE__ */ jsx(TooltipPrimitive.Content, { - ref, - sideOffset, - className: cn( - 'z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', - className, - ), - ...props, - }), -); -TooltipContent.displayName = TooltipPrimitive.Content.displayName; -const MOBILE_BREAKPOINT = 768; -function useIsMobile() { - const [isMobile, setIsMobile] = React.useState(void 0); - React.useEffect(() => { - const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`); - const onChange = () => { - setIsMobile(window.innerWidth < MOBILE_BREAKPOINT); - }; - mql.addEventListener('change', onChange); - setIsMobile(window.innerWidth < MOBILE_BREAKPOINT); - return () => mql.removeEventListener('change', onChange); - }, []); - return !!isMobile; -} -const SIDEBAR_COOKIE_NAME = 'sidebar:state'; -const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7; -const SIDEBAR_WIDTH = '16rem'; -const SIDEBAR_WIDTH_MOBILE = '18rem'; -const SIDEBAR_WIDTH_ICON = '3rem'; -const SIDEBAR_KEYBOARD_SHORTCUT = 'b'; -const SidebarContext = React.createContext(null); -function useSidebar() { - const context = React.useContext(SidebarContext); - if (!context) { - throw new Error('useSidebar must be used within a SidebarProvider.'); - } - return context; -} -const SidebarProvider = React.forwardRef( - ({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref) => { - const isMobile = useIsMobile(); - const [openMobile, setOpenMobile] = React.useState(false); - const [_open, _setOpen] = React.useState(defaultOpen); - const open = openProp ?? _open; - const setOpen = React.useCallback( - (value) => { - const openState = typeof value === 'function' ? value(open) : value; - if (setOpenProp) { - setOpenProp(openState); - } else { - _setOpen(openState); - } - document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`; - }, - [setOpenProp, open], - ); - const toggleSidebar = React.useCallback(() => { - return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2); - }, [isMobile, setOpen, setOpenMobile]); - React.useEffect(() => { - const handleKeyDown = (event) => { - if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) { - event.preventDefault(); - toggleSidebar(); - } - }; - window.addEventListener('keydown', handleKeyDown); - return () => window.removeEventListener('keydown', handleKeyDown); - }, [toggleSidebar]); - const state = open ? 'expanded' : 'collapsed'; - const contextValue = React.useMemo( - () => ({ - state, - open, - setOpen, - isMobile, - openMobile, - setOpenMobile, - toggleSidebar, - }), - [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar], - ); - return /* @__PURE__ */ jsx(SidebarContext.Provider, { - value: contextValue, - children: /* @__PURE__ */ jsx(TooltipProvider, { - delayDuration: 0, - children: /* @__PURE__ */ jsx('div', { - style: { - '--sidebar-width': SIDEBAR_WIDTH, - '--sidebar-width-icon': SIDEBAR_WIDTH_ICON, - ...style, - }, - className: cn('group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar', className), - ref, - ...props, - children, - }), - }), - }); - }, -); -SidebarProvider.displayName = 'SidebarProvider'; -const Sidebar = React.forwardRef(({ side = 'left', variant = 'sidebar', collapsible = 'offcanvas', className, children, ...props }, ref) => { - const { isMobile, state, openMobile, setOpenMobile } = useSidebar(); - if (collapsible === 'none') { - return /* @__PURE__ */ jsx('div', { - className: cn('flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground', className), - ref, - ...props, - children, - }); - } - if (isMobile) { - return /* @__PURE__ */ jsx(Sheet, { - open: openMobile, - onOpenChange: setOpenMobile, - ...props, - children: /* @__PURE__ */ jsx(SheetContent, { - 'data-sidebar': 'sidebar', - 'data-mobile': 'true', - className: 'w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden', - style: { - '--sidebar-width': SIDEBAR_WIDTH_MOBILE, - }, - side, - children: /* @__PURE__ */ jsx('div', { className: 'flex h-full w-full flex-col', children }), - }), - }); - } - return /* @__PURE__ */ jsxs('div', { - ref, - className: 'group peer hidden text-sidebar-foreground md:block', - 'data-state': state, - 'data-collapsible': state === 'collapsed' ? collapsible : '', - 'data-variant': variant, - 'data-side': side, - children: [ - /* @__PURE__ */ jsx('div', { - className: cn( - 'relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear', - 'group-data-[collapsible=offcanvas]:w-0', - 'group-data-[side=right]:rotate-180', - variant === 'floating' || variant === 'inset' - ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]' - : 'group-data-[collapsible=icon]:w-[--sidebar-width-icon]', - ), - }), - /* @__PURE__ */ jsx('div', { - className: cn( - 'fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex', - side === 'left' - ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]' - : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]', - // Adjust the padding for floating and inset variants. - variant === 'floating' || variant === 'inset' - ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]' - : 'group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l', - className, - ), - ...props, - children: /* @__PURE__ */ jsx('div', { - 'data-sidebar': 'sidebar', - className: - 'flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow', - children, - }), - }), - ], - }); -}); -Sidebar.displayName = 'Sidebar'; -const SidebarTrigger = React.forwardRef(({ className, onClick, ...props }, ref) => { - const { toggleSidebar } = useSidebar(); - return /* @__PURE__ */ jsxs(Button, { - ref, - 'data-sidebar': 'trigger', - variant: 'ghost', - size: 'icon', - className: cn('h-7 w-7', className), - onClick: (event) => { - onClick == null ? void 0 : onClick(event); - toggleSidebar(); - }, - ...props, - children: [/* @__PURE__ */ jsx(PanelLeft, {}), /* @__PURE__ */ jsx('span', { className: 'sr-only', children: 'Toggle Sidebar' })], - }); -}); -SidebarTrigger.displayName = 'SidebarTrigger'; -const SidebarRail = React.forwardRef(({ className, ...props }, ref) => { - const { toggleSidebar } = useSidebar(); - return /* @__PURE__ */ jsx('button', { - ref, - 'data-sidebar': 'rail', - 'aria-label': 'Toggle Sidebar', - tabIndex: -1, - onClick: toggleSidebar, - title: 'Toggle Sidebar', - className: cn( - 'absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex', - '[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize', - '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize', - 'group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar', - '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2', - '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2', - className, - ), - ...props, - }); -}); -SidebarRail.displayName = 'SidebarRail'; -const SidebarInset = React.forwardRef(({ className, ...props }, ref) => { - return /* @__PURE__ */ jsx('main', { - ref, - className: cn( - 'relative flex min-h-svh flex-1 flex-col bg-background', - 'peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow', - className, - ), - ...props, - }); -}); -SidebarInset.displayName = 'SidebarInset'; -const SidebarInput = React.forwardRef(({ className, ...props }, ref) => { - return /* @__PURE__ */ jsx(Input, { - ref, - 'data-sidebar': 'input', - className: cn('h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring', className), - ...props, - }); -}); -SidebarInput.displayName = 'SidebarInput'; -const SidebarHeader = React.forwardRef(({ className, ...props }, ref) => { - return /* @__PURE__ */ jsx('div', { ref, 'data-sidebar': 'header', className: cn('flex flex-col gap-2 p-2', className), ...props }); -}); -SidebarHeader.displayName = 'SidebarHeader'; -const SidebarFooter = React.forwardRef(({ className, ...props }, ref) => { - return /* @__PURE__ */ jsx('div', { ref, 'data-sidebar': 'footer', className: cn('flex flex-col gap-2 p-2', className), ...props }); -}); -SidebarFooter.displayName = 'SidebarFooter'; -const SidebarSeparator = React.forwardRef(({ className, ...props }, ref) => { - return /* @__PURE__ */ jsx(Separator, { ref, 'data-sidebar': 'separator', className: cn('mx-2 w-auto bg-sidebar-border', className), ...props }); -}); -SidebarSeparator.displayName = 'SidebarSeparator'; -const SidebarContent = React.forwardRef(({ className, ...props }, ref) => { - return /* @__PURE__ */ jsx('div', { - ref, - 'data-sidebar': 'content', - className: cn('flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden', className), - ...props, - }); -}); -SidebarContent.displayName = 'SidebarContent'; -const SidebarGroup = React.forwardRef(({ className, ...props }, ref) => { - return /* @__PURE__ */ jsx('div', { - ref, - 'data-sidebar': 'group', - className: cn('relative flex w-full min-w-0 flex-col p-2', className), - ...props, - }); -}); -SidebarGroup.displayName = 'SidebarGroup'; -const SidebarGroupLabel = React.forwardRef(({ className, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : 'div'; - return /* @__PURE__ */ jsx(Comp, { - ref, - 'data-sidebar': 'group-label', - className: cn( - 'flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0', - 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0', - className, - ), - ...props, - }); -}); -SidebarGroupLabel.displayName = 'SidebarGroupLabel'; -const SidebarGroupAction = React.forwardRef(({ className, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : 'button'; - return /* @__PURE__ */ jsx(Comp, { - ref, - 'data-sidebar': 'group-action', - className: cn( - 'absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0', - // Increases the hit area of the button on mobile. - 'after:absolute after:-inset-2 after:md:hidden', - 'group-data-[collapsible=icon]:hidden', - className, - ), - ...props, - }); -}); -SidebarGroupAction.displayName = 'SidebarGroupAction'; -const SidebarGroupContent = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx('div', { ref, 'data-sidebar': 'group-content', className: cn('w-full text-sm', className), ...props }), -); -SidebarGroupContent.displayName = 'SidebarGroupContent'; -const SidebarMenu = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx('ul', { ref, 'data-sidebar': 'menu', className: cn('flex w-full min-w-0 flex-col gap-1', className), ...props }), -); -SidebarMenu.displayName = 'SidebarMenu'; -const SidebarMenuItem = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx('li', { ref, 'data-sidebar': 'menu-item', className: cn('group/menu-item relative', className), ...props }), -); -SidebarMenuItem.displayName = 'SidebarMenuItem'; -const sidebarMenuButtonVariants = cva( - 'peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', - { - variants: { - variant: { - default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground', - outline: - 'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]', - }, - size: { - default: 'h-8 text-sm', - sm: 'h-7 text-xs', - lg: 'h-12 text-sm group-data-[collapsible=icon]:!p-0', - }, - }, - defaultVariants: { - variant: 'default', - size: 'default', - }, - }, -); -const SidebarMenuButton = React.forwardRef( - ({ asChild = false, isActive = false, variant = 'default', size = 'default', tooltip, className, ...props }, ref) => { - const Comp = asChild ? Slot : 'button'; - const { isMobile, state } = useSidebar(); - const button = /* @__PURE__ */ jsx(Comp, { - ref, - 'data-sidebar': 'menu-button', - 'data-size': size, - 'data-active': isActive, - className: cn(sidebarMenuButtonVariants({ variant, size }), className), - ...props, - }); - if (!tooltip) { - return button; - } - if (typeof tooltip === 'string') { - tooltip = { - children: tooltip, - }; - } - return /* @__PURE__ */ jsxs(Tooltip, { - children: [ - /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }), - /* @__PURE__ */ jsx(TooltipContent, { side: 'right', align: 'center', hidden: state !== 'collapsed' || isMobile, ...tooltip }), - ], - }); - }, -); -SidebarMenuButton.displayName = 'SidebarMenuButton'; -const SidebarMenuAction = React.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => { - const Comp = asChild ? Slot : 'button'; - return /* @__PURE__ */ jsx(Comp, { - ref, - 'data-sidebar': 'menu-action', - className: cn( - 'absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0', - // Increases the hit area of the button on mobile. - 'after:absolute after:-inset-2 after:md:hidden', - 'peer-data-[size=sm]/menu-button:top-1', - 'peer-data-[size=default]/menu-button:top-1.5', - 'peer-data-[size=lg]/menu-button:top-2.5', - 'group-data-[collapsible=icon]:hidden', - showOnHover && - 'group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0', - className, - ), - ...props, - }); -}); -SidebarMenuAction.displayName = 'SidebarMenuAction'; -const SidebarMenuBadge = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx('div', { - ref, - 'data-sidebar': 'menu-badge', - className: cn( - 'pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground', - 'peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground', - 'peer-data-[size=sm]/menu-button:top-1', - 'peer-data-[size=default]/menu-button:top-1.5', - 'peer-data-[size=lg]/menu-button:top-2.5', - 'group-data-[collapsible=icon]:hidden', - className, - ), - ...props, - }), -); -SidebarMenuBadge.displayName = 'SidebarMenuBadge'; -const SidebarMenuSkeleton = React.forwardRef(({ className, showIcon = false, ...props }, ref) => { - const width = React.useMemo(() => { - return `${Math.floor(Math.random() * 40) + 50}%`; - }, []); - return /* @__PURE__ */ jsxs('div', { - ref, - 'data-sidebar': 'menu-skeleton', - className: cn('flex h-8 items-center gap-2 rounded-md px-2', className), - ...props, - children: [ - showIcon && /* @__PURE__ */ jsx(Skeleton, { className: 'size-4 rounded-md', 'data-sidebar': 'menu-skeleton-icon' }), - /* @__PURE__ */ jsx(Skeleton, { - className: 'h-4 max-w-[--skeleton-width] flex-1', - 'data-sidebar': 'menu-skeleton-text', - style: { - '--skeleton-width': width, - }, - }), - ], - }); -}); -SidebarMenuSkeleton.displayName = 'SidebarMenuSkeleton'; -const SidebarMenuSub = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx('ul', { - ref, - 'data-sidebar': 'menu-sub', - className: cn( - 'mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5', - 'group-data-[collapsible=icon]:hidden', - className, - ), - ...props, - }), -); -SidebarMenuSub.displayName = 'SidebarMenuSub'; -const SidebarMenuSubItem = React.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx('li', { ref, ...props })); -SidebarMenuSubItem.displayName = 'SidebarMenuSubItem'; -const SidebarMenuSubButton = React.forwardRef(({ asChild = false, size = 'md', isActive, className, ...props }, ref) => { - const Comp = asChild ? Slot : 'a'; - return /* @__PURE__ */ jsx(Comp, { - ref, - 'data-sidebar': 'menu-sub-button', - 'data-size': size, - 'data-active': isActive, - className: cn( - 'flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground', - 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground', - size === 'sm' && 'text-xs', - size === 'md' && 'text-sm', - 'group-data-[collapsible=icon]:hidden', - className, - ), - ...props, - }); -}); -SidebarMenuSubButton.displayName = 'SidebarMenuSubButton'; -function AppHeader({ breadcrumbs: breadcrumbs2 = [] }) { - return /* @__PURE__ */ jsx('header', { - className: - 'flex h-16 shrink-0 items-center gap-2 px-4 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12', - children: /* @__PURE__ */ jsxs('div', { - className: 'flex items-center gap-2', - children: [ - /* @__PURE__ */ jsx(SidebarTrigger, { className: '-ml-1' }), - breadcrumbs2.length > 0 && - /* @__PURE__ */ jsx(Fragment, { - children: /* @__PURE__ */ jsx(Breadcrumb, { - children: /* @__PURE__ */ jsx(BreadcrumbList, { - children: breadcrumbs2.map((item, index) => { - const isLast = index === breadcrumbs2.length - 1; - return /* @__PURE__ */ jsxs( - Fragment$1, - { - children: [ - /* @__PURE__ */ jsx(BreadcrumbItem, { - children: isLast - ? /* @__PURE__ */ jsx(BreadcrumbPage, { children: item.title }) - : /* @__PURE__ */ jsx(BreadcrumbLink, { href: item.href, children: item.title }), - }), - !isLast && /* @__PURE__ */ jsx(BreadcrumbSeparator, {}), - ], - }, - index, - ); - }), - }), - }), - }), - ], - }), - }); -} -function AppShell({ children }) { - const [isOpen, setIsOpen] = useState(() => (typeof window !== 'undefined' ? localStorage.getItem('sidebar') !== 'false' : true)); - const handleSidebarChange = (open) => { - setIsOpen(open); - if (typeof window !== 'undefined') { - localStorage.setItem('sidebar', String(open)); - } - }; - return /* @__PURE__ */ jsx(SidebarProvider, { defaultOpen: isOpen, open: isOpen, onOpenChange: handleSidebarChange, children }); -} -function NavFooter({ items, className, ...props }) { - return /* @__PURE__ */ jsx(SidebarGroup, { - ...props, - className: `group-data-[collapsible=icon]:p-0 ${className || ''}`, - children: /* @__PURE__ */ jsx(SidebarGroupContent, { - children: /* @__PURE__ */ jsx(SidebarMenu, { - children: items.map((item) => - /* @__PURE__ */ jsx( - SidebarMenuItem, - { - children: /* @__PURE__ */ jsx(SidebarMenuButton, { - asChild: true, - className: 'text-neutral-600 hover:text-neutral-800 dark:text-neutral-300 dark:hover:text-neutral-100', - children: /* @__PURE__ */ jsxs('a', { - href: item.url, - target: '_blank', - rel: 'noopener noreferrer', - children: [ - /* @__PURE__ */ jsx(item.icon, { className: '' }), - /* @__PURE__ */ jsx('span', { children: item.title }), - ], - }), - }), - }, - item.title, - ), - ), - }), - }), - }); -} -function NavMain({ items = [] }) { - const page = usePage(); - return /* @__PURE__ */ jsxs(SidebarGroup, { - className: 'px-2 py-0', - children: [ - /* @__PURE__ */ jsx(SidebarGroupLabel, { children: 'Platform' }), - /* @__PURE__ */ jsx(SidebarMenu, { - children: items.map((item) => - /* @__PURE__ */ jsx( - SidebarMenuItem, - { - children: /* @__PURE__ */ jsx(SidebarMenuButton, { - asChild: true, - isActive: item.url === page.url, - children: /* @__PURE__ */ jsxs(Link, { - href: item.url, - prefetch: true, - children: [/* @__PURE__ */ jsx(item.icon, {}), /* @__PURE__ */ jsx('span', { children: item.title })], - }), - }), - }, - item.title, - ), - ), - }), - ], - }); -} -const Avatar = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx(AvatarPrimitive.Root, { - ref, - className: cn('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', className), - ...props, - }), -); -Avatar.displayName = AvatarPrimitive.Root.displayName; -const AvatarImage = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx(AvatarPrimitive.Image, { ref, className: cn('aspect-square h-full w-full', className), ...props }), -); -AvatarImage.displayName = AvatarPrimitive.Image.displayName; -const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx(AvatarPrimitive.Fallback, { - ref, - className: cn('flex h-full w-full items-center justify-center rounded-full bg-sidebar-primary text-sidebar-primary-foreground', className), - ...props, - }), -); -AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName; -const DropdownMenu = DropdownMenuPrimitive.Root; -const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger; -const DropdownMenuGroup = DropdownMenuPrimitive.Group; -const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => - /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, { - ref, - className: cn( - 'flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', - inset && 'pl-8', - className, - ), - ...props, - children: [children, /* @__PURE__ */ jsx(ChevronRight, { className: 'ml-auto' })], - }), -); -DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName; -const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, { - ref, - className: cn( - 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', - className, - ), - ...props, - }), -); -DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName; -const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => - /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { - children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, { - ref, - sideOffset, - className: cn( - 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', - className, - ), - ...props, - }), - }), -); -DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; -const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => - /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, { - ref, - className: cn( - 'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', - inset && 'pl-8', - className, - ), - ...props, - }), -); -DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; -const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => - /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, { - ref, - className: cn( - 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', - className, - ), - checked, - ...props, - children: [ - /* @__PURE__ */ jsx('span', { - className: 'absolute left-2 flex h-3.5 w-3.5 items-center justify-center', - children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { - children: /* @__PURE__ */ jsx(Check, { className: 'h-4 w-4' }), - }), - }), - children, - ], - }), -); -DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName; -const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => - /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, { - ref, - className: cn( - 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', - className, - ), - ...props, - children: [ - /* @__PURE__ */ jsx('span', { - className: 'absolute left-2 flex h-3.5 w-3.5 items-center justify-center', - children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { - children: /* @__PURE__ */ jsx(Circle, { className: 'h-2 w-2 fill-current' }), - }), - }), - children, - ], - }), -); -DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName; -const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => - /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, { - ref, - className: cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className), - ...props, - }), -); -DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName; -const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, { ref, className: cn('-mx-1 my-1 h-px bg-muted', className), ...props }), -); -DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName; -function getInitials(fullName) { - const names = fullName.trim().split(' '); - if (names.length === 0) return ''; - if (names.length === 1) return names[0].charAt(0).toUpperCase(); - return `${names[0].charAt(0)}${names[names.length - 1].charAt(0)}`.toUpperCase(); -} -function UserInfo({ user }) { - return /* @__PURE__ */ jsxs(Fragment, { - children: [ - /* @__PURE__ */ jsxs(Avatar, { - className: 'h-8 w-8 overflow-hidden rounded-full', - children: [ - /* @__PURE__ */ jsx(AvatarImage, { src: user.avatar, alt: user.name }), - /* @__PURE__ */ jsx(AvatarFallback, { - className: 'rounded-full bg-neutral-200 text-black dark:bg-neutral-700 dark:text-white', - children: getInitials(user.name), - }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'grid flex-1 text-left text-sm leading-tight', - children: [ - /* @__PURE__ */ jsx('span', { className: 'truncate font-semibold', children: user.name }), - /* @__PURE__ */ jsx('span', { className: 'truncate text-xs', children: user.email }), - ], - }), - ], - }); -} -function NavUser() { - const { auth } = usePage().props; - return /* @__PURE__ */ jsx(SidebarMenu, { - children: /* @__PURE__ */ jsx(SidebarMenuItem, { - children: /* @__PURE__ */ jsxs(DropdownMenu, { - children: [ - /* @__PURE__ */ jsx(DropdownMenuTrigger, { - asChild: true, - children: /* @__PURE__ */ jsxs(SidebarMenuButton, { - size: 'lg', - className: 'group text-sidebar-accent-foreground data-[state=open]:bg-sidebar-accent', - children: [ - /* @__PURE__ */ jsx(UserInfo, { user: auth.user }), - /* @__PURE__ */ jsx(ChevronsUpDown, { className: 'ml-auto size-4' }), - ], - }), - }), - /* @__PURE__ */ jsxs(DropdownMenuContent, { - className: 'w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg', - side: 'bottom', - align: 'end', - sideOffset: 4, - children: [ - /* @__PURE__ */ jsx(DropdownMenuLabel, { - className: 'p-0 font-normal', - children: /* @__PURE__ */ jsx('div', { - className: 'flex items-center gap-2 px-1 py-1.5 text-left text-sm', - children: /* @__PURE__ */ jsx(UserInfo, { user: auth.user }), - }), - }), - /* @__PURE__ */ jsx(DropdownMenuSeparator, {}), - /* @__PURE__ */ jsx(DropdownMenuGroup, { - children: /* @__PURE__ */ jsx(DropdownMenuItem, { - asChild: true, - children: /* @__PURE__ */ jsxs(Link, { - className: 'block w-full', - href: route('profile.edit'), - as: 'button', - prefetch: true, - children: [/* @__PURE__ */ jsx(Settings, { className: 'mr-2' }), 'Settings'], - }), - }), - }), - /* @__PURE__ */ jsx(DropdownMenuSeparator, {}), - /* @__PURE__ */ jsx(DropdownMenuItem, { - asChild: true, - children: /* @__PURE__ */ jsxs(Link, { - className: 'block w-full', - method: 'post', - href: route('logout'), - as: 'button', - children: [/* @__PURE__ */ jsx(LogOut, { className: 'mr-2' }), 'Log out'], - }), - }), - ], - }), - ], - }), - }), - }); -} -const mainNavItems = [ - { - title: 'Dashboard', - url: '/dashboard', - icon: LayoutDashboard, - }, -]; -const footerNavItems = [ - { - title: 'Repository', - url: 'https://github.com/laravel/react-starter-kit', - icon: FolderGit2, - }, - { - title: 'Documentation', - url: 'https://laravel.com/docs/starter-kits', - icon: BookOpenText, - }, -]; -function AppSidebar() { - return /* @__PURE__ */ jsxs(Sidebar, { - collapsible: 'icon', - variant: 'sidebar', - children: [ - /* @__PURE__ */ jsx(SidebarHeader, { - children: /* @__PURE__ */ jsx(SidebarMenu, { - children: /* @__PURE__ */ jsx(SidebarMenuItem, { - children: /* @__PURE__ */ jsx(SidebarMenuButton, { - size: 'lg', - asChild: true, - children: /* @__PURE__ */ jsxs(Link, { - href: '/dashboard', - prefetch: true, - children: [ - /* @__PURE__ */ jsx('div', { - className: - 'flex aspect-square size-8 items-center justify-center rounded-md bg-sidebar-primary text-sidebar-primary-foreground', - children: /* @__PURE__ */ jsx(ApplicationLogo, { - className: 'size-5 fill-current text-white dark:text-black', - }), - }), - /* @__PURE__ */ jsxs('div', { - className: 'grid flex-1 text-left text-sm leading-tight', - children: [ - /* @__PURE__ */ jsx('span', { className: 'truncate font-semibold', children: 'Laravel' }), - /* @__PURE__ */ jsx('span', { className: 'truncate text-xs', children: 'Starter Kit' }), - ], - }), - ], - }), - }), - }), - }), - }), - /* @__PURE__ */ jsx(SidebarContent, { children: /* @__PURE__ */ jsx(NavMain, { items: mainNavItems }) }), - /* @__PURE__ */ jsxs(SidebarFooter, { - children: [/* @__PURE__ */ jsx(NavFooter, { items: footerNavItems, className: 'mt-auto' }), /* @__PURE__ */ jsx(NavUser, {})], - }), - ], - }); -} -function App({ children, breadcrumbs: breadcrumbs2 = [] }) { - return /* @__PURE__ */ jsxs(AppShell, { - children: [ - /* @__PURE__ */ jsx(AppSidebar, {}), - /* @__PURE__ */ jsxs(SidebarInset, { children: [/* @__PURE__ */ jsx(AppHeader, { breadcrumbs: breadcrumbs2 }), children] }), - ], - }); -} -const breadcrumbs$3 = [ - { - title: 'Dashboard', - href: '/dashboard', - }, -]; -function Dashboard() { - return /* @__PURE__ */ jsxs(App, { - breadcrumbs: breadcrumbs$3, - children: [ - /* @__PURE__ */ jsx(Head, { title: 'Dashboard' }), - /* @__PURE__ */ jsxs('div', { - className: 'flex h-full flex-1 flex-col gap-4 rounded-xl p-4 pt-0', - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'grid auto-rows-min gap-4 md:grid-cols-3', - children: [ - /* @__PURE__ */ jsx('div', { - className: - 'relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border', - children: /* @__PURE__ */ jsxs('svg', { - className: 'absolute inset-0 size-full stroke-gray-900/10 dark:stroke-neutral-100/10', - fill: 'none', - children: [ - /* @__PURE__ */ jsx('defs', { - children: /* @__PURE__ */ jsx('pattern', { - id: 'pattern-01', - x: '0', - y: '0', - width: '10', - height: '10', - patternUnits: 'userSpaceOnUse', - children: /* @__PURE__ */ jsx('path', { d: 'M-3 13 15-5M-5 5l18-18M-1 21 17 3' }), - }), - }), - /* @__PURE__ */ jsx('rect', { stroke: 'none', fill: 'url(#pattern-01)', width: '100%', height: '100%' }), - ], - }), - }), - /* @__PURE__ */ jsx('div', { - className: - 'relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border', - children: /* @__PURE__ */ jsxs('svg', { - className: 'absolute inset-0 size-full stroke-gray-900/10 dark:stroke-neutral-100/10', - fill: 'none', - children: [ - /* @__PURE__ */ jsx('defs', { - children: /* @__PURE__ */ jsx('pattern', { - id: 'pattern-01', - x: '0', - y: '0', - width: '10', - height: '10', - patternUnits: 'userSpaceOnUse', - children: /* @__PURE__ */ jsx('path', { d: 'M-3 13 15-5M-5 5l18-18M-1 21 17 3' }), - }), - }), - /* @__PURE__ */ jsx('rect', { stroke: 'none', fill: 'url(#pattern-01)', width: '100%', height: '100%' }), - ], - }), - }), - /* @__PURE__ */ jsx('div', { - className: - 'relative aspect-video overflow-hidden rounded-xl border border-sidebar-border/70 dark:border-sidebar-border', - children: /* @__PURE__ */ jsxs('svg', { - className: 'absolute inset-0 size-full stroke-gray-900/10 dark:stroke-neutral-100/10', - fill: 'none', - children: [ - /* @__PURE__ */ jsx('defs', { - children: /* @__PURE__ */ jsx('pattern', { - id: 'pattern-01', - x: '0', - y: '0', - width: '10', - height: '10', - patternUnits: 'userSpaceOnUse', - children: /* @__PURE__ */ jsx('path', { d: 'M-3 13 15-5M-5 5l18-18M-1 21 17 3' }), - }), - }), - /* @__PURE__ */ jsx('rect', { stroke: 'none', fill: 'url(#pattern-01)', width: '100%', height: '100%' }), - ], - }), - }), - ], - }), - /* @__PURE__ */ jsx('div', { - className: 'relative min-h-[100vh] flex-1 rounded-xl border border-sidebar-border/70 dark:border-sidebar-border md:min-h-min', - children: /* @__PURE__ */ jsxs('svg', { - className: 'absolute inset-0 size-full stroke-gray-900/10 dark:stroke-neutral-100/10', - fill: 'none', - children: [ - /* @__PURE__ */ jsx('defs', { - children: /* @__PURE__ */ jsx('pattern', { - id: 'pattern-01', - x: '0', - y: '0', - width: '10', - height: '10', - patternUnits: 'userSpaceOnUse', - children: /* @__PURE__ */ jsx('path', { d: 'M-3 13 15-5M-5 5l18-18M-1 21 17 3' }), - }), - }), - /* @__PURE__ */ jsx('rect', { stroke: 'none', fill: 'url(#pattern-01)', width: '100%', height: '100%' }), - ], - }), - }), - ], - }), - ], - }); -} -const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze( - /* @__PURE__ */ Object.defineProperty( - { - __proto__: null, - default: Dashboard, - }, - Symbol.toStringTag, - { value: 'Module' }, - ), -); -const prefersDark = () => window.matchMedia('(prefers-color-scheme: dark)').matches; -const applyTheme = (appearance) => { - const isDark = appearance === 'dark' || (appearance === 'system' && prefersDark()); - document.documentElement.classList.toggle('dark', isDark); -}; -const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)'); -const handleSystemThemeChange = () => { - const currentAppearance = localStorage.getItem('appearance'); - applyTheme(currentAppearance || 'system'); -}; -function useAppearance() { - const [appearance, setAppearance] = useState('system'); - const updateAppearance = (mode) => { - setAppearance(mode); - localStorage.setItem('appearance', mode); - applyTheme(mode); - }; - useEffect(() => { - const savedAppearance = localStorage.getItem('appearance'); - updateAppearance(savedAppearance || 'system'); - return () => mediaQuery.removeEventListener('change', handleSystemThemeChange); - }, []); - return { appearance, updateAppearance }; -} -function AppearanceToggleTab({ className = '', ...props }) { - const { appearance, updateAppearance } = useAppearance(); - const tabs = [ - { value: 'light', icon: Sun, label: 'Light' }, - { value: 'dark', icon: Moon, label: 'Dark' }, - { value: 'system', icon: Monitor, label: 'System' }, - ]; - return /* @__PURE__ */ jsx('div', { - className: `inline-flex gap-1 rounded-lg bg-neutral-100 p-1 dark:bg-neutral-800 ${className}`, - ...props, - children: tabs.map(({ value, icon: Icon, label }) => - /* @__PURE__ */ jsxs( - 'button', - { - onClick: () => updateAppearance(value), - className: `flex items-center rounded-md px-3.5 py-1.5 transition-colors ${appearance === value ? 'bg-white shadow-sm dark:bg-neutral-700 dark:text-neutral-100' : 'text-neutral-500 hover:bg-neutral-200/60 hover:text-black dark:text-neutral-400 dark:hover:bg-neutral-700/60'} `, - children: [ - /* @__PURE__ */ jsx(Icon, { className: '-ml-1 h-4 w-4' }), - /* @__PURE__ */ jsx('span', { className: 'ml-1.5 text-sm', children: label }), - ], - }, - value, - ), - ), - }); -} -function HeadingSmall({ title, description }) { - return /* @__PURE__ */ jsxs('header', { - children: [ - /* @__PURE__ */ jsx('h3', { class: 'mb-0.5 text-base font-medium', children: title }), - description && /* @__PURE__ */ jsx('p', { className: 'text-xs text-muted-foreground', children: description }), - ], - }); -} -function Heading({ title, description }) { - return /* @__PURE__ */ jsxs(Fragment, { - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'space-y-0.5', - children: [ - /* @__PURE__ */ jsx('h2', { className: 'text-base font-semibold tracking-tight sm:text-lg lg:text-xl', children: title }), - description && /* @__PURE__ */ jsx('p', { className: 'text-xs text-muted-foreground md:text-sm', children: description }), - ], - }), - /* @__PURE__ */ jsx(Separator, { className: 'my-6' }), - ], - }); -} -const sidebarNavItems = [ - { - title: 'Profile', - url: '/settings/profile', - icon: null, - }, - { - title: 'Password', - url: '/settings/password', - icon: null, - }, - { - title: 'Appearance', - url: '/settings/appearance', - icon: null, - }, -]; -function SettingsLayout({ children }) { - const currentPath = window.location.pathname; - sidebarNavItems.find((item) => currentPath === item.url); - return /* @__PURE__ */ jsxs('div', { - className: 'border-t border-sidebar-border/70 p-5 lg:p-7', - children: [ - /* @__PURE__ */ jsx(Heading, { title: 'Settings', description: 'Manage your profile and account settings' }), - /* @__PURE__ */ jsxs('div', { - className: 'flex flex-col space-y-8 md:flex-row md:space-x-12 md:space-y-0', - children: [ - /* @__PURE__ */ jsx('aside', { - className: 'w-full md:w-1/3 lg:w-1/4 xl:w-1/5', - children: /* @__PURE__ */ jsx('nav', { - className: 'flex flex-col space-x-0 space-y-1', - children: sidebarNavItems.map((item) => - /* @__PURE__ */ jsx( - Button, - { - size: 'sm', - variant: 'ghost', - asChild: true, - className: cn('w-full justify-start', { - 'bg-muted': currentPath === item.url, - }), - children: /* @__PURE__ */ jsx(Link, { href: item.url, prefetch: true, children: item.title }), - }, - item.url, - ), - ), - }), - }), - /* @__PURE__ */ jsx(Separator, { className: 'my-6 md:hidden' }), - /* @__PURE__ */ jsx('div', { - className: 'flex-1 md:max-w-2xl', - children: /* @__PURE__ */ jsx('section', { className: 'max-w-xl space-y-12', children }), - }), - ], - }), - ], - }); -} -const breadcrumbs$2 = [ - { - title: 'Appearance settings', - href: '/settings/appearance', - }, -]; -function Appearance() { - return /* @__PURE__ */ jsxs(App, { - breadcrumbs: breadcrumbs$2, - children: [ - /* @__PURE__ */ jsx(Head, { title: 'Appearance settings' }), - /* @__PURE__ */ jsx(SettingsLayout, { - children: /* @__PURE__ */ jsxs('div', { - className: 'space-y-6', - children: [ - /* @__PURE__ */ jsx(HeadingSmall, { title: 'Appearance settings', description: "Update your account's appearance settings" }), - /* @__PURE__ */ jsx(AppearanceToggleTab, {}), - ], - }), - }), - ], - }); -} -const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze( - /* @__PURE__ */ Object.defineProperty( - { - __proto__: null, - default: Appearance, - }, - Symbol.toStringTag, - { value: 'Module' }, - ), -); -const breadcrumbs$1 = [ - { - title: 'Password Settings', - href: '/settings/password', - }, -]; -function Password({ className = '' }) { - const passwordInput = useRef(null); - const currentPasswordInput = useRef(null); - const { data, setData, errors, put, reset, processing, recentlySuccessful } = useForm({ - current_password: '', - password: '', - password_confirmation: '', - }); - const updatePassword = (e) => { - e.preventDefault(); - put(route('password.update'), { - preserveScroll: true, - onSuccess: () => reset(), - onError: (errors2) => { - var _a, _b; - if (errors2.password) { - reset('password', 'password_confirmation'); - (_a = passwordInput.current) == null ? void 0 : _a.focus(); - } - if (errors2.current_password) { - reset('current_password'); - (_b = currentPasswordInput.current) == null ? void 0 : _b.focus(); - } - }, - }); - }; - return /* @__PURE__ */ jsxs(App, { - breadcrumbs: breadcrumbs$1, - children: [ - /* @__PURE__ */ jsx(Head, { title: 'Profile Settings' }), - /* @__PURE__ */ jsx(SettingsLayout, { - children: /* @__PURE__ */ jsxs('div', { - className: 'space-y-6', - children: [ - /* @__PURE__ */ jsx(HeadingSmall, { - title: 'Update password', - description: 'Ensure your account is using a long, random password to stay secure', - }), - /* @__PURE__ */ jsxs('form', { - onSubmit: updatePassword, - className: 'space-y-6', - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'current_password', children: 'Current password' }), - /* @__PURE__ */ jsx(Input, { - id: 'current_password', - ref: currentPasswordInput, - value: data.current_password, - onChange: (e) => setData('current_password', e.target.value), - type: 'password', - className: 'mt-1 block w-full', - autoComplete: 'current-password', - }), - /* @__PURE__ */ jsx(InputError, { message: errors.current_password }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'password', children: 'New password' }), - /* @__PURE__ */ jsx(Input, { - id: 'password', - ref: passwordInput, - value: data.password, - onChange: (e) => setData('password', e.target.value), - type: 'password', - className: 'mt-1 block w-full', - autoComplete: 'new-password', - }), - /* @__PURE__ */ jsx(InputError, { message: errors.password }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'password_confirmation', children: 'Confirm password' }), - /* @__PURE__ */ jsx(Input, { - id: 'password_confirmation', - value: data.password_confirmation, - onChange: (e) => setData('password_confirmation', e.target.value), - type: 'password', - className: 'mt-1 block w-full', - autoComplete: 'new-password', - }), - /* @__PURE__ */ jsx(InputError, { message: errors.password_confirmation }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'flex items-center gap-4', - children: [ - /* @__PURE__ */ jsx(Button, { disabled: processing, children: 'Save password' }), - /* @__PURE__ */ jsx(Transition, { - show: recentlySuccessful, - enter: 'transition ease-in-out', - enterFrom: 'opacity-0', - leave: 'transition ease-in-out', - leaveTo: 'opacity-0', - children: /* @__PURE__ */ jsx('p', { className: 'text-sm text-gray-600', children: 'Saved.' }), - }), - ], - }), - ], - }), - ], - }), - }), - ], - }); -} -const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze( - /* @__PURE__ */ Object.defineProperty( - { - __proto__: null, - default: Password, - }, - Symbol.toStringTag, - { value: 'Module' }, - ), -); -const Dialog = SheetPrimitive.Root; -const DialogTrigger = SheetPrimitive.Trigger; -const DialogPortal = SheetPrimitive.Portal; -const DialogClose = SheetPrimitive.Close; -const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx(SheetPrimitive.Overlay, { - ref, - className: cn( - 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0', - className, - ), - ...props, - }), -); -DialogOverlay.displayName = SheetPrimitive.Overlay.displayName; -const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => - /* @__PURE__ */ jsxs(DialogPortal, { - children: [ - /* @__PURE__ */ jsx(DialogOverlay, {}), - /* @__PURE__ */ jsxs(SheetPrimitive.Content, { - ref, - className: cn( - 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg', - className, - ), - ...props, - children: [ - children, - /* @__PURE__ */ jsxs(SheetPrimitive.Close, { - className: - 'absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground', - children: [ - /* @__PURE__ */ jsx(X, { className: 'h-4 w-4' }), - /* @__PURE__ */ jsx('span', { className: 'sr-only', children: 'Close' }), - ], - }), - ], - }), - ], - }), -); -DialogContent.displayName = SheetPrimitive.Content.displayName; -const DialogHeader = ({ className, ...props }) => - /* @__PURE__ */ jsx('div', { className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className), ...props }); -DialogHeader.displayName = 'DialogHeader'; -const DialogFooter = ({ className, ...props }) => - /* @__PURE__ */ jsx('div', { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }); -DialogFooter.displayName = 'DialogFooter'; -const DialogTitle = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx(SheetPrimitive.Title, { ref, className: cn('text-lg font-semibold leading-none tracking-tight', className), ...props }), -); -DialogTitle.displayName = SheetPrimitive.Title.displayName; -const DialogDescription = React.forwardRef(({ className, ...props }, ref) => - /* @__PURE__ */ jsx(SheetPrimitive.Description, { ref, className: cn('text-sm text-muted-foreground', className), ...props }), -); -DialogDescription.displayName = SheetPrimitive.Description.displayName; -function DeleteUser() { - const passwordInput = useRef(null); - const { data, setData, delete: destroy, processing, reset, errors, clearErrors } = useForm({ password: '' }); - const deleteUser = (e) => { - e.preventDefault(); - destroy(route('profile.destroy'), { - preserveScroll: true, - onSuccess: () => closeModal(), - onError: () => { - var _a; - return (_a = passwordInput.current) == null ? void 0 : _a.focus(); - }, - onFinish: () => reset(), - }); - }; - const closeModal = () => { - clearErrors(); - reset(); - }; - return /* @__PURE__ */ jsxs('div', { - className: 'space-y-6', - children: [ - /* @__PURE__ */ jsx(HeadingSmall, { title: 'Delete account', description: 'Delete your account and all of its resources' }), - /* @__PURE__ */ jsxs('div', { - className: 'flex items-center rounded-lg border border-red-100 bg-red-50 p-3 dark:border-red-950 dark:bg-red-700/10', - children: [ - /* @__PURE__ */ jsxs(Dialog, { - children: [ - /* @__PURE__ */ jsx(DialogTrigger, { - asChild: true, - children: /* @__PURE__ */ jsx(Button, { variant: 'destructive', children: 'Delete account' }), - }), - /* @__PURE__ */ jsx(DialogContent, { - children: /* @__PURE__ */ jsxs('form', { - className: 'space-y-6', - onSubmit: deleteUser, - children: [ - /* @__PURE__ */ jsxs(DialogHeader, { - className: 'space-y-3', - children: [ - /* @__PURE__ */ jsx(DialogTitle, { children: 'Are you sure you want to delete your account?' }), - /* @__PURE__ */ jsx(DialogDescription, { - children: - 'Once your account is deleted, all of its resources and data will also be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.', - }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'password', className: 'sr-only', children: 'Password' }), - /* @__PURE__ */ jsx(Input, { - id: 'password', - type: 'password', - name: 'password', - ref: passwordInput, - value: data.password, - onChange: (e) => setData('password', e.target.value), - placeholder: 'Password', - }), - /* @__PURE__ */ jsx(InputError, { message: errors.password }), - ], - }), - /* @__PURE__ */ jsxs(DialogFooter, { - children: [ - /* @__PURE__ */ jsx(DialogClose, { - asChild: true, - children: /* @__PURE__ */ jsx(Button, { - variant: 'secondary', - onClick: closeModal, - children: 'Cancel', - }), - }), - /* @__PURE__ */ jsx(Button, { - variant: 'destructive', - disabled: processing, - asChild: true, - children: /* @__PURE__ */ jsx('button', { type: 'submit', children: 'Delete account' }), - }), - ], - }), - ], - }), - }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'relative ml-3 text-red-600 dark:text-red-100', - children: [ - /* @__PURE__ */ jsx('p', { className: 'mb-1 text-sm font-medium leading-none', children: 'Warning' }), - /* @__PURE__ */ jsx('p', { - className: 'text-xs leading-none', - children: 'Please proceed with caution, this cannot be undone', - }), - ], - }), - ], - }), - ], - }); -} -const breadcrumbs = [ - { - title: 'Profile Settings', - href: '/settings/profile', - }, -]; -function Profile({ mustVerifyEmail, status, className = '' }) { - const { auth } = usePage().props; - const { data, setData, patch, errors, processing, recentlySuccessful } = useForm({ - name: auth.user.name, - email: auth.user.email, - }); - const submit = (e) => { - e.preventDefault(); - patch(route('profile.update')); - }; - return /* @__PURE__ */ jsxs(App, { - breadcrumbs, - children: [ - /* @__PURE__ */ jsx(Head, { title: 'Profile Settings' }), - /* @__PURE__ */ jsxs(SettingsLayout, { - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'space-y-6', - children: [ - /* @__PURE__ */ jsx(HeadingSmall, { title: 'Profile Information', description: 'Update your name and email address' }), - /* @__PURE__ */ jsxs('form', { - onSubmit: submit, - className: 'space-y-6', - children: [ - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'name', children: 'Name' }), - /* @__PURE__ */ jsx(Input, { - id: 'name', - className: 'mt-1 block w-full', - value: data.name, - onChange: (e) => setData('name', e.target.value), - required: true, - autoComplete: 'name', - }), - /* @__PURE__ */ jsx(InputError, { className: 'mt-2', message: errors.name }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'grid gap-2', - children: [ - /* @__PURE__ */ jsx(Label, { htmlFor: 'email', children: 'Email Address' }), - /* @__PURE__ */ jsx(Input, { - id: 'email', - type: 'email', - className: 'mt-1 block w-full', - value: data.email, - onChange: (e) => setData('email', e.target.value), - required: true, - autoComplete: 'username', - }), - /* @__PURE__ */ jsx(InputError, { className: 'mt-2', message: errors.email }), - ], - }), - mustVerifyEmail && - auth.user.email_verified_at === null && - /* @__PURE__ */ jsxs('div', { - children: [ - /* @__PURE__ */ jsxs('p', { - className: 'mt-2 text-sm text-gray-800', - children: [ - 'Your email address is unverified.', - /* @__PURE__ */ jsx(Link, { - href: route('verification.send'), - method: 'post', - as: 'button', - className: - 'rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2', - children: 'Click here to re-send the verification email.', - }), - ], - }), - status === 'verification-link-sent' && - /* @__PURE__ */ jsx('div', { - className: 'mt-2 text-sm font-medium text-green-600', - children: 'A new verification link has been sent to your email address.', - }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'flex items-center gap-4', - children: [ - /* @__PURE__ */ jsx(Button, { disabled: processing, children: 'Save' }), - /* @__PURE__ */ jsx(Transition, { - show: recentlySuccessful, - enter: 'transition ease-in-out', - enterFrom: 'opacity-0', - leave: 'transition ease-in-out', - leaveTo: 'opacity-0', - children: /* @__PURE__ */ jsx('p', { className: 'text-sm text-gray-600', children: 'Saved.' }), - }), - ], - }), - ], - }), - ], - }), - /* @__PURE__ */ jsx(DeleteUser, {}), - ], - }), - ], - }); -} -const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze( - /* @__PURE__ */ Object.defineProperty( - { - __proto__: null, - default: Profile, - }, - Symbol.toStringTag, - { value: 'Module' }, - ), -); -function Welcome() { - const { auth, laravelVersion, phpVersion } = usePage().props; - const handleImageError = () => { - var _a, _b, _c, _d; - (_a = document.getElementById('screenshot-container')) == null ? void 0 : _a.classList.add('!hidden'); - (_b = document.getElementById('docs-card')) == null ? void 0 : _b.classList.add('!row-span-1'); - (_c = document.getElementById('docs-card-content')) == null ? void 0 : _c.classList.add('!flex-row'); - (_d = document.getElementById('background')) == null ? void 0 : _d.classList.add('!hidden'); - }; - return /* @__PURE__ */ jsxs(Fragment, { - children: [ - /* @__PURE__ */ jsx(Head, { title: 'Welcome' }), - /* @__PURE__ */ jsxs('div', { - className: 'bg-gray-50 text-black/50 dark:bg-black dark:text-white/50', - children: [ - /* @__PURE__ */ jsx('img', { - id: 'background', - className: 'absolute -left-20 top-0 max-w-[877px]', - src: 'https://laravel.com/assets/img/welcome/background.svg', - }), - /* @__PURE__ */ jsx('div', { - className: 'relative flex min-h-screen flex-col items-center justify-center selection:bg-[#FF2D20] selection:text-white', - children: /* @__PURE__ */ jsxs('div', { - className: 'relative w-full max-w-2xl px-6 lg:max-w-7xl', - children: [ - /* @__PURE__ */ jsxs('header', { - className: 'grid grid-cols-2 items-center gap-2 py-10 lg:grid-cols-3', - children: [ - /* @__PURE__ */ jsx('div', { - className: 'flex lg:col-start-2 lg:justify-center', - children: /* @__PURE__ */ jsx('svg', { - className: 'h-12 w-auto text-white lg:h-16 lg:text-[#FF2D20]', - viewBox: '0 0 62 65', - fill: 'none', - xmlns: 'http://www.w3.org/2000/svg', - children: /* @__PURE__ */ jsx('path', { - d: 'M61.8548 14.6253C61.8778 14.7102 61.8895 14.7978 61.8897 14.8858V28.5615C61.8898 28.737 61.8434 28.9095 61.7554 29.0614C61.6675 29.2132 61.5409 29.3392 61.3887 29.4265L49.9104 36.0351V49.1337C49.9104 49.4902 49.7209 49.8192 49.4118 49.9987L25.4519 63.7916C25.3971 63.8227 25.3372 63.8427 25.2774 63.8639C25.255 63.8714 25.2338 63.8851 25.2101 63.8913C25.0426 63.9354 24.8666 63.9354 24.6991 63.8913C24.6716 63.8838 24.6467 63.8689 24.6205 63.8589C24.5657 63.8389 24.5084 63.8215 24.456 63.7916L0.501061 49.9987C0.348882 49.9113 0.222437 49.7853 0.134469 49.6334C0.0465019 49.4816 0.000120578 49.3092 0 49.1337L0 8.10652C0 8.01678 0.0124642 7.92953 0.0348998 7.84477C0.0423783 7.8161 0.0598282 7.78993 0.0697995 7.76126C0.0884958 7.70891 0.105946 7.65531 0.133367 7.6067C0.152063 7.5743 0.179485 7.54812 0.20192 7.51821C0.230588 7.47832 0.256763 7.43719 0.290416 7.40229C0.319084 7.37362 0.356476 7.35243 0.388883 7.32751C0.425029 7.29759 0.457436 7.26518 0.498568 7.2415L12.4779 0.345059C12.6296 0.257786 12.8015 0.211853 12.9765 0.211853C13.1515 0.211853 13.3234 0.257786 13.475 0.345059L25.4531 7.2415H25.4556C25.4955 7.26643 25.5292 7.29759 25.5653 7.32626C25.5977 7.35119 25.6339 7.37362 25.6625 7.40104C25.6974 7.43719 25.7224 7.47832 25.7523 7.51821C25.7735 7.54812 25.8021 7.5743 25.8196 7.6067C25.8483 7.65656 25.8645 7.70891 25.8844 7.76126C25.8944 7.78993 25.9118 7.8161 25.9193 7.84602C25.9423 7.93096 25.954 8.01853 25.9542 8.10652V33.7317L35.9355 27.9844V14.8846C35.9355 14.7973 35.948 14.7088 35.9704 14.6253C35.9792 14.5954 35.9954 14.5692 36.0053 14.5405C36.0253 14.4882 36.0427 14.4346 36.0702 14.386C36.0888 14.3536 36.1163 14.3274 36.1375 14.2975C36.1674 14.2576 36.1923 14.2165 36.2272 14.1816C36.2559 14.1529 36.292 14.1317 36.3244 14.1068C36.3618 14.0769 36.3942 14.0445 36.4341 14.0208L48.4147 7.12434C48.5663 7.03694 48.7383 6.99094 48.9133 6.99094C49.0883 6.99094 49.2602 7.03694 49.4118 7.12434L61.3899 14.0208C61.4323 14.0457 61.4647 14.0769 61.5021 14.1055C61.5333 14.1305 61.5694 14.1529 61.5981 14.1803C61.633 14.2165 61.6579 14.2576 61.6878 14.2975C61.7103 14.3274 61.7377 14.3536 61.7551 14.386C61.7838 14.4346 61.8 14.4882 61.8199 14.5405C61.8312 14.5692 61.8474 14.5954 61.8548 14.6253ZM59.893 27.9844V16.6121L55.7013 19.0252L49.9104 22.3593V33.7317L59.8942 27.9844H59.893ZM47.9149 48.5566V37.1768L42.2187 40.4299L25.953 49.7133V61.2003L47.9149 48.5566ZM1.99677 9.83281V48.5566L23.9562 61.199V49.7145L12.4841 43.2219L12.4804 43.2194L12.4754 43.2169C12.4368 43.1945 12.4044 43.1621 12.3682 43.1347C12.3371 43.1097 12.3009 43.0898 12.2735 43.0624L12.271 43.0586C12.2386 43.0275 12.2162 42.9888 12.1887 42.9539C12.1638 42.9203 12.1339 42.8916 12.114 42.8567L12.1127 42.853C12.0903 42.8156 12.0766 42.7707 12.0604 42.7283C12.0442 42.6909 12.023 42.656 12.013 42.6161C12.0005 42.5688 11.998 42.5177 11.9931 42.4691C11.9881 42.4317 11.9781 42.3943 11.9781 42.3569V15.5801L6.18848 12.2446L1.99677 9.83281ZM12.9777 2.36177L2.99764 8.10652L12.9752 13.8513L22.9541 8.10527L12.9752 2.36177H12.9777ZM18.1678 38.2138L23.9574 34.8809V9.83281L19.7657 12.2459L13.9749 15.5801V40.6281L18.1678 38.2138ZM48.9133 9.14105L38.9344 14.8858L48.9133 20.6305L58.8909 14.8846L48.9133 9.14105ZM47.9149 22.3593L42.124 19.0252L37.9323 16.6121V27.9844L43.7219 31.3174L47.9149 33.7317V22.3593ZM24.9533 47.987L39.59 39.631L46.9065 35.4555L36.9352 29.7145L25.4544 36.3242L14.9907 42.3482L24.9533 47.987Z', - fill: 'currentColor', - }), - }), - }), - /* @__PURE__ */ jsx('nav', { - className: '-mx-3 flex flex-1 justify-end', - children: auth.user - ? /* @__PURE__ */ jsx(Link, { - href: route('dashboard'), - className: - 'rounded-md px-3 py-2 text-black ring-1 ring-transparent transition hover:text-black/70 focus:outline-none focus-visible:ring-[#FF2D20] dark:text-white dark:hover:text-white/80 dark:focus-visible:ring-white', - children: 'Dashboard', - }) - : /* @__PURE__ */ jsxs(Fragment, { - children: [ - /* @__PURE__ */ jsx(Link, { - href: route('login'), - className: - 'rounded-md px-3 py-2 text-black ring-1 ring-transparent transition hover:text-black/70 focus:outline-none focus-visible:ring-[#FF2D20] dark:text-white dark:hover:text-white/80 dark:focus-visible:ring-white', - children: 'Log In', - }), - /* @__PURE__ */ jsx(Link, { - href: route('register'), - className: - 'rounded-md px-3 py-2 text-black ring-1 ring-transparent transition hover:text-black/70 focus:outline-none focus-visible:ring-[#FF2D20] dark:text-white dark:hover:text-white/80 dark:focus-visible:ring-white', - children: 'Register', - }), - ], - }), - }), - ], - }), - /* @__PURE__ */ jsx('main', { - className: 'mt-6', - children: /* @__PURE__ */ jsxs('div', { - className: 'grid gap-6 lg:grid-cols-2 lg:gap-8', - children: [ - /* @__PURE__ */ jsxs('a', { - href: 'https://laravel.com/docs', - id: 'docs-card', - className: - 'flex flex-col items-start gap-6 overflow-hidden rounded-lg bg-white p-6 shadow-[0px_14px_34px_0px_rgba(0,0,0,0.08)] ring-1 ring-white/[0.05] transition duration-300 hover:text-black/70 hover:ring-black/20 focus:outline-none focus-visible:ring-[#FF2D20] dark:bg-zinc-900 dark:ring-zinc-800 dark:hover:text-white/70 dark:hover:ring-zinc-700 dark:focus-visible:ring-[#FF2D20] md:row-span-3 lg:p-10 lg:pb-10', - children: [ - /* @__PURE__ */ jsxs('div', { - id: 'screenshot-container', - className: 'relative flex w-full flex-1 items-stretch', - children: [ - /* @__PURE__ */ jsx('img', { - src: 'https://laravel.com/assets/img/welcome/docs-light.svg', - alt: 'Laravel documentation screenshot', - className: - 'aspect-video h-full w-full flex-1 rounded-[10px] object-cover object-top drop-shadow-[0px_4px_34px_rgba(0,0,0,0.06)] dark:hidden', - onError: handleImageError, - }), - /* @__PURE__ */ jsx('img', { - src: 'https://laravel.com/assets/img/welcome/docs-dark.svg', - alt: 'Laravel documentation screenshot', - className: - 'hidden aspect-video h-full w-full flex-1 rounded-[10px] object-cover object-top drop-shadow-[0px_4px_34px_rgba(0,0,0,0.25)] dark:block', - }), - /* @__PURE__ */ jsx('div', { - className: - 'absolute -bottom-16 -left-16 h-40 w-[calc(100%+8rem)] bg-gradient-to-b from-transparent via-white to-white dark:via-zinc-900 dark:to-zinc-900', - }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: 'relative flex items-center gap-6 lg:items-end', - children: [ - /* @__PURE__ */ jsxs('div', { - id: 'docs-card-content', - className: 'flex items-start gap-6 lg:flex-col', - children: [ - /* @__PURE__ */ jsx('div', { - className: - 'flex size-12 shrink-0 items-center justify-center rounded-full bg-[#FF2D20]/10 sm:size-16', - children: /* @__PURE__ */ jsxs('svg', { - className: 'size-5 sm:size-6', - xmlns: 'http://www.w3.org/2000/svg', - fill: 'none', - viewBox: '0 0 24 24', - children: [ - /* @__PURE__ */ jsx('path', { - fill: '#FF2D20', - d: 'M23 4a1 1 0 0 0-1.447-.894L12.224 7.77a.5.5 0 0 1-.448 0L2.447 3.106A1 1 0 0 0 1 4v13.382a1.99 1.99 0 0 0 1.105 1.79l9.448 4.728c.14.065.293.1.447.1.154-.005.306-.04.447-.105l9.453-4.724a1.99 1.99 0 0 0 1.1-1.789V4ZM3 6.023a.25.25 0 0 1 .362-.223l7.5 3.75a.251.251 0 0 1 .138.223v11.2a.25.25 0 0 1-.362.224l-7.5-3.75a.25.25 0 0 1-.138-.22V6.023Zm18 11.2a.25.25 0 0 1-.138.224l-7.5 3.75a.249.249 0 0 1-.329-.099.249.249 0 0 1-.033-.12V9.772a.251.251 0 0 1 .138-.224l7.5-3.75a.25.25 0 0 1 .362.224v11.2ZM9.61 5.38a.25.25 0 0 0 .08.31c.34.24.616.561.8.935a.25.25 0 0 0 .3.127.631.631 0 0 1 .206-.034c2.054.078 4.036.772 5.69 1.991a.251.251 0 0 0 .267.024c.046-.024.093-.047.141-.067a.25.25 0 0 0 .151-.23A29.98 29.98 0 0 0 15.957.764a.25.25 0 0 0-.16-.164 11.924 11.924 0 0 0-2.21-.518.252.252 0 0 0-.215.076A22.456 22.456 0 0 0 9.61 5.38Z', - }), - /* @__PURE__ */ jsx('path', { - fill: '#FF2D20', - d: 'M5.702 7.058a.254.254 0 0 0 .2-.165A2.488 2.488 0 0 1 7.98 5.245a.093.093 0 0 0 .078-.062 19.734 19.734 0 0 1 3.055-4.74.25.25 0 0 0-.21-.41 12.009 12.009 0 0 0-10.4 8.558.25.25 0 0 0 .373.281 12.912 12.912 0 0 1 4.826-1.814ZM10.773 22.052a.25.25 0 0 0-.28-.046c-.758.356-1.55.635-2.365.833a.25.25 0 0 0-.022.48c1.252.43 2.568.65 3.893.65.1 0 .2 0 .3-.008a.25.25 0 0 0 .147-.444c-.526-.424-1.1-.917-1.673-1.465ZM18.744 8.436a.249.249 0 0 0 .15.228 2.246 2.246 0 0 1 1.352 2.054c0 .337-.08.67-.23.972a.25.25 0 0 0 .042.28l.007.009a15.016 15.016 0 0 1 2.52 4.6.25.25 0 0 0 .37.132.25.25 0 0 0 .096-.114c.623-1.464.944-3.039.945-4.63a12.005 12.005 0 0 0-5.78-10.258.25.25 0 0 0-.373.274c.547 2.109.85 4.274.901 6.453ZM6.303 14.105a.25.25 0 0 0-.265-.274A13.048 13.048 0 0 1 7.98 5.245a.062.062 0 0 0-.022-.07 2.5 2.5 0 0 1-.777-.982.25.25 0 0 0-.271-.149 11 11 0 0 0-5.6 2.815.255.255 0 0 0-.075.163c-.008.135-.02.27-.02.406.002.8.084 1.598.246 2.381a.25.25 0 0 0 .303.193 19.924 19.924 0 0 1 5.746-.438ZM24.9533 47.987L39.59 39.631L46.9065 35.4555L36.9352 29.7145L25.4544 36.3242L14.9907 42.3482L24.9533 47.987Z', - }), - ], - }), - }), - /* @__PURE__ */ jsxs('div', { - className: 'pt-3 sm:pt-5 lg:pt-0', - children: [ - /* @__PURE__ */ jsx('h2', { - className: 'text-xl font-semibold text-black dark:text-white', - children: 'Documentation', - }), - /* @__PURE__ */ jsx('p', { - className: 'mt-4 text-sm/relaxed', - children: - 'Laravel has wonderful documentation covering every aspect of the framework. Whether you are a newcomer or have prior experience with Laravel, we recommend reading our documentation from beginning to end.', - }), - ], - }), - ], - }), - /* @__PURE__ */ jsx('svg', { - className: 'size-6 shrink-0 stroke-[#FF2D20]', - xmlns: 'http://www.w3.org/2000/svg', - fill: 'none', - viewBox: '0 0 24 24', - strokeWidth: '1.5', - children: /* @__PURE__ */ jsx('path', { - strokeLinecap: 'round', - strokeLinejoin: 'round', - d: 'M4.5 12h15m0 0l-6.75-6.75M19.5 12l-6.75 6.75', - }), - }), - ], - }), - ], - }), - /* @__PURE__ */ jsxs('a', { - href: 'https://laracasts.com', - className: - 'flex items-start gap-4 rounded-lg bg-white p-6 shadow-[0px_14px_34px_0px_rgba(0,0,0,0.08)] ring-1 ring-white/[0.05] transition duration-300 hover:text-black/70 hover:ring-black/20 focus:outline-none focus-visible:ring-[#FF2D20] dark:bg-zinc-900 dark:ring-zinc-800 dark:hover:text-white/70 dark:hover:ring-zinc-700 dark:focus-visible:ring-[#FF2D20] lg:pb-10', - children: [ - /* @__PURE__ */ jsx('div', { - className: - 'flex size-12 shrink-0 items-center justify-center rounded-full bg-[#FF2D20]/10 sm:size-16', - children: /* @__PURE__ */ jsx('svg', { - className: 'size-5 sm:size-6', - xmlns: 'http://www.w3.org/2000/svg', - fill: 'none', - viewBox: '0 0 24 24', - children: /* @__PURE__ */ jsx('g', { - fill: '#FF2D20', - children: /* @__PURE__ */ jsx('path', { - d: 'M24 8.25a.5.5 0 0 0-.5-.5H.5a.5.5 0 0 0-.5.5v12a2.5 2.5 0 0 0 2.5 2.5h19a2.5 2.5 0 0 0 2.5-2.5v-12Zm-7.765 5.868a1.221 1.221 0 0 1 0 2.264l-6.626 2.776A1.153 1.153 0 0 1 8 18.123v-5.746a1.151 1.151 0 0 1 1.609-1.035l6.626 2.776ZM19.564 1.677a.25.25 0 0 0-.177-.427H15.6a.106.106 0 0 0-.072.03l-4.54 4.543a.25.25 0 0 0 .177.427h3.783c.027 0 .054-.01.073-.03l4.543-4.543ZM22.071 1.318a.047.047 0 0 0-.045.013l-4.492 4.492a.249.249 0 0 0 .038.385.25.25 0 0 0 .14.042h5.784a.5.5 0 0 0 .5-.5v-2a2.5 2.5 0 0 0-1.925-2.432ZM13.014 1.677a.25.25 0 0 0-.178-.427H9.101a.106.106 0 0 0-.073.03l-4.54 4.543a.25.25 0 0 0 .177.427H8.4a.106.106 0 0 0 .073-.03l4.54-4.543ZM6.513 1.677a.25.25 0 0 0-.177-.427H2.5A2.5 2.5 0 0 0 0 3.75v2a.5.5 0 0 0 .5.5h1.4a.106.106 0 0 0 .073-.03l4.54-4.543Z', - }), - }), - }), - }), - /* @__PURE__ */ jsxs('div', { - className: 'pt-3 sm:pt-5', - children: [ - /* @__PURE__ */ jsx('h2', { - className: 'text-xl font-semibold text-black dark:text-white', - children: 'Laracasts', - }), - /* @__PURE__ */ jsx('p', { - className: 'mt-4 text-sm/relaxed', - children: - 'Laracasts offers thousands of video tutorials on Laravel, PHP, and JavaScript development. Check them out, see for yourself, and massively level up your development skills in the process.', - }), - ], - }), - /* @__PURE__ */ jsx('svg', { - className: 'size-6 shrink-0 self-center stroke-[#FF2D20]', - xmlns: 'http://www.w3.org/2000/svg', - fill: 'none', - viewBox: '0 0 24 24', - strokeWidth: '1.5', - children: /* @__PURE__ */ jsx('path', { - strokeLinecap: 'round', - strokeLinejoin: 'round', - d: 'M4.5 12h15m0 0l-6.75-6.75M19.5 12l-6.75 6.75', - }), - }), - ], - }), - /* @__PURE__ */ jsxs('a', { - href: 'https://laravel-news.com', - className: - 'flex items-start gap-4 rounded-lg bg-white p-6 shadow-[0px_14px_34px_0px_rgba(0,0,0,0.08)] ring-1 ring-white/[0.05] transition duration-300 hover:text-black/70 hover:ring-black/20 focus:outline-none focus-visible:ring-[#FF2D20] dark:bg-zinc-900 dark:ring-zinc-800 dark:hover:text-white/70 dark:hover:ring-zinc-700 dark:focus-visible:ring-[#FF2D20] lg:pb-10', - children: [ - /* @__PURE__ */ jsx('div', { - className: - 'flex size-12 shrink-0 items-center justify-center rounded-full bg-[#FF2D20]/10 sm:size-16', - children: /* @__PURE__ */ jsx('svg', { - className: 'size-5 sm:size-6', - xmlns: 'http://www.w3.org/2000/svg', - fill: 'none', - viewBox: '0 0 24 24', - children: /* @__PURE__ */ jsxs('g', { - fill: '#FF2D20', - children: [ - /* @__PURE__ */ jsx('path', { - d: 'M8.75 4.5H5.5c-.69 0-1.25.56-1.25 1.25v4.75c0 .69.56 1.25 1.25 1.25h3.25c.69 0 1.25-.56 1.25-1.25V5.75c0-.69-.56-1.25-1.25-1.25Z', - }), - /* @__PURE__ */ jsx('path', { - d: 'M24 10a3 3 0 0 0-3-3h-2V2.5a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2V20a3.5 3.5 0 0 0 3.5 3.5h17A3.5 3.5 0 0 0 24 20V10ZM3.5 21.5A1.5 1.5 0 0 1 2 20V3a.5.5 0 0 1 .5-.5h14a.5.5 0 0 1 .5.5v17c0 .295.037.588.11.874a.5.5 0 0 1-.484.625L3.5 21.5ZM22 20a1.5 1.5 0 1 1-3 0V9.5a.5.5 0 0 1 .5-.5H21a1 1 0 0 1 1 1v10Z', - }), - /* @__PURE__ */ jsx('path', { - d: 'M12.751 6.047h2a.75.75 0 0 1 .75.75v.5a.75.75 0 0 1-.75.75h-2A.75.75 0 0 1 12 7.3v-.5a.75.75 0 0 1 .751-.753ZM12.751 10.047h2a.75.75 0 0 1 .75.75v.5a.75.75 0 0 1-.75.75h-2A.75.75 0 0 1 12 11.3v-.5a.75.75 0 0 1 .751-.753ZM4.751 14.047h10a.75.75 0 0 1 .75.75v.5a.75.75 0 0 1-.75.75h-10A.75.75 0 0 1 4 15.3v-.5a.75.75 0 0 1 .751-.753ZM4.75 18.047h7.5a.75.75 0 0 1 .75.75v.5a.75.75 0 0 1-.75.75h-7.5A.75.75 0 0 1 4 19.3v-.5a.75.75 0 0 1 .75-.753Z', - }), - ], - }), - }), - }), - /* @__PURE__ */ jsxs('div', { - className: 'pt-3 sm:pt-5', - children: [ - /* @__PURE__ */ jsx('h2', { - className: 'text-xl font-semibold text-black dark:text-white', - children: 'Laravel News', - }), - /* @__PURE__ */ jsx('p', { - className: 'mt-4 text-sm/relaxed', - children: - 'Laravel News is a community driven portal and newsletter aggregating all of the latest and most important news in the Laravel ecosystem, including new package releases and tutorials.', - }), - ], - }), - /* @__PURE__ */ jsx('svg', { - className: 'size-6 shrink-0 self-center stroke-[#FF2D20]', - xmlns: 'http://www.w3.org/2000/svg', - fill: 'none', - viewBox: '0 0 24 24', - strokeWidth: '1.5', - children: /* @__PURE__ */ jsx('path', { - strokeLinecap: 'round', - strokeLinejoin: 'round', - d: 'M4.5 12h15m0 0l-6.75-6.75M19.5 12l-6.75 6.75', - }), - }), - ], - }), - /* @__PURE__ */ jsxs('div', { - className: - 'flex items-start gap-4 rounded-lg bg-white p-6 shadow-[0px_14px_34px_0px_rgba(0,0,0,0.08)] ring-1 ring-white/[0.05] dark:bg-zinc-900 dark:ring-zinc-800 lg:pb-10', - children: [ - /* @__PURE__ */ jsx('div', { - className: - 'flex size-12 shrink-0 items-center justify-center rounded-full bg-[#FF2D20]/10 sm:size-16', - children: /* @__PURE__ */ jsx('svg', { - className: 'size-5 sm:size-6', - xmlns: 'http://www.w3.org/2000/svg', - fill: 'none', - viewBox: '0 0 24 24', - children: /* @__PURE__ */ jsx('g', { - fill: '#FF2D20', - children: /* @__PURE__ */ jsx('path', { - d: 'M16.597 12.635a.247.247 0 0 0-.08-.237 2.234 2.234 0 0 1-.769-1.68c.001-.195.03-.39.084-.578a.25.25 0 0 0-.09-.267 8.8 8.8 0 0 0-4.826-1.66.25.25 0 0 0-.268.181 2.5 2.5 0 0 1-2.4 1.824.045.045 0 0 0-.045.037 12.255 12.255 0 0 0-.093 3.86.251.251 0 0 0 .208.214c2.22.366 4.367 1.08 6.362 2.118a.252.252 0 0 0 .32-.079 10.09 10.09 0 0 0 1.597-3.733ZM13.616 17.968a.25.25 0 0 0-.063-.407A19.697 19.697 0 0 0 8.91 15.98a.25.25 0 0 0-.287.325c.151.455.334.898.548 1.328.437.827.981 1.594 1.619 2.28a.249.249 0 0 0 .32.044 29.13 29.13 0 0 0 2.506-1.99ZM6.303 14.105a.25.25 0 0 0 .265-.274 13.048 13.048 0 0 1 .205-4.045.062.062 0 0 0-.022-.07 2.5 2.5 0 0 1-.777-.982.25.25 0 0 0-.271-.149 11 11 0 0 0-5.6 2.815.255.255 0 0 0-.075.163c-.008.135-.02.27-.02.406.002.8.084 1.598.246 2.381a.25.25 0 0 0 .303.193 19.924 19.924 0 0 1 5.746-.438ZM9.228 20.914a.25.25 0 0 0 .1-.393 11.53 11.53 0 0 1-1.5-2.22 12.238 12.238 0 0 1-.91-2.465.248.248 0 0 0-.22-.187 18.876 18.876 0 0 0-5.69.33.249.249 0 0 0-.179.336c.838 2.142 2.272 4 4.132 5.353a.254.254 0 0 0 .15.048c1.41-.01 2.807-.282 4.117-.802ZM18.93 12.957l-.005-.008a.25.25 0 0 0-.268-.082 2.21 2.21 0 0 1-.41.081.25.25 0 0 0-.217.2c-.582 2.66-2.127 5.35-5.75 7.843a.248.248 0 0 0-.09.299.25.25 0 0 0 .065.091 28.703 28.703 0 0 0 2.662 2.12.246.246 0 0 0 .209.037c2.579-.701 4.85-2.242 6.456-4.378a.25.25 0 0 0 .048-.189 13.51 13.51 0 0 0-2.7-6.014ZM5.702 7.058a.254.254 0 0 0 .2-.165A2.488 2.488 0 0 1 7.98 5.245a.093.093 0 0 0 .078-.062 19.734 19.734 0 0 1 3.055-4.74.25.25 0 0 0-.21-.41 12.009 12.009 0 0 0-10.4 8.558.25.25 0 0 0 .373.281 12.912 12.912 0 0 1 4.826-1.814ZM10.773 22.052a.25.25 0 0 0-.28-.046c-.758.356-1.55.635-2.365.833a.25.25 0 0 0-.022.48c1.252.43 2.568.65 3.893.65.1 0 .2 0 .3-.008a.25.25 0 0 0 .147-.444c-.526-.424-1.1-.917-1.673-1.465ZM18.744 8.436a.249.249 0 0 0 .15.228 2.246 2.246 0 0 1 1.352 2.054c0 .337-.08.67-.23.972a.25.25 0 0 0 .042.28l.007.009a15.016 15.016 0 0 1 2.52 4.6.25.25 0 0 0 .37.132.25.25 0 0 0 .096-.114c.623-1.464.944-3.039.945-4.63a12.005 12.005 0 0 0-5.78-10.258.25.25 0 0 0-.373.274c.547 2.109.85 4.274.901 6.453ZM9.61 5.38a.25.25 0 0 0 .08.31c.34.24.616.561.8.935a.25.25 0 0 0 .3.127.631.631 0 0 1 .206-.034c2.054.078 4.036.772 5.69 1.991a.251.251 0 0 0 .267.024c.046-.024.093-.047.141-.067a.25.25 0 0 0 .151-.23A29.98 29.98 0 0 0 15.957.764a.25.25 0 0 0-.16-.164 11.924 11.924 0 0 0-2.21-.518.252.252 0 0 0-.215.076A22.456 22.456 0 0 0 9.61 5.38Z', - }), - }), - }), - }), - /* @__PURE__ */ jsxs('div', { - className: 'pt-3 sm:pt-5', - children: [ - /* @__PURE__ */ jsx('h2', { - className: 'text-xl font-semibold text-black dark:text-white', - children: 'Vibrant Ecosystem', - }), - /* @__PURE__ */ jsxs('p', { - className: 'mt-4 text-sm/relaxed', - children: [ - "Laravel's robust library of first-party tools and libraries, such as", - ' ', - /* @__PURE__ */ jsx('a', { - href: 'https://forge.laravel.com', - className: - 'rounded-sm underline hover:text-black focus:outline-none focus-visible:ring-1 focus-visible:ring-[#FF2D20] dark:hover:text-white dark:focus-visible:ring-[#FF2D20]', - children: 'Forge', - }), - ',', - ' ', - /* @__PURE__ */ jsx('a', { - href: 'https://vapor.laravel.com', - className: - 'rounded-sm underline hover:text-black focus:outline-none focus-visible:ring-1 focus-visible:ring-[#FF2D20] dark:hover:text-white', - children: 'Vapor', - }), - ',', - ' ', - /* @__PURE__ */ jsx('a', { - href: 'https://nova.laravel.com', - className: - 'rounded-sm underline hover:text-black focus:outline-none focus-visible:ring-1 focus-visible:ring-[#FF2D20] dark:hover:text-white', - children: 'Nova', - }), - ',', - ' ', - /* @__PURE__ */ jsx('a', { - href: 'https://envoyer.io', - className: - 'rounded-sm underline hover:text-black focus:outline-none focus-visible:ring-1 focus-visible:ring-[#FF2D20] dark:hover:text-white', - children: 'Envoyer', - }), - ', and', - ' ', - /* @__PURE__ */ jsx('a', { - href: 'https://herd.laravel.com', - className: - 'rounded-sm underline hover:text-black focus:outline-none focus-visible:ring-1 focus-visible:ring-[#FF2D20] dark:hover:text-white', - children: 'Herd', - }), - ' ', - 'help you take your projects to the next level. Pair them with powerful open source libraries like', - ' ', - /* @__PURE__ */ jsx('a', { - href: 'https://laravel.com/docs/billing', - className: - 'rounded-sm underline hover:text-black focus:outline-none focus-visible:ring-1 focus-visible:ring-[#FF2D20] dark:hover:text-white', - children: 'Cashier', - }), - ',', - ' ', - /* @__PURE__ */ jsx('a', { - href: 'https://laravel.com/docs/dusk', - className: - 'rounded-sm underline hover:text-black focus:outline-none focus-visible:ring-1 focus-visible:ring-[#FF2D20] dark:hover:text-white', - children: 'Dusk', - }), - ',', - ' ', - /* @__PURE__ */ jsx('a', { - href: 'https://laravel.com/docs/broadcasting', - className: - 'rounded-sm underline hover:text-black focus:outline-none focus-visible:ring-1 focus-visible:ring-[#FF2D20] dark:hover:text-white', - children: 'Echo', - }), - ',', - ' ', - /* @__PURE__ */ jsx('a', { - href: 'https://laravel.com/docs/horizon', - className: - 'rounded-sm underline hover:text-black focus:outline-none focus-visible:ring-1 focus-visible:ring-[#FF2D20] dark:hover:text-white', - children: 'Horizon', - }), - ',', - ' ', - /* @__PURE__ */ jsx('a', { - href: 'https://laravel.com/docs/sanctum', - className: - 'rounded-sm underline hover:text-black focus:outline-none focus-visible:ring-1 focus-visible:ring-[#FF2D20] dark:hover:text-white', - children: 'Sanctum', - }), - ',', - ' ', - /* @__PURE__ */ jsx('a', { - href: 'https://laravel.com/docs/telescope', - className: - 'rounded-sm underline hover:text-black focus:outline-none focus-visible:ring-1 focus-visible:ring-[#FF2D20] dark:hover:text-white', - children: 'Telescope', - }), - ', and more.', - ], - }), - ], - }), - ], - }), - ], - }), - }), - /* @__PURE__ */ jsxs('footer', { - className: 'py-16 text-center text-sm text-black dark:text-white/70', - children: ['Laravel v', laravelVersion, ' (PHP v', phpVersion, ')'], - }), - ], - }), - }), - ], - }), - ], - }); -} -const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze( - /* @__PURE__ */ Object.defineProperty( - { - __proto__: null, - default: Welcome, - }, - Symbol.toStringTag, - { value: 'Module' }, - ), -); -createServer((page) => - createInertiaApp({ - page, - render: ReactDOMServer.renderToString, - resolve: (name) => { - const pages = /* @__PURE__ */ Object.assign({ - './pages/auth/confirm-password.tsx': __vite_glob_0_0, - './pages/auth/forgot-password.tsx': __vite_glob_0_1, - './pages/auth/login.tsx': __vite_glob_0_2, - './pages/auth/register.tsx': __vite_glob_0_3, - './pages/auth/reset-password.tsx': __vite_glob_0_4, - './pages/auth/verify-email.tsx': __vite_glob_0_5, - './pages/dashboard.tsx': __vite_glob_0_6, - './pages/settings/appearance.tsx': __vite_glob_0_7, - './pages/settings/password.tsx': __vite_glob_0_8, - './pages/settings/profile.tsx': __vite_glob_0_9, - './pages/welcome.tsx': __vite_glob_0_10, - }); - return pages[`./pages/${name}.tsx`]; - }, - // prettier-ignore - setup: ({ App: App2, props }) => /* @__PURE__ */ jsx(App2, { ...props }), - }), -); diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 000000000..a136d2248 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,44 @@ +import js from '@eslint/js'; +import prettier from 'eslint-config-prettier'; +import react from 'eslint-plugin-react'; +import reactHooks from 'eslint-plugin-react-hooks'; +import globals from 'globals'; +import typescript from 'typescript-eslint'; + +/** @type {import('eslint').Linter.Config[]} */ +export default [ + js.configs.recommended, + ...typescript.configs.recommended, + { + ...react.configs.flat.recommended, + ...react.configs.flat['jsx-runtime'], // Required for React 17+ + languageOptions: { + globals: { + ...globals.browser, + }, + }, + rules: { + 'react/react-in-jsx-scope': 'off', + 'react/prop-types': 'off', + 'react/no-unescaped-entities': 'off', + }, + settings: { + react: { + version: 'detect', + }, + }, + }, + { + plugins: { + 'react-hooks': reactHooks, + }, + rules: { + 'react-hooks/rules-of-hooks': 'error', + 'react-hooks/exhaustive-deps': 'warn', + }, + }, + { + ignores: ['vendor', 'node_modules', 'public', 'bootstrap/ssr', 'tailwind.config.js'], + }, + prettier, // Turn off all rules that might conflict with Prettier +]; diff --git a/package-lock.json b/package-lock.json index ff160c61c..35e22b8be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "tailwindcss-animate": "^1.0.7" }, "devDependencies": { + "@eslint/js": "^9.19.0", "@inertiajs/react": "^2.0.0", "@types/react": "^19.0.3", "@types/react-dom": "^19.0.2", @@ -32,8 +33,10 @@ "autoprefixer": "^10.4.20", "concurrently": "^9.0.1", "eslint": "^9.17.0", + "eslint-config-prettier": "^10.0.1", "eslint-plugin-react": "^7.37.3", "eslint-plugin-react-hooks": "^5.1.0", + "globals": "^15.14.0", "husky": "^9.1.7", "laravel-vite-plugin": "^1.0", "postcss": "^8.4.49", @@ -44,6 +47,7 @@ "react-dom": "^19.0.0", "tailwindcss": "^3.4.16", "typescript": "^5.7.2", + "typescript-eslint": "^8.23.0", "vite": "^6.0" } }, @@ -341,6 +345,16 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/types": { "version": "7.26.3", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", @@ -919,9 +933,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.17.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", - "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", + "version": "9.19.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.19.0.tgz", + "integrity": "sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==", "dev": true, "license": "MIT", "engines": { @@ -2552,6 +2566,199 @@ "@types/react": "^19.0.0" } }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.23.0.tgz", + "integrity": "sha512-vBz65tJgRrA1Q5gWlRfvoH+w943dq9K1p1yDBY2pc+a1nbBLZp7fB9+Hk8DaALUbzjqlMfgaqlVPT1REJdkt/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.23.0", + "@typescript-eslint/type-utils": "8.23.0", + "@typescript-eslint/utils": "8.23.0", + "@typescript-eslint/visitor-keys": "8.23.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.23.0.tgz", + "integrity": "sha512-h2lUByouOXFAlMec2mILeELUbME5SZRN/7R9Cw2RD2lRQQY08MWMM+PmVVKKJNK1aIwqTo9t/0CvOxwPbRIE2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.23.0", + "@typescript-eslint/types": "8.23.0", + "@typescript-eslint/typescript-estree": "8.23.0", + "@typescript-eslint/visitor-keys": "8.23.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.23.0.tgz", + "integrity": "sha512-OGqo7+dXHqI7Hfm+WqkZjKjsiRtFUQHPdGMXzk5mYXhJUedO7e/Y7i8AK3MyLMgZR93TX4bIzYrfyVjLC+0VSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.23.0", + "@typescript-eslint/visitor-keys": "8.23.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.23.0.tgz", + "integrity": "sha512-iIuLdYpQWZKbiH+RkCGc6iu+VwscP5rCtQ1lyQ7TYuKLrcZoeJVpcLiG8DliXVkUxirW/PWlmS+d6yD51L9jvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.23.0", + "@typescript-eslint/utils": "8.23.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.23.0.tgz", + "integrity": "sha512-1sK4ILJbCmZOTt9k4vkoulT6/y5CHJ1qUYxqpF1K/DBAd8+ZUL4LlSCxOssuH5m4rUaaN0uS0HlVPvd45zjduQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.23.0.tgz", + "integrity": "sha512-LcqzfipsB8RTvH8FX24W4UUFk1bl+0yTOf9ZA08XngFwMg4Kj8A+9hwz8Cr/ZS4KwHrmo9PJiLZkOt49vPnuvQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.23.0", + "@typescript-eslint/visitor-keys": "8.23.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.0.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.23.0.tgz", + "integrity": "sha512-uB/+PSo6Exu02b5ZEiVtmY6RVYO7YU5xqgzTIVZwTHvvK3HsL8tZZHFaTLFtRG3CsV4A5mhOv+NZx5BlhXPyIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.23.0", + "@typescript-eslint/types": "8.23.0", + "@typescript-eslint/typescript-estree": "8.23.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.23.0.tgz", + "integrity": "sha512-oWWhcWDLwDfu++BGTZcmXWqpwtkwb5o7fxUIGksMQQDSdPW9prsSnfIOZMlsj4vBOSrcnjIUZMiIjODgGosFhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.23.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@vitejs/plugin-react": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.4.tgz", @@ -3823,6 +4030,19 @@ } } }, + "node_modules/eslint-config-prettier": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.0.1.tgz", + "integrity": "sha512-lZBts941cyJyeaooiKxAtzoPHTN+GbQTJFAIdQbRhA4/8whaAraEh47Whw/ZFfrjNSnlAxqfm9i0XVAEkULjCw==", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "build/bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, "node_modules/eslint-plugin-react": { "version": "7.37.3", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.3.tgz", @@ -3941,6 +4161,16 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/@eslint/js": { + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", + "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -4385,13 +4615,16 @@ } }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "15.14.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.14.0.tgz", + "integrity": "sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globalthis": { @@ -4424,6 +4657,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, "node_modules/has-bigints": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", @@ -6892,6 +7132,19 @@ "tree-kill": "cli.js" } }, + "node_modules/ts-api-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.1.tgz", + "integrity": "sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/ts-interface-checker": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", @@ -7009,6 +7262,29 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.23.0.tgz", + "integrity": "sha512-/LBRo3HrXr5LxmrdYSOCvoAMm7p2jNizNfbIpCgvG4HMsnoprRUOce/+8VJ9BDYWW68rqIENE/haVLWPeFZBVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.23.0", + "@typescript-eslint/parser": "8.23.0", + "@typescript-eslint/utils": "8.23.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, "node_modules/unbox-primitive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", diff --git a/package.json b/package.json index c0f1028a3..b11851090 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,10 @@ "prepare": "husky install", "format": "prettier --write .", "format:check": "prettier --check .", - "lint": "./node_modules/.bin/eslint resources/js --ext .js,.jsx,.ts,.tsx" + "lint": "eslint . --fix" }, "devDependencies": { + "@eslint/js": "^9.19.0", "@inertiajs/react": "^2.0.0", "@types/react": "^19.0.3", "@types/react-dom": "^19.0.2", @@ -18,8 +19,10 @@ "autoprefixer": "^10.4.20", "concurrently": "^9.0.1", "eslint": "^9.17.0", + "eslint-config-prettier": "^10.0.1", "eslint-plugin-react": "^7.37.3", "eslint-plugin-react-hooks": "^5.1.0", + "globals": "^15.14.0", "husky": "^9.1.7", "laravel-vite-plugin": "^1.0", "postcss": "^8.4.49", @@ -30,6 +33,7 @@ "react-dom": "^19.0.0", "tailwindcss": "^3.4.16", "typescript": "^5.7.2", + "typescript-eslint": "^8.23.0", "vite": "^6.0" }, "dependencies": { @@ -52,4 +56,4 @@ "tailwind-merge": "^2.5.5", "tailwindcss-animate": "^1.0.7" } -} \ No newline at end of file +} diff --git a/resources/js/app.tsx b/resources/js/app.tsx index 3b9762202..42dd864eb 100644 --- a/resources/js/app.tsx +++ b/resources/js/app.tsx @@ -7,7 +7,7 @@ import { route as routeFn } from 'ziggy-js'; import { initializeTheme } from './hooks/use-appearance'; declare global { - var route: typeof routeFn; + const route: typeof routeFn; } const appName = import.meta.env.VITE_APP_NAME || 'Laravel'; diff --git a/resources/js/components/app-header.tsx b/resources/js/components/app-header.tsx index 134b52722..d38f7e8fd 100644 --- a/resources/js/components/app-header.tsx +++ b/resources/js/components/app-header.tsx @@ -1,42 +1,25 @@ -import { Link, usePage } from '@inertiajs/react'; -import { type BreadcrumbItem } from '@/types'; -import AppLogo from './app-logo'; -import AppLogoIcon from './app-logo-icon'; -import { Button } from "@/components/ui/button" import { Breadcrumbs } from '@/components/breadcrumbs'; +import { Icon } from '@/components/icon'; +import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; +import { Button } from '@/components/ui/button'; +import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '@/components/ui/dropdown-menu'; import { NavigationMenu, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, navigationMenuTriggerStyle, -} from "@/components/ui/navigation-menu" -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu" -import { - Tooltip, - TooltipContent, - TooltipProvider, - TooltipTrigger, -} from "@/components/ui/tooltip" -import { type NavItem } from '@/types'; -import { - Sheet, - SheetContent, - SheetHeader, - SheetTitle, - SheetTrigger, -} from "@/components/ui/sheet" -import { type SharedData } from '@/types'; -import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" -import { Menu, ChevronDown, FolderGit2, BookOpenText, Search, LayoutGrid } from 'lucide-react' -import { useInitials } from '@/hooks/use-initials'; -import { cn } from "@/lib/utils"; +} from '@/components/ui/navigation-menu'; +import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from '@/components/ui/sheet'; +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'; import { UserMenuContent } from '@/components/user-menu-content'; -import { Icon } from '@/components/icon'; +import { useInitials } from '@/hooks/use-initials'; +import { cn } from '@/lib/utils'; +import { type BreadcrumbItem, type NavItem, type SharedData } from '@/types'; +import { Link, usePage } from '@inertiajs/react'; +import { BookOpenText, ChevronDown, FolderGit2, LayoutGrid, Menu, Search } from 'lucide-react'; +import AppLogo from './app-logo'; +import AppLogoIcon from './app-logo-icon'; const mainNavItems: NavItem[] = [ { @@ -59,7 +42,7 @@ const rightNavItems: NavItem[] = [ }, ]; -const activeItemStyles = "bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-100"; +const activeItemStyles = 'bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-100'; interface AppHeaderProps { breadcrumbs?: BreadcrumbItem[]; @@ -70,125 +53,128 @@ export function AppHeader({ breadcrumbs = [] }: AppHeaderProps) { const getInitials = useInitials(); return ( <> -
-
- {/* Mobile Menu */} -
- - - - - - Navigation Menu - - - -
-
-
- {mainNavItems.map((item) => ( - - {item.icon && } - {item.title} - - ))} -
+
+
+ {/* Mobile Menu */} +
+ + + + + + Navigation Menu + + + +
+
+
+ {mainNavItems.map((item) => ( + + {item.icon && } + {item.title} + + ))} +
-
- {rightNavItems.map((item) => ( - - {item.icon && } - {item.title} - - ))} +
+ {rightNavItems.map((item) => ( + + {item.icon && } + {item.title} + + ))} +
-
-
-
-
- - - - + + +
- {/* Desktop Navigation */} -
- - + + + - {mainNavItems.map((item, index) => ( - - - - {item.icon && } - {item.title} - - -
-
- ))} -
-
-
+ {/* Desktop Navigation */} +
+ + + {mainNavItems.map((item, index) => ( + + + + {item.icon && } + {item.title} + + +
+
+ ))} +
+
+
-
-
- -
- {rightNavItems.map((item) => ( - - - - - - -

{item.title}

-
-
-
- ))} +
+
+ +
+ {rightNavItems.map((item) => ( + + + + + + +

{item.title}

+
+
+
+ ))} +
+ + + + + + + +
- - - - - - - -
-
- {breadcrumbs.length > 1 && ( -
-
- + {breadcrumbs.length > 1 && ( +
+
+ +
-
- )} - - ) -} \ No newline at end of file + )} + + ); +} diff --git a/resources/js/components/app-logo.tsx b/resources/js/components/app-logo.tsx index 7b4d788d7..7d9b74e12 100644 --- a/resources/js/components/app-logo.tsx +++ b/resources/js/components/app-logo.tsx @@ -1,7 +1,6 @@ -import { SVGAttributes } from 'react'; import AppLogoIcon from './app-logo-icon'; -export default function AppLogo(props: SVGAttributes) { +export default function AppLogo() { return ( <>
diff --git a/resources/js/components/appearance-dropdown.tsx b/resources/js/components/appearance-dropdown.tsx index d7ded4828..0335963bd 100644 --- a/resources/js/components/appearance-dropdown.tsx +++ b/resources/js/components/appearance-dropdown.tsx @@ -4,9 +4,7 @@ import { useAppearance } from '@/hooks/use-appearance'; import { Monitor, Moon, Sun } from 'lucide-react'; import { HTMLAttributes } from 'react'; -interface AppearanceToggleDropdownProps extends HTMLAttributes {} - -export default function AppearanceToggleDropdown({ className = '', ...props }: AppearanceToggleDropdownProps) { +export default function AppearanceToggleDropdown({ className = '', ...props }: HTMLAttributes) { const { appearance, updateAppearance } = useAppearance(); const getCurrentIcon = () => { diff --git a/resources/js/components/appearance-tabs.tsx b/resources/js/components/appearance-tabs.tsx index a93f8e085..898d2911c 100644 --- a/resources/js/components/appearance-tabs.tsx +++ b/resources/js/components/appearance-tabs.tsx @@ -1,13 +1,11 @@ -import { useAppearance } from '@/hooks/use-appearance'; -import { Monitor, Moon, Sun } from 'lucide-react'; +import { Appearance, useAppearance } from '@/hooks/use-appearance'; +import { LucideIcon, Monitor, Moon, Sun } from 'lucide-react'; import { HTMLAttributes } from 'react'; -interface AppearanceToggleTabProps extends HTMLAttributes {} - -export default function AppearanceToggleTab({ className = '', ...props }: AppearanceToggleTabProps) { +export default function AppearanceToggleTab({ className = '', ...props }: HTMLAttributes) { const { appearance, updateAppearance } = useAppearance(); - const tabs = [ + const tabs: { value: Appearance; icon: LucideIcon; label: string }[] = [ { value: 'light', icon: Sun, label: 'Light' }, { value: 'dark', icon: Moon, label: 'Dark' }, { value: 'system', icon: Monitor, label: 'System' }, diff --git a/resources/js/layouts/settings/layout.tsx b/resources/js/layouts/settings/layout.tsx index b556535b4..1a7bcd2bb 100644 --- a/resources/js/layouts/settings/layout.tsx +++ b/resources/js/layouts/settings/layout.tsx @@ -25,7 +25,6 @@ const sidebarNavItems: NavItem[] = [ export default function SettingsLayout({ children }: { children: React.ReactNode }) { const currentPath = window.location.pathname; - const currentItem = sidebarNavItems.find((item) => currentPath === item.url); return (
diff --git a/resources/js/pages/auth/reset-password.tsx b/resources/js/pages/auth/reset-password.tsx index 915ca86b8..f40c5381e 100644 --- a/resources/js/pages/auth/reset-password.tsx +++ b/resources/js/pages/auth/reset-password.tsx @@ -21,7 +21,7 @@ interface ResetPasswordForm { } export default function ResetPassword({ token, email }: ResetPasswordProps) { - const { data, setData, post, processing, errors, reset } = useForm({ + const { data, setData, post, processing, errors, reset } = useForm({ token: token, email: email, password: '', diff --git a/resources/js/pages/settings/password.tsx b/resources/js/pages/settings/password.tsx index 4ff950899..ef82aed9e 100644 --- a/resources/js/pages/settings/password.tsx +++ b/resources/js/pages/settings/password.tsx @@ -18,7 +18,7 @@ const breadcrumbs: BreadcrumbItem[] = [ }, ]; -export default function Password({ className = '' }: { className?: string }) { +export default function Password() { const passwordInput = useRef(null); const currentPasswordInput = useRef(null); diff --git a/resources/js/types/index.ts b/resources/js/types/index.ts index 6fe508617..45621cc5f 100644 --- a/resources/js/types/index.ts +++ b/resources/js/types/index.ts @@ -25,7 +25,7 @@ export interface SharedData { auth: Auth; name: string; quote: { message: string; author: string }; - [key: string]: any; + [key: string]: unknown; } export interface User { @@ -36,5 +36,5 @@ export interface User { email_verified_at: string | null; created_at: string; updated_at: string; - [key: string]: any; // This allows for additional properties + [key: string]: unknown; // This allows for additional properties }