svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
+ className
+ )}
+ {...props}
+ />
+ )
+}
+
+export {
+ Avatar,
+ AvatarImage,
+ AvatarFallback,
+ AvatarBadge,
+ AvatarGroup,
+ AvatarGroupCount,
+}
diff --git a/apps/v4/registry/new-york-v4/ui/badge.tsx b/apps/v4/registry/new-york-v4/ui/badge.tsx
index fd3a406bad..ba40cc16b6 100644
--- a/apps/v4/registry/new-york-v4/ui/badge.tsx
+++ b/apps/v4/registry/new-york-v4/ui/badge.tsx
@@ -5,18 +5,19 @@ import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
const badgeVariants = cva(
- "inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>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 transition-[color,box-shadow] overflow-hidden",
+ "inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>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 transition-[color,box-shadow] overflow-hidden",
{
variants: {
variant: {
- default:
- "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
+ default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
secondary:
- "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
+ "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
destructive:
- "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
+ "bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
outline:
- "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
+ "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
+ ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
+ link: "text-primary underline-offset-4 [a&]:hover:underline",
},
},
defaultVariants: {
@@ -27,7 +28,7 @@ const badgeVariants = cva(
function Badge({
className,
- variant,
+ variant = "default",
asChild = false,
...props
}: React.ComponentProps<"span"> &
@@ -37,6 +38,7 @@ function Badge({
return (
diff --git a/apps/v4/registry/new-york-v4/ui/button.tsx b/apps/v4/registry/new-york-v4/ui/button.tsx
index 37a7d4b9a2..915ea2a0f6 100644
--- a/apps/v4/registry/new-york-v4/ui/button.tsx
+++ b/apps/v4/registry/new-york-v4/ui/button.tsx
@@ -22,9 +22,11 @@ const buttonVariants = cva(
},
size: {
default: "h-9 px-4 py-2 has-[>svg]:px-3",
+ xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
icon: "size-9",
+ "icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",
"icon-sm": "size-8",
"icon-lg": "size-10",
},
diff --git a/apps/v4/registry/new-york-v4/ui/combobox.tsx b/apps/v4/registry/new-york-v4/ui/combobox.tsx
index d9f0e31c7e..dc314fee75 100644
--- a/apps/v4/registry/new-york-v4/ui/combobox.tsx
+++ b/apps/v4/registry/new-york-v4/ui/combobox.tsx
@@ -2,7 +2,7 @@
import * as React from "react"
import { Combobox as ComboboxPrimitive } from "@base-ui/react"
-import { IconCheck, IconChevronDown, IconX } from "@tabler/icons-react"
+import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react"
import { cn } from "@/lib/utils"
import { Button } from "@/registry/new-york-v4/ui/button"
@@ -31,7 +31,7 @@ function ComboboxTrigger({
{...props}
>
{children}
-
@@ -47,7 +47,7 @@ function ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {
className={cn(className)}
{...props}
>
-
+
)
}
@@ -160,7 +160,7 @@ function ComboboxItem({
}
>
-
+
)
@@ -233,7 +233,7 @@ function ComboboxChips({
}
+ render={
}
className="-ml-1 opacity-50 hover:opacity-100"
data-slot="combobox-chip-remove"
>
-
+
)}
diff --git a/apps/v4/registry/new-york-v4/ui/dialog.tsx b/apps/v4/registry/new-york-v4/ui/dialog.tsx
index a6f1cfbd85..09d0e67edb 100644
--- a/apps/v4/registry/new-york-v4/ui/dialog.tsx
+++ b/apps/v4/registry/new-york-v4/ui/dialog.tsx
@@ -5,6 +5,7 @@ import * as DialogPrimitive from "@radix-ui/react-dialog"
import { XIcon } from "lucide-react"
import { cn } from "@/lib/utils"
+import { Button } from "@/registry/new-york-v4/ui/button"
function Dialog({
...props
@@ -90,7 +91,14 @@ function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
)
}
-function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
+function DialogFooter({
+ className,
+ showCloseButton = false,
+ children,
+ ...props
+}: React.ComponentProps<"div"> & {
+ showCloseButton?: boolean
+}) {
return (
) {
className
)}
{...props}
- />
+ >
+ {children}
+ {showCloseButton && (
+
+
+
+ )}
+
)
}
diff --git a/apps/v4/registry/new-york-v4/ui/popover.tsx b/apps/v4/registry/new-york-v4/ui/popover.tsx
index 01e468b678..3cab5f28dc 100644
--- a/apps/v4/registry/new-york-v4/ui/popover.tsx
+++ b/apps/v4/registry/new-york-v4/ui/popover.tsx
@@ -45,4 +45,45 @@ function PopoverAnchor({
return
}
-export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }
+function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
+ return (
+
+ )
+}
+
+function PopoverTitle({ className, ...props }: React.ComponentProps<"h2">) {
+ return (
+
+ )
+}
+
+function PopoverDescription({
+ className,
+ ...props
+}: React.ComponentProps<"p">) {
+ return (
+
+ )
+}
+
+export {
+ Popover,
+ PopoverTrigger,
+ PopoverContent,
+ PopoverAnchor,
+ PopoverHeader,
+ PopoverTitle,
+ PopoverDescription,
+}
diff --git a/apps/v4/registry/new-york-v4/ui/sheet.tsx b/apps/v4/registry/new-york-v4/ui/sheet.tsx
index 84649ad0ff..7bf2857e00 100644
--- a/apps/v4/registry/new-york-v4/ui/sheet.tsx
+++ b/apps/v4/registry/new-york-v4/ui/sheet.tsx
@@ -48,9 +48,11 @@ function SheetContent({
className,
children,
side = "right",
+ showCloseButton = true,
...props
}: React.ComponentProps
& {
side?: "top" | "right" | "bottom" | "left"
+ showCloseButton?: boolean
}) {
return (
@@ -72,10 +74,12 @@ function SheetContent({
{...props}
>
{children}
-
-
- Close
-
+ {showCloseButton && (
+
+
+ Close
+
+ )}
)
diff --git a/apps/v4/registry/new-york-v4/ui/switch.tsx b/apps/v4/registry/new-york-v4/ui/switch.tsx
index 6a2b5241d8..f442c2cb75 100644
--- a/apps/v4/registry/new-york-v4/ui/switch.tsx
+++ b/apps/v4/registry/new-york-v4/ui/switch.tsx
@@ -7,13 +7,17 @@ import { cn } from "@/lib/utils"
function Switch({
className,
+ size = "default",
...props
-}: React.ComponentProps) {
+}: React.ComponentProps & {
+ size?: "sm" | "default"
+}) {
return (
diff --git a/apps/v4/registry/new-york-v4/ui/tabs.tsx b/apps/v4/registry/new-york-v4/ui/tabs.tsx
index 497ba5ea34..441c5d4264 100644
--- a/apps/v4/registry/new-york-v4/ui/tabs.tsx
+++ b/apps/v4/registry/new-york-v4/ui/tabs.tsx
@@ -2,33 +2,55 @@
import * as React from "react"
import * as TabsPrimitive from "@radix-ui/react-tabs"
+import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
function Tabs({
className,
+ orientation = "horizontal",
...props
}: React.ComponentProps) {
return (
)
}
+const tabsListVariants = cva(
+ "rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",
+ {
+ variants: {
+ variant: {
+ default: "bg-muted",
+ line: "gap-1 bg-transparent",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ }
+)
+
function TabsList({
className,
+ variant = "default",
...props
-}: React.ComponentProps) {
+}: React.ComponentProps &
+ VariantProps) {
return (
)
@@ -42,7 +64,10 @@ function TabsTrigger({
@/registry/radix-nova/ui/button
transformedContent = transformedContent.replace(
- new RegExp(
- `@/registry/bases/${base.name}/`,
- "g"
- ),
+ new RegExp(`@/registry/bases/${base.name}/`, "g"),
`@/registry/${base.name}-${style.name}/`
)
}