Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🔥 Remove unused Radix toast component (#2573)
Luke Velladee41ba4e943
diff --git a/packages/ui/package.json b/packages/ui/package.jsonindex 6744c534d..49442a7cd 100644--- a/packages/ui/package.json+++ b/packages/ui/package.json@@ -29,7 +29,6 @@"@radix-ui/react-slot": "^1.1.2","@radix-ui/react-switch": "^1.0.2","@radix-ui/react-tabs": "^1.0.4",- "@radix-ui/react-toast": "^1.2.11","@radix-ui/react-tooltip": "^1.1.8","@rallly/languages": "workspace:*","@rallly/tailwind-config": "workspace:*",diff --git a/packages/ui/src/toast.tsx b/packages/ui/src/toast.tsxdeleted file mode 100644index dcbaac70d..000000000--- a/packages/ui/src/toast.tsx+++ /dev/null@@ -1,128 +0,0 @@-import * as ToastPrimitives from "@radix-ui/react-toast";-import type { VariantProps } from "class-variance-authority";-import { cva } from "class-variance-authority";-import { X } from "lucide-react";-import * as React from "react";--import { cn } from "./lib/utils";--const ToastProvider = ToastPrimitives.Provider;--const ToastViewport = React.forwardRef<- React.ElementRef<typeof ToastPrimitives.Viewport>,- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>->(({ className, ...props }, ref) => (- <ToastPrimitives.Viewport- ref={ref}- className={cn(- "fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-4 sm:bottom-4 sm:flex-col md:max-w-[420px]",- className,- )}- {...props}- />-));-ToastViewport.displayName = ToastPrimitives.Viewport.displayName;--const toastVariants = cva(- "group data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-lg p-5 shadow-huge transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-(--radix-toast-swipe-end-x) data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) data-[state=closed]:animate-out data-[state=open]:animate-in data-[swipe=end]:animate-out data-[swipe=move]:transition-none",- {- variants: {- variant: {- default: "bg-background/75 text-foreground backdrop-blur-lg",- destructive:- "destructive group border-destructive bg-destructive text-destructive-foreground",- },- },- defaultVariants: {- variant: "default",- },- },-);--const Toast = React.forwardRef<- React.ElementRef<typeof ToastPrimitives.Root>,- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &- VariantProps<typeof toastVariants>->(({ className, variant, ...props }, ref) => {- return (- <ToastPrimitives.Root- ref={ref}- className={cn(toastVariants({ variant }), className)}- {...props}- />- );-});-Toast.displayName = ToastPrimitives.Root.displayName;--const ToastAction = React.forwardRef<- React.ElementRef<typeof ToastPrimitives.Action>,- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>->(({ className, ...props }, ref) => (- <ToastPrimitives.Action- ref={ref}- className={cn(- "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 font-medium text-sm ring-offset-background transition-colors hover:bg-secondary focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:focus:ring-destructive group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground",- className,- )}- {...props}- />-));-ToastAction.displayName = ToastPrimitives.Action.displayName;--const ToastClose = React.forwardRef<- React.ElementRef<typeof ToastPrimitives.Close>,- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>->(({ className, ...props }, ref) => (- <ToastPrimitives.Close- ref={ref}- className={cn(- "absolute top-2 right-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-hidden focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 group-[.destructive]:hover:text-red-50",- className,- )}- toast-close=""- {...props}- >- <X className="size-4" />- </ToastPrimitives.Close>-));-ToastClose.displayName = ToastPrimitives.Close.displayName;--const ToastTitle = React.forwardRef<- React.ElementRef<typeof ToastPrimitives.Title>,- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>->(({ className, ...props }, ref) => (- <ToastPrimitives.Title- ref={ref}- className={cn("font-semibold text-sm", className)}- {...props}- />-));-ToastTitle.displayName = ToastPrimitives.Title.displayName;--const ToastDescription = React.forwardRef<- React.ElementRef<typeof ToastPrimitives.Description>,- React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>->(({ className, ...props }, ref) => (- <ToastPrimitives.Description- ref={ref}- className={cn("text-muted-foreground text-sm", className)}- {...props}- />-));-ToastDescription.displayName = ToastPrimitives.Description.displayName;--type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;--type ToastActionElement = React.ReactElement<typeof ToastAction>;--export {- type ToastActionElement,- type ToastProps,- Toast,- ToastAction,- ToastClose,- ToastDescription,- ToastProvider,- ToastTitle,- ToastViewport,-};diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 16a9e9204..20792a606 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -800,9 +800,6 @@ importers:'@radix-ui/react-tabs':specifier: ^1.0.4version: 1.1.13(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-toast':- specifier: ^1.2.11- version: 1.2.15(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-tooltip':specifier: ^1.1.8version: 1.2.8(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])@@ -3860,19 +3857,6 @@ packages:'@types/react-dom':optional: true- '@radix-ui/[email protected]':- resolution: {integrity: sha512-3OSz3TacUWy4WtOXV38DggwxoqJK4+eDkNMl5Z/MJZaoUPaP4/9lf81xXMe1I2ReTAptverZUpbPY4wWwWyL5g==}- peerDependencies:- '@types/react': '*'- '@types/react-dom': '*'- react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc- react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc- peerDependenciesMeta:- '@types/react':- optional: true- '@types/react-dom':- optional: true-'@radix-ui/[email protected]':resolution: {integrity: sha512-lS1odchhFTeZv3xwHH31YPObmJn8gOg7Lq12inrr0+BH/l3Tsq32VfjqH1oh80ARM3mlkfMic15n0kg4sD1poQ==}peerDependencies:@@ -15243,26 +15227,6 @@ snapshots:'@types/react': 19.2.13'@types/react-dom': 19.2.3(@types/[email protected])- '@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':- dependencies:- '@radix-ui/primitive': 1.1.3- '@radix-ui/react-collection': 1.1.7(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])- '@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])- '@radix-ui/react-dismissable-layer': 1.1.11(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-portal': 1.1.9(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-presence': 1.1.5(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-primitive': 2.1.3(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])- '@radix-ui/react-use-controllable-state': 1.2.2(@types/[email protected])([email protected])- '@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])- '@radix-ui/react-visually-hidden': 1.2.3(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- react: 19.2.6- react-dom: 19.2.6([email protected])- optionalDependencies:- '@types/react': 19.2.13- '@types/react-dom': 19.2.3(@types/[email protected])-'@radix-ui/[email protected](@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])':dependencies:'@radix-ui/primitive': 1.1.3