From e532ef69dbeb87123ad352977a42a67719cbf370 Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Sat, 27 Dec 2025 22:59:42 +0000 Subject: [PATCH] chore: add ui subset barrels --- frontends/nextjs/src/components/ui/core.ts | 87 ++++++ frontends/nextjs/src/components/ui/data.ts | 28 ++ frontends/nextjs/src/components/ui/index.ts | 270 +----------------- frontends/nextjs/src/components/ui/overlay.ts | 57 ++++ 4 files changed, 180 insertions(+), 262 deletions(-) create mode 100644 frontends/nextjs/src/components/ui/core.ts create mode 100644 frontends/nextjs/src/components/ui/data.ts create mode 100644 frontends/nextjs/src/components/ui/overlay.ts diff --git a/frontends/nextjs/src/components/ui/core.ts b/frontends/nextjs/src/components/ui/core.ts new file mode 100644 index 000000000..c590037e1 --- /dev/null +++ b/frontends/nextjs/src/components/ui/core.ts @@ -0,0 +1,87 @@ +// Core UI exports: foundational atoms and common building blocks +export * from './atoms' + +// Common molecules +export { + Card, + CardHeader, + CardTitle, + CardDescription, + CardContent, + CardFooter, + Select, + SelectContent, + SelectGroup, + SelectItem, + SelectLabel, + SelectScrollDownButton, + SelectScrollUpButton, + SelectSeparator, + SelectTrigger, + SelectValue, + Tabs, + TabsList, + TabsTrigger, + TabsContent, + Alert, + AlertTitle, + AlertDescription, + type AlertVariant, + type AlertProps, + Accordion, + AccordionItem, + AccordionTrigger, + AccordionContent, + RadioGroup, + RadioGroupItem, + ToggleGroup, + ToggleGroupItem, + Breadcrumb, + BreadcrumbList, + BreadcrumbItem, + BreadcrumbLink, + BreadcrumbPage, + BreadcrumbSeparator, + BreadcrumbEllipsis, + NavItem, + type NavItemProps, + NavLink, + type NavLinkProps, + NavGroup, + type NavGroupProps, +} from './molecules' + +// Navigation and command organisms +export { + Navigation, + NavigationMenu, + NavigationList, + NavigationItem, + NavigationTrigger, + NavigationContent, + NavigationLink, + NavigationBrand, + NavigationSeparator, + NavigationSpacer, + NavigationMobileToggle, + useNavigationDropdown, + Sidebar, + SidebarHeader, + SidebarContent, + SidebarFooter, + SidebarNav, + SidebarSection, + SidebarSeparator, + SidebarToggle, + Command, + CommandInput, + CommandList, + CommandEmpty, + CommandGroup, + CommandItem, + CommandSeparator, + CommandShortcut, + useCommandShortcut, +} from './organisms' + +export type { SidebarItem, SidebarProps } from './organisms' diff --git a/frontends/nextjs/src/components/ui/data.ts b/frontends/nextjs/src/components/ui/data.ts new file mode 100644 index 000000000..db7736da2 --- /dev/null +++ b/frontends/nextjs/src/components/ui/data.ts @@ -0,0 +1,28 @@ +// Data-centric UI exports +export { + Table, + TableHeader, + TableBody, + TableFooter, + TableRow, + TableHead, + TableCell, + TableCaption, + Form, + FormField, + FormItem, + FormLabel, + FormControl, + FormDescription, + FormMessage, + useFormField, + Pagination, + SimplePagination, + TablePagination, + PaginationContent, + PaginationItem, + PaginationLink, + PaginationEllipsis, + PaginationPrevious, + PaginationNext, +} from './organisms' diff --git a/frontends/nextjs/src/components/ui/index.ts b/frontends/nextjs/src/components/ui/index.ts index 7100dd9fa..bda704572 100644 --- a/frontends/nextjs/src/components/ui/index.ts +++ b/frontends/nextjs/src/components/ui/index.ts @@ -1,263 +1,9 @@ -// UI Components - Atomic Design Structure -// This file re-exports all UI components organized by atomic design pattern +// Central UI barrel exports +export * from './core' +export * from './overlay' +export * from './data' -// ============================================================================ -// ATOMS - Basic building blocks (buttons, inputs, labels, etc.) -// ============================================================================ -export { - // Button - Button, - type ButtonProps, - type ButtonVariant, - type ButtonSize, - // Input - Input, - type InputProps, - // Textarea - Textarea, - type TextareaProps, - // Label - Label, - type LabelProps, - // Checkbox - Checkbox, - type CheckboxProps, - // Switch - Switch, - type SwitchProps, - // Badge - Badge, - type BadgeProps, - type BadgeVariant, - // Avatar - Avatar, - AvatarImage, - AvatarFallback, - type AvatarProps, - // Separator - Separator, - type SeparatorProps, - // Skeleton - Skeleton, - type SkeletonProps, - // Progress - Progress, - type ProgressProps, - // Slider - Slider, - type SliderProps, - // Toggle - Toggle, - type ToggleProps, - type ToggleVariant, - type ToggleSize, - // ScrollArea - ScrollArea, - ScrollBar, - type ScrollAreaProps, - // NEW ATOMS (available in God Tier panel via @/components/ui) - // Radio - Radio, - type RadioProps, - // Icon - Icon, - type IconProps, - type IconName, - type IconSize, - // Link - Link, - type LinkProps, - // Text - Text, - type TextProps, - type TextVariant, - type TextWeight, - type TextAlign, - // TextArea (multi-line) - TextArea, - type TextAreaProps, - // AtomSelect (simple dropdown) - AtomSelect, - type SelectProps as AtomSelectProps, - type SelectOption, -} from './atoms' - -// ============================================================================ -// MOLECULES - Simple groups of atoms (cards, dialogs, selects, etc.) -// ============================================================================ -export { - // Card - Card, - CardHeader, - CardContent, - CardFooter, - CardTitle, - CardDescription, - // Dialog - Dialog, - DialogTrigger, - DialogContent, - DialogHeader, - DialogFooter, - DialogTitle, - DialogDescription, - DialogClose, - DialogOverlay, - DialogPortal, - // Select - Select, - SelectTrigger, - SelectContent, - SelectItem, - SelectGroup, - SelectLabel, - SelectSeparator, - SelectValue, - SelectScrollDownButton, - SelectScrollUpButton, - // Tabs - Tabs, - TabsList, - TabsTrigger, - TabsContent, - // Tooltip - Tooltip, - TooltipTrigger, - TooltipContent, - TooltipProvider, - SimpleTooltip, - // Alert - Alert, - AlertTitle, - AlertDescription, - type AlertVariant, - type AlertProps, - // Accordion - Accordion, - AccordionItem, - AccordionTrigger, - AccordionContent, - // DropdownMenu - DropdownMenu, - DropdownMenuTrigger, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuSeparator, - DropdownMenuLabel, - DropdownMenuGroup, - DropdownMenuCheckboxItem, - DropdownMenuRadioGroup, - DropdownMenuRadioItem, - DropdownMenuSub, - DropdownMenuSubTrigger, - DropdownMenuSubContent, - DropdownMenuShortcut, - DropdownMenuPortal, - // RadioGroup - RadioGroup, - RadioGroupItem, - // Popover - Popover, - PopoverTrigger, - PopoverContent, - PopoverAnchor, - // ToggleGroup - ToggleGroup, - ToggleGroupItem, - // Breadcrumb - Breadcrumb, - BreadcrumbList, - BreadcrumbItem, - BreadcrumbLink, - BreadcrumbPage, - BreadcrumbSeparator, - BreadcrumbEllipsis, -} from './molecules' - -// ============================================================================ -// ORGANISMS - Complex components (tables, forms, navigation, etc.) -// ============================================================================ -export { - // Table - Table, - TableHeader, - TableBody, - TableFooter, - TableRow, - TableHead, - TableCell, - TableCaption, - // Form - Form, - FormField, - FormItem, - FormLabel, - FormControl, - FormDescription, - FormMessage, - useFormField, - // Sheet (Drawer) - Sheet, - SheetTrigger, - SheetContent, - SheetHeader, - SheetFooter, - SheetTitle, - SheetDescription, - SheetClose, - // Sidebar - Sidebar, - SidebarHeader, - SidebarContent, - SidebarFooter, - SidebarNav, - SidebarSection, - SidebarSeparator, - SidebarToggle, - // Command Palette - Command, - CommandInput, - CommandList, - CommandEmpty, - CommandGroup, - CommandItem, - CommandSeparator, - CommandShortcut, - useCommandShortcut, - // Pagination - Pagination, - SimplePagination, - TablePagination, - PaginationContent, - PaginationItem, - PaginationLink, - PaginationEllipsis, - PaginationPrevious, - PaginationNext, - // Navigation - Navigation, - NavigationMenu, - NavigationList, - NavigationItem, - NavigationTrigger, - NavigationContent, - NavigationLink, - NavigationBrand, - NavigationSeparator, - NavigationSpacer, - NavigationMobileToggle, - useNavigationDropdown, - // Alert Dialog - AlertDialog, - AlertDialogTrigger, - AlertDialogContent, - AlertDialogHeader, - AlertDialogTitle, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogCancel, - AlertDialogAction, -} from './organisms' - -// Re-export types -export type { SidebarItem, SidebarProps } from './organisms' +// Preserve category-level entrypoints +export * from './atoms' +export * from './molecules' +export * from './organisms' diff --git a/frontends/nextjs/src/components/ui/overlay.ts b/frontends/nextjs/src/components/ui/overlay.ts new file mode 100644 index 000000000..1eb7af331 --- /dev/null +++ b/frontends/nextjs/src/components/ui/overlay.ts @@ -0,0 +1,57 @@ +// Overlay-focused UI exports +export { + Dialog, + DialogTrigger, + DialogContent, + DialogHeader, + DialogFooter, + DialogTitle, + DialogDescription, + DialogClose, + DialogOverlay, + DialogPortal, + Tooltip, + TooltipTrigger, + TooltipContent, + TooltipProvider, + SimpleTooltip, + DropdownMenu, + DropdownMenuTrigger, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuSeparator, + DropdownMenuLabel, + DropdownMenuGroup, + DropdownMenuCheckboxItem, + DropdownMenuRadioGroup, + DropdownMenuRadioItem, + DropdownMenuSub, + DropdownMenuSubTrigger, + DropdownMenuSubContent, + DropdownMenuShortcut, + DropdownMenuPortal, + Popover, + PopoverTrigger, + PopoverContent, + PopoverAnchor, +} from './molecules' + +export { + Sheet, + SheetTrigger, + SheetContent, + SheetHeader, + SheetFooter, + SheetTitle, + SheetDescription, + SheetClose, + AlertDialog, + AlertDialogTrigger, + AlertDialogContent, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogCancel, + AlertDialogAction, +} from './organisms'