chore: clean up code formatting and remove unnecessary whitespace across multiple files for improved readability

This commit is contained in:
Julien Froidefond
2025-12-05 11:05:14 +01:00
parent b3157fffbd
commit 71d850c985
65 changed files with 347 additions and 505 deletions

View File

@@ -28,5 +28,3 @@ export function Avatar({
/>
);
}

View File

@@ -49,4 +49,3 @@ export const Badge = forwardRef<HTMLSpanElement, BadgeProps>(
);
Badge.displayName = 'Badge';

View File

@@ -10,16 +10,11 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
}
const variantStyles: Record<ButtonVariant, string> = {
primary:
'bg-primary text-primary-foreground hover:bg-primary-hover border-transparent',
secondary:
'bg-card text-foreground hover:bg-card-hover border-border',
outline:
'bg-transparent text-foreground hover:bg-card-hover border-border',
ghost:
'bg-transparent text-foreground hover:bg-card-hover border-transparent',
destructive:
'bg-destructive text-white hover:bg-destructive/90 border-transparent',
primary: 'bg-primary text-primary-foreground hover:bg-primary-hover border-transparent',
secondary: 'bg-card text-foreground hover:bg-card-hover border-border',
outline: 'bg-transparent text-foreground hover:bg-card-hover border-border',
ghost: 'bg-transparent text-foreground hover:bg-card-hover border-transparent',
destructive: 'bg-destructive text-white hover:bg-destructive/90 border-transparent',
};
const sizeStyles: Record<ButtonSize, string> = {
@@ -29,7 +24,10 @@ const sizeStyles: Record<ButtonSize, string> = {
};
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
({ className = '', variant = 'primary', size = 'md', loading, disabled, children, ...props }, ref) => {
(
{ className = '', variant = 'primary', size = 'md', loading, disabled, children, ...props },
ref
) => {
return (
<button
ref={ref}
@@ -74,4 +72,3 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
);
Button.displayName = 'Button';

View File

@@ -40,11 +40,12 @@ export const CardTitle = forwardRef<HTMLHeadingElement, HTMLAttributes<HTMLHeadi
CardTitle.displayName = 'CardTitle';
export const CardDescription = forwardRef<HTMLParagraphElement, HTMLAttributes<HTMLParagraphElement>>(
({ className = '', ...props }, ref) => (
<p ref={ref} className={`mt-1 text-sm text-muted ${className}`} {...props} />
)
);
export const CardDescription = forwardRef<
HTMLParagraphElement,
HTMLAttributes<HTMLParagraphElement>
>(({ className = '', ...props }, ref) => (
<p ref={ref} className={`mt-1 text-sm text-muted ${className}`} {...props} />
));
CardDescription.displayName = 'CardDescription';
@@ -63,4 +64,3 @@ export const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivEleme
);
CardFooter.displayName = 'CardFooter';

View File

@@ -79,5 +79,3 @@ export function CollaboratorDisplay({
</div>
);
}

View File

@@ -12,10 +12,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
return (
<div className="w-full">
{label && (
<label
htmlFor={inputId}
className="mb-2 block text-sm font-medium text-foreground"
>
<label htmlFor={inputId} className="mb-2 block text-sm font-medium text-foreground">
{label}
</label>
)}
@@ -32,13 +29,10 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
`}
{...props}
/>
{error && (
<p className="mt-1.5 text-sm text-destructive">{error}</p>
)}
{error && <p className="mt-1.5 text-sm text-destructive">{error}</p>}
</div>
);
}
);
Input.displayName = 'Input';

View File

@@ -84,12 +84,7 @@ export function Modal({ isOpen, onClose, title, children, size = 'md' }: ModalPr
className="rounded-lg p-1 text-muted hover:bg-card-hover hover:text-foreground transition-colors"
aria-label="Fermer"
>
<svg
className="h-5 w-5"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<svg className="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path
strokeLinecap="round"
strokeLinejoin="round"

View File

@@ -12,10 +12,7 @@ export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
return (
<div className="w-full">
{label && (
<label
htmlFor={textareaId}
className="mb-2 block text-sm font-medium text-foreground"
>
<label htmlFor={textareaId} className="mb-2 block text-sm font-medium text-foreground">
{label}
</label>
)}
@@ -33,13 +30,10 @@ export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
`}
{...props}
/>
{error && (
<p className="mt-1.5 text-sm text-destructive">{error}</p>
)}
{error && <p className="mt-1.5 text-sm text-destructive">{error}</p>}
</div>
);
}
);
Textarea.displayName = 'Textarea';

View File

@@ -6,4 +6,3 @@ export { CollaboratorDisplay } from './CollaboratorDisplay';
export { Input } from './Input';
export { Modal, ModalFooter } from './Modal';
export { Textarea } from './Textarea';