diff --git a/modules/core/src/web/hooks/use-unsaved-changes-notifier/components/form-commit-button-group.tsx b/modules/core/src/web/hooks/use-unsaved-changes-notifier/components/form-commit-button-group.tsx index b3c7f7e3..534b500f 100644 --- a/modules/core/src/web/hooks/use-unsaved-changes-notifier/components/form-commit-button-group.tsx +++ b/modules/core/src/web/hooks/use-unsaved-changes-notifier/components/form-commit-button-group.tsx @@ -16,8 +16,9 @@ import { Trash2Icon, } from "lucide-react"; import { useFormContext } from "react-hook-form"; -import { CancelFormButton, CancelFormButtonProps } from "./cancel-form-button"; -import { SubmitButtonProps, SubmitFormButton } from "./submit-form-button"; + +import { CancelFormButton, type CancelFormButtonProps } from "./cancel-form-button"; +import { type SubmitButtonProps, SubmitFormButton } from "./submit-form-button"; type Align = "start" | "center" | "end" | "between"; @@ -93,7 +94,6 @@ export const UpdateCommitButtonGroup = ({ className )} > - {submit && } {showCancel && } @@ -101,37 +101,37 @@ export const UpdateCommitButtonGroup = ({ {hasSecondaryActions && ( - - + {onReset && ( - + Deshacer cambios )} {onPreview && ( - - + + Vista previa )} {onDuplicate && ( - - + + Duplicar )} {onBack && ( - - + + Volver )} @@ -139,10 +139,10 @@ export const UpdateCommitButtonGroup = ({ <> - + Eliminar diff --git a/modules/core/src/web/hooks/use-unsaved-changes-notifier/components/submit-form-button.tsx b/modules/core/src/web/hooks/use-unsaved-changes-notifier/components/submit-form-button.tsx index 3a98a79c..327c8aee 100644 --- a/modules/core/src/web/hooks/use-unsaved-changes-notifier/components/submit-form-button.tsx +++ b/modules/core/src/web/hooks/use-unsaved-changes-notifier/components/submit-form-button.tsx @@ -1,8 +1,9 @@ import { Button } from "@repo/shadcn-ui/components"; import { cn } from "@repo/shadcn-ui/lib/utils"; import { LoaderCircleIcon, SaveIcon } from "lucide-react"; -import * as React from "react"; +import type * as React from "react"; import { useFormContext } from "react-hook-form"; + import { useTranslation } from "../../../i18n.ts"; export type SubmitButtonProps = { @@ -68,31 +69,35 @@ export const SubmitFormButton = ({ return ( - diff --git a/packages/shadcn-ui/components.json b/packages/shadcn-ui/components.json index cdbc3c8a..3f96316a 100644 --- a/packages/shadcn-ui/components.json +++ b/packages/shadcn-ui/components.json @@ -17,5 +17,6 @@ "lib": "@repo/shadcn-ui/lib", "hooks": "@repo/shadcn-ui/hooks" }, - "iconLibrary": "lucide" -} + "iconLibrary": "lucide", + "rtl": true +} \ No newline at end of file diff --git a/packages/shadcn-ui/package.json b/packages/shadcn-ui/package.json index 34b34cad..d9bca9be 100644 --- a/packages/shadcn-ui/package.json +++ b/packages/shadcn-ui/package.json @@ -39,32 +39,6 @@ }, "dependencies": { "@hookform/resolvers": "^5.2.2", - "@radix-ui/react-accordion": "^1.2.12", - "@radix-ui/react-alert-dialog": "^1.1.15", - "@radix-ui/react-aspect-ratio": "^1.1.7", - "@radix-ui/react-avatar": "^1.1.10", - "@radix-ui/react-checkbox": "^1.3.3", - "@radix-ui/react-collapsible": "^1.1.12", - "@radix-ui/react-context-menu": "^2.2.16", - "@radix-ui/react-dialog": "^1.1.15", - "@radix-ui/react-dropdown-menu": "^2.1.16", - "@radix-ui/react-hover-card": "^1.1.15", - "@radix-ui/react-label": "^2.1.7", - "@radix-ui/react-menubar": "^1.1.16", - "@radix-ui/react-navigation-menu": "^1.2.14", - "@radix-ui/react-popover": "^1.1.15", - "@radix-ui/react-progress": "^1.1.7", - "@radix-ui/react-radio-group": "^1.3.8", - "@radix-ui/react-scroll-area": "^1.2.10", - "@radix-ui/react-select": "^2.2.6", - "@radix-ui/react-separator": "^1.1.7", - "@radix-ui/react-slider": "^1.3.6", - "@radix-ui/react-slot": "^1.2.3", - "@radix-ui/react-switch": "^1.2.6", - "@radix-ui/react-tabs": "^1.1.13", - "@radix-ui/react-toggle": "^1.1.10", - "@radix-ui/react-toggle-group": "^1.1.11", - "@radix-ui/react-tooltip": "^1.2.8", "add": "^2.0.6", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", @@ -85,6 +59,7 @@ "tailwindcss": "^4.1.10", "tw-animate-css": "^1.2.9", "vaul": "^1.1.2", - "zod": "^3.25.76" + "zod": "^3.25.76", + "radix-ui": "latest" } -} +} \ No newline at end of file diff --git a/packages/shadcn-ui/src/components/accordion.tsx b/packages/shadcn-ui/src/components/accordion.tsx index 277a477c..49a0bcbd 100644 --- a/packages/shadcn-ui/src/components/accordion.tsx +++ b/packages/shadcn-ui/src/components/accordion.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as AccordionPrimitive from "@radix-ui/react-accordion" +import { Accordion as AccordionPrimitive } from "radix-ui" import { ChevronDownIcon } from "lucide-react" import { cn } from "@repo/shadcn-ui/lib/utils" @@ -33,7 +33,7 @@ function AccordionTrigger({ svg]:rotate-180", + "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-start text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", className )} {...props} diff --git a/packages/shadcn-ui/src/components/alert-dialog.tsx b/packages/shadcn-ui/src/components/alert-dialog.tsx index 8e8fce66..8b208a64 100644 --- a/packages/shadcn-ui/src/components/alert-dialog.tsx +++ b/packages/shadcn-ui/src/components/alert-dialog.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog" +import { AlertDialog as AlertDialogPrimitive } from "radix-ui" import { cn } from "@repo/shadcn-ui/lib/utils" import { buttonVariants } from "@repo/shadcn-ui/components/button" @@ -52,7 +52,7 @@ function AlertDialogContent({ ) diff --git a/packages/shadcn-ui/src/components/aspect-ratio.tsx b/packages/shadcn-ui/src/components/aspect-ratio.tsx index 9b491fb8..ae5f48c7 100644 --- a/packages/shadcn-ui/src/components/aspect-ratio.tsx +++ b/packages/shadcn-ui/src/components/aspect-ratio.tsx @@ -1,4 +1,4 @@ -import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" +import { AspectRatio as AspectRatioPrimitive } from "radix-ui" function AspectRatio({ ...props diff --git a/packages/shadcn-ui/src/components/avatar.tsx b/packages/shadcn-ui/src/components/avatar.tsx index e4dac9f7..aaa4d9a5 100644 --- a/packages/shadcn-ui/src/components/avatar.tsx +++ b/packages/shadcn-ui/src/components/avatar.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as AvatarPrimitive from "@radix-ui/react-avatar" +import { Avatar as AvatarPrimitive } from "radix-ui" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/badge.tsx b/packages/shadcn-ui/src/components/badge.tsx index d0955d67..b02f598b 100644 --- a/packages/shadcn-ui/src/components/badge.tsx +++ b/packages/shadcn-ui/src/components/badge.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import { Slot } from "@radix-ui/react-slot" +import { Slot as SlotPrimitive } from "radix-ui" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@repo/shadcn-ui/lib/utils" @@ -32,7 +32,7 @@ function Badge({ ...props }: React.ComponentProps<"span"> & VariantProps & { asChild?: boolean }) { - const Comp = asChild ? Slot : "span" + const Comp = asChild ? SlotPrimitive.Slot : "span" return ( & { asChild?: boolean }) { - const Comp = asChild ? Slot : "a" + const Comp = asChild ? SlotPrimitive.Slot : "a" return ( *]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2", + "flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-e-md has-[>[data-slot=button-group]]:gap-2", { variants: { orientation: { horizontal: - "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none", + "[&>*:not(:first-child)]:rounded-s-none [&>*:not(:first-child)]:border-s-0 [&>*:not(:last-child)]:rounded-e-none", vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none", }, @@ -44,7 +44,7 @@ function ButtonGroupText({ }: React.ComponentProps<"div"> & { asChild?: boolean }) { - const Comp = asChild ? Slot : "div" + const Comp = asChild ? SlotPrimitive.Slot : "div" return ( & { asChild?: boolean }) { - const Comp = asChild ? Slot : "button" + const Comp = asChild ? SlotPrimitive.Slot : "button" return ( svg]:text-muted-foreground [&>svg]:size-3.5", + : "rounded-md ps-2 pe-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5", defaultClassNames.caption_label ), table: "w-full border-collapse", @@ -98,15 +98,15 @@ function Calendar({ defaultClassNames.week_number ), day: cn( - "relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none", + "relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-s-md [&:last-child[data-selected=true]_button]:rounded-e-md group/day aspect-square select-none", defaultClassNames.day ), range_start: cn( - "rounded-l-md bg-accent", + "rounded-s-md bg-accent", defaultClassNames.range_start ), range_middle: cn("rounded-none", defaultClassNames.range_middle), - range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end), + range_end: cn("rounded-e-md bg-accent", defaultClassNames.range_end), today: cn( "bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none", defaultClassNames.today @@ -199,7 +199,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-accent data-[range-middle=true]:text-accent-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/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 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-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70", + "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-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/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 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-md data-[range-end=true]:rounded-e-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-s-md [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className )} diff --git a/packages/shadcn-ui/src/components/carousel.tsx b/packages/shadcn-ui/src/components/carousel.tsx index b5ec3626..3e7b7b82 100644 --- a/packages/shadcn-ui/src/components/carousel.tsx +++ b/packages/shadcn-ui/src/components/carousel.tsx @@ -142,7 +142,7 @@ function CarouselContent({ className, ...props }: React.ComponentProps<"div">) {
) { data-slot="carousel-item" className={cn( "min-w-0 shrink-0 grow-0 basis-full", - orientation === "horizontal" ? "pl-4" : "pt-4", + orientation === "horizontal" ? "ps-4" : "pt-4", className )} {...props} @@ -185,8 +185,8 @@ function CarouselPrevious({ className={cn( "absolute size-8 rounded-full", orientation === "horizontal" - ? "top-1/2 -left-12 -translate-y-1/2" - : "-top-12 left-1/2 -translate-x-1/2 rotate-90", + ? "top-1/2 -start-12 -translate-y-1/2" + : "-top-12 start-1/2 -translate-x-1/2 rtl:translate-x-1/2 rotate-90", className )} disabled={!canScrollPrev} @@ -215,8 +215,8 @@ function CarouselNext({ className={cn( "absolute size-8 rounded-full", orientation === "horizontal" - ? "top-1/2 -right-12 -translate-y-1/2" - : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", + ? "top-1/2 -end-12 -translate-y-1/2" + : "-bottom-12 start-1/2 -translate-x-1/2 rtl:translate-x-1/2 rotate-90", className )} disabled={!canScrollNext} diff --git a/packages/shadcn-ui/src/components/checkbox.tsx b/packages/shadcn-ui/src/components/checkbox.tsx index 5c26c94a..f50cd7db 100644 --- a/packages/shadcn-ui/src/components/checkbox.tsx +++ b/packages/shadcn-ui/src/components/checkbox.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as CheckboxPrimitive from "@radix-ui/react-checkbox" +import { Checkbox as CheckboxPrimitive } from "radix-ui" import { CheckIcon } from "lucide-react" import { cn } from "@repo/shadcn-ui/lib/utils" diff --git a/packages/shadcn-ui/src/components/collapsible.tsx b/packages/shadcn-ui/src/components/collapsible.tsx index 77f86bed..63fc8eff 100644 --- a/packages/shadcn-ui/src/components/collapsible.tsx +++ b/packages/shadcn-ui/src/components/collapsible.tsx @@ -1,4 +1,4 @@ -import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" +import { Collapsible as CollapsiblePrimitive } from "radix-ui" function Collapsible({ ...props diff --git a/packages/shadcn-ui/src/components/command.tsx b/packages/shadcn-ui/src/components/command.tsx index e8e30194..cc08e580 100644 --- a/packages/shadcn-ui/src/components/command.tsx +++ b/packages/shadcn-ui/src/components/command.tsx @@ -163,7 +163,7 @@ function CommandShortcut({ {children} - + ) } @@ -124,7 +124,7 @@ function ContextMenuItem({ data-inset={inset} data-variant={variant} className={cn( - "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", + "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:ps-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className )} {...props} @@ -142,13 +142,13 @@ function ContextMenuCheckboxItem({ - + @@ -167,12 +167,12 @@ function ContextMenuRadioItem({ - + @@ -194,7 +194,7 @@ function ContextMenuLabel({ data-slot="context-menu-label" data-inset={inset} className={cn( - "text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", + "text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:ps-8", className )} {...props} @@ -223,7 +223,7 @@ function ContextMenuShortcut({ Close @@ -82,7 +82,7 @@ function DialogHeader({ className, ...props }: React.ComponentProps<"div">) { return (
) diff --git a/packages/shadcn-ui/src/components/drawer.tsx b/packages/shadcn-ui/src/components/drawer.tsx index a3941086..bf9f0beb 100644 --- a/packages/shadcn-ui/src/components/drawer.tsx +++ b/packages/shadcn-ui/src/components/drawer.tsx @@ -57,8 +57,8 @@ function DrawerContent({ "group/drawer-content bg-background fixed z-50 flex h-auto flex-col", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", - "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", - "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", + "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:end-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-s data-[vaul-drawer-direction=right]:sm:max-w-sm", + "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:start-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-e data-[vaul-drawer-direction=left]:sm:max-w-sm", className )} {...props} @@ -75,7 +75,7 @@ function DrawerHeader({ className, ...props }: React.ComponentProps<"div">) {
- + @@ -126,12 +126,12 @@ function DropdownMenuRadioItem({ - + @@ -153,7 +153,7 @@ function DropdownMenuLabel({ data-slot="dropdown-menu-label" data-inset={inset} className={cn( - "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", + "px-2 py-1.5 text-sm font-medium data-[inset]:ps-8", className )} {...props} @@ -182,7 +182,7 @@ function DropdownMenuShortcut({ {children} - + ) } diff --git a/packages/shadcn-ui/src/components/field.tsx b/packages/shadcn-ui/src/components/field.tsx index 10edb764..5de8c3a1 100644 --- a/packages/shadcn-ui/src/components/field.tsx +++ b/packages/shadcn-ui/src/components/field.tsx @@ -203,7 +203,7 @@ function FieldError({ } return ( -
    +
      {errors.map( (error, index) => error?.message &&
    • {error.message}
    • diff --git a/packages/shadcn-ui/src/components/form.tsx b/packages/shadcn-ui/src/components/form.tsx index 6d7fa950..d42cdc6d 100644 --- a/packages/shadcn-ui/src/components/form.tsx +++ b/packages/shadcn-ui/src/components/form.tsx @@ -1,8 +1,8 @@ "use client" import * as React from "react" -import * as LabelPrimitive from "@radix-ui/react-label" -import { Slot } from "@radix-ui/react-slot" +import { Label as LabelPrimitive, Slot as SlotPrimitive } from "radix-ui" + import { Controller, FormProvider, @@ -104,11 +104,11 @@ function FormLabel({ ) } -function FormControl({ ...props }: React.ComponentProps) { +function FormControl({ ...props }: React.ComponentProps) { const { error, formItemId, formDescriptionId, formMessageId } = useFormField() return ( - ) { "h-9 min-w-0 has-[>textarea]:h-auto", // Variants based on alignment. - "has-[>[data-align=inline-start]]:[&>input]:pl-2", - "has-[>[data-align=inline-end]]:[&>input]:pr-2", + "has-[>[data-align=inline-start]]:[&>input]:ps-2", + "has-[>[data-align=inline-end]]:[&>input]:pe-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", @@ -40,9 +40,9 @@ const inputGroupAddonVariants = cva( variants: { align: { "inline-start": - "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]", + "order-first ps-3 has-[>button]:ms-[-0.45rem] has-[>kbd]:ms-[-0.35rem]", "inline-end": - "order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]", + "order-last pe-3 has-[>button]:me-[-0.45rem] has-[>kbd]:me-[-0.35rem]", "block-start": "order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5", "block-end": diff --git a/packages/shadcn-ui/src/components/input-otp.tsx b/packages/shadcn-ui/src/components/input-otp.tsx index 9c4c9328..eaf8c3b2 100644 --- a/packages/shadcn-ui/src/components/input-otp.tsx +++ b/packages/shadcn-ui/src/components/input-otp.tsx @@ -49,7 +49,7 @@ function InputOTPSlot({ data-slot="input-otp-slot" data-active={isActive} className={cn( - "data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]", + "data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-e text-sm shadow-xs transition-all outline-none first:rounded-s-md first:border-s last:rounded-e-md data-[active=true]:z-10 data-[active=true]:ring-[3px]", className )} {...props} diff --git a/packages/shadcn-ui/src/components/item.tsx b/packages/shadcn-ui/src/components/item.tsx index 2ac725bd..6fdde0a2 100644 --- a/packages/shadcn-ui/src/components/item.tsx +++ b/packages/shadcn-ui/src/components/item.tsx @@ -1,4 +1,4 @@ -import { Slot } from "@radix-ui/react-slot"; +import { Slot as SlotPrimitive } from "radix-ui"; import { Separator } from "@repo/shadcn-ui/components/separator"; import { cn } from "@repo/shadcn-ui/lib/utils"; import { type VariantProps, cva } from "class-variance-authority"; @@ -54,7 +54,7 @@ function Item({ asChild = false, ...props }: React.ComponentProps<"div"> & VariantProps & { asChild?: boolean }) { - const Comp = asChild ? Slot : "div"; + const Comp = asChild ? SlotPrimitive.Slot : "div"; return ( - + @@ -144,12 +144,12 @@ function MenubarRadioItem({ - + @@ -171,7 +171,7 @@ function MenubarLabel({ data-slot="menubar-label" data-inset={inset} className={cn( - "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", + "px-2 py-1.5 text-sm font-medium data-[inset]:ps-8", className )} {...props} @@ -200,7 +200,7 @@ function MenubarShortcut({ {children} - + ) } diff --git a/packages/shadcn-ui/src/components/navigation-menu.tsx b/packages/shadcn-ui/src/components/navigation-menu.tsx index 4b20ec8d..ffe89523 100644 --- a/packages/shadcn-ui/src/components/navigation-menu.tsx +++ b/packages/shadcn-ui/src/components/navigation-menu.tsx @@ -1,5 +1,5 @@ import * as React from "react" -import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu" +import { NavigationMenu as NavigationMenuPrimitive } from "radix-ui" import { cva } from "class-variance-authority" import { ChevronDownIcon } from "lucide-react" @@ -75,7 +75,7 @@ function NavigationMenuTrigger({ > {children}{" "}