chore(ui,dashboard): Use radix-ui package (#11195)

* update deps for ui

* chore(ui,dashboard): Use radix-ui package

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Kasper Fabricius Kristensen
2025-02-02 14:20:34 +01:00
committed by GitHub
parent 12c3e6a03d
commit 9822bd930b
54 changed files with 1351 additions and 877 deletions

View File

@@ -6,8 +6,7 @@ import {
Tooltip,
clx,
} from "@medusajs/ui"
import * as LabelPrimitives from "@radix-ui/react-label"
import { Slot } from "@radix-ui/react-slot"
import { Label as RadixLabel, Slot } from "radix-ui"
import React, {
ReactNode,
createContext,
@@ -103,8 +102,8 @@ const Item = forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
Item.displayName = "Form.Item"
const Label = forwardRef<
React.ElementRef<typeof LabelPrimitives.Root>,
React.ComponentPropsWithoutRef<typeof LabelPrimitives.Root> & {
React.ElementRef<typeof RadixLabel.Root>,
React.ComponentPropsWithoutRef<typeof RadixLabel.Root> & {
optional?: boolean
tooltip?: ReactNode
icon?: ReactNode
@@ -141,8 +140,8 @@ const Label = forwardRef<
Label.displayName = "Form.Label"
const Control = forwardRef<
React.ElementRef<typeof Slot>,
React.ComponentPropsWithoutRef<typeof Slot>
React.ElementRef<typeof Slot.Root>,
React.ComponentPropsWithoutRef<typeof Slot.Root>
>(({ ...props }, ref) => {
const {
error,
@@ -153,7 +152,7 @@ const Control = forwardRef<
} = useFormField()
return (
<Slot
<Slot.Root
ref={ref}
id={formItemId}
aria-describedby={