Skip to content

Commit

Permalink
Merge branch 'dev' into shift-schedule-page
Browse files Browse the repository at this point in the history
  • Loading branch information
seandreassen committed Oct 30, 2024
2 parents 22c4241 + 4560e47 commit 7d6bdc5
Show file tree
Hide file tree
Showing 27 changed files with 173 additions and 175 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
File renamed without changes.
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions lighthouserc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down
52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]",
"@types/react-dom": "npm:[email protected]",
"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:[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion src/components/shift-schedule/RegisterSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function RegisterSection({ className }: { className?: string }) {
<Label htmlFor='recurring'>{t('recurring')}: </Label>
<Checkbox id='recurring' />
</section>
<Button>{t('register')}</Button>
<Button className='float-right'>{t('register')}</Button>
</section>
);
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/ui/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof AvatarPrimitive.Root>,
const Avatar = forwardRef<
React.ComponentRef<typeof AvatarPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
>(({ className, ...props }, ref) => (
<AvatarPrimitive.Root
Expand All @@ -19,8 +19,8 @@ const Avatar = React.forwardRef<
));
Avatar.displayName = AvatarPrimitive.Root.displayName;

const AvatarFallback = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Fallback>,
const AvatarFallback = forwardRef<
React.ComponentRef<typeof AvatarPrimitive.Fallback>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
>(({ className, ...props }, ref) => (
<AvatarPrimitive.Fallback
Expand Down
1 change: 0 additions & 1 deletion src/components/ui/Badge.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { type VariantProps, cva, cx } from '@/lib/utils';
import type * as React from 'react';

const badgeVariants = cva({
base: 'inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type VariantProps, cva } from '@/lib/utils';
import { Slot } from '@radix-ui/react-slot';
import * as React from 'react';
import { forwardRef } from 'react';

const buttonVariants = cva({
base: 'inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium text-sm 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',
Expand Down Expand Up @@ -39,7 +39,7 @@ export interface ButtonProps
asChild?: boolean;
}

const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
const Button = forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : 'button';
return (
Expand Down
37 changes: 18 additions & 19 deletions src/components/ui/Card.tsx
Original file line number Diff line number Diff line change
@@ -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<HTMLHeadingElement>;

const Card = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
<div
ref={ref}
className={cx(
'rounded-lg border bg-card text-card-foreground shadow-sm',
className,
)}
{...props}
/>
));
const Card = forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
({ className, ...props }, ref) => (
<div
ref={ref}
className={cx(
'rounded-lg border bg-card text-card-foreground shadow-sm',
className,
)}
{...props}
/>
),
);
Card.displayName = 'Card';

const CardHeader = React.forwardRef<
const CardHeader = forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
Expand All @@ -32,7 +31,7 @@ const CardHeader = React.forwardRef<
));
CardHeader.displayName = 'CardHeader';

const CardTitle = React.forwardRef<HTMLParagraphElement, CardTitleProps>(
const CardTitle = forwardRef<HTMLParagraphElement, CardTitleProps>(
({ level = 'h3', className, ...props }, ref) => {
const Component = level;

Expand All @@ -50,7 +49,7 @@ const CardTitle = React.forwardRef<HTMLParagraphElement, CardTitleProps>(
);
CardTitle.displayName = 'CardTitle';

const CardDescription = React.forwardRef<
const CardDescription = forwardRef<
HTMLParagraphElement,
React.HTMLAttributes<HTMLParagraphElement>
>(({ className, ...props }, ref) => (
Expand All @@ -62,15 +61,15 @@ const CardDescription = React.forwardRef<
));
CardDescription.displayName = 'CardDescription';

const CardContent = React.forwardRef<
const CardContent = forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
<div ref={ref} className={cx('p-6 pt-0', className)} {...props} />
));
CardContent.displayName = 'CardContent';

const CardFooter = React.forwardRef<
const CardFooter = forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
Expand Down
6 changes: 3 additions & 3 deletions src/components/ui/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof CheckboxPrimitive.Root>,
const Checkbox = forwardRef<
React.ComponentRef<typeof CheckboxPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
>(({ className, ...props }, ref) => (
<CheckboxPrimitive.Root
Expand Down
6 changes: 3 additions & 3 deletions src/components/ui/Combobox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from '@/components/ui/Popover';
import { cx } from '@/lib/utils';
import { CheckIcon, ChevronsUpDownIcon } from 'lucide-react';
import * as React from 'react';
import { useState } from 'react';

type ComboboxProps = {
choices: {
Expand All @@ -42,8 +42,8 @@ function Combobox({
initialValue,
ariaLabel,
}: ComboboxProps) {
const [open, setOpen] = React.useState(false);
const [value, setValue] = React.useState<string | null>(initialValue ?? '');
const [open, setOpen] = useState(false);
const [value, setValue] = useState<string | null>(initialValue ?? '');

return (
<Popover open={open} onOpenChange={setOpen}>
Expand Down
30 changes: 15 additions & 15 deletions src/components/ui/Command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof CommandPrimitive>,
const Command = forwardRef<
React.ComponentRef<typeof CommandPrimitive>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive>
>(({ className, ...props }, ref) => (
<CommandPrimitive
Expand Down Expand Up @@ -36,8 +36,8 @@ const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
);
};

const CommandInput = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Input>,
const CommandInput = forwardRef<
React.ComponentRef<typeof CommandPrimitive.Input>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
>(({ className, ...props }, ref) => (
<div className='flex items-center border-b px-3' cmdk-input-wrapper=''>
Expand All @@ -55,8 +55,8 @@ const CommandInput = React.forwardRef<

CommandInput.displayName = CommandPrimitive.Input.displayName;

const CommandList = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.List>,
const CommandList = forwardRef<
React.ComponentRef<typeof CommandPrimitive.List>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
>(({ className, ...props }, ref) => (
<CommandPrimitive.List
Expand All @@ -68,8 +68,8 @@ const CommandList = React.forwardRef<

CommandList.displayName = CommandPrimitive.List.displayName;

const CommandEmpty = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Empty>,
const CommandEmpty = forwardRef<
React.ComponentRef<typeof CommandPrimitive.Empty>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
>((props, ref) => (
<CommandPrimitive.Empty
Expand All @@ -81,8 +81,8 @@ const CommandEmpty = React.forwardRef<

CommandEmpty.displayName = CommandPrimitive.Empty.displayName;

const CommandGroup = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Group>,
const CommandGroup = forwardRef<
React.ComponentRef<typeof CommandPrimitive.Group>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
>(({ className, ...props }, ref) => (
<CommandPrimitive.Group
Expand All @@ -97,8 +97,8 @@ const CommandGroup = React.forwardRef<

CommandGroup.displayName = CommandPrimitive.Group.displayName;

const CommandSeparator = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Separator>,
const CommandSeparator = forwardRef<
React.ComponentRef<typeof CommandPrimitive.Separator>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
>(({ className, ...props }, ref) => (
<CommandPrimitive.Separator
Expand All @@ -109,8 +109,8 @@ const CommandSeparator = React.forwardRef<
));
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;

const CommandItem = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Item>,
const CommandItem = forwardRef<
React.ComponentRef<typeof CommandPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
>(({ className, ...props }, ref) => (
<CommandPrimitive.Item
Expand Down
Loading

0 comments on commit 7d6bdc5

Please sign in to comment.