Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions apps/web/src/components/ui/alert-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ import {
DIALOG_POPUP_CLASS,
} from "~/components/ui/dialog-styles";

const AlertDialogCreateHandle = AlertDialogPrimitive.createHandle;

const AlertDialog = AlertDialogPrimitive.Root;

const AlertDialogPortal = AlertDialogPrimitive.Portal;

function AlertDialogTrigger(props: AlertDialogPrimitive.Trigger.Props) {
return <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />;
}

function AlertDialogBackdrop({ className, ...props }: AlertDialogPrimitive.Backdrop.Props) {
return (
<AlertDialogPrimitive.Backdrop
Expand Down Expand Up @@ -129,18 +123,11 @@ function AlertDialogClose(props: AlertDialogPrimitive.Close.Props) {
}

export {
AlertDialogCreateHandle,
AlertDialog,
AlertDialogPortal,
AlertDialogBackdrop,
AlertDialogBackdrop as AlertDialogOverlay,
AlertDialogTrigger,
AlertDialogPopup,
AlertDialogPopup as AlertDialogContent,
AlertDialogHeader,
AlertDialogFooter,
AlertDialogTitle,
AlertDialogDescription,
AlertDialogClose,
AlertDialogViewport,
};
8 changes: 0 additions & 8 deletions apps/web/src/components/ui/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import {
} from "~/components/ui/dialog-styles";
import { ScrollArea } from "~/components/ui/scroll-area";

const DialogCreateHandle = DialogPrimitive.createHandle;

const Dialog = DialogPrimitive.Root;

const DialogPortal = DialogPrimitive.Portal;
Expand Down Expand Up @@ -165,19 +163,13 @@ function DialogPanel({
}

export {
DialogCreateHandle,
Dialog,
DialogTrigger,
DialogPortal,
DialogClose,
DialogBackdrop,
DialogBackdrop as DialogOverlay,
DialogPopup,
DialogPopup as DialogContent,
DialogHeader,
DialogFooter,
DialogTitle,
DialogDescription,
DialogPanel,
DialogViewport,
};
22 changes: 0 additions & 22 deletions apps/web/src/components/ui/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,33 +81,11 @@ function PopoverClose({ ...props }: PopoverPrimitive.Close.Props) {
return <PopoverPrimitive.Close data-slot="popover-close" {...props} />;
}

function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
return (
<PopoverPrimitive.Title
className={cn("font-semibold text-lg leading-none", className)}
data-slot="popover-title"
{...props}
/>
);
}

function PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props) {
return (
<PopoverPrimitive.Description
className={cn("text-muted-foreground text-sm", className)}
data-slot="popover-description"
{...props}
/>
);
}

export {
PopoverCreateHandle,
Popover,
PopoverTrigger,
PopoverPopup,
PopoverPopup as PopoverContent,
PopoverTitle,
PopoverDescription,
PopoverClose,
};
66 changes: 1 addition & 65 deletions apps/web/src/components/ui/sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,11 @@ import { XIcon } from "lucide-react";
import type { CSSProperties } from "react";
import { cn } from "~/lib/utils";
import { Button } from "~/components/ui/button";
import { ScrollArea } from "~/components/ui/scroll-area";

const Sheet = SheetPrimitive.Root;

const SheetPortal = SheetPrimitive.Portal;

function SheetTrigger(props: SheetPrimitive.Trigger.Props) {
return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
}

function SheetClose(props: SheetPrimitive.Close.Props) {
return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;
}

function SheetBackdrop({ className, ...props }: SheetPrimitive.Backdrop.Props) {
return (
<SheetPrimitive.Backdrop
Expand Down Expand Up @@ -146,28 +137,6 @@ function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
);
}

function SheetFooter({
className,
variant = "default",
...props
}: React.ComponentProps<"div"> & {
variant?: "default" | "bare";
}) {
return (
<div
className={cn(
"flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end",
variant === "default" && "border-t bg-muted/72 py-4",
variant === "bare" &&
"in-[[data-slot=sheet-popup]:has([data-slot=sheet-panel])]:pt-3 pt-4 pb-6",
className,
)}
data-slot="sheet-footer"
{...props}
/>
);
}

function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {
return (
<SheetPrimitive.Title
Expand All @@ -188,37 +157,4 @@ function SheetDescription({ className, ...props }: SheetPrimitive.Description.Pr
);
}

function SheetPanel({
className,
scrollFade = true,
...props
}: React.ComponentProps<"div"> & { scrollFade?: boolean }) {
return (
<ScrollArea scrollFade={scrollFade}>
<div
className={cn(
"p-6 in-[[data-slot=sheet-popup]:has([data-slot=sheet-header])]:pt-1 in-[[data-slot=sheet-popup]:has([data-slot=sheet-footer]:not(.border-t))]:pb-1",
className,
)}
data-slot="sheet-panel"
{...props}
/>
</ScrollArea>
);
}

export {
Sheet,
SheetTrigger,
SheetPortal,
SheetClose,
SheetBackdrop,
SheetBackdrop as SheetOverlay,
SheetPopup,
SheetPopup as SheetContent,
SheetHeader,
SheetFooter,
SheetTitle,
SheetDescription,
SheetPanel,
};
export { Sheet, SheetPopup, SheetHeader, SheetTitle, SheetDescription };
4 changes: 1 addition & 3 deletions apps/web/src/components/ui/tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";

import { cn } from "~/lib/utils";

const TooltipCreateHandle = TooltipPrimitive.createHandle;

const TooltipProvider = TooltipPrimitive.Provider;

const Tooltip = TooltipPrimitive.Root;
Expand Down Expand Up @@ -61,4 +59,4 @@ function TooltipPopup({
);
}

export { TooltipCreateHandle, TooltipProvider, Tooltip, TooltipTrigger, TooltipPopup };
export { TooltipProvider, Tooltip, TooltipTrigger, TooltipPopup };
Loading