Skip to content

🔥 feat(codemod): migrate to unify @radix-ui/react-* imports to radix-ui… #336

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

Closed
wants to merge 9 commits into from

Conversation

nrjdalal
Copy link
Contributor

@nrjdalal nrjdalal commented Apr 29, 2025

@shadcn plans to move to radix-ui monorepo in next release, as radix-ui now itself supports tree-shaking

so I created this codemod - npx smart-registry@latest --codemod-radix and ran it for you, we gotta migrate eventually, so why not sooner than later?

preview - https://originui-git-unify-radix-nrjdalals-projects.vercel.app

… > registry.json timeline.ts...

registry.json
pnpm-lock.yaml
package.json
registry/default/ui/timeline.tsx
registry/default/ui/stepper.tsx
registry/default/ui/button.tsx
registry/default/ui/breadcrumb.tsx
registry/default/ui/badge.tsx
public/r/tooltip.json
public/r/toggle.json
public/r/toggle-group.json
public/r/timeline.json
public/r/tabs.json
public/r/switch.json
public/r/slider.json
public/r/select.json
public/r/scroll-area.json
public/r/radio-group.json
public/r/progress.json
public/r/popover.json
public/r/label.json
public/r/hover-card.json
public/r/dropdown-menu.json
public/r/dialog.json
public/r/collapsible.json
public/r/checkbox.json
public/r/button.json
public/r/breadcrumb.json
public/r/avatar.json
public/r/alert-dialog.json
public/r/accordion.json
registry/default/ui/tooltip.tsx
registry/default/ui/toggle.tsx
registry/default/ui/toggle-group.tsx
registry/default/ui/tabs.tsx
registry/default/ui/switch.tsx
registry/default/ui/slider.tsx
registry/default/ui/select.tsx
registry/default/ui/scroll-area.tsx
registry/default/ui/radio-group.tsx
registry/default/ui/progress.tsx
registry/default/ui/popover.tsx
registry/default/ui/label.tsx
registry/default/ui/hover-card.tsx
registry/default/ui/dropdown-menu.tsx
registry/default/ui/dialog.tsx
registry/default/ui/collapsible.tsx
registry/default/ui/checkbox.tsx
registry/default/ui/avatar.tsx
registry/default/ui/alert-dialog.tsx
registry/default/ui/accordion.tsx
registry/default/components/comp-351.tsx
registry/default/components/comp-349.tsx
registry/default/components/comp-347.tsx
registry/default/components/comp-345.tsx
registry/default/components/comp-343.tsx
registry/default/components/comp-342.tsx
registry/default/components/comp-341.tsx
registry/default/components/comp-340.tsx
registry/default/components/comp-339.tsx
registry/default/components/comp-337.tsx
registry/default/components/comp-335.tsx
public/r/stepper.json
public/r/comp-351.json
public/r/comp-349.json
public/r/comp-347.json
public/r/comp-345.json
public/r/comp-343.json
public/r/comp-342.json
public/r/comp-341.json
public/r/comp-340.json
public/r/comp-339.json
public/r/comp-337.json
public/r/comp-335.json
public/r/badge.json
Copy link

vercel bot commented Apr 29, 2025

@nrjdalal is attempting to deploy a commit to the Cruip Team on Vercel.

A member of the Team first needs to authorize it.

bun.lock
components/component-details.tsx
pnpm-lock.yaml
package.json
registry/default/components/comp-371.tsx
package.json
app/layouts/page.tsx
public/r/comp-371.json
import { CodeIcon } from "lucide-react"
import { Dialog as DialogPrimitive } from "radix-ui"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is done manually, not part of codemod

@@ -12,7 +12,9 @@ import {
DropdownMenuTrigger,
} from "@/registry/default/ui/dropdown-menu"

type Checked = DropdownMenuCheckboxItemProps["checked"]
type Checked = React.ComponentProps<
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is done manually, not part of codemod

…oast.tsx

registry.json
pnpm-lock.yaml
registry/default/ui/toast.tsx
package.json
@pasqualevitiello
Copy link
Contributor

Putting this on hold for now, and here's why: shadcn-ui/ui#6868 (comment)

@nrjdalal nrjdalal closed this by deleting the head repository May 6, 2025
@nrjdalal
Copy link
Contributor Author

nrjdalal commented May 6, 2025

Putting this on hold for now, and here's why: shadcn-ui/ui#6868 (comment)

create brand new fork the PR was auto-deleted, will create once shadcn and community migrates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants