@postxl/ui-components 1.5.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -898,6 +898,8 @@ declare module '@tanstack/react-table' {
898
898
  rowHeight?: RowHeightValue;
899
899
  onRowHeightChange?: (value: RowHeightValue) => void;
900
900
  onRowSelect?: (rowIndex: number, checked: boolean, shiftKey: boolean) => void;
901
+ /** Optional className applied to each cell in a row. Can be a function receiving row data. */
902
+ rowClassName?: string | ((row: Row<TData>) => string | undefined);
901
903
  /** Index of the row to highlight (e.g., for keyField-based URL routing) */
902
904
  highlightedRowIndex?: number;
903
905
  /** Called when a row is clicked. Receives the row index */
@@ -955,6 +957,8 @@ type UseDataGridProps<TData> = {
955
957
  * The highlighted row gets a subtle background color.
956
958
  */
957
959
  highlightedRowIndex?: number;
960
+ /** Optional className applied to each row. Can be a static string or a function receiving the TanStack Row object. */
961
+ rowClassName?: string | ((row: Row<TData>) => string | undefined);
958
962
  rowHeight?: RowHeightValue;
959
963
  overscan?: number;
960
964
  autoFocus?: boolean | Partial<CellPosition>;
@@ -1000,6 +1004,7 @@ declare function useDataGrid<TData>({
1000
1004
  onCellFocus: onCellFocusProp,
1001
1005
  onRowClick: onRowClickProp,
1002
1006
  highlightedRowIndex,
1007
+ rowClassName,
1003
1008
  rowHeight: rowHeightProp,
1004
1009
  overscan,
1005
1010
  initialState,
@@ -2518,12 +2523,18 @@ declare function SidebarProvider({
2518
2523
  //#endregion
2519
2524
  //#region src/sidebar/sidebar-tab-context-provider.d.ts
2520
2525
  type SidebarSide = 'left' | 'right';
2526
+ type SidebarTabBadge = {
2527
+ label: string;
2528
+ variant?: VariantProps<typeof badgeVariants>['variant'];
2529
+ className?: string;
2530
+ };
2521
2531
  type SidebarTabDefinition = {
2522
2532
  id: string;
2523
2533
  icon: LucideIcon;
2524
2534
  label: string;
2525
2535
  render: () => React$11.ReactNode;
2526
2536
  order?: number;
2537
+ badge?: SidebarTabBadge;
2527
2538
  };
2528
2539
  type SidebarTabsState = {
2529
2540
  tabs: Partial<Record<SidebarSide, SidebarTabDefinition[]>>;
@@ -2552,7 +2563,8 @@ declare function SidebarTab({
2552
2563
  icon,
2553
2564
  label,
2554
2565
  render,
2555
- order
2566
+ order,
2567
+ badge
2556
2568
  }: {
2557
2569
  side: SidebarSide;
2558
2570
  } & SidebarTabDefinition): null;
@@ -2883,6 +2895,7 @@ type TreeNode = {
2883
2895
  name: string;
2884
2896
  type: 'node' | 'group';
2885
2897
  children?: TreeNode[];
2898
+ className?: string;
2886
2899
  icon?: React$2.ReactNode;
2887
2900
  trailing?: React$2.ReactNode;
2888
2901
  };
@@ -2930,5 +2943,5 @@ declare const TreeView: React$2.ForwardRefExoticComponent<Callbacks & {
2930
2943
  } & React$2.RefAttributes<HTMLDivElement>>;
2931
2944
 
2932
2945
  //#endregion
2933
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, KanbanBoard as Board, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, CarouselProps, Cell, CellHierarchyOption, CellPosition, CellRange, CellSelectOption, CellSelectOptionsMap, CellSelectOptionsUnion, CellVariantProps, Checkbox, CheckboxCell, Collapse, CollapseContent, CollapseTrigger, KanbanColumn as Column, KanbanColumnHandle as ColumnHandle, ColumnMenuRendererFunction, ComboboxDemo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandInputProps, CommandItem, CommandList, CommandPalette, CommandPaletteDialog, CommandPaletteEmpty, CommandPaletteGroup, CommandPaletteInput, CommandPaletteItem, CommandPaletteList, CommandPaletteSeparator, CommandPaletteShortcut, CommandSeparator, CommandShortcut, CommentCallbacks, CommentCreate, CommentGroup, CommentItem, CommentList, CommentThread, ContentFrame, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuState, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, DataGridCell, DataGridCellWrapper, DataGridColumnHeader, DataGridContextMenu, DataGridRow, DataGridSearch, DataGridViewMenu, DataGridViewMenuProps, DateCell, DatePickerDemo, DeferredInput, DeferredInputProps, DeferredNumberInput, DeferredNumberInputProps, DeferredTextarea, DeferredTextareaProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicTabbedSidebar, ExternalToast, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GanttCell, GanttCellProps, GanttTimeline, GanttTimerangePicker, GanttTimerangePickerProps, HeaderComponents, HierarchyCell, HierarchyItem, HierarchyItemProps, HoverCard, HoverCardContent, HoverCardTrigger, ISODateRange, InfoCard, InfoCardVariant, Input, InputProps, KanbanItem as Item, KanbanItemHandle as ItemHandle, KanbanRoot as Kanban, KanbanBoard, KanbanColumn, KanbanColumnHandle, KanbanItem, KanbanItemHandle, KanbanOverlay, Label, Loader, LongTextCell, MarkValueRenderer, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, MultiSelectCell, NavigationDirection, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NumberCell, NumberFormatConfig, NumberFormatter, NumberInput, NumberInputProps, KanbanOverlay as Overlay, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ReactNodeCell, ResizableHandle, ResizablePanel, ResizablePanelGroup, KanbanRoot as Root, RowHeightValue, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_KEYBOARD_SHORTCUT_RIGHT, SIDEBAR_MAX_WIDTH, SIDEBAR_MIN_WIDTH, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, SavedView, ScrollArea, ScrollBar, SearchState, Select, SelectCell, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectionState, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortTextCell, Sidebar, SidebarContent, SidebarContext, SidebarContextProps, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarIdContext, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarSide, SidebarTab, SidebarTabDefinition, SidebarTabsContext, SidebarTabsProvider, SidebarTrigger, Skeleton, Slicer, SlicerFilterOption, SlicerHierarchyItem, Slider, Spinner, Stepper, StepperContent, StepperDescription, StepperIndicator, StepperItem, StepperList, StepperNext, StepperPrev, StepperProps, StepperSeparator, StepperTitle, StepperTrigger, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TreeBranch, TreeNode, TreeView, TreeViewProps, UpdateCell, UseDataGridProps, badgeVariants, buildLabelMap, buttonVariants, checkboxVariants, cn, commandInputVariants, createSelectColumn, findOptionById, getAllDescendantIds, getAllDescendantValues, getAllIds, getAncestorIds, getCellKey, getCommonPinningStyles, getInitialExpandedIds, getLabelPath, getLineCount, getRowHeightValue, inputVariants, isoToLocalDate, knobVariants, matchesSearch, navigationMenuTriggerStyle, parseCellKey, sliderVariants, testId, toast, toggleVariants, useCallbackRef, useDataGrid, useDebouncedCallback, useIsMobile, useRegisteredSidebars, useSidebar, useSidebarTabs, useStore as useStepper };
2946
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, KanbanBoard as Board, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonProps, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, CarouselProps, Cell, CellHierarchyOption, CellPosition, CellRange, CellSelectOption, CellSelectOptionsMap, CellSelectOptionsUnion, CellVariantProps, Checkbox, CheckboxCell, Collapse, CollapseContent, CollapseTrigger, KanbanColumn as Column, KanbanColumnHandle as ColumnHandle, ColumnMenuRendererFunction, ComboboxDemo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandInputProps, CommandItem, CommandList, CommandPalette, CommandPaletteDialog, CommandPaletteEmpty, CommandPaletteGroup, CommandPaletteInput, CommandPaletteItem, CommandPaletteList, CommandPaletteSeparator, CommandPaletteShortcut, CommandSeparator, CommandShortcut, CommentCallbacks, CommentCreate, CommentGroup, CommentItem, CommentList, CommentThread, ContentFrame, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuState, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, DataGridCell, DataGridCellWrapper, DataGridColumnHeader, DataGridContextMenu, DataGridRow, DataGridSearch, DataGridViewMenu, DataGridViewMenuProps, DateCell, DatePickerDemo, DeferredInput, DeferredInputProps, DeferredNumberInput, DeferredNumberInputProps, DeferredTextarea, DeferredTextareaProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicTabbedSidebar, ExternalToast, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GanttCell, GanttCellProps, GanttTimeline, GanttTimerangePicker, GanttTimerangePickerProps, HeaderComponents, HierarchyCell, HierarchyItem, HierarchyItemProps, HoverCard, HoverCardContent, HoverCardTrigger, ISODateRange, InfoCard, InfoCardVariant, Input, InputProps, KanbanItem as Item, KanbanItemHandle as ItemHandle, KanbanRoot as Kanban, KanbanBoard, KanbanColumn, KanbanColumnHandle, KanbanItem, KanbanItemHandle, KanbanOverlay, Label, Loader, LongTextCell, MarkValueRenderer, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, MultiSelectCell, NavigationDirection, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NumberCell, NumberFormatConfig, NumberFormatter, NumberInput, NumberInputProps, KanbanOverlay as Overlay, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ReactNodeCell, ResizableHandle, ResizablePanel, ResizablePanelGroup, KanbanRoot as Root, RowHeightValue, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_KEYBOARD_SHORTCUT_RIGHT, SIDEBAR_MAX_WIDTH, SIDEBAR_MIN_WIDTH, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON, SIDEBAR_WIDTH_MOBILE, SavedView, ScrollArea, ScrollBar, SearchState, Select, SelectCell, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectionState, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortTextCell, Sidebar, SidebarContent, SidebarContext, SidebarContextProps, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarIdContext, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarSide, SidebarTab, SidebarTabBadge, SidebarTabDefinition, SidebarTabsContext, SidebarTabsProvider, SidebarTrigger, Skeleton, Slicer, SlicerFilterOption, SlicerHierarchyItem, Slider, Spinner, Stepper, StepperContent, StepperDescription, StepperIndicator, StepperItem, StepperList, StepperNext, StepperPrev, StepperProps, StepperSeparator, StepperTitle, StepperTrigger, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TreeBranch, TreeNode, TreeView, TreeViewProps, UpdateCell, UseDataGridProps, badgeVariants, buildLabelMap, buttonVariants, checkboxVariants, cn, commandInputVariants, createSelectColumn, findOptionById, getAllDescendantIds, getAllDescendantValues, getAllIds, getAncestorIds, getCellKey, getCommonPinningStyles, getInitialExpandedIds, getLabelPath, getLineCount, getRowHeightValue, inputVariants, isoToLocalDate, knobVariants, matchesSearch, navigationMenuTriggerStyle, parseCellKey, sliderVariants, testId, toast, toggleVariants, useCallbackRef, useDataGrid, useDebouncedCallback, useIsMobile, useRegisteredSidebars, useSidebar, useSidebarTabs, useStore as useStepper };
2934
2947
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -2488,6 +2488,12 @@ function DataGridCellWrapper({ cell, table, rowIndex, columnId, isEditing, isFoc
2488
2488
  return typeof v === "function" ? v : () => v;
2489
2489
  }, [colCellMeta?.className]);
2490
2490
  const colCellClassName = classNameResolver(rowOriginal);
2491
+ const rowClassNameMeta = meta?.rowClassName;
2492
+ const rowCellClassName = React$44.useMemo(() => {
2493
+ if (!rowClassNameMeta) return void 0;
2494
+ if (typeof rowClassNameMeta === "function") return rowClassNameMeta(cell.row);
2495
+ return rowClassNameMeta;
2496
+ }, [rowClassNameMeta, cell.row]);
2491
2497
  const isSearchMatch = meta?.getIsSearchMatch?.(rowIndex, columnId) ?? false;
2492
2498
  const isActiveSearchMatch = meta?.getIsActiveSearchMatch?.(rowIndex, columnId) ?? false;
2493
2499
  const onClick = React$44.useCallback((event) => {
@@ -2588,7 +2594,7 @@ function DataGridCellWrapper({ cell, table, rowIndex, columnId, isEditing, isFoc
2588
2594
  "text-left": align === "left",
2589
2595
  "text-right": align === "right",
2590
2596
  "text-center": align === "center"
2591
- }, {
2597
+ }, rowCellClassName, colCellClassName, {
2592
2598
  "ring-1 ring-foreground ring-inset dark:ring-secondary-foreground": isFocused,
2593
2599
  "bg-yellow-100 dark:bg-yellow-900/30": isSearchMatch && !isActiveSearchMatch,
2594
2600
  "bg-orange-200 dark:bg-orange-900/50": isActiveSearchMatch,
@@ -2599,7 +2605,7 @@ function DataGridCellWrapper({ cell, table, rowIndex, columnId, isEditing, isFoc
2599
2605
  "**:data-[slot=grid-cell-content]:line-clamp-3": !isEditing && rowHeight === "tall",
2600
2606
  "**:data-[slot=grid-cell-content]:line-clamp-4": !isEditing && rowHeight === "extra-tall",
2601
2607
  "relative overflow-visible": !!overlayContent
2602
- }, colCellClassName, className),
2608
+ }, className),
2603
2609
  onClick,
2604
2610
  onContextMenu,
2605
2611
  onDoubleClick,
@@ -6285,7 +6291,7 @@ function useStore$1(store, selector) {
6285
6291
  const getSnapshot = React$22.useCallback(() => selector(store.getState()), [store, selector]);
6286
6292
  return React$22.useSyncExternalStore(store.subscribe, getSnapshot, getSnapshot);
6287
6293
  }
6288
- function useDataGrid({ columns, data, onDataChange, onRowAdd: onRowAddProp, onRowsDelete: onRowsDeleteProp, onCellFocus: onCellFocusProp, onRowClick: onRowClickProp, highlightedRowIndex, rowHeight: rowHeightProp = DEFAULT_ROW_HEIGHT, overscan = OVERSCAN, initialState, autoFocus = false, enableColumnSelection = false, enableSearch = false, manualSorting, sorting: externalSorting, onSortingChange: externalOnSortingChange, onLoadMore, loadMoreThreshold = 25, totalRowCount, persistColumnState = false,...dataGridProps }) {
6294
+ function useDataGrid({ columns, data, onDataChange, onRowAdd: onRowAddProp, onRowsDelete: onRowsDeleteProp, onCellFocus: onCellFocusProp, onRowClick: onRowClickProp, highlightedRowIndex, rowClassName, rowHeight: rowHeightProp = DEFAULT_ROW_HEIGHT, overscan = OVERSCAN, initialState, autoFocus = false, enableColumnSelection = false, enableSearch = false, manualSorting, sorting: externalSorting, onSortingChange: externalOnSortingChange, onLoadMore, loadMoreThreshold = 25, totalRowCount, persistColumnState = false,...dataGridProps }) {
6289
6295
  const dataGridRef = React$22.useRef(null);
6290
6296
  const tableRef = React$22.useRef(null);
6291
6297
  const rowVirtualizerRef = React$22.useRef(null);
@@ -6421,7 +6427,11 @@ function useDataGrid({ columns, data, onDataChange, onRowAdd: onRowAddProp, onRo
6421
6427
  }, [initialState, persistedState]);
6422
6428
  const getNavigableColumnIds = React$22.useCallback(() => {
6423
6429
  const t = tableRef.current;
6424
- if (t) return t.getVisibleLeafColumns().map((c) => c.id).filter((c) => !NON_NAVIGABLE_COLUMN_IDS.includes(c));
6430
+ if (t) return [
6431
+ ...t.getLeftVisibleLeafColumns(),
6432
+ ...t.getCenterVisibleLeafColumns(),
6433
+ ...t.getRightVisibleLeafColumns()
6434
+ ].map((c) => c.id).filter((c) => !NON_NAVIGABLE_COLUMN_IDS.includes(c));
6425
6435
  return columnIds.filter((c) => !NON_NAVIGABLE_COLUMN_IDS.includes(c));
6426
6436
  }, [columnIds]);
6427
6437
  const onDataUpdate = React$22.useCallback((updates) => {
@@ -7300,6 +7310,7 @@ function useDataGrid({ columns, data, onDataChange, onRowAdd: onRowAddProp, onRo
7300
7310
  rowHeight,
7301
7311
  isScrolling,
7302
7312
  highlightedRowIndex,
7313
+ rowClassName,
7303
7314
  columnDefsVersion,
7304
7315
  onRowClick: onRowClickProp,
7305
7316
  getIsCellSelected,
@@ -7338,6 +7349,7 @@ function useDataGrid({ columns, data, onDataChange, onRowAdd: onRowAddProp, onRo
7338
7349
  searchOpen,
7339
7350
  isScrolling,
7340
7351
  highlightedRowIndex,
7352
+ rowClassName,
7341
7353
  columnDefsVersion,
7342
7354
  onRowClickProp,
7343
7355
  getIsCellSelected,
@@ -9821,7 +9833,7 @@ function useSidebarTabs(side) {
9821
9833
 
9822
9834
  //#endregion
9823
9835
  //#region src/sidebar/sidebar-tab.tsx
9824
- function SidebarTab({ side, id, icon, label, render, order }) {
9836
+ function SidebarTab({ side, id, icon, label, render, order, badge }) {
9825
9837
  const ctx = React$10.useContext(SidebarTabsContext);
9826
9838
  if (!ctx) throw new Error("SidebarTab must be used within a SidebarTabsProvider.");
9827
9839
  const { register, unregister } = ctx;
@@ -9836,7 +9848,8 @@ function SidebarTab({ side, id, icon, label, render, order }) {
9836
9848
  icon: iconRef.current,
9837
9849
  label,
9838
9850
  render: stableRender,
9839
- order
9851
+ order,
9852
+ badge
9840
9853
  });
9841
9854
  return () => unregister(side, id);
9842
9855
  }, [
@@ -9844,6 +9857,7 @@ function SidebarTab({ side, id, icon, label, render, order }) {
9844
9857
  id,
9845
9858
  label,
9846
9859
  order,
9860
+ badge,
9847
9861
  register,
9848
9862
  unregister,
9849
9863
  stableRender
@@ -9939,14 +9953,20 @@ function HorizontalTabBar({ side, tabs, activeTabId }) {
9939
9953
  children: tabs.map((tab) => {
9940
9954
  const Icon = tab.icon;
9941
9955
  const isActive = tab.id === activeTabId;
9956
+ const badge = tab.badge;
9942
9957
  return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
9943
9958
  asChild: true,
9944
- children: /* @__PURE__ */ jsx("button", {
9959
+ children: /* @__PURE__ */ jsxs("button", {
9945
9960
  role: "tab",
9946
9961
  "aria-selected": isActive,
9947
- className: cn("flex flex-1 items-center justify-center rounded-sm p-1.5 transition-colors", isActive ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"),
9962
+ className: cn("flex flex-1 items-center justify-center rounded-sm p-1.5 transition-colors cursor-pointer group/button", isActive ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground", badge && "pt-1"),
9948
9963
  onClick: () => handleTabClick(tab.id),
9949
- children: /* @__PURE__ */ jsx(Icon, { className: "size-4" })
9964
+ children: [/* @__PURE__ */ jsx(Icon, { className: "size-4" }), badge && /* @__PURE__ */ jsx(Badge, {
9965
+ size: "xs",
9966
+ variant: badge.variant,
9967
+ className: cn("ml-0.5 h-3.25 mb-1.25 px-1.5 group-hover/button:opacity-100 opacity-70 transition-opacity", isActive && "opacity-100", badge.className),
9968
+ children: badge.label
9969
+ })]
9950
9970
  })
9951
9971
  }), /* @__PURE__ */ jsx(TooltipContent, {
9952
9972
  side: "bottom",
@@ -9973,14 +9993,20 @@ function VerticalTabBar({ side, tabs, activeTabId }) {
9973
9993
  children: tabs.map((tab) => {
9974
9994
  const Icon = tab.icon;
9975
9995
  const isActive = tab.id === activeTabId;
9996
+ const badge = tab.badge;
9976
9997
  return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
9977
9998
  asChild: true,
9978
- children: /* @__PURE__ */ jsx("button", {
9999
+ children: /* @__PURE__ */ jsxs("button", {
9979
10000
  role: "tab",
9980
10001
  "aria-selected": isActive,
9981
- className: cn("size-9 flex items-center justify-center rounded-md transition-colors", isActive ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-muted-foreground hover:text-foreground hover:bg-sidebar-accent/50"),
10002
+ className: cn("size-9 flex items-center justify-center rounded-md transition-colors cursor-pointer group/button", isActive ? "bg-sidebar-accent text-sidebar-accent-foreground" : "text-muted-foreground hover:text-foreground hover:bg-sidebar-accent/50"),
9982
10003
  onClick: () => handleTabClick(tab.id),
9983
- children: /* @__PURE__ */ jsx(Icon, { className: "size-4" })
10004
+ children: [/* @__PURE__ */ jsx(Icon, { className: "size-4" }), badge && /* @__PURE__ */ jsx(Badge, {
10005
+ size: "xs",
10006
+ variant: badge.variant,
10007
+ className: cn("ml-0.5 h-3.25 mb-1.25 px-1.5 group-hover/button:opacity-100 opacity-70 transition-opacity", isActive && "opacity-100", badge.className),
10008
+ children: badge.label
10009
+ })]
9984
10010
  })
9985
10011
  }), /* @__PURE__ */ jsx(TooltipContent, {
9986
10012
  side: side === "left" ? "right" : "left",
@@ -11265,7 +11291,7 @@ const TreeBranch = ({ node, level, onNodeSelect, onGroupSelect, onToggleGroup, i
11265
11291
  const hasChildren = node.children && node.children.length > 0;
11266
11292
  if (!isGroup) return /* @__PURE__ */ jsxs("div", {
11267
11293
  "data-test-id": `tree-node-${node.id}`,
11268
- className: cn("relative flex items-center gap-2 py-1.5 px-2 rounded-md cursor-pointer hover:bg-accent hover:text-accent-foreground transition-colors border border-transparent hover:border hover:border-(--discreet-border)", { "bg-primary text-primary-foreground hover:border hover:border-(--discreet-border)": selectedId === node.id }),
11294
+ className: cn("relative flex items-center gap-2 py-1.5 px-2 rounded-md cursor-pointer hover:bg-accent hover:text-accent-foreground transition-colors border border-transparent hover:border hover:border-(--discreet-border)", node.className, { "bg-primary text-primary-foreground hover:border hover:border-(--discreet-border)": selectedId === node.id }),
11269
11295
  style: { marginLeft: `${level * 24}px` },
11270
11296
  onClick: () => onNodeSelect?.(node),
11271
11297
  children: [
@@ -11283,7 +11309,7 @@ const TreeBranch = ({ node, level, onNodeSelect, onGroupSelect, onToggleGroup, i
11283
11309
  "data-test-id": `tree-group-${node.id}`,
11284
11310
  children: [/* @__PURE__ */ jsxs(AccordionTrigger, {
11285
11311
  style: { "--margin-left": `calc(${level * 24 + 16}px - 16px)` },
11286
- className: cn("flex flex-1 overflow-hidden items-center gap-2 py-1.5 px-2 rounded-md ml-(--margin-left) hover:bg-accent hover:text-accent-foreground hover:no-underline transition-colors border border-transparent hover:border hover:border-(--discreet-border)", "[&>svg:last-child]:hidden", { "bg-primary text-primary-foreground": selectedId === node.id }),
11312
+ className: cn("flex flex-1 overflow-hidden items-center gap-2 py-1.5 px-2 rounded-md ml-(--margin-left) hover:bg-accent hover:text-accent-foreground hover:no-underline transition-colors border border-transparent hover:border hover:border-(--discreet-border)", "[&>svg:last-child]:hidden", node.className, { "bg-primary text-primary-foreground": selectedId === node.id }),
11287
11313
  children: [
11288
11314
  /* @__PURE__ */ jsx(PlusIcon, {
11289
11315
  "data-test-id": `tree-expand-${node.id}`,