diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dd0814b..9deae11 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ ### Development setup -Make sure you have Bun installed on your machine. If you don't have it, you can download it [here](https://bun.sh/docs/installation). +Make sure you have Bun installed on your machine. If you don't have it, you can download it [here](https://bun.sh/docs/installation). Here is some information about Bun in Next.js: [Build an app with Next.js and Bun](https://bun.sh/guides/ecosystem/nextjs). If you can't install Bun, you can always use [Node.js](https://nodejs.org/en/) with the `npm` command instead, but it will not be as fast as Bun. diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/bun.lockb b/bun.lockb index dee7342..1ed5e7e 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/lighthouserc.cjs b/lighthouserc.cjs index 6abc5ee..1f06549 100644 --- a/lighthouserc.cjs +++ b/lighthouserc.cjs @@ -13,6 +13,7 @@ const config = { 'http://localhost:3000/en/news/1', 'http://localhost:3000/en/storage', 'http://localhost:3000/en/storage/shopping-cart', + 'http://localhost:3000/en/shift-schedule', ], startServerCommand: 'bun run start', }, diff --git a/package.json b/package.json index 0219872..a496c1d 100644 --- a/package.json +++ b/package.json @@ -19,67 +19,67 @@ "s3:start": "docker-compose up s3" }, "dependencies": { - "@aws-sdk/client-s3": "^3.637.0", + "@aws-sdk/client-s3": "^3.679.0", "@lucia-auth/adapter-drizzle": "^1.1.0", - "@radix-ui/react-avatar": "^1.1.0", + "@radix-ui/react-avatar": "^1.1.1", "@radix-ui/react-checkbox": "^1.1.2", "@radix-ui/react-collapsible": "^1.1.1", - "@radix-ui/react-dialog": "^1.1.1", - "@radix-ui/react-dropdown-menu": "^2.1.1", + "@radix-ui/react-dialog": "^1.1.2", + "@radix-ui/react-dropdown-menu": "^2.1.2", "@radix-ui/react-label": "^2.1.0", - "@radix-ui/react-popover": "^1.1.1", + "@radix-ui/react-popover": "^1.1.2", "@radix-ui/react-scroll-area": "^1.2.0", - "@radix-ui/react-select": "^2.1.1", + "@radix-ui/react-select": "^2.1.2", "@radix-ui/react-separator": "^1.1.0", "@radix-ui/react-slot": "^1.1.0", - "@radix-ui/react-tooltip": "^1.1.1", + "@radix-ui/react-tooltip": "^1.1.3", "@t3-oss/env-nextjs": "^0.10.1", "@tanstack/react-form": "^0.34.1", - "@tanstack/react-query": "^5.53.1", + "@tanstack/react-query": "^5.59.16", "@tanstack/zod-form-adapter": "^0.34.1", - "@trpc/client": "^11.0.0-rc.490", - "@trpc/react-query": "^11.0.0-rc.490", - "@trpc/server": "^11.0.0-rc.490", + "@trpc/client": "^11.0.0-rc.599", + "@trpc/react-query": "^11.0.0-rc.599", + "@trpc/server": "^11.0.0-rc.599", "cmdk": "1.0.0", - "country-flag-icons": "^1.5.12", + "country-flag-icons": "^1.5.13", "cva": "^1.0.0-beta.1", "date-fns": "^4.1.0", "drizzle-orm": "^0.33.0", - "lucia": "^3.2.0", + "lucia": "3.2.0", "lucide-react": "^0.396.0", - "next": "15.0.1", + "next": "^15.0.1", "next-intl": "^3.23.5", "next-themes": "1.0.0-beta.0", "nuqs": "^2.0.4", - "postgres": "^3.4.4", - "react": "19.0.0-rc-69d4b800-20241021", - "react-day-picker": "^9.1.4", - "react-dom": "19.0.0-rc-69d4b800-20241021", + "postgres": "^3.4.5", + "react": "^19.0.0-rc-fb9a90fa48-20240614", + "react-day-picker": "^9.2.1", + "react-dom": "^19.0.0-rc-fb9a90fa48-20240614", "reading-time": "^1.5.0", "superjson": "^2.2.1", - "tailwind-merge": "^2.5.2", + "tailwind-merge": "^2.5.4", "vaul": "^1.1.0", "zod": "^3.23.8" }, "devDependencies": { - "@biomejs/biome": "^1.9.1", + "@biomejs/biome": "^1.9.4", "@fluid-tailwind/tailwind-merge": "^0.0.2", - "@types/node": "^20.14.8", + "@types/bun": "^1.1.12", "@types/react": "npm:types-react@19.0.0-rc.1", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1", "autoprefixer": "^10.4.20", "client-only": "^0.0.1", "cross-env": "^7.0.3", - "drizzle-kit": "^0.24.1", + "drizzle-kit": "^0.24.2", "fluid-tailwind": "^1.0.3", - "lefthook": "^1.7.14", - "postcss": "^8.4.38", + "lefthook": "^1.8.1", + "postcss": "^8.4.47", "server-only": "^0.0.1", "tailwind-scrollbar": "^3.1.0", - "tailwindcss": "^3.4.4", + "tailwindcss": "^3.4.14", "tailwindcss-animate": "^1.0.7", "tailwindcss-radix": "^3.0.5", - "typescript": "^5.5.0" + "typescript": "^5.6.3" }, "overrides": { "@types/react": "npm:types-react@19.0.0-rc.1", diff --git a/src/components/shift-schedule/RegisterSection.tsx b/src/components/shift-schedule/RegisterSection.tsx index 0342ced..46a68cf 100644 --- a/src/components/shift-schedule/RegisterSection.tsx +++ b/src/components/shift-schedule/RegisterSection.tsx @@ -15,7 +15,7 @@ function RegisterSection({ className }: { className?: string }) { - + ); } diff --git a/src/components/ui/Avatar.tsx b/src/components/ui/Avatar.tsx index a9166d5..2a6b693 100644 --- a/src/components/ui/Avatar.tsx +++ b/src/components/ui/Avatar.tsx @@ -2,10 +2,10 @@ import { cx } from '@/lib/utils'; import * as AvatarPrimitive from '@radix-ui/react-avatar'; -import * as React from 'react'; +import { forwardRef } from 'react'; -const Avatar = React.forwardRef< - React.ElementRef, +const Avatar = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , +const AvatarFallback = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( ( +const Button = forwardRef( ({ className, variant, size, asChild = false, ...props }, ref) => { const Comp = asChild ? Slot : 'button'; return ( diff --git a/src/components/ui/Card.tsx b/src/components/ui/Card.tsx index ac5b4b8..b43dd24 100644 --- a/src/components/ui/Card.tsx +++ b/src/components/ui/Card.tsx @@ -1,26 +1,25 @@ import { cx } from '@/lib/utils'; -import * as React from 'react'; +import { forwardRef } from 'react'; type CardTitleProps = { level?: 'h2' | 'h3' | 'h4'; } & React.HTMLAttributes; -const Card = React.forwardRef< - HTMLDivElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( -
-)); +const Card = forwardRef>( + ({ className, ...props }, ref) => ( +
+ ), +); Card.displayName = 'Card'; -const CardHeader = React.forwardRef< +const CardHeader = forwardRef< HTMLDivElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( @@ -32,7 +31,7 @@ const CardHeader = React.forwardRef< )); CardHeader.displayName = 'CardHeader'; -const CardTitle = React.forwardRef( +const CardTitle = forwardRef( ({ level = 'h3', className, ...props }, ref) => { const Component = level; @@ -50,7 +49,7 @@ const CardTitle = React.forwardRef( ); CardTitle.displayName = 'CardTitle'; -const CardDescription = React.forwardRef< +const CardDescription = forwardRef< HTMLParagraphElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( @@ -62,7 +61,7 @@ const CardDescription = React.forwardRef< )); CardDescription.displayName = 'CardDescription'; -const CardContent = React.forwardRef< +const CardContent = forwardRef< HTMLDivElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( @@ -70,7 +69,7 @@ const CardContent = React.forwardRef< )); CardContent.displayName = 'CardContent'; -const CardFooter = React.forwardRef< +const CardFooter = forwardRef< HTMLDivElement, React.HTMLAttributes >(({ className, ...props }, ref) => ( diff --git a/src/components/ui/Checkbox.tsx b/src/components/ui/Checkbox.tsx index 8159c24..e4f5cd9 100644 --- a/src/components/ui/Checkbox.tsx +++ b/src/components/ui/Checkbox.tsx @@ -2,12 +2,12 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox'; import { Check } from 'lucide-react'; -import * as React from 'react'; +import { forwardRef } from 'react'; import { cx } from '@/lib/utils'; -const Checkbox = React.forwardRef< - React.ElementRef, +const Checkbox = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( (initialValue ?? ''); + const [open, setOpen] = useState(false); + const [value, setValue] = useState(initialValue ?? ''); return ( diff --git a/src/components/ui/Command.tsx b/src/components/ui/Command.tsx index 15ddba2..d362f0a 100644 --- a/src/components/ui/Command.tsx +++ b/src/components/ui/Command.tsx @@ -5,10 +5,10 @@ import { cx } from '@/lib/utils'; import type { DialogProps } from '@radix-ui/react-dialog'; import { Command as CommandPrimitive } from 'cmdk'; import { SearchIcon } from 'lucide-react'; -import * as React from 'react'; +import { forwardRef } from 'react'; -const Command = React.forwardRef< - React.ElementRef, +const Command = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( { ); }; -const CommandInput = React.forwardRef< - React.ElementRef, +const CommandInput = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => (
@@ -55,8 +55,8 @@ const CommandInput = React.forwardRef< CommandInput.displayName = CommandPrimitive.Input.displayName; -const CommandList = React.forwardRef< - React.ElementRef, +const CommandList = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , +const CommandEmpty = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >((props, ref) => ( , +const CommandGroup = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , +const CommandSeparator = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , +const CommandItem = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , +const DialogOverlay = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , +const DialogContent = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( @@ -80,8 +80,8 @@ const DialogFooter = ({ ); DialogFooter.displayName = 'DialogFooter'; -const DialogTitle = React.forwardRef< - React.ElementRef, +const DialogTitle = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , +const DialogDescription = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , +const DrawerOverlay = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , +const DrawerContent = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( @@ -77,8 +77,8 @@ const DrawerFooter = ({ ); DrawerFooter.displayName = 'DrawerFooter'; -const DrawerTitle = React.forwardRef< - React.ElementRef, +const DrawerTitle = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , +const DrawerDescription = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , +const DropdownMenuSubTrigger = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef & { inset?: boolean; } @@ -40,8 +40,8 @@ const DropdownMenuSubTrigger = React.forwardRef< DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName; -const DropdownMenuSubContent = React.forwardRef< - React.ElementRef, +const DropdownMenuSubContent = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( , +const DropdownMenuContent = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, sideOffset = 4, ...props }, ref) => ( @@ -74,8 +74,8 @@ const DropdownMenuContent = React.forwardRef< )); DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; -const DropdownMenuItem = React.forwardRef< - React.ElementRef, +const DropdownMenuItem = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef & { inset?: boolean; } @@ -92,8 +92,8 @@ const DropdownMenuItem = React.forwardRef< )); DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; -const DropdownMenuCheckboxItem = React.forwardRef< - React.ElementRef, +const DropdownMenuCheckboxItem = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, children, checked, ...props }, ref) => ( , +const DropdownMenuRadioItem = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( , +const DropdownMenuLabel = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef & { inset?: boolean; } @@ -156,8 +156,8 @@ const DropdownMenuLabel = React.forwardRef< )); DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName; -const DropdownMenuSeparator = React.forwardRef< - React.ElementRef, +const DropdownMenuSeparator = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( ( +const FormItemContext = createContext( {} as FormItemContextValue, ); @@ -73,7 +73,7 @@ const FormItem = ({ errors, ...props }: React.HTMLAttributes & { errors: ValidationError[] }) => { - const id = React.useId(); + const id = useId(); return ( @@ -83,7 +83,7 @@ const FormItem = ({ }; const useFormItem = () => { - const itemContext = React.useContext(FormItemContext); + const itemContext = useContext(FormItemContext); if (!itemContext) { throw new Error('useFormField should be used within '); diff --git a/src/components/ui/Input.tsx b/src/components/ui/Input.tsx index 18d6b46..f2f405b 100644 --- a/src/components/ui/Input.tsx +++ b/src/components/ui/Input.tsx @@ -1,10 +1,10 @@ -import * as React from 'react'; +import { forwardRef } from 'react'; import { cx } from '@/lib/utils'; export type InputProps = React.InputHTMLAttributes; -const Input = React.forwardRef( +const Input = forwardRef( ({ className, type, ...props }, ref) => { return ( , +const Label = forwardRef< + React.ComponentRef, React.ComponentPropsWithoutRef & VariantProps >(({ className, ...props }, ref) => ( diff --git a/src/components/ui/Pagination.tsx b/src/components/ui/Pagination.tsx index 1bfeb6f..0c3e30b 100644 --- a/src/components/ui/Pagination.tsx +++ b/src/components/ui/Pagination.tsx @@ -5,7 +5,7 @@ import { ChevronRightIcon, MoreHorizontalIcon, } from 'lucide-react'; -import * as React from 'react'; +import { forwardRef } from 'react'; const Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => (