@onesaz/ui 0.3.20 → 0.3.22

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
@@ -205,6 +205,19 @@ interface IconButtonProps extends Omit<ButtonProps, 'size'> {
205
205
  'aria-label': string;
206
206
  }
207
207
  declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
208
+ interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
209
+ /** Variant applied to all child buttons (can be overridden per button) */
210
+ variant?: ButtonProps['variant'];
211
+ /** Size applied to all child buttons (can be overridden per button) */
212
+ size?: ButtonProps['size'];
213
+ /** Layout direction */
214
+ orientation?: 'horizontal' | 'vertical';
215
+ /** Disable all child buttons */
216
+ disabled?: boolean;
217
+ /** Stretch group to fill container width */
218
+ fullWidth?: boolean;
219
+ }
220
+ declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
208
221
 
209
222
  interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
210
223
  /** Input size variant */
@@ -1839,4 +1852,4 @@ declare const RailPanelItem: React.ForwardRefExoticComponent<RailPanelItemProps
1839
1852
 
1840
1853
  declare const Playground: () => react_jsx_runtime.JSX.Element;
1841
1854
 
1842
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, AreaChart, type AreaChartProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, BarChart, type BarChartProps, Box, type BoxProps, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbPage, type BreadcrumbPageProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Caption, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, type CircularProgressProps, type ColumnGroupModel, type ColumnVisibilityModel, Combobox, type ComboboxMultipleProps, type ComboboxOption, type ComboboxProps, type ComboboxSingleProps, DataGrid, type DataGridProps, DataGrid as DataGridV0, DialogNamespace as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DonutChart, type DonutChartProps, Drawer, DrawerBody, type DrawerBodyProps, DrawerClose, DrawerContent, type DrawerContentProps, DrawerDescription, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, FormControl, type FormControlProps, FormGroup, type FormGroupProps, FormHelperText, type FormHelperTextProps, FormLabel, type FormLabelProps, Grid, type GridColDef, type GridProps, type GridRenderCellParams, type GridRenderHeaderParams, type GridRowSelectionModel, type GridSpanParams, type GridValueFormatterParams, type GridValueGetterParams, H1, H2, H3, H4, H5, H6, HStack, IconButton, type IconButtonProps, IconRail, IconRailContent, type IconRailContentProps, IconRailFooter, type IconRailFooterProps, IconRailHeader, type IconRailHeaderProps, IconRailItem, type IconRailItemProps, type IconRailProps, Input, InputAdornment, type InputAdornmentProps, type InputProps, Label, type LabelProps, LineChart, type LineChartProps, LinearProgress, type LinearProgressProps, List, ListDivider, type ListDividerProps, ListItem, ListItemAvatar, type ListItemAvatarProps, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MultiProgressDonut, type MultiProgressDonutProps, NativeSelect, NativeSelectOption, type NativeSelectOptionProps, type NativeSelectProps, PackedBubbleChart, type PackedBubbleChartProps, type PackedBubbleDataItem, PaginationNamespace as Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, type PaginationModel, PaginationNext, PaginationPrevious, type PaginationProps, PieChart, type PieChartProps, type PinnedColumnsModel, type PinnedRowsModel, Playground, Progress, ProgressCard, type ProgressCardProps, ProgressDonut, type ProgressDonutProps, type ProgressProps, RadarChart, type RadarChartProps, Radio, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioProps, RailPanel, RailPanelGroup, type RailPanelGroupProps, RailPanelItem, type RailPanelItemProps, type RailPanelProps, RangeSlider, type RangeSliderProps, ScatterChart, type ScatterChartProps, SelectNamespace as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarGroup, type SidebarGroupProps, SidebarHeader, type SidebarHeaderProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarRail, type SidebarRailProps, SidebarSubMenu, type SidebarSubMenuProps, SidebarToggle, type SidebarToggleProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonCard, type SkeletonCardProps, type SkeletonProps, SkeletonTableRow, type SkeletonTableRowProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stack, type StackProps, Switch, type SwitchProps, TableNamespace as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextField, type TextFieldProps, Textarea, type TextareaProps, ThemeContext, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, TopBar, TopBarBrand, type TopBarBrandProps, TopBarDivider, type TopBarDividerProps, TopBarNav, TopBarNavItem, type TopBarNavItemProps, type TopBarNavProps, type TopBarProps, TopBarSection, type TopBarSectionProps, Typography, type TypographyProps, UnderlineTabsContent, UnderlineTabsList, UnderlineTabsTrigger, type UnderlineTabsTriggerProps, VStack, VerticalTabs, VerticalTabsContent, VerticalTabsGroupLabel, type VerticalTabsGroupLabelProps, VerticalTabsList, VerticalTabsTrigger, type VerticalTabsTriggerProps, VirtualList, type VirtualListProps, cn, useFormControl, useSidebar, useSidebarRail, useTheme };
1855
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, AreaChart, type AreaChartProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, BarChart, type BarChartProps, Box, type BoxProps, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbPage, type BreadcrumbPageProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Breadcrumbs, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Caption, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, type CircularProgressProps, type ColumnGroupModel, type ColumnVisibilityModel, Combobox, type ComboboxMultipleProps, type ComboboxOption, type ComboboxProps, type ComboboxSingleProps, DataGrid, type DataGridProps, DataGrid as DataGridV0, DialogNamespace as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DonutChart, type DonutChartProps, Drawer, DrawerBody, type DrawerBodyProps, DrawerClose, DrawerContent, type DrawerContentProps, DrawerDescription, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, FormControl, type FormControlProps, FormGroup, type FormGroupProps, FormHelperText, type FormHelperTextProps, FormLabel, type FormLabelProps, Grid, type GridColDef, type GridProps, type GridRenderCellParams, type GridRenderHeaderParams, type GridRowSelectionModel, type GridSpanParams, type GridValueFormatterParams, type GridValueGetterParams, H1, H2, H3, H4, H5, H6, HStack, IconButton, type IconButtonProps, IconRail, IconRailContent, type IconRailContentProps, IconRailFooter, type IconRailFooterProps, IconRailHeader, type IconRailHeaderProps, IconRailItem, type IconRailItemProps, type IconRailProps, Input, InputAdornment, type InputAdornmentProps, type InputProps, Label, type LabelProps, LineChart, type LineChartProps, LinearProgress, type LinearProgressProps, List, ListDivider, type ListDividerProps, ListItem, ListItemAvatar, type ListItemAvatarProps, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, MultiProgressDonut, type MultiProgressDonutProps, NativeSelect, NativeSelectOption, type NativeSelectOptionProps, type NativeSelectProps, PackedBubbleChart, type PackedBubbleChartProps, type PackedBubbleDataItem, PaginationNamespace as Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, type PaginationModel, PaginationNext, PaginationPrevious, type PaginationProps, PieChart, type PieChartProps, type PinnedColumnsModel, type PinnedRowsModel, Playground, Progress, ProgressCard, type ProgressCardProps, ProgressDonut, type ProgressDonutProps, type ProgressProps, RadarChart, type RadarChartProps, Radio, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioProps, RailPanel, RailPanelGroup, type RailPanelGroupProps, RailPanelItem, type RailPanelItemProps, type RailPanelProps, RangeSlider, type RangeSliderProps, ScatterChart, type ScatterChartProps, SelectNamespace as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarGroup, type SidebarGroupProps, SidebarHeader, type SidebarHeaderProps, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarRail, type SidebarRailProps, SidebarSubMenu, type SidebarSubMenuProps, SidebarToggle, type SidebarToggleProps, Skeleton, SkeletonAvatar, type SkeletonAvatarProps, SkeletonCard, type SkeletonCardProps, type SkeletonProps, SkeletonTableRow, type SkeletonTableRowProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stack, type StackProps, Switch, type SwitchProps, TableNamespace as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Text, TextField, type TextFieldProps, Textarea, type TextareaProps, ThemeContext, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, Tooltip, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, TopBar, TopBarBrand, type TopBarBrandProps, TopBarDivider, type TopBarDividerProps, TopBarNav, TopBarNavItem, type TopBarNavItemProps, type TopBarNavProps, type TopBarProps, TopBarSection, type TopBarSectionProps, Typography, type TypographyProps, UnderlineTabsContent, UnderlineTabsList, UnderlineTabsTrigger, type UnderlineTabsTriggerProps, VStack, VerticalTabs, VerticalTabsContent, VerticalTabsGroupLabel, type VerticalTabsGroupLabelProps, VerticalTabsList, VerticalTabsTrigger, type VerticalTabsTriggerProps, VirtualList, type VirtualListProps, cn, useFormControl, useSidebar, useSidebarRail, useTheme };
package/dist/index.js CHANGED
@@ -865,28 +865,35 @@ Caption.displayName = "Caption";
865
865
  // src/components/button.tsx
866
866
  import * as React6 from "react";
867
867
  import { jsx as jsx6 } from "react/jsx-runtime";
868
+ var ButtonGroupContext = React6.createContext({});
869
+ var useButtonGroup = () => React6.useContext(ButtonGroupContext);
868
870
  var Button = React6.forwardRef(
869
- ({ className, variant = "default", size = "default", fullWidth = false, ...props }, ref) => {
871
+ ({ className, variant, size, fullWidth = false, disabled, ...props }, ref) => {
872
+ const groupCtx = useButtonGroup();
873
+ const resolvedVariant = variant ?? groupCtx.variant ?? "default";
874
+ const resolvedSize = size ?? groupCtx.size ?? "default";
875
+ const resolvedDisabled = disabled ?? groupCtx.disabled;
870
876
  return /* @__PURE__ */ jsx6(
871
877
  "button",
872
878
  {
879
+ disabled: resolvedDisabled,
873
880
  className: cn(
874
881
  "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors cursor-pointer",
875
882
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
876
883
  "disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
877
884
  {
878
- "bg-accent text-accent-foreground hover:bg-accent-hover": variant === "default",
879
- "bg-destructive text-destructive-foreground hover:bg-destructive/90": variant === "destructive",
880
- "border border-input bg-background hover:bg-muted hover:text-foreground": variant === "outline",
881
- "bg-muted text-foreground hover:bg-muted/80": variant === "secondary",
882
- "hover:bg-muted hover:text-foreground": variant === "ghost",
883
- "text-accent underline-offset-4 hover:underline": variant === "link"
885
+ "bg-accent text-accent-foreground hover:bg-accent-hover": resolvedVariant === "default",
886
+ "bg-destructive text-destructive-foreground hover:bg-destructive/90": resolvedVariant === "destructive",
887
+ "border border-input bg-background hover:bg-muted hover:text-foreground": resolvedVariant === "outline",
888
+ "bg-muted text-foreground hover:bg-muted/80": resolvedVariant === "secondary",
889
+ "hover:bg-muted hover:text-foreground": resolvedVariant === "ghost",
890
+ "text-accent underline-offset-4 hover:underline": resolvedVariant === "link"
884
891
  },
885
892
  {
886
- "h-10 px-4 py-2": size === "default",
887
- "h-9 rounded-md px-3": size === "sm",
888
- "h-11 rounded-md px-8": size === "lg",
889
- "h-10 w-10": size === "icon"
893
+ "h-10 px-4 py-2": resolvedSize === "default",
894
+ "h-9 rounded-md px-3": resolvedSize === "sm",
895
+ "h-11 rounded-md px-8": resolvedSize === "lg",
896
+ "h-10 w-10": resolvedSize === "icon"
890
897
  },
891
898
  fullWidth && "w-full",
892
899
  className
@@ -932,6 +939,54 @@ var IconButton = React6.forwardRef(
932
939
  }
933
940
  );
934
941
  IconButton.displayName = "IconButton";
942
+ var ButtonGroup = React6.forwardRef(
943
+ ({
944
+ className,
945
+ variant,
946
+ size,
947
+ orientation = "horizontal",
948
+ disabled,
949
+ fullWidth = false,
950
+ children,
951
+ ...props
952
+ }, ref) => {
953
+ return /* @__PURE__ */ jsx6(ButtonGroupContext.Provider, { value: { variant, size, disabled }, children: /* @__PURE__ */ jsx6(
954
+ "div",
955
+ {
956
+ ref,
957
+ role: "group",
958
+ className: cn(
959
+ "inline-flex",
960
+ orientation === "vertical" && "flex-col",
961
+ fullWidth && "flex w-full",
962
+ // Horizontal: collapse inner borders and strip inner radius
963
+ orientation === "horizontal" && [
964
+ "[&>*:not(:first-child)]:rounded-l-none",
965
+ "[&>*:not(:last-child)]:rounded-r-none",
966
+ "[&>*:not(:first-child)]:-ml-px",
967
+ // Bring hovered/focused button's border to front
968
+ "[&>*]:relative",
969
+ "[&>*:hover]:z-10",
970
+ "[&>*:focus-visible]:z-10"
971
+ ],
972
+ // Vertical: collapse inner borders and strip inner radius
973
+ orientation === "vertical" && [
974
+ "[&>*:not(:first-child)]:rounded-t-none",
975
+ "[&>*:not(:last-child)]:rounded-b-none",
976
+ "[&>*:not(:first-child)]:-mt-px",
977
+ "[&>*]:relative",
978
+ "[&>*:hover]:z-10",
979
+ "[&>*:focus-visible]:z-10"
980
+ ],
981
+ className
982
+ ),
983
+ ...props,
984
+ children
985
+ }
986
+ ) });
987
+ }
988
+ );
989
+ ButtonGroup.displayName = "ButtonGroup";
935
990
 
936
991
  // src/components/input.tsx
937
992
  import * as React7 from "react";
@@ -2222,7 +2277,7 @@ var DialogContent = React24.forwardRef(({ className, children, hideCloseButton =
2222
2277
  {
2223
2278
  ref,
2224
2279
  className: cn(
2225
- "fixed z-50 grid w-full gap-4 p-6 shadow-lg",
2280
+ "fixed z-50 flex flex-col w-full gap-4 p-6 shadow-lg",
2226
2281
  "bg-popover border border-border text-popover-foreground",
2227
2282
  "rounded-lg",
2228
2283
  "data-[state=open]:animate-zoom-in data-[state=closed]:animate-zoom-out",
@@ -2230,8 +2285,8 @@ var DialogContent = React24.forwardRef(({ className, children, hideCloseButton =
2230
2285
  size === "sm" && "left-1/2 top-1/2 max-w-sm -translate-x-1/2 -translate-y-1/2",
2231
2286
  size === "md" && "left-1/2 top-1/2 max-w-md -translate-x-1/2 -translate-y-1/2",
2232
2287
  size === "lg" && "left-1/2 top-1/2 max-w-lg -translate-x-1/2 -translate-y-1/2",
2233
- size === "xl" && "left-1/2 top-1/2 max-w-xl -translate-x-1/2 -translate-y-1/2",
2234
- size === "2xl" && "left-1/2 top-1/2 max-w-2xl -translate-x-1/2 -translate-y-1/2",
2288
+ size === "xl" && "left-1/2 top-[5vh] max-w-xl max-h-[90vh] -translate-x-1/2",
2289
+ size === "2xl" && "left-1/2 top-[5vh] max-w-2xl max-h-[90vh] -translate-x-1/2",
2235
2290
  size === "full" && "inset-0 h-full w-full max-w-full rounded-none",
2236
2291
  className
2237
2292
  ),
@@ -5503,6 +5558,12 @@ function DataGrid({
5503
5558
  return computeRowSpanMap(table.getRowModel().rows, columns);
5504
5559
  }, [table.getRowModel().rows, columns]);
5505
5560
  const hasColSpan = React36.useMemo(() => columns.some((col) => col.colSpan), [columns]);
5561
+ const totalColumnsWidth = React36.useMemo(() => {
5562
+ return table.getVisibleLeafColumns().reduce((sum, column) => {
5563
+ const colWidth = columnWidths.get(column.id);
5564
+ return sum + (colWidth?.width || column.getSize());
5565
+ }, 0);
5566
+ }, [table.getVisibleLeafColumns(), columnWidths]);
5506
5567
  const containerStyle = {
5507
5568
  ...sx
5508
5569
  };
@@ -5515,7 +5576,7 @@ function DataGrid({
5515
5576
  "div",
5516
5577
  {
5517
5578
  className: cn(
5518
- "rounded-lg border border-border bg-background overflow-hidden flex flex-col text-xs",
5579
+ "rounded-lg border border-border bg-background flex flex-col text-xs",
5519
5580
  className
5520
5581
  ),
5521
5582
  style: containerStyle,
@@ -5539,167 +5600,174 @@ function DataGrid({
5539
5600
  moreOptions
5540
5601
  }
5541
5602
  ),
5542
- /* @__PURE__ */ jsxs22(
5603
+ /* @__PURE__ */ jsx36("div", { className: "flex-1 flex flex-col min-h-0 overflow-hidden", children: /* @__PURE__ */ jsxs22(
5543
5604
  "div",
5544
5605
  {
5545
5606
  ref: tableContainerRef,
5546
5607
  className: "relative flex-1 overflow-auto",
5547
5608
  children: [
5548
5609
  loading && /* @__PURE__ */ jsx36("div", { className: "absolute inset-0 bg-background/80 flex items-center justify-center z-10", children: /* @__PURE__ */ jsx36(Spinner, { size: "lg" }) }),
5549
- /* @__PURE__ */ jsxs22("table", { className: "w-full border-separate border-spacing-0 table-fixed", children: [
5550
- /* @__PURE__ */ jsx36("colgroup", { children: table.getVisibleLeafColumns().map((column) => {
5551
- const colWidth = columnWidths.get(column.id);
5552
- return /* @__PURE__ */ jsx36(
5553
- "col",
5554
- {
5555
- style: {
5556
- width: colWidth?.width || column.getSize(),
5557
- minWidth: colWidth?.minWidth || column.columnDef.minSize,
5558
- maxWidth: colWidth?.maxWidth || column.columnDef.maxSize
5610
+ /* @__PURE__ */ jsxs22(
5611
+ "table",
5612
+ {
5613
+ className: "border-separate border-spacing-0 table-fixed",
5614
+ style: { width: totalColumnsWidth, minWidth: "100%" },
5615
+ children: [
5616
+ /* @__PURE__ */ jsx36("colgroup", { children: table.getVisibleLeafColumns().map((column) => {
5617
+ const colWidth = columnWidths.get(column.id);
5618
+ return /* @__PURE__ */ jsx36(
5619
+ "col",
5620
+ {
5621
+ style: {
5622
+ width: colWidth?.width || column.getSize(),
5623
+ minWidth: colWidth?.minWidth || column.columnDef.minSize,
5624
+ maxWidth: colWidth?.maxWidth || column.columnDef.maxSize
5625
+ }
5626
+ },
5627
+ column.id
5628
+ );
5629
+ }) }),
5630
+ /* @__PURE__ */ jsxs22("thead", { className: "sticky top-0 z-[3] bg-muted", children: [
5631
+ columnGroupingModel && columnGroupingModel.length > 0 && /* @__PURE__ */ jsx36(
5632
+ ColumnGroupHeader,
5633
+ {
5634
+ columnGroupingModel,
5635
+ columns,
5636
+ columnWidths,
5637
+ showColumnVerticalBorder,
5638
+ rowHeight,
5639
+ columnVisibility,
5640
+ checkboxSelection,
5641
+ pinnedColumnOffsets
5642
+ }
5643
+ ),
5644
+ table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx36("tr", { className: "bg-muted", children: headerGroup.headers.map((header) => {
5645
+ const meta = header.column.columnDef.meta;
5646
+ const align = meta?.headerAlign || meta?.align || "left";
5647
+ const colWidth = columnWidths.get(header.column.id);
5648
+ const effectiveWidth = colWidth?.width || header.getSize();
5649
+ const pinnedInfo = pinnedColumnOffsets?.get(header.column.id);
5650
+ return /* @__PURE__ */ jsxs22(
5651
+ "th",
5652
+ {
5653
+ className: cn(
5654
+ "px-4 text-left text-xs font-medium text-muted-foreground border-b border-border bg-muted overflow-hidden relative",
5655
+ showColumnVerticalBorder && "border-r last:border-r-0",
5656
+ header.column.getCanSort() && "cursor-pointer select-none hover:bg-muted/80",
5657
+ // Add cursor class when resizing
5658
+ header.column.getIsResizing() && "cursor-col-resize",
5659
+ // Pinned column styling
5660
+ pinnedInfo && "sticky z-[4]",
5661
+ pinnedInfo?.side === "left" && "border-r border-border",
5662
+ pinnedInfo?.side === "right" && "border-l border-border"
5663
+ ),
5664
+ style: {
5665
+ height: rowHeight,
5666
+ width: effectiveWidth,
5667
+ minWidth: colWidth?.minWidth || header.column.columnDef.minSize,
5668
+ maxWidth: colWidth?.maxWidth || header.column.columnDef.maxSize,
5669
+ textAlign: align,
5670
+ ...pinnedInfo ? {
5671
+ position: "sticky",
5672
+ [pinnedInfo.side]: pinnedInfo.offset
5673
+ } : {}
5674
+ },
5675
+ onClick: header.column.getToggleSortingHandler(),
5676
+ children: [
5677
+ /* @__PURE__ */ jsxs22("div", { className: cn(
5678
+ "flex items-center gap-1 truncate",
5679
+ align === "center" && "justify-center",
5680
+ align === "right" && "justify-end"
5681
+ ), children: [
5682
+ header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()),
5683
+ header.column.getCanSort() && /* @__PURE__ */ jsx36(SortIcon, { direction: header.column.getIsSorted() })
5684
+ ] }),
5685
+ resizableColumns && header.column.id !== "__select__" && /* @__PURE__ */ jsx36(
5686
+ ColumnResizeHandle,
5687
+ {
5688
+ header,
5689
+ isResizing: header.column.getIsResizing()
5690
+ }
5691
+ )
5692
+ ]
5693
+ },
5694
+ header.id
5695
+ );
5696
+ }) }, headerGroup.id))
5697
+ ] }),
5698
+ pinnedTopTable && pinnedTopTable.length > 0 && /* @__PURE__ */ jsx36(
5699
+ PinnedRowsRenderer,
5700
+ {
5701
+ pinnedData: pinnedTopTable,
5702
+ columns,
5703
+ tanstackColumns,
5704
+ getRowId,
5705
+ rowHeight,
5706
+ showCellVerticalBorder,
5707
+ getRowClassName,
5708
+ globalWrapText: wrapText,
5709
+ columnWidths,
5710
+ pinnedColumnOffsets,
5711
+ columnVisibility,
5712
+ position: "top"
5559
5713
  }
5560
- },
5561
- column.id
5562
- );
5563
- }) }),
5564
- /* @__PURE__ */ jsxs22("thead", { className: "sticky top-0 z-[3] bg-muted", children: [
5565
- columnGroupingModel && columnGroupingModel.length > 0 && /* @__PURE__ */ jsx36(
5566
- ColumnGroupHeader,
5567
- {
5568
- columnGroupingModel,
5569
- columns,
5570
- columnWidths,
5571
- showColumnVerticalBorder,
5572
- rowHeight,
5573
- columnVisibility,
5574
- checkboxSelection,
5575
- pinnedColumnOffsets
5576
- }
5577
- ),
5578
- table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx36("tr", { className: "bg-muted", children: headerGroup.headers.map((header) => {
5579
- const meta = header.column.columnDef.meta;
5580
- const align = meta?.headerAlign || meta?.align || "left";
5581
- const colWidth = columnWidths.get(header.column.id);
5582
- const effectiveWidth = colWidth?.width || header.getSize();
5583
- const pinnedInfo = pinnedColumnOffsets?.get(header.column.id);
5584
- return /* @__PURE__ */ jsxs22(
5585
- "th",
5714
+ ),
5715
+ effectiveVirtualized ? /* @__PURE__ */ jsx36(
5716
+ VirtualizedTableBody,
5586
5717
  {
5587
- className: cn(
5588
- "px-4 text-left text-xs font-medium text-muted-foreground border-b border-border bg-muted overflow-hidden relative",
5589
- showColumnVerticalBorder && "border-r last:border-r-0",
5590
- header.column.getCanSort() && "cursor-pointer select-none hover:bg-muted/80",
5591
- // Add cursor class when resizing
5592
- header.column.getIsResizing() && "cursor-col-resize",
5593
- // Pinned column styling
5594
- pinnedInfo && "sticky z-[4]",
5595
- pinnedInfo?.side === "left" && "border-r border-border",
5596
- pinnedInfo?.side === "right" && "border-l border-border"
5597
- ),
5598
- style: {
5599
- height: rowHeight,
5600
- width: effectiveWidth,
5601
- minWidth: colWidth?.minWidth || header.column.columnDef.minSize,
5602
- maxWidth: colWidth?.maxWidth || header.column.columnDef.maxSize,
5603
- textAlign: align,
5604
- ...pinnedInfo ? {
5605
- position: "sticky",
5606
- [pinnedInfo.side]: pinnedInfo.offset
5607
- } : {}
5608
- },
5609
- onClick: header.column.getToggleSortingHandler(),
5610
- children: [
5611
- /* @__PURE__ */ jsxs22("div", { className: cn(
5612
- "flex items-center gap-1 truncate",
5613
- align === "center" && "justify-center",
5614
- align === "right" && "justify-end"
5615
- ), children: [
5616
- header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()),
5617
- header.column.getCanSort() && /* @__PURE__ */ jsx36(SortIcon, { direction: header.column.getIsSorted() })
5618
- ] }),
5619
- resizableColumns && header.column.id !== "__select__" && /* @__PURE__ */ jsx36(
5620
- ColumnResizeHandle,
5621
- {
5622
- header,
5623
- isResizing: header.column.getIsResizing()
5624
- }
5625
- )
5626
- ]
5627
- },
5628
- header.id
5629
- );
5630
- }) }, headerGroup.id))
5631
- ] }),
5632
- pinnedTopTable && pinnedTopTable.length > 0 && /* @__PURE__ */ jsx36(
5633
- PinnedRowsRenderer,
5634
- {
5635
- pinnedData: pinnedTopTable,
5636
- columns,
5637
- tanstackColumns,
5638
- getRowId,
5639
- rowHeight,
5640
- showCellVerticalBorder,
5641
- getRowClassName,
5642
- globalWrapText: wrapText,
5643
- columnWidths,
5644
- pinnedColumnOffsets,
5645
- columnVisibility,
5646
- position: "top"
5647
- }
5648
- ),
5649
- effectiveVirtualized ? /* @__PURE__ */ jsx36(
5650
- VirtualizedTableBody,
5651
- {
5652
- table,
5653
- rowHeight,
5654
- showCellVerticalBorder,
5655
- checkboxSelection,
5656
- disableRowSelectionOnClick,
5657
- getRowClassName,
5658
- overscan,
5659
- parentRef: tableContainerRef,
5660
- globalWrapText: wrapText,
5661
- columnWidths,
5662
- pinnedColumnOffsets,
5663
- rowSpanMap,
5664
- gridColumns: hasColSpan ? columns : void 0
5665
- }
5666
- ) : /* @__PURE__ */ jsx36(
5667
- StandardTableBody,
5668
- {
5669
- table,
5670
- rowHeight,
5671
- showCellVerticalBorder,
5672
- checkboxSelection,
5673
- disableRowSelectionOnClick,
5674
- getRowClassName,
5675
- globalWrapText: wrapText,
5676
- columnWidths,
5677
- pinnedColumnOffsets,
5678
- rowSpanMap,
5679
- gridColumns: hasColSpan ? columns : void 0
5680
- }
5681
- ),
5682
- pinnedBottomTable && pinnedBottomTable.length > 0 && /* @__PURE__ */ jsx36(
5683
- PinnedRowsRenderer,
5684
- {
5685
- pinnedData: pinnedBottomTable,
5686
- columns,
5687
- tanstackColumns,
5688
- getRowId,
5689
- rowHeight,
5690
- showCellVerticalBorder,
5691
- getRowClassName,
5692
- globalWrapText: wrapText,
5693
- columnWidths,
5694
- pinnedColumnOffsets,
5695
- columnVisibility,
5696
- position: "bottom"
5697
- }
5698
- )
5699
- ] })
5718
+ table,
5719
+ rowHeight,
5720
+ showCellVerticalBorder,
5721
+ checkboxSelection,
5722
+ disableRowSelectionOnClick,
5723
+ getRowClassName,
5724
+ overscan,
5725
+ parentRef: tableContainerRef,
5726
+ globalWrapText: wrapText,
5727
+ columnWidths,
5728
+ pinnedColumnOffsets,
5729
+ rowSpanMap,
5730
+ gridColumns: hasColSpan ? columns : void 0
5731
+ }
5732
+ ) : /* @__PURE__ */ jsx36(
5733
+ StandardTableBody,
5734
+ {
5735
+ table,
5736
+ rowHeight,
5737
+ showCellVerticalBorder,
5738
+ checkboxSelection,
5739
+ disableRowSelectionOnClick,
5740
+ getRowClassName,
5741
+ globalWrapText: wrapText,
5742
+ columnWidths,
5743
+ pinnedColumnOffsets,
5744
+ rowSpanMap,
5745
+ gridColumns: hasColSpan ? columns : void 0
5746
+ }
5747
+ ),
5748
+ pinnedBottomTable && pinnedBottomTable.length > 0 && /* @__PURE__ */ jsx36(
5749
+ PinnedRowsRenderer,
5750
+ {
5751
+ pinnedData: pinnedBottomTable,
5752
+ columns,
5753
+ tanstackColumns,
5754
+ getRowId,
5755
+ rowHeight,
5756
+ showCellVerticalBorder,
5757
+ getRowClassName,
5758
+ globalWrapText: wrapText,
5759
+ columnWidths,
5760
+ pinnedColumnOffsets,
5761
+ columnVisibility,
5762
+ position: "bottom"
5763
+ }
5764
+ )
5765
+ ]
5766
+ }
5767
+ )
5700
5768
  ]
5701
5769
  }
5702
- ),
5770
+ ) }),
5703
5771
  !effectiveVirtualized && !hideFooter && !hideFooterPagination && /* @__PURE__ */ jsx36(
5704
5772
  DataGridPagination,
5705
5773
  {
@@ -8670,6 +8738,7 @@ export {
8670
8738
  BreadcrumbSeparator,
8671
8739
  Breadcrumbs,
8672
8740
  Button,
8741
+ ButtonGroup,
8673
8742
  Caption,
8674
8743
  Card,
8675
8744
  CardContent,