chore: upgrade deps and linting

This commit is contained in:
Mythie
2023-08-01 17:34:17 +10:00
parent 0fca2e9f4e
commit dc58f77c61
34 changed files with 2189 additions and 16450 deletions

View File

@ -17,7 +17,7 @@ import { AddSubjectFormPartial } from '~/components/forms/edit-document/add-subj
const PDFViewer = dynamic(async () => import('~/components/(dashboard)/pdf-viewer/pdf-viewer'), {
ssr: false,
loading: () => (
<div className="dark:bg-background flex-col flex min-h-[80vh] items-center justify-center bg-white/50">
<div className="dark:bg-background flex min-h-[80vh] flex-col items-center justify-center bg-white/50">
<Loader className="text-documenso h-12 w-12 animate-spin" />
<p className="text-muted-foreground mt-4">Loading document...</p>

View File

@ -16,7 +16,7 @@ export type LoadablePDFCard = PDFViewerProps & {
const PDFViewer = dynamic(async () => import('~/components/(dashboard)/pdf-viewer/pdf-viewer'), {
ssr: false,
loading: () => (
<div className="flex-col flex min-h-[80vh] items-center justify-center bg-white/50">
<div className="flex min-h-[80vh] flex-col items-center justify-center bg-white/50">
<Loader className="h-12 w-12 animate-spin text-slate-500" />
<p className="mt-4 text-slate-500">Loading document...</p>

View File

@ -4,7 +4,7 @@ import { ChevronLeft, Loader } from 'lucide-react';
export default function Loading() {
return (
<div className="flex-col mx-auto -mt-4 flex w-full max-w-screen-xl px-4 md:px-8">
<div className="mx-auto -mt-4 flex w-full max-w-screen-xl flex-col px-4 md:px-8">
<Link href="/documents" className="flex grow-0 items-center text-[#7AC455] hover:opacity-80">
<ChevronLeft className="mr-2 inline-block h-5 w-5" />
Documents
@ -14,7 +14,7 @@ export default function Loading() {
</h1>
<div className="mt-8 grid min-h-[80vh] w-full grid-cols-12 gap-x-8">
<div className="dark:bg-background border-border col-span-12 rounded-xl border-2 bg-white/50 p-2 before:rounded-xl lg:col-span-6 xl:col-span-7">
<div className="flex-col flex min-h-[80vh] items-center justify-center">
<div className="flex min-h-[80vh] flex-col items-center justify-center">
<Loader className="text-documenso h-12 w-12 animate-spin" />
<p className="text-muted-foreground mt-4">Loading document...</p>

View File

@ -4,7 +4,7 @@ import { ChevronLeft } from 'lucide-react';
export default function DocumentSentPage() {
return (
<div className="flex-col mx-auto -mt-4 flex w-full max-w-screen-xl px-4 md:px-8">
<div className="mx-auto -mt-4 flex w-full max-w-screen-xl flex-col px-4 md:px-8">
<Link href="/documents" className="flex grow-0 items-center text-[#7AC455] hover:opacity-80">
<ChevronLeft className="mr-2 inline-block h-5 w-5" />
Documents

View File

@ -102,7 +102,7 @@ export const DocumentDropzone = ({ className, onDrop, ...props }: DocumentDropzo
<Card
role="button"
className={cn(
'focus-visible:ring-ring ring-offset-background flex-col flex flex-1 cursor-pointer items-center justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2',
'focus-visible:ring-ring ring-offset-background flex flex-1 cursor-pointer flex-col items-center justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2',
className,
)}
gradient={true}
@ -110,11 +110,11 @@ export const DocumentDropzone = ({ className, onDrop, ...props }: DocumentDropzo
{...getRootProps()}
{...props}
>
<CardContent className="text-muted-foreground/40 flex-col flex items-center justify-center p-6">
<CardContent className="text-muted-foreground/40 flex flex-col items-center justify-center p-6">
{/* <FilePlus strokeWidth="1px" className="h-16 w-16"/> */}
<div className="flex">
<motion.div
className="border-muted-foreground/20 group-hover:border-documenso/80 dark:bg-muted/80 flex-col z-10 flex aspect-[3/4] w-24 origin-top-right -rotate-[22deg] gap-y-1 rounded-lg border bg-white/80 px-2 py-4 backdrop-blur-sm"
className="border-muted-foreground/20 group-hover:border-documenso/80 dark:bg-muted/80 z-10 flex aspect-[3/4] w-24 origin-top-right -rotate-[22deg] flex-col gap-y-1 rounded-lg border bg-white/80 px-2 py-4 backdrop-blur-sm"
variants={DocumentDropzoneCardLeftVariants}
>
<div className="bg-muted-foreground/20 group-hover:bg-documenso h-2 w-full rounded-[2px]" />
@ -123,7 +123,7 @@ export const DocumentDropzone = ({ className, onDrop, ...props }: DocumentDropzo
</motion.div>
<motion.div
className="border-muted-foreground/20 group-hover:border-documenso/80 dark:bg-muted/80 flex-col z-20 flex aspect-[3/4] w-24 items-center justify-center gap-y-1 rounded-lg border bg-white/80 px-2 py-4 backdrop-blur-sm"
className="border-muted-foreground/20 group-hover:border-documenso/80 dark:bg-muted/80 z-20 flex aspect-[3/4] w-24 flex-col items-center justify-center gap-y-1 rounded-lg border bg-white/80 px-2 py-4 backdrop-blur-sm"
variants={DocumentDropzoneCardCenterVariants}
>
<Plus
@ -133,7 +133,7 @@ export const DocumentDropzone = ({ className, onDrop, ...props }: DocumentDropzo
</motion.div>
<motion.div
className="border-muted-foreground/20 group-hover:border-documenso/80 dark:bg-muted/80 flex-col z-10 flex aspect-[3/4] w-24 origin-top-left rotate-[22deg] gap-y-1 rounded-lg border bg-white/80 px-2 py-4 backdrop-blur-sm"
className="border-muted-foreground/20 group-hover:border-documenso/80 dark:bg-muted/80 z-10 flex aspect-[3/4] w-24 origin-top-left rotate-[22deg] flex-col gap-y-1 rounded-lg border bg-white/80 px-2 py-4 backdrop-blur-sm"
variants={DocumentDropzoneCardRightVariants}
>
<div className="bg-muted-foreground/20 group-hover:bg-documenso h-2 w-full rounded-[2px]" />

View File

@ -362,7 +362,7 @@ export const AddFieldsFormPartial = ({
title="Add Fields"
description="Add all relevant fields for each recipient."
>
<div className="flex-col flex">
<div className="flex flex-col">
{selectedField && visible && (
<Card
className="border-primary pointer-events-none fixed z-50 cursor-pointer bg-white"
@ -477,7 +477,7 @@ export const AddFieldsFormPartial = ({
data-selected={selectedField === FieldType.SIGNATURE ? true : undefined}
>
<Card className="group-data-[selected]:border-documenso h-full w-full cursor-pointer group-disabled:opacity-50">
<CardContent className="flex-col flex items-center justify-center px-6 py-4">
<CardContent className="flex flex-col items-center justify-center px-6 py-4">
<p
className={cn(
'text-muted-foreground group-data-[selected]:text-foreground text-3xl font-medium',
@ -500,7 +500,7 @@ export const AddFieldsFormPartial = ({
data-selected={selectedField === FieldType.EMAIL ? true : undefined}
>
<Card className="group-data-[selected]:border-documenso h-full w-full cursor-pointer group-disabled:opacity-50">
<CardContent className="flex-col flex items-center justify-center px-6 py-4">
<CardContent className="flex flex-col items-center justify-center px-6 py-4">
<p
className={cn(
'text-muted-foreground group-data-[selected]:text-foreground text-xl font-medium',
@ -522,7 +522,7 @@ export const AddFieldsFormPartial = ({
data-selected={selectedField === FieldType.NAME ? true : undefined}
>
<Card className="group-data-[selected]:border-documenso h-full w-full cursor-pointer group-disabled:opacity-50">
<CardContent className="flex-col flex items-center justify-center px-6 py-4">
<CardContent className="flex flex-col items-center justify-center px-6 py-4">
<p
className={cn(
'text-muted-foreground group-data-[selected]:text-foreground text-xl font-medium',
@ -544,7 +544,7 @@ export const AddFieldsFormPartial = ({
data-selected={selectedField === FieldType.DATE ? true : undefined}
>
<Card className="group-data-[selected]:border-documenso h-full w-full cursor-pointer group-disabled:opacity-50">
<CardContent className="flex-col flex items-center justify-center px-6 py-4">
<CardContent className="flex flex-col items-center justify-center px-6 py-4">
<p
className={cn(
'text-muted-foreground group-data-[selected]:text-foreground text-xl font-medium',

View File

@ -148,7 +148,7 @@ export const AddSignersFormPartial = ({
title="Add Signers"
description="Add the people who will sign the document."
>
<div className="flex-col flex w-full gap-y-4">
<div className="flex w-full flex-col gap-y-4">
<AnimatePresence>
{signers.map((signer, index) => (
<motion.div

View File

@ -85,8 +85,8 @@ export const AddSubjectFormPartial = ({
title="Add Subject"
description="Add the subject and message you wish to send to signers."
>
<div className="flex-col flex">
<div className="flex-col flex gap-y-4">
<div className="flex flex-col">
<div className="flex flex-col gap-y-4">
<div>
<Label htmlFor="subject">
Subject <span className="text-muted-foreground">(Optional)</span>
@ -128,7 +128,7 @@ export const AddSubjectFormPartial = ({
You can use the following variables in your message:
</p>
<ul className="flex-col mt-2 flex list-inside list-disc gap-y-2 text-sm">
<ul className="mt-2 flex list-inside list-disc flex-col gap-y-2 text-sm">
<li className="text-muted-foreground">
<code className="text-muted-foreground bg-muted-foreground/20 rounded p-1 text-sm">
{'{signer.name}'}

View File

@ -19,12 +19,12 @@ export const EditDocumentFormContainer = ({
<form
id={id}
className={cn(
'dark:bg-background border-border bg-widget flex-col sticky top-20 flex h-[calc(100vh-6rem)] max-h-screen rounded-xl border px-4 py-6',
'dark:bg-background border-border bg-widget sticky top-20 flex h-[calc(100vh-6rem)] max-h-screen flex-col rounded-xl border px-4 py-6',
className,
)}
{...props}
>
<div className={cn('flex-col -mx-2 flex flex-1 overflow-hidden px-2')}>{children}</div>
<div className={cn('-mx-2 flex flex-1 flex-col overflow-hidden px-2')}>{children}</div>
</form>
);
};
@ -43,14 +43,14 @@ export const EditDocumentFormContainerContent = ({
...props
}: EditDocumentFormContainerContentProps) => {
return (
<div className={cn('flex-col flex flex-1', className)} {...props}>
<div className={cn('flex flex-1 flex-col', className)} {...props}>
<h3 className="text-foreground text-2xl font-semibold">{title}</h3>
<p className="text-muted-foreground mt-2 text-sm">{description}</p>
<hr className="border-border mb-8 mt-4" />
<div className="flex-col -mx-2 flex flex-1 overflow-y-auto px-2">{children}</div>
<div className="-mx-2 flex flex-1 flex-col overflow-y-auto px-2">{children}</div>
</div>
);
};

View File

@ -28,8 +28,8 @@ export const FieldItem = ({
field,
passive,
disabled,
minHeight,
minWidth,
minHeight: _minHeight,
minWidth: _minWidth,
onResize,
onMove,
onRemove,
@ -63,24 +63,6 @@ export const FieldItem = ({
const pageHeight = (field.pageHeight / 100) * height;
const pageWidth = (field.pageWidth / 100) * width;
console.log(
structuredClone({
field,
top,
left,
height,
width,
pageX: coords.pageX,
pageY: coords.pageY,
pageHeight: coords.pageHeight,
pageWidth: coords.pageWidth,
newPageX: pageX,
newPageY: pageY,
newPageHeight: pageHeight,
newPageWidth: pageWidth,
}),
);
setCoords({
pageX: pageX,
pageY: pageY,

View File

@ -81,7 +81,7 @@ export const PasswordForm = ({ className }: PasswordFormProps) => {
return (
<form
className={cn('flex-col flex w-full gap-y-4', className)}
className={cn('flex w-full flex-col gap-y-4', className)}
onSubmit={handleSubmit(onFormSubmit)}
>
<div>