From 254394d46f57cf3989c169d107c5d1f6d04061bb Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Nov 2026 00:10:59 +0000 Subject: [PATCH] refactor(components)!: retire ten zero-consumer shadcn sub-part exports The dialog, dropdown-menu, sheet and sidebar lines of the unpublished src/ui/index.ts sub-barrel become named lists without DialogPortal, DialogOverlay, DialogClose, DropdownMenuPortal, SheetPortal, SheetClose, SidebarSeparator, SidebarGroupAction, SidebarMenuBadge and SidebarMenuSkeleton. The shadcn module files are unchanged. Co-Authored-By: Claude --- .../25921-components-shadcn-subparts.md | 30 +++++++++ ui/packages/components/src/ui/index.ts | 62 +++++++++++++++++-- 2 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 .changeset/25921-components-shadcn-subparts.md diff --git a/.changeset/25921-components-shadcn-subparts.md b/.changeset/25921-components-shadcn-subparts.md new file mode 100644 index 00000000000..591f922f797 --- /dev/null +++ b/.changeset/25921-components-shadcn-subparts.md @@ -0,0 +1,30 @@ +--- +'@object-ui/components': patch +--- + +refactor(components)!: retire ten zero-consumer shadcn sub-part exports (dialog, dropdown-menu, sheet and sidebar parts) + +Clause-②: no (narrowing) +Metadata-protocol: none + + + +**BREAKING** for a host that imports any of these ten names from `@object-ui/components`. None had an importer anywhere in the workspace or in hotcrm, so the Console and every `@object-ui/*` package are unaffected, and every schema node type (`dialog`, `sheet`, `dropdown-menu`, `sidebar` and the rest) renders exactly as before. + +All ten stay in their shadcn modules, which `pnpm shadcn:update` keeps in step with the registry and which this package's own code still reads (`MobileDialogContent` mounts `DialogPortal` and `DialogOverlay`); only the entry stops publishing them: + +- `dialog`: `DialogPortal`, `DialogOverlay`, `DialogClose` +- `dropdown-menu`: `DropdownMenuPortal` +- `sheet`: `SheetPortal`, `SheetClose` +- `sidebar`: `SidebarSeparator`, `SidebarGroupAction`, `SidebarMenuBadge`, `SidebarMenuSkeleton` + +Every other name the entry exported stays exported unchanged, among them `Dialog`, `DialogTrigger`, `DialogContent` and its header, footer, title and description parts, `DropdownMenu` with its trigger, content, item, group, label, separator, shortcut, radio, checkbox and sub-menu parts, `Sheet` with `SheetOverlay`, `SheetTrigger`, `SheetContent` and its header, footer, title and description parts, and `Sidebar`, `SidebarProvider`, `useSidebar`, `useOptionalSidebar` with every other sidebar part. + +What leaves, and what to write instead: + +- FROM `DialogPortal`, `DialogOverlay` TO `DialogContent`, which already mounts the portal and the overlay. +- FROM `DialogClose` TO the close button `DialogContent` already draws, or the `Close` part of `@radix-ui/react-dialog` for a custom one. +- FROM `DropdownMenuPortal` TO `DropdownMenuContent`, which already mounts its own portal; for a sub-menu, the `Portal` part of `@radix-ui/react-dropdown-menu` around `DropdownMenuSubContent`. +- FROM `SheetPortal` TO `SheetContent`, which already mounts the portal and the overlay. +- FROM `SheetClose` TO the close button `SheetContent` already draws, or the `Close` part of `@radix-ui/react-dialog` for a custom one. +- FROM `SidebarSeparator`, `SidebarGroupAction`, `SidebarMenuBadge`, `SidebarMenuSkeleton` TO the same parts in the host's own tree (`npx shadcn@latest add sidebar`), or `Separator`, `SidebarMenuAction` and `Skeleton`, which stay exported. diff --git a/ui/packages/components/src/ui/index.ts b/ui/packages/components/src/ui/index.ts index 4b94a687815..df0cb6490d0 100644 --- a/ui/packages/components/src/ui/index.ts +++ b/ui/packages/components/src/ui/index.ts @@ -58,7 +58,15 @@ export { ContextMenuSubTrigger, ContextMenuTrigger, } from './context-menu'; -export * from './dialog'; +export { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger, +} from './dialog'; export { Drawer, DrawerClose, @@ -69,7 +77,22 @@ export { DrawerTitle, DrawerTrigger, } from './drawer'; -export * from './dropdown-menu'; +export { + DropdownMenu, + DropdownMenuCheckboxItem, + DropdownMenuContent, + DropdownMenuGroup, + DropdownMenuItem, + DropdownMenuLabel, + DropdownMenuRadioGroup, + DropdownMenuRadioItem, + DropdownMenuSeparator, + DropdownMenuShortcut, + DropdownMenuSub, + DropdownMenuSubContent, + DropdownMenuSubTrigger, + DropdownMenuTrigger, +} from './dropdown-menu'; export { Form, FormControl, @@ -101,8 +124,39 @@ export { SelectValue, } from './select'; export * from './separator'; -export * from './sheet'; -export * from './sidebar'; +export { + Sheet, + SheetContent, + SheetDescription, + SheetFooter, + SheetHeader, + SheetOverlay, + SheetTitle, + SheetTrigger, +} from './sheet'; +export { + Sidebar, + SidebarContent, + SidebarFooter, + SidebarGroup, + SidebarGroupContent, + SidebarGroupLabel, + SidebarHeader, + SidebarInput, + SidebarInset, + SidebarMenu, + SidebarMenuAction, + SidebarMenuButton, + SidebarMenuItem, + SidebarMenuSub, + SidebarMenuSubButton, + SidebarMenuSubItem, + SidebarProvider, + SidebarRail, + SidebarTrigger, + useOptionalSidebar, + useSidebar, +} from './sidebar'; export * from './skeleton'; export * from './slider'; export * from './sonner';