refactor and reorganize

This commit is contained in:
Milo Schwartz 2025-01-01 21:41:31 -05:00
parent 9732098799
commit 3b4a993704
No known key found for this signature in database
216 changed files with 519 additions and 2128 deletions

View file

@ -1,7 +1,7 @@
import * as React from "react";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
import { cn } from "@app/lib/cn";
const alertVariants = cva(
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",

View file

@ -3,7 +3,7 @@
import * as React from "react"
import * as AvatarPrimitive from "@radix-ui/react-avatar"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const Avatar = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Root>,

View file

@ -1,7 +1,7 @@
import * as React from "react";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
import { cn } from "@app/lib/cn";
const badgeVariants = cva(
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",

View file

@ -2,7 +2,7 @@ import * as React from "react"
import { Slot } from "@radix-ui/react-slot"
import { ChevronRight, MoreHorizontal } from "lucide-react"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const Breadcrumb = React.forwardRef<
HTMLElement,

View file

@ -2,7 +2,7 @@ import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
import { cn } from "@app/lib/cn";
import { Loader2 } from "lucide-react";
const buttonVariants = cva(

View file

@ -1,6 +1,6 @@
import * as React from "react";
import { cn } from "@/lib/utils";
import { cn } from "@app/lib/cn";
const Card = React.forwardRef<
HTMLDivElement,

View file

@ -4,7 +4,7 @@ import * as React from "react"
import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
import { Check } from "lucide-react"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const Checkbox = React.forwardRef<
React.ElementRef<typeof CheckboxPrimitive.Root>,

View file

@ -5,7 +5,7 @@ import { type DialogProps } from "@radix-ui/react-dialog"
import { Command as CommandPrimitive } from "cmdk"
import { Search } from "lucide-react"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
import { Dialog, DialogContent } from "@/components/ui/dialog"
const Command = React.forwardRef<

View file

@ -4,7 +4,7 @@ import * as React from "react";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "lucide-react";
import { cn } from "@/lib/utils";
import { cn } from "@app/lib/cn";
const Dialog = DialogPrimitive.Root;

View file

@ -3,7 +3,7 @@
import * as React from "react";
import { Drawer as DrawerPrimitive } from "vaul";
import { cn } from "@/lib/utils";
import { cn } from "@app/lib/cn";
const Drawer = ({
shouldScaleBackground = true,

View file

@ -4,7 +4,7 @@ import * as React from "react"
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
import { Check, ChevronRight, Circle } from "lucide-react"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const DropdownMenu = DropdownMenuPrimitive.Root

View file

@ -12,7 +12,7 @@ import {
useFormContext,
} from "react-hook-form"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
import { Label } from "@/components/ui/label"
const Form = FormProvider

View file

@ -4,7 +4,7 @@ import * as React from "react"
import { OTPInput, OTPInputContext } from "input-otp"
import { Dot } from "lucide-react"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const InputOTP = React.forwardRef<
React.ElementRef<typeof OTPInput>,

View file

@ -1,6 +1,6 @@
import * as React from "react";
import { cn } from "@/lib/utils";
import { cn } from "@app/lib/cn";
import { EyeOff, Eye } from "lucide-react";
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;

View file

@ -4,7 +4,7 @@ import * as React from "react"
import * as LabelPrimitive from "@radix-ui/react-label"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const labelVariants = cva(
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"

View file

@ -3,7 +3,7 @@
import * as React from "react"
import * as PopoverPrimitive from "@radix-ui/react-popover"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const Popover = PopoverPrimitive.Root

View file

@ -4,7 +4,7 @@ import * as React from "react"
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"
import { Circle } from "lucide-react"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const RadioGroup = React.forwardRef<
React.ElementRef<typeof RadioGroupPrimitive.Root>,

View file

@ -4,7 +4,7 @@ import * as React from "react"
import * as SelectPrimitive from "@radix-ui/react-select"
import { Check, ChevronDown, ChevronUp } from "lucide-react"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const Select = SelectPrimitive.Root

View file

@ -3,7 +3,7 @@
import * as React from "react"
import * as SeparatorPrimitive from "@radix-ui/react-separator"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const Separator = React.forwardRef<
React.ElementRef<typeof SeparatorPrimitive.Root>,

View file

@ -5,7 +5,7 @@ import * as SheetPrimitive from "@radix-ui/react-dialog"
import { cva, type VariantProps } from "class-variance-authority"
import { X } from "lucide-react"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const Sheet = SheetPrimitive.Root

View file

@ -3,7 +3,7 @@
import * as React from "react"
import * as SwitchPrimitives from "@radix-ui/react-switch"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const Switch = React.forwardRef<
React.ElementRef<typeof SwitchPrimitives.Root>,

View file

@ -1,6 +1,6 @@
import * as React from "react"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const Table = React.forwardRef<
HTMLTableElement,

View file

@ -3,7 +3,7 @@
import * as React from "react"
import * as TabsPrimitive from "@radix-ui/react-tabs"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const Tabs = TabsPrimitive.Root

View file

@ -1,6 +1,6 @@
import * as React from "react"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
export interface TextareaProps
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}

View file

@ -5,7 +5,7 @@ import * as ToastPrimitives from "@radix-ui/react-toast"
import { cva, type VariantProps } from "class-variance-authority"
import { X } from "lucide-react"
import { cn } from "@/lib/utils"
import { cn } from "@app/lib/cn"
const ToastProvider = ToastPrimitives.Provider