Merge remote-tracking branch 'origin/feat/refresh' into feat/single-player-mode

This commit is contained in:
Mythie
2023-09-24 22:18:01 +10:00
113 changed files with 2063 additions and 568 deletions
+33 -28
View File
@@ -1,29 +1,34 @@
import type { LucideIcon, LucideProps } from 'lucide-react/dist/lucide-react';
import { forwardRef } from 'react';
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
export const SignatureIcon = (({
size = 24,
color = 'currentColor',
strokeWidth = 1.33,
absoluteStrokeWidth,
...props
}: LucideProps) => {
return (
<svg
width={size}
height={size}
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M1.5 11H14.5M1.5 14C1.5 14 8.72 2 4.86938 2H4.875C2.01 2 1.97437 14.0694 8 6.51188V6.5C8 6.5 9 11.3631 11.5 7.52375V7.5C11.5 7.5 11.5 9 14.5 9"
stroke={color}
strokeWidth={absoluteStrokeWidth ? (Number(strokeWidth) * 24) / Number(size) : strokeWidth}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}) as LucideIcon;
import type { LucideIcon } from 'lucide-react/dist/lucide-react';
export const SignatureIcon: LucideIcon = forwardRef(
(
{ size = 24, color = 'currentColor', strokeWidth = 1.33, absoluteStrokeWidth, ...props },
ref,
) => {
return (
<svg
ref={ref}
width={size}
height={size}
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M1.5 11H14.5M1.5 14C1.5 14 8.72 2 4.86938 2H4.875C2.01 2 1.97437 14.0694 8 6.51188V6.5C8 6.5 9 11.3631 11.5 7.52375V7.5C11.5 7.5 11.5 9 14.5 9"
stroke={color}
strokeWidth={
absoluteStrokeWidth ? (Number(strokeWidth) * 24) / Number(size) : strokeWidth
}
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
},
);
SignatureIcon.displayName = 'SignatureIcon';
+3 -2
View File
@@ -12,7 +12,8 @@
"index.tsx"
],
"scripts": {
"lint": "eslint \"**/*.ts*\""
"lint": "eslint \"**/*.ts*\"",
"clean": "rimraf node_modules"
},
"devDependencies": {
"@documenso/tailwind-config": "*",
@@ -57,7 +58,7 @@
"clsx": "^1.2.1",
"cmdk": "^0.2.0",
"framer-motion": "^10.12.8",
"lucide-react": "^0.277.0",
"lucide-react": "^0.279.0",
"luxon": "^3.4.2",
"next": "13.4.19",
"pdfjs-dist": "3.6.172",
@@ -292,7 +292,7 @@ export const AddFieldsFormPartial = ({
{selectedField && (
<Card
className={cn(
'pointer-events-none fixed z-50 cursor-pointer bg-white transition-opacity',
'bg-background pointer-events-none fixed z-50 cursor-pointer transition-opacity',
{
'border-primary': isFieldWithinBounds,
'opacity-50': !isFieldWithinBounds,
@@ -2,7 +2,8 @@
import { useForm } from 'react-hook-form';
import { Document, DocumentStatus, Field, Recipient } from '@documenso/prisma/client';
import { DocumentStatus, Field, Recipient } from '@documenso/prisma/client';
import { DocumentWithData } from '@documenso/prisma/types/document-with-data';
import { FormErrorMessage } from '@documenso/ui/primitives/form/form-error-message';
import { Input } from '@documenso/ui/primitives/input';
import { Label } from '@documenso/ui/primitives/label';
@@ -21,7 +22,7 @@ export type AddSubjectFormProps = {
documentFlow: DocumentFlowStep;
recipients: Recipient[];
fields: Field[];
document: Document;
document: DocumentWithData;
numberOfSteps: number;
onSubmit: (_data: TAddSubjectFormSchema) => void;
};
@@ -41,8 +42,8 @@ export const AddSubjectFormPartial = ({
} = useForm<TAddSubjectFormSchema>({
defaultValues: {
email: {
subject: '',
message: '',
subject: document.documentMeta?.subject ?? '',
message: document.documentMeta?.message ?? '',
},
},
});
@@ -118,7 +118,7 @@ export const FieldItem = ({
>
{!disabled && (
<button
className="text-muted-foreground/50 hover:text-muted-foreground/80 absolute -right-2 -top-2 z-20 flex h-8 w-8 items-center justify-center rounded-full border bg-white shadow-[0_0_0_2px_theme(colors.gray.100/70%)]"
className="text-muted-foreground/50 hover:text-muted-foreground/80 bg-background absolute -right-2 -top-2 z-20 flex h-8 w-8 items-center justify-center rounded-full border"
onClick={() => onRemove?.()}
>
<Trash className="h-4 w-4" />
@@ -126,7 +126,7 @@ export const FieldItem = ({
)}
<Card
className={cn('h-full w-full bg-white', {
className={cn('bg-background h-full w-full', {
'border-primary': !disabled,
'border-primary/80': active,
})}
+19 -19
View File
@@ -41,34 +41,34 @@
}
.dark {
--background: 224 71% 4%;
--foreground: 213 31% 91%;
--background: 0 0% 14.9%;
--foreground: 0 0% 97%;
--muted: 223 47% 11%;
--muted-foreground: 215.4 16.3% 56.9%;
--muted: 0 0% 23.4%;
--muted-foreground: 0 0% 85%;
--popover: 224 71% 4%;
--popover-foreground: 215 20.2% 65.1%;
--popover: 0 0% 14.9%;
--popover-foreground: 0 0% 90%;
--card: 224 71% 4%;
--card-border: 216 34% 17%;
--card: 0 0% 14.9%;
--card-border: 0 0% 27.9%;
--card-border-tint: 112 205 159;
--card-foreground: 213 31% 91%;
--card-foreground: 0 0% 95%;
--border: 216 34% 17%;
--input: 216 34% 17%;
--border: 0 0% 27.9%;
--input: 0 0% 27.9%;
--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 1.2%;
--primary: 95.08 71.08% 67.45%;
--primary-foreground: 95.08 71.08% 10%;
--secondary: 222.2 47.4% 11.2%;
--secondary-foreground: 210 40% 98%;
--secondary: 0 0% 23.4%;
--secondary-foreground: 95.08 71.08% 67.45%;
--accent: 216 34% 17%;
--accent-foreground: 210 40% 98%;
--accent: 0 0% 27.9%;
--accent-foreground: 95.08 71.08% 67.45%;
--destructive: 0 63% 31%;
--destructive-foreground: 210 40% 98%;
--destructive: 0 87% 62%;
--destructive-foreground: 0 87% 19%;
--ring: 95.08 71.08% 67.45%;