) {
)
}
-function TableHead({ className, ...props }: React.ComponentProps<'th'>) {
+function TableHead({ className, ...props }: React.ComponentProps<"th">) {
return (
| [role=checkbox]]:translate-y-[2px]',
+ "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
className
)}
{...props}
@@ -78,12 +78,12 @@ function TableHead({ className, ...props }: React.ComponentProps<'th'>) {
)
}
-function TableCell({ className, ...props }: React.ComponentProps<'td'>) {
+function TableCell({ className, ...props }: React.ComponentProps<"td">) {
return (
| [role=checkbox]]:translate-y-[2px]',
+ "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
className
)}
{...props}
@@ -94,11 +94,11 @@ function TableCell({ className, ...props }: React.ComponentProps<'td'>) {
function TableCaption({
className,
...props
-}: React.ComponentProps<'caption'>) {
+}: React.ComponentProps<"caption">) {
return (
)
diff --git a/components/ui/tabs.tsx b/components/ui/tabs.tsx
index 2b3671fd..9d90b36f 100644
--- a/components/ui/tabs.tsx
+++ b/components/ui/tabs.tsx
@@ -1,49 +1,67 @@
-'use client'
+"use client"
-import * as React from 'react'
-import * as TabsPrimitive from '@radix-ui/react-tabs'
-import { AnimatePresence, motion } from 'motion/react'
+import { Tabs as TabsPrimitive } from "@base-ui/react/tabs"
+import { cva, type VariantProps } from "class-variance-authority"
-import { cn } from '~/lib/utils'
+import { cn } from "~/lib/utils"
function Tabs({
className,
+ orientation = "horizontal",
...props
-}: React.ComponentProps) {
+}: TabsPrimitive.Root.Props) {
return (
)
}
+const tabsListVariants = cva(
+ "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",
+ {
+ variants: {
+ variant: {
+ default: "bg-muted",
+ line: "gap-1 bg-transparent",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ }
+)
+
function TabsList({
className,
+ variant = "default",
...props
-}: React.ComponentProps) {
+}: TabsPrimitive.List.Props & VariantProps) {
return (
)
}
-function TabsTrigger({
- className,
- ...props
-}: React.ComponentProps) {
+function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {
return (
- ) {
+function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {
return (
-
-
-
- {children}
-
-
-
+
)
}
-export { Tabs, TabsList, TabsTrigger, TabsContent }
+export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants }
diff --git a/components/ui/textarea.tsx b/components/ui/textarea.tsx
index 376927dd..79ca7d07 100644
--- a/components/ui/textarea.tsx
+++ b/components/ui/textarea.tsx
@@ -1,13 +1,13 @@
-import * as React from 'react'
+import * as React from "react"
-import { cn } from '~/lib/utils'
+import { cn } from "~/lib/utils"
-function Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {
+function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
return (
|