diff --git a/apps/checkout/package.json b/apps/checkout/package.json
index e41496175..147128e47 100644
--- a/apps/checkout/package.json
+++ b/apps/checkout/package.json
@@ -6,7 +6,6 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
- "lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
@@ -33,17 +32,11 @@
"vite-tsconfig-paths": "^6.0.5"
},
"devDependencies": {
- "@eslint/js": "^9.39.1",
"@types/node": "^24.10.1",
"@types/react": "^19.2.5",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.1",
- "eslint": "^9.39.1",
- "eslint-plugin-react-hooks": "^7.0.1",
- "eslint-plugin-react-refresh": "^0.4.24",
- "globals": "^16.5.0",
"typescript": "~5.9.3",
- "typescript-eslint": "^8.46.4",
"vite": "^7.2.4"
}
}
diff --git a/apps/checkout/src/components/checkout/CheckoutContent.tsx b/apps/checkout/src/components/checkout/CheckoutContent.tsx
index b837db1ba..522ce9a1d 100644
--- a/apps/checkout/src/components/checkout/CheckoutContent.tsx
+++ b/apps/checkout/src/components/checkout/CheckoutContent.tsx
@@ -2,13 +2,13 @@ import { LayoutGroup, motion } from "motion/react";
import { Separator } from "@/components/ui/separator";
import { useCheckoutContext } from "@/contexts/CheckoutContext";
import { STANDARD_TRANSITION, fadeUpVariants, listContainerVariants } from "@/lib/animations";
-import { CheckoutBackground } from "./CheckoutBackground";
-import { CheckoutErrorState } from "./CheckoutErrorState";
-import { CheckoutHeader } from "./CheckoutHeader";
-import { CheckoutSuccessState } from "./CheckoutSuccessState";
-import { ConfirmSection } from "./ConfirmSection";
-import { OrderSummarySection } from "./OrderSummarySection";
-import { PlanSection } from "./PlanSection";
+import { ConfirmSection } from "./confirm/ConfirmSection";
+import { CheckoutBackground } from "./layout/CheckoutBackground";
+import { CheckoutHeader } from "./layout/CheckoutHeader";
+import { OrderSummarySection } from "./order-summary/OrderSummarySection";
+import { PlanSection } from "./plan/PlanSection";
+import { CheckoutErrorState } from "./states/CheckoutErrorState";
+import { CheckoutSuccessState } from "./states/CheckoutSuccessState";
export function CheckoutContent() {
const { confirmResult, status, isSandbox } = useCheckoutContext();
diff --git a/apps/checkout/src/components/checkout/FreeTrialCard.tsx b/apps/checkout/src/components/checkout/FreeTrialCard.tsx
deleted file mode 100644
index 817f750c6..000000000
--- a/apps/checkout/src/components/checkout/FreeTrialCard.tsx
+++ /dev/null
@@ -1,69 +0,0 @@
-import type { ApiFreeTrialV2 } from "@autumn/shared";
-import { Gift } from "@phosphor-icons/react";
-import { motion } from "motion/react";
-import { CardBackground } from "@/components/checkout/CardBackground";
-import { LAYOUT_TRANSITION, listItemVariants } from "@/lib/animations";
-import { formatTrialDuration } from "@/utils/trialUtils";
-
-interface FreeTrialCardProps {
- freeTrial: ApiFreeTrialV2;
- trialAvailable: boolean;
-}
-
-export function FreeTrialCard({ freeTrial, trialAvailable }: FreeTrialCardProps) {
- const duration = formatTrialDuration({
- duration_type: freeTrial.duration_type,
- duration_length: freeTrial.duration_length,
- });
-
- return (
-
-
- {/* Header */}
-
-
-
-
- Free Trial
-
-
-
- {duration}
-
-
-
- {/* Content */}
-
- {trialAvailable ? (
- <>
-
- Try free for {duration} before subscribing
-
-
- {freeTrial.card_required
- ? "Card required to start"
- : "No payment required to start"}
-
- >
- ) : (
-
- Trial already used
-
- )}
-
-
-
- );
-}
diff --git a/apps/checkout/src/components/checkout/FreeTrialCardSkeleton.tsx b/apps/checkout/src/components/checkout/FreeTrialCardSkeleton.tsx
deleted file mode 100644
index 94a0d357b..000000000
--- a/apps/checkout/src/components/checkout/FreeTrialCardSkeleton.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Skeleton } from "@/components/ui/skeleton";
-
-/** Skeleton that matches FreeTrialCard structure */
-export function FreeTrialCardSkeleton() {
- return (
-
- {/* Header */}
-
- {/* Content */}
-
-
-
-
-
- );
-}
diff --git a/apps/checkout/src/components/checkout/PlanGroupCard.tsx b/apps/checkout/src/components/checkout/PlanGroupCard.tsx
deleted file mode 100644
index 248500ce9..000000000
--- a/apps/checkout/src/components/checkout/PlanGroupCard.tsx
+++ /dev/null
@@ -1,148 +0,0 @@
-import type { PreviewLineItem } from "@autumn/shared";
-import { Clock, Minus, Plus } from "@phosphor-icons/react";
-import { motion } from "motion/react";
-import { Separator } from "@/components/ui/separator";
-import { FAST_TRANSITION, LAYOUT_TRANSITION, listItemVariants } from "@/lib/animations";
-import { cn } from "@/lib/utils";
-import { formatAmount } from "@/utils/formatUtils";
-import { CardBackground } from "@/components/checkout/CardBackground";
-
-type PlanChangeType = "incoming" | "outgoing";
-
-interface PlanGroupCardProps {
- planId: string;
- planName: string;
- items: PreviewLineItem[];
- currency: string;
- index: number;
- type: PlanChangeType;
-}
-
-export function PlanGroupCard({
- planId,
- planName,
- items,
- currency,
- index,
- type,
-}: PlanGroupCardProps) {
- const Icon = type === "outgoing" ? Minus : Plus;
- const groupTotal = items.reduce((sum, item) => sum + item.amount, 0);
-
- // Check if all items in this group are deferred for trial
- const allDeferred =
- items.length > 0 && items.every((item) => item.deferred_for_trial);
-
- // Sort items so base price appears first
- const sortedItems = [...items].sort((a, b) => {
- if (a.is_base && !b.is_base) return -1;
- if (!a.is_base && b.is_base) return 1;
- return 0;
- });
-
- return (
-
-
-
- {/* After trial banner */}
- {allDeferred && (
-
-
- Charged after trial ends
-
- )}
-
- {/* Plan header */}
-
-
-
-
- {planName}
-
-
-
- {formatAmount(groupTotal, currency)}
-
-
-
- {/* Line items for this plan */}
-
- {sortedItems.length === 0 ? (
-
-
- {type === "outgoing" ? "No charges" : "Free"}
-
-
- {formatAmount(0, currency)}
-
-
- ) : (
- sortedItems.map((item, itemIndex) => (
-
-
-
-
- {item.is_base ? "Base Price" : item.title}
-
- {!item.is_base && item.total_quantity > 1 && (
-
- x{item.total_quantity}
-
- )}
-
-
- {/* Show "After trial" for individual deferred items (only if not all are deferred) */}
- {item.deferred_for_trial && !allDeferred && (
-
-
- After trial
-
- )}
-
- {formatAmount(item.amount, currency)}
-
-
-
- {itemIndex < sortedItems.length - 1 && (
-
- )}
-
- ))
- )}
-
-
-
- );
-}
diff --git a/apps/checkout/src/components/checkout/PlanGroupCardSkeleton.tsx b/apps/checkout/src/components/checkout/PlanGroupCardSkeleton.tsx
deleted file mode 100644
index a830d7330..000000000
--- a/apps/checkout/src/components/checkout/PlanGroupCardSkeleton.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Skeleton } from "@/components/ui/skeleton";
-
-/** Skeleton that matches PlanGroupCard structure */
-export function PlanGroupCardSkeleton() {
- return (
-
- {/* Header */}
-
- {/* Line item */}
-
-
- );
-}
diff --git a/apps/checkout/src/components/checkout/BottomSectionSkeleton.tsx b/apps/checkout/src/components/checkout/confirm/BottomSectionSkeleton.tsx
similarity index 100%
rename from apps/checkout/src/components/checkout/BottomSectionSkeleton.tsx
rename to apps/checkout/src/components/checkout/confirm/BottomSectionSkeleton.tsx
diff --git a/apps/checkout/src/components/checkout/ConfirmSection.tsx b/apps/checkout/src/components/checkout/confirm/ConfirmSection.tsx
similarity index 98%
rename from apps/checkout/src/components/checkout/ConfirmSection.tsx
rename to apps/checkout/src/components/checkout/confirm/ConfirmSection.tsx
index 12849040f..cacaf294d 100644
--- a/apps/checkout/src/components/checkout/ConfirmSection.tsx
+++ b/apps/checkout/src/components/checkout/confirm/ConfirmSection.tsx
@@ -6,7 +6,7 @@ import { useCheckoutContext } from "@/contexts/CheckoutContext";
import { FAST_TRANSITION, STANDARD_TRANSITION, fadeUpVariants } from "@/lib/animations";
import { formatAmount } from "@/utils/formatUtils";
import { BottomSectionSkeleton } from "./BottomSectionSkeleton";
-import { CheckoutFooter } from "./CheckoutFooter";
+import { CheckoutFooter } from "../layout/CheckoutFooter";
function getButtonText({
isPending,
diff --git a/apps/checkout/src/components/checkout/CardBackground.tsx b/apps/checkout/src/components/checkout/layout/CardBackground.tsx
similarity index 100%
rename from apps/checkout/src/components/checkout/CardBackground.tsx
rename to apps/checkout/src/components/checkout/layout/CardBackground.tsx
diff --git a/apps/checkout/src/components/checkout/CheckoutBackground.tsx b/apps/checkout/src/components/checkout/layout/CheckoutBackground.tsx
similarity index 97%
rename from apps/checkout/src/components/checkout/CheckoutBackground.tsx
rename to apps/checkout/src/components/checkout/layout/CheckoutBackground.tsx
index 4a97989f9..86380e3b8 100644
--- a/apps/checkout/src/components/checkout/CheckoutBackground.tsx
+++ b/apps/checkout/src/components/checkout/layout/CheckoutBackground.tsx
@@ -1,7 +1,7 @@
import type { ReactNode } from "react";
import { motion } from "motion/react";
import { BackgroundBeams } from "@/components/bg/background-beams";
-import { SandboxBanner } from "@/components/checkout/SandboxBanner";
+import { SandboxBanner } from "@/components/checkout/layout/SandboxBanner";
import { SLOW_TRANSITION, SPRING_TRANSITION } from "@/lib/animations";
interface CheckoutBackgroundProps {
diff --git a/apps/checkout/src/components/checkout/CheckoutFooter.tsx b/apps/checkout/src/components/checkout/layout/CheckoutFooter.tsx
similarity index 100%
rename from apps/checkout/src/components/checkout/CheckoutFooter.tsx
rename to apps/checkout/src/components/checkout/layout/CheckoutFooter.tsx
diff --git a/apps/checkout/src/components/checkout/CheckoutHeader.tsx b/apps/checkout/src/components/checkout/layout/CheckoutHeader.tsx
similarity index 100%
rename from apps/checkout/src/components/checkout/CheckoutHeader.tsx
rename to apps/checkout/src/components/checkout/layout/CheckoutHeader.tsx
diff --git a/apps/checkout/src/components/checkout/SandboxBanner.tsx b/apps/checkout/src/components/checkout/layout/SandboxBanner.tsx
similarity index 100%
rename from apps/checkout/src/components/checkout/SandboxBanner.tsx
rename to apps/checkout/src/components/checkout/layout/SandboxBanner.tsx
diff --git a/apps/checkout/src/components/checkout/OrderSummary.tsx b/apps/checkout/src/components/checkout/order-summary/OrderSummary.tsx
similarity index 94%
rename from apps/checkout/src/components/checkout/OrderSummary.tsx
rename to apps/checkout/src/components/checkout/order-summary/OrderSummary.tsx
index dc10a841d..0f619fff5 100644
--- a/apps/checkout/src/components/checkout/OrderSummary.tsx
+++ b/apps/checkout/src/components/checkout/order-summary/OrderSummary.tsx
@@ -1,9 +1,9 @@
import type { PreviewLineItem } from "@autumn/shared";
import { motion } from "motion/react";
import { useMemo } from "react";
-import { CardBackground } from "@/components/checkout/CardBackground";
-import { FreeTrialSection } from "@/components/checkout/FreeTrialSection";
-import { PlanGroupSection } from "@/components/checkout/PlanGroupSection";
+import { CardBackground } from "@/components/checkout/layout/CardBackground";
+import { PlanGroupSection } from "@/components/checkout/plan/PlanGroupSection";
+import { FreeTrialSection } from "@/components/checkout/trial/FreeTrialSection";
import { Separator } from "@/components/ui/separator";
import { useCheckoutContext } from "@/contexts/CheckoutContext";
import { LAYOUT_TRANSITION } from "@/lib/animations";
diff --git a/apps/checkout/src/components/checkout/OrderSummarySection.tsx b/apps/checkout/src/components/checkout/order-summary/OrderSummarySection.tsx
similarity index 94%
rename from apps/checkout/src/components/checkout/OrderSummarySection.tsx
rename to apps/checkout/src/components/checkout/order-summary/OrderSummarySection.tsx
index 7bc0762e5..b6b35a22e 100644
--- a/apps/checkout/src/components/checkout/OrderSummarySection.tsx
+++ b/apps/checkout/src/components/checkout/order-summary/OrderSummarySection.tsx
@@ -4,7 +4,7 @@ import { useCheckoutContext } from "@/contexts/CheckoutContext";
import { FAST_TRANSITION, STANDARD_TRANSITION, fadeUpVariants } from "@/lib/animations";
import { OrderSummary } from "./OrderSummary";
import { OrderSummarySkeleton } from "./OrderSummarySkeleton";
-import { SectionHeader } from "./SectionHeader";
+import { SectionHeader } from "../shared/SectionHeader";
export function OrderSummarySection() {
const { status } = useCheckoutContext();
diff --git a/apps/checkout/src/components/checkout/OrderSummarySkeleton.tsx b/apps/checkout/src/components/checkout/order-summary/OrderSummarySkeleton.tsx
similarity index 100%
rename from apps/checkout/src/components/checkout/OrderSummarySkeleton.tsx
rename to apps/checkout/src/components/checkout/order-summary/OrderSummarySkeleton.tsx
diff --git a/apps/checkout/src/components/checkout/PlanGroupSection.tsx b/apps/checkout/src/components/checkout/plan/PlanGroupSection.tsx
similarity index 100%
rename from apps/checkout/src/components/checkout/PlanGroupSection.tsx
rename to apps/checkout/src/components/checkout/plan/PlanGroupSection.tsx
diff --git a/apps/checkout/src/components/checkout/PlanSection.tsx b/apps/checkout/src/components/checkout/plan/PlanSection.tsx
similarity index 94%
rename from apps/checkout/src/components/checkout/PlanSection.tsx
rename to apps/checkout/src/components/checkout/plan/PlanSection.tsx
index b6d6ff3d9..a85804d0c 100644
--- a/apps/checkout/src/components/checkout/PlanSection.tsx
+++ b/apps/checkout/src/components/checkout/plan/PlanSection.tsx
@@ -4,7 +4,7 @@ import { useCheckoutContext } from "@/contexts/CheckoutContext";
import { STANDARD_TRANSITION, fadeUpVariants } from "@/lib/animations";
import { PlanSelectionCard } from "./PlanSelectionCard";
import { PlanSelectionCardSkeleton } from "./PlanSelectionCardSkeleton";
-import { SectionHeader } from "./SectionHeader";
+import { SectionHeader } from "../shared/SectionHeader";
export function PlanSection() {
const { incoming, status } = useCheckoutContext();
diff --git a/apps/checkout/src/components/checkout/PlanSelectionCard.tsx b/apps/checkout/src/components/checkout/plan/PlanSelectionCard.tsx
similarity index 98%
rename from apps/checkout/src/components/checkout/PlanSelectionCard.tsx
rename to apps/checkout/src/components/checkout/plan/PlanSelectionCard.tsx
index 6f50552d9..35f027704 100644
--- a/apps/checkout/src/components/checkout/PlanSelectionCard.tsx
+++ b/apps/checkout/src/components/checkout/plan/PlanSelectionCard.tsx
@@ -12,8 +12,8 @@ import {
listItemVariants,
} from "@/lib/animations";
import { formatAmount } from "@/utils/formatUtils";
-import { CardBackground } from "@/components/checkout/CardBackground";
-import { QuantityInput } from "./QuantityInput";
+import { CardBackground } from "@/components/checkout/layout/CardBackground";
+import { QuantityInput } from "../shared/QuantityInput";
function categorizeFeatures(features: ApiPlanFeature[]): {
prepaid: ApiPlanFeature[];
diff --git a/apps/checkout/src/components/checkout/PlanSelectionCardSkeleton.tsx b/apps/checkout/src/components/checkout/plan/PlanSelectionCardSkeleton.tsx
similarity index 93%
rename from apps/checkout/src/components/checkout/PlanSelectionCardSkeleton.tsx
rename to apps/checkout/src/components/checkout/plan/PlanSelectionCardSkeleton.tsx
index 8618ba64e..07e46ec67 100644
--- a/apps/checkout/src/components/checkout/PlanSelectionCardSkeleton.tsx
+++ b/apps/checkout/src/components/checkout/plan/PlanSelectionCardSkeleton.tsx
@@ -1,4 +1,4 @@
-import { CardBackground } from "@/components/checkout/CardBackground";
+import { CardBackground } from "@/components/checkout/layout/CardBackground";
import { Card } from "@/components/ui/card";
import { Separator } from "@/components/ui/separator";
import { Skeleton } from "@/components/ui/skeleton";
diff --git a/apps/checkout/src/components/checkout/QuantityInput.tsx b/apps/checkout/src/components/checkout/shared/QuantityInput.tsx
similarity index 100%
rename from apps/checkout/src/components/checkout/QuantityInput.tsx
rename to apps/checkout/src/components/checkout/shared/QuantityInput.tsx
diff --git a/apps/checkout/src/components/checkout/SectionHeader.tsx b/apps/checkout/src/components/checkout/shared/SectionHeader.tsx
similarity index 100%
rename from apps/checkout/src/components/checkout/SectionHeader.tsx
rename to apps/checkout/src/components/checkout/shared/SectionHeader.tsx
diff --git a/apps/checkout/src/components/checkout/CheckoutErrorState.tsx b/apps/checkout/src/components/checkout/states/CheckoutErrorState.tsx
similarity index 89%
rename from apps/checkout/src/components/checkout/CheckoutErrorState.tsx
rename to apps/checkout/src/components/checkout/states/CheckoutErrorState.tsx
index f583de30e..a24ba2ab4 100644
--- a/apps/checkout/src/components/checkout/CheckoutErrorState.tsx
+++ b/apps/checkout/src/components/checkout/states/CheckoutErrorState.tsx
@@ -1,6 +1,6 @@
import { WarningIcon } from "@phosphor-icons/react";
import { motion } from "motion/react";
-import { CheckoutBackground } from "@/components/checkout/CheckoutBackground";
+import { CheckoutBackground } from "@/components/checkout/layout/CheckoutBackground";
import { STANDARD_TRANSITION } from "@/lib/animations";
export function CheckoutErrorState({ message }: { message: string }) {
diff --git a/apps/checkout/src/components/checkout/CheckoutSuccessState.tsx b/apps/checkout/src/components/checkout/states/CheckoutSuccessState.tsx
similarity index 91%
rename from apps/checkout/src/components/checkout/CheckoutSuccessState.tsx
rename to apps/checkout/src/components/checkout/states/CheckoutSuccessState.tsx
index d3e017b2b..9f513c6cb 100644
--- a/apps/checkout/src/components/checkout/CheckoutSuccessState.tsx
+++ b/apps/checkout/src/components/checkout/states/CheckoutSuccessState.tsx
@@ -1,7 +1,7 @@
import type { ConfirmCheckoutResponse } from "@autumn/shared";
import { CheckIcon } from "@phosphor-icons/react";
import { motion } from "motion/react";
-import { CheckoutBackground } from "@/components/checkout/CheckoutBackground";
+import { CheckoutBackground } from "@/components/checkout/layout/CheckoutBackground";
import { STANDARD_TRANSITION } from "@/lib/animations";
export function CheckoutSuccessState({
diff --git a/apps/checkout/src/components/checkout/FreeTrialSection.tsx b/apps/checkout/src/components/checkout/trial/FreeTrialSection.tsx
similarity index 100%
rename from apps/checkout/src/components/checkout/FreeTrialSection.tsx
rename to apps/checkout/src/components/checkout/trial/FreeTrialSection.tsx
diff --git a/apps/checkout/src/components/motion/CyclingSkeletonList.tsx b/apps/checkout/src/components/motion/CyclingSkeletonList.tsx
deleted file mode 100644
index e5bcb880e..000000000
--- a/apps/checkout/src/components/motion/CyclingSkeletonList.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-import { AnimatePresence, motion } from "motion/react";
-import { useEffect, useState } from "react";
-import {
- LAYOUT_TRANSITION,
- SKELETON_CYCLE_INTERVAL,
- skeletonItemVariants,
-} from "@/lib/animations";
-
-interface CyclingSkeletonListProps {
- renderItem: (index: number) => React.ReactNode;
- minItems?: number;
- maxItems?: number;
- interval?: number;
-}
-
-/**
- * Renders a list of skeleton items that cycles between min and max count.
- * Items animate in/out with slide-down + fade effect.
- */
-export function CyclingSkeletonList({
- renderItem,
- minItems = 1,
- maxItems = 2,
- interval = SKELETON_CYCLE_INTERVAL,
-}: CyclingSkeletonListProps) {
- const [itemCount, setItemCount] = useState(minItems);
-
- useEffect(() => {
- const timer = setInterval(() => {
- setItemCount((prev) => (prev >= maxItems ? minItems : prev + 1));
- }, interval);
-
- return () => clearInterval(timer);
- }, [minItems, maxItems, interval]);
-
- return (
-
-
- {Array.from({ length: itemCount }).map((_, index) => (
-
- {renderItem(index)}
-
- ))}
-
-
- );
-}
diff --git a/apps/checkout/src/components/motion/animated-layout.tsx b/apps/checkout/src/components/motion/animated-layout.tsx
deleted file mode 100644
index bbc5296e1..000000000
--- a/apps/checkout/src/components/motion/animated-layout.tsx
+++ /dev/null
@@ -1,70 +0,0 @@
-import { type HTMLMotionProps, motion } from "motion/react";
-import { forwardRef } from "react";
-import { LAYOUT_TRANSITION } from "@/lib/animations";
-
-type AnimatedLayoutProps = HTMLMotionProps<"div"> & {
- /** Unique ID for layout animations - elements with matching IDs animate between each other */
- layoutId?: string;
-};
-
-/**
- * A div that smoothly animates size/position changes.
- * Uses a gentle spring transition optimized for skeleton-to-content morphing.
- */
-export const AnimatedLayout = forwardRef(
- ({ children, layoutId, transition, ...props }, ref) => (
-
- {children}
-
- ),
-);
-AnimatedLayout.displayName = "AnimatedLayout";
-
-/** Pre-configured animated container for cards with layout animations. */
-export const AnimatedCard = forwardRef(
- ({ children, layoutId, transition, ...props }, ref) => (
-
- {children}
-
- ),
-);
-AnimatedCard.displayName = "AnimatedCard";
-
-/**
- * Animated list item that works within AnimatedLayout containers.
- * Automatically participates in layout animations.
- */
-export const AnimatedListItem = forwardRef(
- ({ children, transition, ...props }, ref) => (
-
- {children}
-
- ),
-);
-AnimatedListItem.displayName = "AnimatedListItem";
diff --git a/apps/checkout/src/components/ui/alert-dialog.tsx b/apps/checkout/src/components/ui/alert-dialog.tsx
deleted file mode 100644
index ee099f844..000000000
--- a/apps/checkout/src/components/ui/alert-dialog.tsx
+++ /dev/null
@@ -1,175 +0,0 @@
-"use client"
-
-import * as React from "react"
-import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog"
-
-import { cn } from "@/lib/utils"
-import { Button } from "@/components/ui/button"
-
-function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {
- return
-}
-
-function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {
- return (
-
- )
-}
-
-function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {
- return (
-
- )
-}
-
-function AlertDialogOverlay({
- className,
- ...props
-}: AlertDialogPrimitive.Backdrop.Props) {
- return (
-
- )
-}
-
-function AlertDialogContent({
- className,
- size = "default",
- ...props
-}: AlertDialogPrimitive.Popup.Props & {
- size?: "default" | "sm"
-}) {
- return (
-
-
-
-
- )
-}
-
-function AlertDialogHeader({
- className,
- ...props
-}: React.ComponentProps<"div">) {
- return (
-
- )
-}
-
-function AlertDialogFooter({
- className,
- ...props
-}: React.ComponentProps<"div">) {
- return (
-
- )
-}
-
-function AlertDialogMedia({
- className,
- ...props
-}: React.ComponentProps<"div">) {
- return (
-
- )
-}
-
-function AlertDialogTitle({
- className,
- ...props
-}: React.ComponentProps) {
- return (
-
- )
-}
-
-function AlertDialogDescription({
- className,
- ...props
-}: React.ComponentProps) {
- return (
-
- )
-}
-
-function AlertDialogAction({
- className,
- ...props
-}: React.ComponentProps) {
- return (
-
- )
-}
-
-function AlertDialogCancel({
- className,
- variant = "outline",
- size = "default",
- ...props
-}: AlertDialogPrimitive.Close.Props &
- Pick, "variant" | "size">) {
- return (
- }
- {...props}
- />
- )
-}
-
-export {
- AlertDialog,
- AlertDialogAction,
- AlertDialogCancel,
- AlertDialogContent,
- AlertDialogDescription,
- AlertDialogFooter,
- AlertDialogHeader,
- AlertDialogMedia,
- AlertDialogOverlay,
- AlertDialogPortal,
- AlertDialogTitle,
- AlertDialogTrigger,
-}
diff --git a/apps/checkout/src/components/ui/badge.tsx b/apps/checkout/src/components/ui/badge.tsx
deleted file mode 100644
index c0d4ad842..000000000
--- a/apps/checkout/src/components/ui/badge.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import { mergeProps } from "@base-ui/react/merge-props"
-import { useRender } from "@base-ui/react/use-render"
-import { cva, type VariantProps } from "class-variance-authority"
-
-import { cn } from "@/lib/utils"
-
-const badgeVariants = cva(
- "h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive overflow-hidden group/badge",
- {
- variants: {
- variant: {
- default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
- secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
- destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",
- outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
- ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
- link: "text-primary underline-offset-4 hover:underline",
- },
- },
- defaultVariants: {
- variant: "default",
- },
- }
-)
-
-function Badge({
- className,
- variant = "default",
- render,
- ...props
-}: useRender.ComponentProps<"span"> & VariantProps) {
- return useRender({
- defaultTagName: "span",
- props: mergeProps<"span">(
- {
- className: cn(badgeVariants({ className, variant })),
- },
- props
- ),
- render,
- state: {
- slot: "badge",
- variant,
- },
- })
-}
-
-export { Badge, badgeVariants }
diff --git a/apps/checkout/src/components/ui/combobox.tsx b/apps/checkout/src/components/ui/combobox.tsx
deleted file mode 100644
index 062d99c7d..000000000
--- a/apps/checkout/src/components/ui/combobox.tsx
+++ /dev/null
@@ -1,290 +0,0 @@
-import * as React from "react"
-import { Combobox as ComboboxPrimitive } from "@base-ui/react"
-
-import { cn } from "@/lib/utils"
-import { Button } from "@/components/ui/button"
-import {
- InputGroup,
- InputGroupAddon,
- InputGroupButton,
- InputGroupInput,
-} from "@/components/ui/input-group"
-import { CaretDownIcon, XIcon, CheckIcon } from "@phosphor-icons/react"
-
-const Combobox = ComboboxPrimitive.Root
-
-function ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {
- return
-}
-
-function ComboboxTrigger({
- className,
- children,
- ...props
-}: ComboboxPrimitive.Trigger.Props) {
- return (
-
- {children}
-
-
- )
-}
-
-function ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {
- return (
- }
- className={cn(className)}
- {...props}
- >
-
-
- )
-}
-
-function ComboboxInput({
- className,
- children,
- disabled = false,
- showTrigger = true,
- showClear = false,
- ...props
-}: ComboboxPrimitive.Input.Props & {
- showTrigger?: boolean
- showClear?: boolean
-}) {
- return (
-
- }
- {...props}
- />
-
- {showTrigger && (
- }
- data-slot="input-group-button"
- className="group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent"
- disabled={disabled}
- />
- )}
- {showClear && }
-
- {children}
-
- )
-}
-
-function ComboboxContent({
- className,
- side = "bottom",
- sideOffset = 6,
- align = "start",
- alignOffset = 0,
- anchor,
- ...props
-}: ComboboxPrimitive.Popup.Props &
- Pick<
- ComboboxPrimitive.Positioner.Props,
- "side" | "align" | "sideOffset" | "alignOffset" | "anchor"
- >) {
- return (
-
-
-
-
-
- )
-}
-
-function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {
- return (
-
- )
-}
-
-function ComboboxItem({
- className,
- children,
- ...props
-}: ComboboxPrimitive.Item.Props) {
- return (
-
- {children}
- }
- >
-
-
-
- )
-}
-
-function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {
- return (
-
- )
-}
-
-function ComboboxLabel({
- className,
- ...props
-}: ComboboxPrimitive.GroupLabel.Props) {
- return (
-
- )
-}
-
-function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {
- return (
-
- )
-}
-
-function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {
- return (
-
- )
-}
-
-function ComboboxSeparator({
- className,
- ...props
-}: ComboboxPrimitive.Separator.Props) {
- return (
-
- )
-}
-
-function ComboboxChips({
- className,
- ...props
-}: React.ComponentPropsWithRef &
- ComboboxPrimitive.Chips.Props) {
- return (
-
- )
-}
-
-function ComboboxChip({
- className,
- children,
- showRemove = true,
- ...props
-}: ComboboxPrimitive.Chip.Props & {
- showRemove?: boolean
-}) {
- return (
-
- {children}
- {showRemove && (
- }
- className="-ml-1 opacity-50 hover:opacity-100"
- data-slot="combobox-chip-remove"
- >
-
-
- )}
-
- )
-}
-
-function ComboboxChipsInput({
- className,
- ...props
-}: ComboboxPrimitive.Input.Props) {
- return (
-
- )
-}
-
-function useComboboxAnchor() {
- return React.useRef(null)
-}
-
-export {
- Combobox,
- ComboboxInput,
- ComboboxContent,
- ComboboxList,
- ComboboxItem,
- ComboboxGroup,
- ComboboxLabel,
- ComboboxCollection,
- ComboboxEmpty,
- ComboboxSeparator,
- ComboboxChips,
- ComboboxChip,
- ComboboxChipsInput,
- ComboboxTrigger,
- ComboboxValue,
- useComboboxAnchor,
-}
diff --git a/apps/checkout/src/components/ui/dropdown-menu.tsx b/apps/checkout/src/components/ui/dropdown-menu.tsx
deleted file mode 100644
index 2b962e315..000000000
--- a/apps/checkout/src/components/ui/dropdown-menu.tsx
+++ /dev/null
@@ -1,254 +0,0 @@
-"use client"
-
-import * as React from "react"
-import { Menu as MenuPrimitive } from "@base-ui/react/menu"
-
-import { cn } from "@/lib/utils"
-import { CaretRightIcon, CheckIcon } from "@phosphor-icons/react"
-
-function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
- return
-}
-
-function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {
- return
-}
-
-function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {
- return
-}
-
-function DropdownMenuContent({
- align = "start",
- alignOffset = 0,
- side = "bottom",
- sideOffset = 4,
- className,
- ...props
-}: MenuPrimitive.Popup.Props &
- Pick<
- MenuPrimitive.Positioner.Props,
- "align" | "alignOffset" | "side" | "sideOffset"
- >) {
- return (
-
-
-
-
-
- )
-}
-
-function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {
- return
-}
-
-function DropdownMenuLabel({
- className,
- inset,
- ...props
-}: MenuPrimitive.GroupLabel.Props & {
- inset?: boolean
-}) {
- return (
-
- )
-}
-
-function DropdownMenuItem({
- className,
- inset,
- variant = "default",
- ...props
-}: MenuPrimitive.Item.Props & {
- inset?: boolean
- variant?: "default" | "destructive"
-}) {
- return (
-
- )
-}
-
-function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {
- return
-}
-
-function DropdownMenuSubTrigger({
- className,
- inset,
- children,
- ...props
-}: MenuPrimitive.SubmenuTrigger.Props & {
- inset?: boolean
-}) {
- return (
-
- {children}
-
-
- )
-}
-
-function DropdownMenuSubContent({
- align = "start",
- alignOffset = -3,
- side = "right",
- sideOffset = 0,
- className,
- ...props
-}: React.ComponentProps) {
- return (
-
- )
-}
-
-function DropdownMenuCheckboxItem({
- className,
- children,
- checked,
- ...props
-}: MenuPrimitive.CheckboxItem.Props) {
- return (
-
-
-
-
-
-
- {children}
-
- )
-}
-
-function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {
- return (
-
- )
-}
-
-function DropdownMenuRadioItem({
- className,
- children,
- ...props
-}: MenuPrimitive.RadioItem.Props) {
- return (
-
-
-
-
-
-
- {children}
-
- )
-}
-
-function DropdownMenuSeparator({
- className,
- ...props
-}: MenuPrimitive.Separator.Props) {
- return (
-
- )
-}
-
-function DropdownMenuShortcut({
- className,
- ...props
-}: React.ComponentProps<"span">) {
- return (
-
- )
-}
-
-export {
- DropdownMenu,
- DropdownMenuPortal,
- DropdownMenuTrigger,
- DropdownMenuContent,
- DropdownMenuGroup,
- DropdownMenuLabel,
- DropdownMenuItem,
- DropdownMenuCheckboxItem,
- DropdownMenuRadioGroup,
- DropdownMenuRadioItem,
- DropdownMenuSeparator,
- DropdownMenuShortcut,
- DropdownMenuSub,
- DropdownMenuSubTrigger,
- DropdownMenuSubContent,
-}
diff --git a/apps/checkout/src/components/ui/field.tsx b/apps/checkout/src/components/ui/field.tsx
deleted file mode 100644
index 5b613888e..000000000
--- a/apps/checkout/src/components/ui/field.tsx
+++ /dev/null
@@ -1,227 +0,0 @@
-"use client"
-
-import { useMemo } from "react"
-import { cva, type VariantProps } from "class-variance-authority"
-
-import { cn } from "@/lib/utils"
-import { Label } from "@/components/ui/label"
-import { Separator } from "@/components/ui/separator"
-
-function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
- return (
-