diff --git a/apps/v4/examples/radix/ui-rtl/alert-dialog.tsx b/apps/v4/examples/radix/ui-rtl/alert-dialog.tsx
index a0903c70f..31c2f6f7f 100644
--- a/apps/v4/examples/radix/ui-rtl/alert-dialog.tsx
+++ b/apps/v4/examples/radix/ui-rtl/alert-dialog.tsx
@@ -1,9 +1,10 @@
"use client"
import * as React from "react"
+import { AlertDialog as AlertDialogPrimitive } from "radix-ui"
+
import { cn } from "@/examples/radix/lib/utils"
import { Button } from "@/examples/radix/ui-rtl/button"
-import { AlertDialog as AlertDialogPrimitive } from "radix-ui"
function AlertDialog({
...props
@@ -34,10 +35,7 @@ function AlertDialogOverlay({
return (
)
@@ -57,7 +55,7 @@ function AlertDialogContent({
data-slot="alert-dialog-content"
data-size={size}
className={cn(
- "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/10 group/alert-dialog-content fixed start-1/2 top-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 ring-1 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm",
+ "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/10 gap-4 rounded-xl p-4 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 start-1/2 z-50 grid w-full -translate-x-1/2 rtl:translate-x-1/2 -translate-y-1/2 outline-none",
className
)}
{...props}
@@ -73,10 +71,7 @@ function AlertDialogHeader({
return (
)
@@ -90,7 +85,7 @@ function AlertDialogFooter({
)
@@ -121,10 +113,7 @@ function AlertDialogTitle({
return (
)
@@ -137,10 +126,7 @@ function AlertDialogDescription({
return (
)
diff --git a/apps/v4/examples/radix/ui-rtl/alert.tsx b/apps/v4/examples/radix/ui-rtl/alert.tsx
index 22144f550..84fb1945a 100644
--- a/apps/v4/examples/radix/ui-rtl/alert.tsx
+++ b/apps/v4/examples/radix/ui-rtl/alert.tsx
@@ -1,22 +1,19 @@
import * as React from "react"
-import { cn } from "@/examples/radix/lib/utils"
import { cva, type VariantProps } from "class-variance-authority"
-const alertVariants = cva(
- "grid gap-0.5 rounded-lg border px-2.5 py-2 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 w-full relative group/alert",
- {
- variants: {
- variant: {
- default: "bg-card text-card-foreground",
- destructive:
- "text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
- },
+import { cn } from "@/examples/radix/lib/utils"
+
+const alertVariants = cva("grid gap-0.5 rounded-lg border px-2.5 py-2 text-start text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pe-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 w-full relative group/alert", {
+ variants: {
+ variant: {
+ default: "bg-card text-card-foreground",
+ destructive: "text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
},
- defaultVariants: {
- variant: "default",
- },
- }
-)
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+})
function Alert({
className,
@@ -38,7 +35,7 @@ function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3",
+ "font-medium group-has-[>svg]/alert:col-start-2 [&_a]:hover:text-foreground [&_a]:underline [&_a]:underline-offset-3",
className
)}
{...props}
@@ -54,7 +51,7 @@ function AlertDescription({
) {
return (
)
diff --git a/apps/v4/examples/radix/ui-rtl/avatar.tsx b/apps/v4/examples/radix/ui-rtl/avatar.tsx
index 1af18d995..6135e63e8 100644
--- a/apps/v4/examples/radix/ui-rtl/avatar.tsx
+++ b/apps/v4/examples/radix/ui-rtl/avatar.tsx
@@ -1,9 +1,10 @@
"use client"
import * as React from "react"
-import { cn } from "@/examples/radix/lib/utils"
import { Avatar as AvatarPrimitive } from "radix-ui"
+import { cn } from "@/examples/radix/lib/utils"
+
function Avatar({
className,
size = "default",
@@ -16,7 +17,7 @@ function Avatar({
data-slot="avatar"
data-size={size}
className={cn(
- "after:border-border group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
+ "size-8 rounded-full after:rounded-full data-[size=lg]:size-10 data-[size=sm]:size-6 after:border-border group/avatar relative flex shrink-0 select-none after:absolute after:inset-0 after:border after:mix-blend-darken dark:after:mix-blend-lighten",
className
)}
{...props}
@@ -32,7 +33,7 @@ function AvatarImage({
svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
- className
- )}
+ className={cn("bg-muted text-muted-foreground size-8 rounded-full text-sm group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3 ring-background relative flex shrink-0 items-center justify-center ring-2", className)}
{...props}
/>
)
diff --git a/apps/v4/examples/radix/ui-rtl/badge.tsx b/apps/v4/examples/radix/ui-rtl/badge.tsx
index c1e42f5c4..2e11bb3b4 100644
--- a/apps/v4/examples/radix/ui-rtl/badge.tsx
+++ b/apps/v4/examples/radix/ui-rtl/badge.tsx
@@ -1,22 +1,19 @@
import * as React from "react"
-import { cn } from "@/examples/radix/lib/utils"
import { cva, type VariantProps } from "class-variance-authority"
import { Slot } from "radix-ui"
+import { cn } from "@/examples/radix/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]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&>svg]:size-3! inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none focus-visible:border-eing 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",
+ 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",
},
},
diff --git a/apps/v4/examples/radix/ui-rtl/breadcrumb.tsx b/apps/v4/examples/radix/ui-rtl/breadcrumb.tsx
index 8c11f3a0b..1279b05bd 100644
--- a/apps/v4/examples/radix/ui-rtl/breadcrumb.tsx
+++ b/apps/v4/examples/radix/ui-rtl/breadcrumb.tsx
@@ -1,7 +1,7 @@
import * as React from "react"
-import { cn } from "@/examples/radix/lib/utils"
import { Slot } from "radix-ui"
+import { cn } from "@/examples/radix/lib/utils"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
function Breadcrumb({ className, ...props }: React.ComponentProps<"nav">) {
@@ -20,7 +20,7 @@ function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
) {
return (
)
@@ -105,7 +105,7 @@ function BreadcrumbEllipsis({
role="presentation"
aria-hidden="true"
className={cn(
- "flex size-5 items-center justify-center [&>svg]:size-4",
+ "size-5 [&>svg]:size-4 flex items-center justify-center",
className
)}
{...props}
diff --git a/apps/v4/examples/radix/ui-rtl/button-group.tsx b/apps/v4/examples/radix/ui-rtl/button-group.tsx
index ddf790377..b614b8a30 100644
--- a/apps/v4/examples/radix/ui-rtl/button-group.tsx
+++ b/apps/v4/examples/radix/ui-rtl/button-group.tsx
@@ -1,8 +1,9 @@
-import { cn } from "@/examples/radix/lib/utils"
-import { Separator } from "@/examples/radix/ui-rtl/separator"
import { cva, type VariantProps } from "class-variance-authority"
import { Slot } from "radix-ui"
+import { cn } from "@/examples/radix/lib/utils"
+import { Separator } from "@/examples/radix/ui-rtl/separator"
+
const buttonGroupVariants = cva(
"has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-lg flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
{
@@ -48,7 +49,7 @@ function ButtonGroupText({
return (
svg]:rotate-180`,
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
className
@@ -228,7 +228,7 @@ function CalendarDayButton({
data-range-end={modifiers.range_end}
data-range-middle={modifiers.range_middle}
className={cn(
- "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring dark:hover:text-foreground relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) [&>span]:text-xs [&>span]:opacity-70",
+ "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-eing group-data-[focused=true]/day:ring-ring/50 dark:hover:text-foreground relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-e-(--cell-radius) data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-s-(--cell-radius) [&>span]:text-xs [&>span]:opacity-70",
defaultClassNames.day,
className
)}
diff --git a/apps/v4/examples/radix/ui-rtl/card.tsx b/apps/v4/examples/radix/ui-rtl/card.tsx
index fcd8fed0c..4918e3e23 100644
--- a/apps/v4/examples/radix/ui-rtl/card.tsx
+++ b/apps/v4/examples/radix/ui-rtl/card.tsx
@@ -1,4 +1,5 @@
import * as React from "react"
+
import { cn } from "@/examples/radix/lib/utils"
function Card({
@@ -10,10 +11,7 @@ function Card({
img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
- className
- )}
+ className={cn("ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col", className)}
{...props}
/>
)
@@ -24,7 +22,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
) {
return (
)
@@ -82,10 +77,7 @@ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
return (
)
diff --git a/apps/v4/examples/radix/ui-rtl/carousel.tsx b/apps/v4/examples/radix/ui-rtl/carousel.tsx
index 35a43f0b7..eed1aa0dd 100644
--- a/apps/v4/examples/radix/ui-rtl/carousel.tsx
+++ b/apps/v4/examples/radix/ui-rtl/carousel.tsx
@@ -1,12 +1,12 @@
"use client"
import * as React from "react"
-import { cn } from "@/examples/radix/lib/utils"
-import { Button } from "@/examples/radix/ui-rtl/button"
import useEmblaCarousel, {
type UseEmblaCarouselType,
} from "embla-carousel-react"
+import { cn } from "@/examples/radix/lib/utils"
+import { Button } from "@/examples/radix/ui-rtl/button"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
type CarouselApi = UseEmblaCarouselType[1]
@@ -185,10 +185,10 @@ function CarouselPrevious({
variant={variant}
size={size}
className={cn(
- "absolute touch-manipulation rounded-full",
+ "rounded-full absolute touch-manipulation",
orientation === "horizontal"
- ? "-start-12 top-1/2 -translate-y-1/2"
- : "start-1/2 -top-12 -translate-x-1/2 rotate-90",
+ ? "top-1/2 -start-12 -translate-y-1/2"
+ : "-top-12 start-1/2 -translate-x-1/2 rotate-90",
className
)}
disabled={!canScrollPrev}
@@ -221,10 +221,10 @@ function CarouselNext({
variant={variant}
size={size}
className={cn(
- "absolute touch-manipulation rounded-full",
+ "rounded-full absolute touch-manipulation",
orientation === "horizontal"
- ? "-end-12 top-1/2 -translate-y-1/2"
- : "start-1/2 -bottom-12 -translate-x-1/2 rotate-90",
+ ? "top-1/2 -end-12 -translate-y-1/2"
+ : "-bottom-12 start-1/2 -translate-x-1/2 rotate-90",
className
)}
disabled={!canScrollNext}
diff --git a/apps/v4/examples/radix/ui-rtl/chart.tsx b/apps/v4/examples/radix/ui-rtl/chart.tsx
index 09f77157c..18ee7a7e8 100644
--- a/apps/v4/examples/radix/ui-rtl/chart.tsx
+++ b/apps/v4/examples/radix/ui-rtl/chart.tsx
@@ -1,9 +1,10 @@
"use client"
import * as React from "react"
-import { cn } from "@/examples/radix/lib/utils"
import * as RechartsPrimitive from "recharts"
+import { cn } from "@/examples/radix/lib/utils"
+
// Format: { THEME_NAME: CSS_SELECTOR }
const THEMES = { light: "", dark: ".dark" } as const
@@ -172,7 +173,7 @@ function ChartTooltipContent({
return (
diff --git a/apps/v4/examples/radix/ui-rtl/checkbox.tsx b/apps/v4/examples/radix/ui-rtl/checkbox.tsx
index 1acb54608..d1ab6ccfd 100644
--- a/apps/v4/examples/radix/ui-rtl/checkbox.tsx
+++ b/apps/v4/examples/radix/ui-rtl/checkbox.tsx
@@ -1,9 +1,9 @@
"use client"
import * as React from "react"
-import { cn } from "@/examples/radix/lib/utils"
import { Checkbox as CheckboxPrimitive } from "radix-ui"
+import { cn } from "@/examples/radix/lib/utils"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
function Checkbox({
@@ -14,14 +14,14 @@ function Checkbox({
)
@@ -127,7 +127,7 @@ function ComboboxContent({
data-slot="combobox-content"
data-chips={!!anchor}
className={cn(
- "bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 rtl:data-[side=left]:slide-in-from-left-2 data-[side=right]:slide-in-from-left-2 rtl:data-[side=right]:slide-in-from-right-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:border-input/30 cn-menu-target group/combobox-content relative max-h-(--available-height) max-h-72 w-(--anchor-width) max-w-(--available-width) min-w-36 min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg shadow-md ring-1 duration-100 data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none",
+ "bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:border-input/30 max-h-72 min-w-36 overflow-hidden rounded-lg shadow-md ring-1 duration-100 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none cn-menu-target group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) data-[chips=true]:min-w-(--anchor-width)",
className
)}
{...props}
@@ -142,7 +142,7 @@ function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {
{children}
- }
+ render={}
>
)
@@ -246,10 +241,7 @@ function ComboboxChips({
return (
)
@@ -267,7 +259,7 @@ function ComboboxChip({
)
diff --git a/apps/v4/examples/radix/ui-rtl/command.tsx b/apps/v4/examples/radix/ui-rtl/command.tsx
index ed855cb97..fb15fb3e2 100644
--- a/apps/v4/examples/radix/ui-rtl/command.tsx
+++ b/apps/v4/examples/radix/ui-rtl/command.tsx
@@ -1,6 +1,8 @@
"use client"
import * as React from "react"
+import { Command as CommandPrimitive } from "cmdk"
+
import { cn } from "@/examples/radix/lib/utils"
import {
Dialog,
@@ -13,8 +15,6 @@ import {
InputGroup,
InputGroupAddon,
} from "@/examples/radix/ui-rtl/input-group"
-import { Command as CommandPrimitive } from "cmdk"
-
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
function Command({
@@ -25,7 +25,7 @@ function Command({
)
@@ -162,7 +159,7 @@ function CommandItem({
)
diff --git a/apps/v4/examples/radix/ui-rtl/context-menu.tsx b/apps/v4/examples/radix/ui-rtl/context-menu.tsx
index 38b330d05..1212cc17c 100644
--- a/apps/v4/examples/radix/ui-rtl/context-menu.tsx
+++ b/apps/v4/examples/radix/ui-rtl/context-menu.tsx
@@ -1,9 +1,9 @@
"use client"
import * as React from "react"
-import { cn } from "@/examples/radix/lib/utils"
import { ContextMenu as ContextMenuPrimitive } from "radix-ui"
+import { cn } from "@/examples/radix/lib/utils"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
function ContextMenu({
@@ -69,7 +69,7 @@ function ContextMenuContent({
-
+
-
+
)
@@ -250,10 +247,7 @@ function ContextMenuShortcut({
return (
)
diff --git a/apps/v4/examples/radix/ui-rtl/dialog.tsx b/apps/v4/examples/radix/ui-rtl/dialog.tsx
index 6f306a490..999f58a63 100644
--- a/apps/v4/examples/radix/ui-rtl/dialog.tsx
+++ b/apps/v4/examples/radix/ui-rtl/dialog.tsx
@@ -1,10 +1,10 @@
"use client"
import * as React from "react"
-import { cn } from "@/examples/radix/lib/utils"
-import { Button } from "@/examples/radix/ui-rtl/button"
import { Dialog as DialogPrimitive } from "radix-ui"
+import { cn } from "@/examples/radix/lib/utils"
+import { Button } from "@/examples/radix/ui-rtl/button"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
function Dialog({
@@ -38,10 +38,7 @@ function DialogOverlay({
return (
)
@@ -61,7 +58,7 @@ function DialogContent({
-