Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

💄 UI Changes (#1804)

Luke Vella5af79028e559
diff --git a/apps/landing/src/app/[locale]/(main)/footer.tsx b/apps/landing/src/app/[locale]/(main)/footer.tsx
index e63cc0919..3dd23d74c 100644
--- a/apps/landing/src/app/[locale]/(main)/footer.tsx
+++ b/apps/landing/src/app/[locale]/(main)/footer.tsx
@@ -261,7 +261,7 @@ export const Footer: React.FunctionComponent = () => {
</div>
<a
href="https://support.rallly.co/contribute/translations"
- className="inline-flex items-center rounded-md border px-3 py-2 text-gray-500 text-xs hover:border-primary-600 hover:text-primary-600"
+ className="inline-flex h-8 items-center rounded-md border px-3 text-gray-500 text-xs hover:border-primary-600 hover:text-primary-600"
>
<LanguagesIcon className="mr-2 size-5" />
<Trans ns="common" i18nKey="volunteerTranslator" /> &rarr;
diff --git a/apps/web/src/app/[locale]/(space)/components/sidebar/app-sidebar.tsx b/apps/web/src/app/[locale]/(space)/components/sidebar/app-sidebar.tsx
index 909a49394..d4c2d21e6 100644
--- a/apps/web/src/app/[locale]/(space)/components/sidebar/app-sidebar.tsx
+++ b/apps/web/src/app/[locale]/(space)/components/sidebar/app-sidebar.tsx
@@ -93,7 +93,7 @@ export async function AppSidebar({
/>
</p>
<UpgradeButton>
- <Button size="sm" variant="primary" className="w-full">
+ <Button variant="primary" className="w-full">
<Trans i18nKey="upgrade" defaults="Upgrade" />
</Button>
</UpgradeButton>
diff --git a/packages/ui/src/badge.tsx b/packages/ui/src/badge.tsx
index 31a5ccabe..329b7ef55 100644
--- a/packages/ui/src/badge.tsx
+++ b/packages/ui/src/badge.tsx
@@ -13,9 +13,10 @@ const badgeVariants = cva(
destructive: "bg-destructive text-destructive-foreground",
outline: "text-foreground",
green: "bg-green-600 text-white",
- secondary: "bg-primary-50 text-primary",
+ secondary: "border border-primary-200 bg-primary-50 text-primary",
},
size: {
+ sm: "h-5 min-w-5 px-1.5 text-xs",
md: "h-6 min-w-5 px-2 text-xs",
lg: "h-7 min-w-7 px-2.5 text-sm",
},
diff --git a/packages/ui/src/button.tsx b/packages/ui/src/button.tsx
index 584b4a431..1fd8da973 100644
--- a/packages/ui/src/button.tsx
+++ b/packages/ui/src/button.tsx
@@ -29,10 +29,10 @@ const buttonVariants = cva(
link: "border-transparent text-primary underline-offset-4 hover:underline",
},
size: {
- default: "h-9 gap-x-2 rounded-md px-2.5 text-sm",
- sm: "h-8 gap-x-1.5 rounded-md px-2 text-sm",
+ default: "h-8 gap-x-2 rounded-md px-2 text-sm",
+ sm: "h-7 gap-x-1.5 rounded-md px-1.5 text-sm",
lg: "h-12 gap-x-3 rounded-lg px-4 text-base",
- icon: "size-7 gap-x-1.5 rounded-md text-sm",
+ icon: "size-7 gap-x-1.5 rounded-lg text-sm",
"icon-lg": "size-8 rounded-full",
},
},
diff --git a/packages/ui/src/command.tsx b/packages/ui/src/command.tsx
index e1f7b4368..ea424e15a 100644
--- a/packages/ui/src/command.tsx
+++ b/packages/ui/src/command.tsx
@@ -34,7 +34,7 @@ const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
hideCloseButton={true}
size="xl"
position="top"
- className="p-0 shadow-huge"
+ className="p-0"
>
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-4 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:p-2 [&_[cmdk-item]_svg]:size-4">
{children}
@@ -145,7 +145,7 @@ const CommandItemShortcut = React.forwardRef<
<CommandPrimitive.Item
ref={ref}
className={cn(
- "relative flex h-12 cursor-pointer select-none items-center gap-3 rounded-md px-3 font-medium outline-none aria-selected:bg-gray-100 data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
+ "relative flex h-12 cursor-pointer select-none items-center gap-3 rounded-xl px-3 font-medium outline-none aria-selected:bg-gray-100 data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
className,
)}
{...props}
diff --git a/packages/ui/src/dialog.tsx b/packages/ui/src/dialog.tsx
index c325df956..7ff787f3c 100644
--- a/packages/ui/src/dialog.tsx
+++ b/packages/ui/src/dialog.tsx
@@ -6,6 +6,7 @@ import { cva } from "class-variance-authority";
import { XIcon } from "lucide-react";
import * as React from "react";
+import { Slot } from "@radix-ui/react-slot";
import { Button } from "./button";
import { Icon } from "./icon";
import { cn } from "./lib/utils";
@@ -37,7 +38,7 @@ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
const dialogContentVariants = cva(
cn(
//style
- "gap-4 bg-background p-4 shadow-lg sm:rounded-lg sm:border",
+ "gap-4 bg-background p-4 shadow-lg sm:rounded-xl",
// position
"-translate-x-1/2 fixed top-0 left-1/2 z-50 grid w-full",
// animation
@@ -51,6 +52,7 @@ const dialogContentVariants = cva(
"data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%] sm:top-[50%] sm:translate-y-[-50%]",
},
size: {
+ xs: "sm:max-w-[400px]",
sm: "sm:max-w-sm",
md: "sm:max-w-md",
lg: "sm:max-w-lg",
@@ -87,7 +89,7 @@ const DialogContent = React.forwardRef<
>
{children}
{!hideCloseButton ? (
- <DialogClose asChild className="absolute top-4 right-4">
+ <DialogClose asChild className="absolute top-2 right-2">
<Button size="icon" variant="ghost">
<Icon>
<XIcon />
@@ -104,9 +106,20 @@ DialogContent.displayName = DialogPrimitive.Content.displayName;
const DialogHeader = ({
className,
+ icon,
+ children,
...props
-}: React.HTMLAttributes<HTMLDivElement>) => (
- <div className={cn("flex flex-col space-y-1.5", className)} {...props} />
+}: React.HTMLAttributes<HTMLDivElement> & {
+ icon?: React.ReactNode;
+}) => (
+ <div className={cn("flex flex-col gap-4", className)} {...props}>
+ {icon ? (
+ <span className="inline-flex size-8 items-center justify-center rounded-lg bg-primary-foreground text-primary">
+ <Slot className="size-4">{icon}</Slot>
+ </span>
+ ) : null}
+ <div>{children}</div>
+ </div>
);
DialogHeader.displayName = "DialogHeader";
@@ -116,7 +129,7 @@ const DialogFooter = ({
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={cn(
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
+ "mt-2 flex flex-col-reverse sm:flex-row sm:space-x-2",
className,
)}
{...props}
@@ -145,7 +158,7 @@ const DialogDescription = React.forwardRef<
>(({ className, ...props }, ref) => (
<DialogPrimitive.Description
ref={ref}
- className={cn("text-muted-foreground text-sm", className)}
+ className={cn("mt-2 text-muted-foreground text-sm", className)}
{...props}
/>
));
diff --git a/packages/ui/src/dropdown-menu.tsx b/packages/ui/src/dropdown-menu.tsx
index 141947c1c..2854d86bf 100644
--- a/packages/ui/src/dropdown-menu.tsx
+++ b/packages/ui/src/dropdown-menu.tsx
@@ -77,7 +77,7 @@ const DropdownMenuContent = React.forwardRef<
ref={ref}
sideOffset={sideOffset}
className={cn(
- "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[140px] animate-in overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[140px] animate-in overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-md",
className,
)}
{...props}
@@ -96,7 +96,7 @@ const DropdownMenuItem = React.forwardRef<
ref={ref}
className={cn(
"flex items-center gap-x-2.5",
- "relative flex cursor-default select-none items-center rounded px-2 py-1.5 font-medium text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
+ "relative flex cursor-default select-none items-center rounded-md px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
inset && "pl-8",
className,
)}
@@ -138,12 +138,12 @@ const DropdownMenuRadioItem = React.forwardRef<
<DropdownMenuPrimitive.RadioItem
ref={ref}
className={cn(
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pr-2 pl-8 font-medium text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
+ "relative flex cursor-default select-none items-center rounded-md py-1.5 pr-8 pl-2 font-medium text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className,
)}
{...props}
>
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <span className="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.ItemIndicator>
<Icon>
<CheckIcon />
@@ -164,7 +164,7 @@ const DropdownMenuLabel = React.forwardRef<
<DropdownMenuPrimitive.Label
ref={ref}
className={cn(
- "px-2 py-1.5 font-semibold text-sm",
+ "px-2 py-1.5 text-muted-foreground text-sm",
inset && "pl-8",
className,
)}
diff --git a/packages/ui/src/input.tsx b/packages/ui/src/input.tsx
index 9d30a697c..05bb996fa 100644
--- a/packages/ui/src/input.tsx
+++ b/packages/ui/src/input.tsx
@@ -20,7 +20,7 @@ const inputVariants = cva(
variants: {
size: {
sm: "h-7 px-1 text-xs",
- md: "h-9 px-2 text-sm",
+ md: "h-8 px-2 text-sm",
lg: "h-12 px-3 text-base",
},
variant: {
diff --git a/packages/ui/src/sidebar.tsx b/packages/ui/src/sidebar.tsx
index 7c082d0d8..2f8ba2554 100644
--- a/packages/ui/src/sidebar.tsx
+++ b/packages/ui/src/sidebar.tsx
@@ -336,7 +336,7 @@ const SidebarInset = React.forwardRef<
<main
ref={ref}
className={cn(
- "relative flex w-full flex-1 flex-col bg-background",
+ "flex w-full flex-1 flex-col bg-background",
"md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-lg md:peer-data-[variant=inset]:border md:peer-data-[variant=inset]:shadow-sm",
className,
)}
@@ -526,11 +526,13 @@ const SidebarMenuItem = React.forwardRef<
SidebarMenuItem.displayName = "SidebarMenuItem";
const sidebarMenuButtonVariants = cva(
- "peer/menu-button group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 flex w-full items-center gap-2.5 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
+ "peer/menu-button group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 flex w-full items-center gap-2.5 overflow-hidden rounded-lg p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] focus-visible:ring-2 focus-visible:ring-gray-400 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
{
variants: {
variant: {
- default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
+ primary: "text-primary data-[active=false]:hover:bg-primary-100",
+ default:
+ "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:text-sidebar-accent-foreground focus:bg-sidebar-accent focus:text-sidebar-accent-foreground focus-visible:text-sidebar-accent-foreground data-[active=false]:hover:bg-sidebar-accent/50",
outline:
"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",
},
diff --git a/packages/ui/src/tile.tsx b/packages/ui/src/tile.tsx
index 6bcdf8a00..84fcd727e 100644
--- a/packages/ui/src/tile.tsx
+++ b/packages/ui/src/tile.tsx
@@ -70,7 +70,7 @@ const TileGrid = React.forwardRef<
>(({ className, ...props }, ref) => (
<div
ref={ref}
- className={cn("grid gap-4 sm:grid-cols-2 lg:grid-cols-3", className)}
+ className={cn("grid gap-4 md:grid-cols-3 2xl:grid-cols-4", className)}
{...props}
/>
));