shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
75.41k stars 4.73k forks source link

[bug]: Unnecessary Double Spaces in DialogPrimitive Overlay Class for Dialog Component #5742

Open Coordinate-Cat opened 3 weeks ago

Coordinate-Cat commented 3 weeks ago

Describe the bug

There is extra space in part of the style for the dialog component. There are two extra spaces before the class data-[state=open]:animate-in.

https://github.com/shadcn-ui/ui/blob/f7c42169a6c7daa5821a033eed5928f26e565f38/apps/www/registry/default/ui/dialog.tsx#L21C1-L28C5

https://github.com/shadcn-ui/ui/blob/f7c42169a6c7daa5821a033eed5928f26e565f38/apps/www/registry/new-york/ui/dialog.tsx#L24

  <DialogPrimitive.Overlay
    ref={ref}
    className={cn(
      "fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
      className
    )}
    {...props}
  />

Affected component/components

dialog

How to reproduce

At the very least, the components generated when running npx shadcn@latest add dialog included this issue. I’ve also confirmed that it’s present in the New York theme.

Codesandbox/StackBlitz link

https://github.com/shadcn-ui/ui/blob/f7c42169a6c7daa5821a033eed5928f26e565f38/apps/www/registry/default/ui/dialog.tsx#L21C1-L28C5

Logs

No response

System Info

MacBook Air macOS m3 sonoma 14.5

Before submitting

antoinefamibelle commented 2 weeks ago

I would like to take on this issue. Could someone please assign it to me?