Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(v4 components): use radix-ui mono package #6868

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 1 addition & 30 deletions apps/v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,7 @@
},
"dependencies": {
"@hookform/resolvers": "^3.10.0",
"@radix-ui/react-accessible-icon": "^1.1.1",
"@radix-ui/react-accordion": "^1.2.2",
"@radix-ui/react-alert-dialog": "^1.1.5",
"@radix-ui/react-aspect-ratio": "^1.1.1",
"@radix-ui/react-avatar": "^1.1.2",
"@radix-ui/react-checkbox": "^1.1.3",
"@radix-ui/react-collapsible": "^1.1.2",
"@radix-ui/react-context-menu": "^2.2.5",
"@radix-ui/react-dialog": "^1.1.5",
"@radix-ui/react-dropdown-menu": "^2.1.5",
"@radix-ui/react-hover-card": "^1.1.5",
"@radix-ui/react-icons": "^1.3.2",
"@radix-ui/react-label": "^2.1.1",
"@radix-ui/react-menubar": "^1.1.5",
"@radix-ui/react-navigation-menu": "^1.2.4",
"@radix-ui/react-popover": "^1.1.5",
"@radix-ui/react-portal": "^1.1.3",
"@radix-ui/react-progress": "^1.1.1",
"@radix-ui/react-radio-group": "^1.2.2",
"@radix-ui/react-scroll-area": "^1.2.2",
"@radix-ui/react-select": "^2.1.5",
"@radix-ui/react-separator": "^1.1.1",
"@radix-ui/react-slider": "^1.2.2",
"@radix-ui/react-slot": "^1.1.1",
"@radix-ui/react-switch": "^1.1.2",
"@radix-ui/react-tabs": "^1.1.2",
"@radix-ui/react-toast": "^1.2.5",
"@radix-ui/react-toggle": "^1.1.1",
"@radix-ui/react-toggle-group": "^1.1.1",
"@radix-ui/react-tooltip": "^1.1.7",
"radix-ui": "^1.1.3",
"@tailwindcss/postcss": "^4.0.1",
"@vercel/analytics": "^1.2.2",
"class-variance-authority": "^0.7.1",
Expand Down
66 changes: 34 additions & 32 deletions apps/v4/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"name": "accordion",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-accordion"
"radix-ui"
],
"files": [
{
Expand Down Expand Up @@ -80,7 +80,7 @@
"name": "alert-dialog",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-alert-dialog"
"radix-ui"
],
"registryDependencies": [
"button"
Expand All @@ -96,7 +96,7 @@
"name": "aspect-ratio",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-aspect-ratio"
"radix-ui"
],
"files": [
{
Expand All @@ -109,7 +109,7 @@
"name": "avatar",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-avatar"
"radix-ui"
],
"files": [
{
Expand All @@ -121,6 +121,9 @@
{
"name": "badge",
"type": "registry:ui",
"dependencies": [
"radix-ui"
],
"files": [
{
"path": "registry/new-york-v4/ui/badge.tsx",
Expand All @@ -132,7 +135,7 @@
"name": "breadcrumb",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-slot"
"radix-ui"
],
"files": [
{
Expand All @@ -145,7 +148,7 @@
"name": "button",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-slot"
"radix-ui"
],
"files": [
{
Expand Down Expand Up @@ -218,7 +221,7 @@
"name": "checkbox",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-checkbox"
"radix-ui"
],
"files": [
{
Expand All @@ -231,7 +234,7 @@
"name": "collapsible",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-collapsible"
"radix-ui"
],
"files": [
{
Expand Down Expand Up @@ -260,7 +263,7 @@
"name": "context-menu",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-context-menu"
"radix-ui"
],
"files": [
{
Expand All @@ -273,7 +276,7 @@
"name": "dialog",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-dialog"
"radix-ui"
],
"files": [
{
Expand All @@ -287,7 +290,7 @@
"type": "registry:ui",
"dependencies": [
"vaul",
"@radix-ui/react-dialog"
"radix-ui"
],
"files": [
{
Expand All @@ -300,7 +303,7 @@
"name": "dropdown-menu",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-dropdown-menu"
"radix-ui"
],
"files": [
{
Expand All @@ -313,8 +316,7 @@
"name": "form",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-label",
"@radix-ui/react-slot",
"radix-ui",
"@hookform/resolvers",
"zod",
"react-hook-form"
Expand All @@ -334,7 +336,7 @@
"name": "hover-card",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-hover-card"
"radix-ui"
],
"files": [
{
Expand Down Expand Up @@ -370,7 +372,7 @@
"name": "label",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-label"
"radix-ui"
],
"files": [
{
Expand All @@ -383,7 +385,7 @@
"name": "menubar",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-menubar"
"radix-ui"
],
"files": [
{
Expand All @@ -396,7 +398,7 @@
"name": "navigation-menu",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-navigation-menu"
"radix-ui"
],
"files": [
{
Expand All @@ -422,7 +424,7 @@
"name": "popover",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-popover"
"radix-ui"
],
"files": [
{
Expand All @@ -435,7 +437,7 @@
"name": "progress",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-progress"
"radix-ui"
],
"files": [
{
Expand All @@ -448,7 +450,7 @@
"name": "radio-group",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-radio-group"
"radix-ui"
],
"files": [
{
Expand All @@ -474,7 +476,7 @@
"name": "scroll-area",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-scroll-area"
"radix-ui"
],
"files": [
{
Expand All @@ -487,7 +489,7 @@
"name": "select",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-select"
"radix-ui"
],
"files": [
{
Expand All @@ -500,7 +502,7 @@
"name": "separator",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-separator"
"radix-ui"
],
"files": [
{
Expand All @@ -513,7 +515,7 @@
"name": "sheet",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-dialog"
"radix-ui"
],
"files": [
{
Expand All @@ -526,7 +528,7 @@
"name": "sidebar",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-slot",
"radix-ui",
"class-variance-authority",
"lucide-react"
],
Expand Down Expand Up @@ -602,7 +604,7 @@
"name": "slider",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-slider"
"radix-ui"
],
"files": [
{
Expand All @@ -629,7 +631,7 @@
"name": "switch",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-switch"
"radix-ui"
],
"files": [
{
Expand All @@ -652,7 +654,7 @@
"name": "tabs",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-tabs"
"radix-ui"
],
"files": [
{
Expand All @@ -675,7 +677,7 @@
"name": "toggle",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-toggle"
"radix-ui"
],
"files": [
{
Expand All @@ -688,7 +690,7 @@
"name": "toggle-group",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-toggle-group"
"radix-ui"
],
"registryDependencies": [
"toggle"
Expand All @@ -704,7 +706,7 @@
"name": "tooltip",
"type": "registry:ui",
"dependencies": [
"@radix-ui/react-tooltip"
"radix-ui"
],
"files": [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/v4/registry/new-york-v4/ui/accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client"

import * as React from "react"
import * as AccordionPrimitive from "@radix-ui/react-accordion"
import { ChevronDownIcon } from "lucide-react"
import { Accordion as AccordionPrimitive } from "radix-ui"

import { cn } from "@/lib/utils"

Expand Down
2 changes: 1 addition & 1 deletion apps/v4/registry/new-york-v4/ui/alert-dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client"

import * as React from "react"
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
import { AlertDialog as AlertDialogPrimitive } from "radix-ui"

import { cn } from "@/lib/utils"
import { buttonVariants } from "@/registry/new-york-v4/ui/button"
Expand Down
2 changes: 1 addition & 1 deletion apps/v4/registry/new-york-v4/ui/aspect-ratio.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client"

import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
import { AspectRatio as AspectRatioPrimitive } from "radix-ui"

function AspectRatio({
...props
Expand Down
2 changes: 1 addition & 1 deletion apps/v4/registry/new-york-v4/ui/avatar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client"

import * as React from "react"
import * as AvatarPrimitive from "@radix-ui/react-avatar"
import { Avatar as AvatarPrimitive } from "radix-ui"

import { cn } from "@/lib/utils"

Expand Down
4 changes: 2 additions & 2 deletions apps/v4/registry/new-york-v4/ui/badge.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react"
import { Slot } from "@radix-ui/react-slot"
import { cva, type VariantProps } from "class-variance-authority"
import { Slot as SlotPrimitive } from "radix-ui"

import { cn } from "@/lib/utils"

Expand Down Expand Up @@ -32,7 +32,7 @@ function Badge({
...props
}: React.ComponentProps<"span"> &
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
const Comp = asChild ? Slot : "span"
const Comp = asChild ? SlotPrimitive.Slot : "span"

return (
<Comp
Expand Down
4 changes: 2 additions & 2 deletions apps/v4/registry/new-york-v4/ui/breadcrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react"
import { Slot } from "@radix-ui/react-slot"
import { ChevronRight, MoreHorizontal } from "lucide-react"
import { Slot as SlotPrimitive } from "radix-ui"

import { cn } from "@/lib/utils"

Expand Down Expand Up @@ -38,7 +38,7 @@ function BreadcrumbLink({
}: React.ComponentProps<"a"> & {
asChild?: boolean
}) {
const Comp = asChild ? Slot : "a"
const Comp = asChild ? SlotPrimitive.Slot : "a"

return (
<Comp
Expand Down
Loading