fix: standardize formatting and improve readability across various components and styles, including CSS and TypeScript files

This commit is contained in:
Julien Froidefond
2025-12-08 06:37:29 +01:00
parent 2db5bc324d
commit 0321eab5b5
18 changed files with 347 additions and 244 deletions

View File

@@ -30,17 +30,21 @@ function PopoverContent({
if (!element) return;
const disableAnimations = () => {
element.style.setProperty('animation', 'none', 'important');
element.style.setProperty('transition', 'none', 'important');
element.style.setProperty("animation", "none", "important");
element.style.setProperty("transition", "none", "important");
// Ne pas toucher au transform car il est utilisé pour le positionnement
element.style.setProperty('opacity', '1', 'important');
element.style.setProperty('will-change', 'auto', 'important');
element.style.setProperty("opacity", "1", "important");
element.style.setProperty("will-change", "auto", "important");
// Supprimer toutes les classes d'animation Tailwind
const classesToRemove = Array.from(element.classList).filter(cls =>
cls.includes('animate') || cls.includes('fade') || cls.includes('zoom') || cls.includes('slide')
const classesToRemove = Array.from(element.classList).filter(
(cls) =>
cls.includes("animate") ||
cls.includes("fade") ||
cls.includes("zoom") ||
cls.includes("slide"),
);
classesToRemove.forEach(cls => element.classList.remove(cls));
classesToRemove.forEach((cls) => element.classList.remove(cls));
};
// Désactiver immédiatement
@@ -53,7 +57,7 @@ function PopoverContent({
observer.observe(element, {
attributes: true,
attributeFilter: ['class', 'data-state'],
attributeFilter: ["class", "data-state"],
subtree: false,
});
@@ -84,11 +88,13 @@ function PopoverContent({
"bg-popover text-popover-foreground z-50 w-72 rounded-md border p-4 shadow-md outline-hidden",
className,
)}
style={{
animation: 'none !important',
transition: 'none !important',
opacity: '1 !important',
} as React.CSSProperties}
style={
{
animation: "none !important",
transition: "none !important",
opacity: "1 !important",
} as React.CSSProperties
}
{...props}
/>
</PopoverPrimitive.Portal>