diff --git a/apps/marketing/components/ui/button-group.tsx b/apps/marketing/components/ui/button-group.tsx deleted file mode 100644 index 9261afefa..000000000 --- a/apps/marketing/components/ui/button-group.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { Slot } from "@radix-ui/react-slot"; -import { cva, type VariantProps } from "class-variance-authority"; - -import { cn } from "@/lib/utils"; -import { Separator } from "@/components/ui/separator"; - -const buttonGroupVariants = cva( - "flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2", - { - variants: { - orientation: { - horizontal: - "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none", - vertical: - "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none", - }, - }, - defaultVariants: { - orientation: "horizontal", - }, - }, -); - -function ButtonGroup({ - className, - orientation, - ...props -}: React.ComponentProps<"div"> & VariantProps) { - return ( -
- ); -} - -function ButtonGroupText({ - className, - asChild = false, - ...props -}: React.ComponentProps<"div"> & { - asChild?: boolean; -}) { - const Comp = asChild ? Slot : "div"; - - return ( - - ); -} - -function ButtonGroupSeparator({ - className, - orientation = "vertical", - ...props -}: React.ComponentProps) { - return ( - - ); -} - -export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants }; diff --git a/apps/marketing/components/ui/calendar.tsx b/apps/marketing/components/ui/calendar.tsx deleted file mode 100644 index 91e83108b..000000000 --- a/apps/marketing/components/ui/calendar.tsx +++ /dev/null @@ -1,177 +0,0 @@ -"use client"; - -import * as React from "react"; -import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react"; -import { DayButton, DayPicker, getDefaultClassNames } from "react-day-picker"; - -import { cn } from "@/lib/utils"; -import { Button, buttonVariants } from "@/components/ui/button"; - -function Calendar({ - className, - classNames, - showOutsideDays = true, - captionLayout = "label", - buttonVariant = "ghost", - formatters, - components, - ...props -}: React.ComponentProps & { - buttonVariant?: React.ComponentProps["variant"]; -}) { - const defaultClassNames = getDefaultClassNames(); - - return ( - svg]:rotate-180`, - String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, - className, - )} - captionLayout={captionLayout} - formatters={{ - formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }), - ...formatters, - }} - classNames={{ - root: cn("w-fit", defaultClassNames.root), - months: cn("flex gap-4 flex-col md:flex-row relative", defaultClassNames.months), - month: cn("flex flex-col w-full gap-4", defaultClassNames.month), - nav: cn( - "flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between", - defaultClassNames.nav, - ), - button_previous: cn( - buttonVariants({ variant: buttonVariant }), - "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", - defaultClassNames.button_previous, - ), - button_next: cn( - buttonVariants({ variant: buttonVariant }), - "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", - defaultClassNames.button_next, - ), - month_caption: cn( - "flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)", - defaultClassNames.month_caption, - ), - dropdowns: cn( - "w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5", - defaultClassNames.dropdowns, - ), - dropdown_root: cn( - "relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md", - defaultClassNames.dropdown_root, - ), - dropdown: cn("absolute bg-popover inset-0 opacity-0", defaultClassNames.dropdown), - caption_label: cn( - "select-none font-medium", - captionLayout === "label" - ? "text-sm" - : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5", - defaultClassNames.caption_label, - ), - table: "w-full border-collapse", - weekdays: cn("flex", defaultClassNames.weekdays), - weekday: cn( - "text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none", - defaultClassNames.weekday, - ), - week: cn("flex w-full mt-2", defaultClassNames.week), - week_number_header: cn("select-none w-(--cell-size)", defaultClassNames.week_number_header), - week_number: cn( - "text-[0.8rem] select-none text-muted-foreground", - defaultClassNames.week_number, - ), - day: cn( - "relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none", - defaultClassNames.day, - ), - range_start: cn("rounded-l-md bg-accent", defaultClassNames.range_start), - range_middle: cn("rounded-none", defaultClassNames.range_middle), - range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end), - today: cn( - "bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none", - defaultClassNames.today, - ), - outside: cn( - "text-muted-foreground aria-selected:text-muted-foreground", - defaultClassNames.outside, - ), - disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled), - hidden: cn("invisible", defaultClassNames.hidden), - ...classNames, - }} - components={{ - Root: ({ className, rootRef, ...props }) => { - return
; - }, - Chevron: ({ className, orientation, ...props }) => { - if (orientation === "left") { - return ; - } - - if (orientation === "right") { - return ; - } - - return ; - }, - DayButton: CalendarDayButton, - WeekNumber: ({ children, ...props }) => { - return ( - -
- {children} -
- - ); - }, - ...components, - }} - {...props} - /> - ); -} - -function CalendarDayButton({ - className, - day, - modifiers, - ...props -}: React.ComponentProps) { - const defaultClassNames = getDefaultClassNames(); - - const ref = React.useRef(null); - React.useEffect(() => { - if (modifiers.focused) ref.current?.focus(); - }, [modifiers.focused]); - - return ( -