@facter/ds-core 1.16.0 → 1.17.0

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.mts CHANGED
@@ -389,6 +389,14 @@ interface DataTableContentProps {
389
389
  highlightOnHover?: boolean;
390
390
  /** Callback quando uma row é clicada */
391
391
  onRowClick?: (row: unknown) => void;
392
+ /**
393
+ * Habilita scroll vertical com altura calculada automaticamente.
394
+ * O header das colunas fica sticky e apenas as rows fazem scroll.
395
+ * O bottomOffset controla a margem inferior (default: 16px).
396
+ */
397
+ scrollable?: boolean;
398
+ /** Margem inferior em px para o cálculo de altura automática (default: 16) */
399
+ scrollBottomOffset?: number;
392
400
  /** Custom className */
393
401
  className?: string;
394
402
  }
@@ -2669,6 +2677,40 @@ declare const StatsCard: typeof StatsCardRoot & {
2669
2677
  Today: typeof StatsCardToday;
2670
2678
  };
2671
2679
 
2680
+ interface UseAvailableHeightOptions {
2681
+ /** Bottom margin in pixels (default: 16) */
2682
+ bottomOffset?: number;
2683
+ /** Minimum height in pixels (default: 200) */
2684
+ minHeight?: number;
2685
+ /** Whether the calculation is enabled (default: true) */
2686
+ enabled?: boolean;
2687
+ }
2688
+ /**
2689
+ * Hook that calculates the available height from an element's top position
2690
+ * to the bottom of the viewport. Useful for making containers fill remaining space.
2691
+ *
2692
+ * Recalculates on window resize automatically.
2693
+ *
2694
+ * @example
2695
+ * ```tsx
2696
+ * function MyTable() {
2697
+ * const { ref, height } = useAvailableHeight({ bottomOffset: 32 })
2698
+ * return (
2699
+ * <div ref={ref} style={{ maxHeight: height }}>
2700
+ * {content}
2701
+ * </div>
2702
+ * )
2703
+ * }
2704
+ * ```
2705
+ */
2706
+ declare function useAvailableHeight<T extends HTMLElement = HTMLDivElement>(options?: UseAvailableHeightOptions): {
2707
+ ref: React$1.RefObject<T | null>;
2708
+ height: number | undefined;
2709
+ style: {
2710
+ maxHeight: string;
2711
+ } | undefined;
2712
+ };
2713
+
2672
2714
  type Theme = 'dark' | 'light' | 'system';
2673
2715
  interface ThemeProviderProps {
2674
2716
  children: React$1.ReactNode;
@@ -2691,4 +2733,4 @@ declare const useTheme: () => ThemeProviderState;
2691
2733
  */
2692
2734
  declare function cn(...inputs: ClassValue[]): string;
2693
2735
 
2694
- export { AuthLayout, type AuthLayoutBodyProps, type AuthLayoutContentProps, type AuthLayoutDividerProps, type AuthLayoutFooterProps, type AuthLayoutHeaderProps, type AuthLayoutImageProps, type AuthLayoutLinkProps, type AuthLayoutProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, type BaseFieldProps, BigNumberCard, type BigNumberCardContentProps, type BigNumberCardHeaderProps, type BigNumberCardLinkProps, type BigNumberCardRootProps, type BigNumberCardSize, type BigNumberCardSparklineProps, type BigNumberCardTitleProps, type BigNumberCardTrendProps, type BigNumberCardValueProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type ChartDataPoint, Checkbox, type CheckboxProps, type Company, DENSITY_CONFIG, DashboardLayout, type DashboardLayoutBreadcrumbsProps, type DashboardLayoutContentProps, type DashboardLayoutContextValue, type DashboardLayoutHeaderActionsProps, type DashboardLayoutHeaderProps, type DashboardLayoutHeaderTitleProps, type DashboardLayoutHeaderUserProps, type DashboardLayoutMobileNavItemProps, type DashboardLayoutMobileNavProps, type DashboardLayoutProps, type DashboardLayoutSidebarFooterProps, type DashboardLayoutSidebarHeaderProps, type DashboardLayoutSidebarNavGroupProps, type DashboardLayoutSidebarNavItemProps, type DashboardLayoutSidebarNavProps, type DashboardLayoutSidebarProps, type DashboardLayoutSidebarSectionProps, DataTable, type DataTableBulkActionsProps, type DataTableColumnHeaderProps, type DataTableColumnVisibilityProps, type DataTableContentProps, type DataTableContextValue, type DataTableDensity, type DataTableDensityToggleProps, type DataTableEmptyStateProps, type DataTableExportFormat, type DataTableExportProps, type DataTableFilterOption, type DataTableFilterProps, type DataTableFiltersProps, type DataTableLoadingProps, type DataTableMeta, type DataTablePaginationMode, type DataTablePaginationProps, type DataTableProps, type DataTableRowActionsProps, type DataTableSearchProps, type DataTableState, type DataTableTab, type DataTableTabsProps, type DataTableToolbarProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogWrapper, type DialogWrapperProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, FloatingBarCompound as FloatingBar, FloatingBarAction, type FloatingBarActionProps, FloatingBarCounter, type FloatingBarCounterProps, FloatingBarDivider, type FloatingBarDividerProps, FloatingBarIconAction, type FloatingBarIconActionProps, type FloatingBarProps, Form, FormCheckbox, type FormCheckboxProps, type FormContextValue, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormFieldContextValue, FormFieldProvider, FormFieldWrapper, type FormFieldWrapperProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormRadioGroup, type FormRadioGroupProps, type FormRootProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, GlobalLoaderController, Input, type InputProps, ItemCard, ItemCardActionButton, type ItemCardActionButtonProps, ItemCardActions, type ItemCardActionsProps, ItemCardActionsRow, type ItemCardActionsRowProps, ItemCardBadge, type ItemCardBadgeProps, ItemCardContent, ItemCardContentItem, type ItemCardContentItemProps, type ItemCardContentProps, ItemCardEmpty, type ItemCardEmptyProps, ItemCardFooter, ItemCardFooterDivider, type ItemCardFooterDividerProps, ItemCardFooterItem, type ItemCardFooterItemProps, type ItemCardFooterProps, ItemCardHeader, type ItemCardHeaderProps, ItemCardIcon, type ItemCardIconProps, ItemCardRoot, type ItemCardRootProps, ItemCardSubtitle, type ItemCardSubtitleProps, ItemCardTitle, ItemCardTitleGroup, type ItemCardTitleGroupProps, type ItemCardTitleProps, Kanban, type KanbanBoardProps, type KanbanCardProps, type KanbanColumnConfig, type KanbanColumnProps, type KanbanContextValue, type KanbanDragResult, type KanbanEmptyProps, type KanbanItem, Loader, type LoaderProps, LoaderProvider, Logo, type LogoProps, type MaskType, MobileNav, type MobileNavFabAction, MobileNavItem, type MobileNavItemConfig, type MobileNavItemProps, type MobileNavProps, Navbar, NavbarCompanyProfile, type NavbarCompanyProfileProps, NavbarNotification, type NavbarNotificationProps, type NavbarProps, NavbarUserMenu, type NavbarUserMenuProps, type NotificationItem, PageHeader, type PageHeaderProps, type PaginatedResponse, type PaginationMeta, type PaginationParams, Popover, PopoverContent, PopoverTrigger, type RadioOption, type RadioOptionColor, RippleBackground, type RippleBackgroundProps, RippleEffect, type RippleEffectProps, RippleWrapper, type RippleWrapperProps, ScrollArea, ScrollBar, SectionHeader, SectionHeaderActions, type SectionHeaderActionsProps, SectionHeaderBadge, type SectionHeaderBadgeProps, SectionHeaderContent, type SectionHeaderContentProps, SectionHeaderIcon, type SectionHeaderIconProps, SectionHeaderRoot, type SectionHeaderRootProps, SectionHeaderSubtitle, type SectionHeaderSubtitleProps, SectionHeaderTitle, type SectionHeaderTitleProps, Select, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectOption, type SelectProps, SelectSeparator, SelectionLayout, type SelectionLayoutCardProps, type SelectionLayoutEmptyProps, type SelectionLayoutHeaderProps, type SelectionLayoutHeadlineProps, type SelectionLayoutListProps, type SelectionLayoutLogoProps, type SelectionLayoutMainProps, type SelectionLayoutProps, type SelectionLayoutSearchProps, type SelectionLayoutSidebarProps, type SelectionLayoutStatsProps, type SelectionLayoutTabProps, type SelectionLayoutTabsProps, Separator, Sidebar, type SidebarContextValue, type SidebarFooterMenuItem, type SidebarFooterProps, type SidebarFooterUser, type SidebarHeaderProps, type SidebarNavGroupProps, type SidebarNavItemProps, type SidebarNavProps, type SidebarProps, type SidebarSectionProps, SimpleTooltip, type SimpleTooltipProps, Skeleton, type SkeletonProps, Sparkline, type SparklineColor, StatsCard, type StatsCardChangeProps, type StatsCardChartProps, type ColorScheme as StatsCardColorScheme, type StatsCardContentProps, type StatsCardHeaderProps, type StatsCardIconProps, type StatsCardRootProps, type StatsCardSubtitleProps, type StatsCardTitleProps, type StatsCardTodayProps, type StatsCardValueProps, type Variant as StatsCardVariant, type StepState, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeProvider, ThemeToggle, type ThemeToggleProps, Toaster, type ToasterProps, Tooltip, TooltipAction, type TooltipActionProps, TooltipActions, type TooltipActionsProps, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipDescription, type TooltipDescriptionProps, TooltipHeader, type TooltipHeaderProps, TooltipIcon, type TooltipIconProps, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTitle, type TooltipTitleProps, TooltipTrigger, type UseDataTableConfig, type UserMenuItemConfig, type ValidationSchema, Wizard, WizardContent, type WizardContentProps, type WizardContextValue, WizardNavigation, type WizardNavigationProps, WizardPanel, type WizardPanelProps, WizardProgress, type WizardProgressProps, type WizardProps, WizardProvider, type WizardStepConfig, WizardStepConnector, type WizardStepConnectorProps, WizardStepIndicator, type WizardStepIndicatorProps, WizardSteps, type WizardStepsProps, cn, itemCardBadgeVariants, itemCardIconVariants, itemCardVariants, loader, toast, useDashboardLayout, useDataTable, useDataTableColumnVisibility, useDataTableDensity, useDataTableEmpty, useDataTableInstance, useDataTableLoading, useDataTableMeta, useDataTablePagination, useDataTableSelection, useDataTableSorting, useDataTableState, useDebounce, useDebouncedCallback, useFormFieldContext, useItemCard, useKanban, useKanbanOptional, useLoader, useMediaQuery, useSidebar, useSidebarOptional, useTheme, useWizardContext, useWizardContextOptional };
2736
+ export { AuthLayout, type AuthLayoutBodyProps, type AuthLayoutContentProps, type AuthLayoutDividerProps, type AuthLayoutFooterProps, type AuthLayoutHeaderProps, type AuthLayoutImageProps, type AuthLayoutLinkProps, type AuthLayoutProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, type BaseFieldProps, BigNumberCard, type BigNumberCardContentProps, type BigNumberCardHeaderProps, type BigNumberCardLinkProps, type BigNumberCardRootProps, type BigNumberCardSize, type BigNumberCardSparklineProps, type BigNumberCardTitleProps, type BigNumberCardTrendProps, type BigNumberCardValueProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type ChartDataPoint, Checkbox, type CheckboxProps, type Company, DENSITY_CONFIG, DashboardLayout, type DashboardLayoutBreadcrumbsProps, type DashboardLayoutContentProps, type DashboardLayoutContextValue, type DashboardLayoutHeaderActionsProps, type DashboardLayoutHeaderProps, type DashboardLayoutHeaderTitleProps, type DashboardLayoutHeaderUserProps, type DashboardLayoutMobileNavItemProps, type DashboardLayoutMobileNavProps, type DashboardLayoutProps, type DashboardLayoutSidebarFooterProps, type DashboardLayoutSidebarHeaderProps, type DashboardLayoutSidebarNavGroupProps, type DashboardLayoutSidebarNavItemProps, type DashboardLayoutSidebarNavProps, type DashboardLayoutSidebarProps, type DashboardLayoutSidebarSectionProps, DataTable, type DataTableBulkActionsProps, type DataTableColumnHeaderProps, type DataTableColumnVisibilityProps, type DataTableContentProps, type DataTableContextValue, type DataTableDensity, type DataTableDensityToggleProps, type DataTableEmptyStateProps, type DataTableExportFormat, type DataTableExportProps, type DataTableFilterOption, type DataTableFilterProps, type DataTableFiltersProps, type DataTableLoadingProps, type DataTableMeta, type DataTablePaginationMode, type DataTablePaginationProps, type DataTableProps, type DataTableRowActionsProps, type DataTableSearchProps, type DataTableState, type DataTableTab, type DataTableTabsProps, type DataTableToolbarProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogWrapper, type DialogWrapperProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, FloatingBarCompound as FloatingBar, FloatingBarAction, type FloatingBarActionProps, FloatingBarCounter, type FloatingBarCounterProps, FloatingBarDivider, type FloatingBarDividerProps, FloatingBarIconAction, type FloatingBarIconActionProps, type FloatingBarProps, Form, FormCheckbox, type FormCheckboxProps, type FormContextValue, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormFieldContextValue, FormFieldProvider, FormFieldWrapper, type FormFieldWrapperProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormRadioGroup, type FormRadioGroupProps, type FormRootProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, GlobalLoaderController, Input, type InputProps, ItemCard, ItemCardActionButton, type ItemCardActionButtonProps, ItemCardActions, type ItemCardActionsProps, ItemCardActionsRow, type ItemCardActionsRowProps, ItemCardBadge, type ItemCardBadgeProps, ItemCardContent, ItemCardContentItem, type ItemCardContentItemProps, type ItemCardContentProps, ItemCardEmpty, type ItemCardEmptyProps, ItemCardFooter, ItemCardFooterDivider, type ItemCardFooterDividerProps, ItemCardFooterItem, type ItemCardFooterItemProps, type ItemCardFooterProps, ItemCardHeader, type ItemCardHeaderProps, ItemCardIcon, type ItemCardIconProps, ItemCardRoot, type ItemCardRootProps, ItemCardSubtitle, type ItemCardSubtitleProps, ItemCardTitle, ItemCardTitleGroup, type ItemCardTitleGroupProps, type ItemCardTitleProps, Kanban, type KanbanBoardProps, type KanbanCardProps, type KanbanColumnConfig, type KanbanColumnProps, type KanbanContextValue, type KanbanDragResult, type KanbanEmptyProps, type KanbanItem, Loader, type LoaderProps, LoaderProvider, Logo, type LogoProps, type MaskType, MobileNav, type MobileNavFabAction, MobileNavItem, type MobileNavItemConfig, type MobileNavItemProps, type MobileNavProps, Navbar, NavbarCompanyProfile, type NavbarCompanyProfileProps, NavbarNotification, type NavbarNotificationProps, type NavbarProps, NavbarUserMenu, type NavbarUserMenuProps, type NotificationItem, PageHeader, type PageHeaderProps, type PaginatedResponse, type PaginationMeta, type PaginationParams, Popover, PopoverContent, PopoverTrigger, type RadioOption, type RadioOptionColor, RippleBackground, type RippleBackgroundProps, RippleEffect, type RippleEffectProps, RippleWrapper, type RippleWrapperProps, ScrollArea, ScrollBar, SectionHeader, SectionHeaderActions, type SectionHeaderActionsProps, SectionHeaderBadge, type SectionHeaderBadgeProps, SectionHeaderContent, type SectionHeaderContentProps, SectionHeaderIcon, type SectionHeaderIconProps, SectionHeaderRoot, type SectionHeaderRootProps, SectionHeaderSubtitle, type SectionHeaderSubtitleProps, SectionHeaderTitle, type SectionHeaderTitleProps, Select, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectOption, type SelectProps, SelectSeparator, SelectionLayout, type SelectionLayoutCardProps, type SelectionLayoutEmptyProps, type SelectionLayoutHeaderProps, type SelectionLayoutHeadlineProps, type SelectionLayoutListProps, type SelectionLayoutLogoProps, type SelectionLayoutMainProps, type SelectionLayoutProps, type SelectionLayoutSearchProps, type SelectionLayoutSidebarProps, type SelectionLayoutStatsProps, type SelectionLayoutTabProps, type SelectionLayoutTabsProps, Separator, Sidebar, type SidebarContextValue, type SidebarFooterMenuItem, type SidebarFooterProps, type SidebarFooterUser, type SidebarHeaderProps, type SidebarNavGroupProps, type SidebarNavItemProps, type SidebarNavProps, type SidebarProps, type SidebarSectionProps, SimpleTooltip, type SimpleTooltipProps, Skeleton, type SkeletonProps, Sparkline, type SparklineColor, StatsCard, type StatsCardChangeProps, type StatsCardChartProps, type ColorScheme as StatsCardColorScheme, type StatsCardContentProps, type StatsCardHeaderProps, type StatsCardIconProps, type StatsCardRootProps, type StatsCardSubtitleProps, type StatsCardTitleProps, type StatsCardTodayProps, type StatsCardValueProps, type Variant as StatsCardVariant, type StepState, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeProvider, ThemeToggle, type ThemeToggleProps, Toaster, type ToasterProps, Tooltip, TooltipAction, type TooltipActionProps, TooltipActions, type TooltipActionsProps, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipDescription, type TooltipDescriptionProps, TooltipHeader, type TooltipHeaderProps, TooltipIcon, type TooltipIconProps, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTitle, type TooltipTitleProps, TooltipTrigger, type UseDataTableConfig, type UserMenuItemConfig, type ValidationSchema, Wizard, WizardContent, type WizardContentProps, type WizardContextValue, WizardNavigation, type WizardNavigationProps, WizardPanel, type WizardPanelProps, WizardProgress, type WizardProgressProps, type WizardProps, WizardProvider, type WizardStepConfig, WizardStepConnector, type WizardStepConnectorProps, WizardStepIndicator, type WizardStepIndicatorProps, WizardSteps, type WizardStepsProps, cn, itemCardBadgeVariants, itemCardIconVariants, itemCardVariants, loader, toast, useAvailableHeight, useDashboardLayout, useDataTable, useDataTableColumnVisibility, useDataTableDensity, useDataTableEmpty, useDataTableInstance, useDataTableLoading, useDataTableMeta, useDataTablePagination, useDataTableSelection, useDataTableSorting, useDataTableState, useDebounce, useDebouncedCallback, useFormFieldContext, useItemCard, useKanban, useKanbanOptional, useLoader, useMediaQuery, useSidebar, useSidebarOptional, useTheme, useWizardContext, useWizardContextOptional };
package/dist/index.d.ts CHANGED
@@ -389,6 +389,14 @@ interface DataTableContentProps {
389
389
  highlightOnHover?: boolean;
390
390
  /** Callback quando uma row é clicada */
391
391
  onRowClick?: (row: unknown) => void;
392
+ /**
393
+ * Habilita scroll vertical com altura calculada automaticamente.
394
+ * O header das colunas fica sticky e apenas as rows fazem scroll.
395
+ * O bottomOffset controla a margem inferior (default: 16px).
396
+ */
397
+ scrollable?: boolean;
398
+ /** Margem inferior em px para o cálculo de altura automática (default: 16) */
399
+ scrollBottomOffset?: number;
392
400
  /** Custom className */
393
401
  className?: string;
394
402
  }
@@ -2669,6 +2677,40 @@ declare const StatsCard: typeof StatsCardRoot & {
2669
2677
  Today: typeof StatsCardToday;
2670
2678
  };
2671
2679
 
2680
+ interface UseAvailableHeightOptions {
2681
+ /** Bottom margin in pixels (default: 16) */
2682
+ bottomOffset?: number;
2683
+ /** Minimum height in pixels (default: 200) */
2684
+ minHeight?: number;
2685
+ /** Whether the calculation is enabled (default: true) */
2686
+ enabled?: boolean;
2687
+ }
2688
+ /**
2689
+ * Hook that calculates the available height from an element's top position
2690
+ * to the bottom of the viewport. Useful for making containers fill remaining space.
2691
+ *
2692
+ * Recalculates on window resize automatically.
2693
+ *
2694
+ * @example
2695
+ * ```tsx
2696
+ * function MyTable() {
2697
+ * const { ref, height } = useAvailableHeight({ bottomOffset: 32 })
2698
+ * return (
2699
+ * <div ref={ref} style={{ maxHeight: height }}>
2700
+ * {content}
2701
+ * </div>
2702
+ * )
2703
+ * }
2704
+ * ```
2705
+ */
2706
+ declare function useAvailableHeight<T extends HTMLElement = HTMLDivElement>(options?: UseAvailableHeightOptions): {
2707
+ ref: React$1.RefObject<T | null>;
2708
+ height: number | undefined;
2709
+ style: {
2710
+ maxHeight: string;
2711
+ } | undefined;
2712
+ };
2713
+
2672
2714
  type Theme = 'dark' | 'light' | 'system';
2673
2715
  interface ThemeProviderProps {
2674
2716
  children: React$1.ReactNode;
@@ -2691,4 +2733,4 @@ declare const useTheme: () => ThemeProviderState;
2691
2733
  */
2692
2734
  declare function cn(...inputs: ClassValue[]): string;
2693
2735
 
2694
- export { AuthLayout, type AuthLayoutBodyProps, type AuthLayoutContentProps, type AuthLayoutDividerProps, type AuthLayoutFooterProps, type AuthLayoutHeaderProps, type AuthLayoutImageProps, type AuthLayoutLinkProps, type AuthLayoutProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, type BaseFieldProps, BigNumberCard, type BigNumberCardContentProps, type BigNumberCardHeaderProps, type BigNumberCardLinkProps, type BigNumberCardRootProps, type BigNumberCardSize, type BigNumberCardSparklineProps, type BigNumberCardTitleProps, type BigNumberCardTrendProps, type BigNumberCardValueProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type ChartDataPoint, Checkbox, type CheckboxProps, type Company, DENSITY_CONFIG, DashboardLayout, type DashboardLayoutBreadcrumbsProps, type DashboardLayoutContentProps, type DashboardLayoutContextValue, type DashboardLayoutHeaderActionsProps, type DashboardLayoutHeaderProps, type DashboardLayoutHeaderTitleProps, type DashboardLayoutHeaderUserProps, type DashboardLayoutMobileNavItemProps, type DashboardLayoutMobileNavProps, type DashboardLayoutProps, type DashboardLayoutSidebarFooterProps, type DashboardLayoutSidebarHeaderProps, type DashboardLayoutSidebarNavGroupProps, type DashboardLayoutSidebarNavItemProps, type DashboardLayoutSidebarNavProps, type DashboardLayoutSidebarProps, type DashboardLayoutSidebarSectionProps, DataTable, type DataTableBulkActionsProps, type DataTableColumnHeaderProps, type DataTableColumnVisibilityProps, type DataTableContentProps, type DataTableContextValue, type DataTableDensity, type DataTableDensityToggleProps, type DataTableEmptyStateProps, type DataTableExportFormat, type DataTableExportProps, type DataTableFilterOption, type DataTableFilterProps, type DataTableFiltersProps, type DataTableLoadingProps, type DataTableMeta, type DataTablePaginationMode, type DataTablePaginationProps, type DataTableProps, type DataTableRowActionsProps, type DataTableSearchProps, type DataTableState, type DataTableTab, type DataTableTabsProps, type DataTableToolbarProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogWrapper, type DialogWrapperProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, FloatingBarCompound as FloatingBar, FloatingBarAction, type FloatingBarActionProps, FloatingBarCounter, type FloatingBarCounterProps, FloatingBarDivider, type FloatingBarDividerProps, FloatingBarIconAction, type FloatingBarIconActionProps, type FloatingBarProps, Form, FormCheckbox, type FormCheckboxProps, type FormContextValue, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormFieldContextValue, FormFieldProvider, FormFieldWrapper, type FormFieldWrapperProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormRadioGroup, type FormRadioGroupProps, type FormRootProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, GlobalLoaderController, Input, type InputProps, ItemCard, ItemCardActionButton, type ItemCardActionButtonProps, ItemCardActions, type ItemCardActionsProps, ItemCardActionsRow, type ItemCardActionsRowProps, ItemCardBadge, type ItemCardBadgeProps, ItemCardContent, ItemCardContentItem, type ItemCardContentItemProps, type ItemCardContentProps, ItemCardEmpty, type ItemCardEmptyProps, ItemCardFooter, ItemCardFooterDivider, type ItemCardFooterDividerProps, ItemCardFooterItem, type ItemCardFooterItemProps, type ItemCardFooterProps, ItemCardHeader, type ItemCardHeaderProps, ItemCardIcon, type ItemCardIconProps, ItemCardRoot, type ItemCardRootProps, ItemCardSubtitle, type ItemCardSubtitleProps, ItemCardTitle, ItemCardTitleGroup, type ItemCardTitleGroupProps, type ItemCardTitleProps, Kanban, type KanbanBoardProps, type KanbanCardProps, type KanbanColumnConfig, type KanbanColumnProps, type KanbanContextValue, type KanbanDragResult, type KanbanEmptyProps, type KanbanItem, Loader, type LoaderProps, LoaderProvider, Logo, type LogoProps, type MaskType, MobileNav, type MobileNavFabAction, MobileNavItem, type MobileNavItemConfig, type MobileNavItemProps, type MobileNavProps, Navbar, NavbarCompanyProfile, type NavbarCompanyProfileProps, NavbarNotification, type NavbarNotificationProps, type NavbarProps, NavbarUserMenu, type NavbarUserMenuProps, type NotificationItem, PageHeader, type PageHeaderProps, type PaginatedResponse, type PaginationMeta, type PaginationParams, Popover, PopoverContent, PopoverTrigger, type RadioOption, type RadioOptionColor, RippleBackground, type RippleBackgroundProps, RippleEffect, type RippleEffectProps, RippleWrapper, type RippleWrapperProps, ScrollArea, ScrollBar, SectionHeader, SectionHeaderActions, type SectionHeaderActionsProps, SectionHeaderBadge, type SectionHeaderBadgeProps, SectionHeaderContent, type SectionHeaderContentProps, SectionHeaderIcon, type SectionHeaderIconProps, SectionHeaderRoot, type SectionHeaderRootProps, SectionHeaderSubtitle, type SectionHeaderSubtitleProps, SectionHeaderTitle, type SectionHeaderTitleProps, Select, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectOption, type SelectProps, SelectSeparator, SelectionLayout, type SelectionLayoutCardProps, type SelectionLayoutEmptyProps, type SelectionLayoutHeaderProps, type SelectionLayoutHeadlineProps, type SelectionLayoutListProps, type SelectionLayoutLogoProps, type SelectionLayoutMainProps, type SelectionLayoutProps, type SelectionLayoutSearchProps, type SelectionLayoutSidebarProps, type SelectionLayoutStatsProps, type SelectionLayoutTabProps, type SelectionLayoutTabsProps, Separator, Sidebar, type SidebarContextValue, type SidebarFooterMenuItem, type SidebarFooterProps, type SidebarFooterUser, type SidebarHeaderProps, type SidebarNavGroupProps, type SidebarNavItemProps, type SidebarNavProps, type SidebarProps, type SidebarSectionProps, SimpleTooltip, type SimpleTooltipProps, Skeleton, type SkeletonProps, Sparkline, type SparklineColor, StatsCard, type StatsCardChangeProps, type StatsCardChartProps, type ColorScheme as StatsCardColorScheme, type StatsCardContentProps, type StatsCardHeaderProps, type StatsCardIconProps, type StatsCardRootProps, type StatsCardSubtitleProps, type StatsCardTitleProps, type StatsCardTodayProps, type StatsCardValueProps, type Variant as StatsCardVariant, type StepState, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeProvider, ThemeToggle, type ThemeToggleProps, Toaster, type ToasterProps, Tooltip, TooltipAction, type TooltipActionProps, TooltipActions, type TooltipActionsProps, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipDescription, type TooltipDescriptionProps, TooltipHeader, type TooltipHeaderProps, TooltipIcon, type TooltipIconProps, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTitle, type TooltipTitleProps, TooltipTrigger, type UseDataTableConfig, type UserMenuItemConfig, type ValidationSchema, Wizard, WizardContent, type WizardContentProps, type WizardContextValue, WizardNavigation, type WizardNavigationProps, WizardPanel, type WizardPanelProps, WizardProgress, type WizardProgressProps, type WizardProps, WizardProvider, type WizardStepConfig, WizardStepConnector, type WizardStepConnectorProps, WizardStepIndicator, type WizardStepIndicatorProps, WizardSteps, type WizardStepsProps, cn, itemCardBadgeVariants, itemCardIconVariants, itemCardVariants, loader, toast, useDashboardLayout, useDataTable, useDataTableColumnVisibility, useDataTableDensity, useDataTableEmpty, useDataTableInstance, useDataTableLoading, useDataTableMeta, useDataTablePagination, useDataTableSelection, useDataTableSorting, useDataTableState, useDebounce, useDebouncedCallback, useFormFieldContext, useItemCard, useKanban, useKanbanOptional, useLoader, useMediaQuery, useSidebar, useSidebarOptional, useTheme, useWizardContext, useWizardContextOptional };
2736
+ export { AuthLayout, type AuthLayoutBodyProps, type AuthLayoutContentProps, type AuthLayoutDividerProps, type AuthLayoutFooterProps, type AuthLayoutHeaderProps, type AuthLayoutImageProps, type AuthLayoutLinkProps, type AuthLayoutProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, type BadgeVariant, type BaseFieldProps, BigNumberCard, type BigNumberCardContentProps, type BigNumberCardHeaderProps, type BigNumberCardLinkProps, type BigNumberCardRootProps, type BigNumberCardSize, type BigNumberCardSparklineProps, type BigNumberCardTitleProps, type BigNumberCardTrendProps, type BigNumberCardValueProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type ChartDataPoint, Checkbox, type CheckboxProps, type Company, DENSITY_CONFIG, DashboardLayout, type DashboardLayoutBreadcrumbsProps, type DashboardLayoutContentProps, type DashboardLayoutContextValue, type DashboardLayoutHeaderActionsProps, type DashboardLayoutHeaderProps, type DashboardLayoutHeaderTitleProps, type DashboardLayoutHeaderUserProps, type DashboardLayoutMobileNavItemProps, type DashboardLayoutMobileNavProps, type DashboardLayoutProps, type DashboardLayoutSidebarFooterProps, type DashboardLayoutSidebarHeaderProps, type DashboardLayoutSidebarNavGroupProps, type DashboardLayoutSidebarNavItemProps, type DashboardLayoutSidebarNavProps, type DashboardLayoutSidebarProps, type DashboardLayoutSidebarSectionProps, DataTable, type DataTableBulkActionsProps, type DataTableColumnHeaderProps, type DataTableColumnVisibilityProps, type DataTableContentProps, type DataTableContextValue, type DataTableDensity, type DataTableDensityToggleProps, type DataTableEmptyStateProps, type DataTableExportFormat, type DataTableExportProps, type DataTableFilterOption, type DataTableFilterProps, type DataTableFiltersProps, type DataTableLoadingProps, type DataTableMeta, type DataTablePaginationMode, type DataTablePaginationProps, type DataTableProps, type DataTableRowActionsProps, type DataTableSearchProps, type DataTableState, type DataTableTab, type DataTableTabsProps, type DataTableToolbarProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogWrapper, type DialogWrapperProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, FloatingBarCompound as FloatingBar, FloatingBarAction, type FloatingBarActionProps, FloatingBarCounter, type FloatingBarCounterProps, FloatingBarDivider, type FloatingBarDividerProps, FloatingBarIconAction, type FloatingBarIconActionProps, type FloatingBarProps, Form, FormCheckbox, type FormCheckboxProps, type FormContextValue, FormDescription, type FormDescriptionProps, FormError, type FormErrorProps, type FormFieldContextValue, FormFieldProvider, FormFieldWrapper, type FormFieldWrapperProps, FormInput, type FormInputProps, FormLabel, type FormLabelProps, FormRadioGroup, type FormRadioGroupProps, type FormRootProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, FormTextarea, type FormTextareaProps, GlobalLoaderController, Input, type InputProps, ItemCard, ItemCardActionButton, type ItemCardActionButtonProps, ItemCardActions, type ItemCardActionsProps, ItemCardActionsRow, type ItemCardActionsRowProps, ItemCardBadge, type ItemCardBadgeProps, ItemCardContent, ItemCardContentItem, type ItemCardContentItemProps, type ItemCardContentProps, ItemCardEmpty, type ItemCardEmptyProps, ItemCardFooter, ItemCardFooterDivider, type ItemCardFooterDividerProps, ItemCardFooterItem, type ItemCardFooterItemProps, type ItemCardFooterProps, ItemCardHeader, type ItemCardHeaderProps, ItemCardIcon, type ItemCardIconProps, ItemCardRoot, type ItemCardRootProps, ItemCardSubtitle, type ItemCardSubtitleProps, ItemCardTitle, ItemCardTitleGroup, type ItemCardTitleGroupProps, type ItemCardTitleProps, Kanban, type KanbanBoardProps, type KanbanCardProps, type KanbanColumnConfig, type KanbanColumnProps, type KanbanContextValue, type KanbanDragResult, type KanbanEmptyProps, type KanbanItem, Loader, type LoaderProps, LoaderProvider, Logo, type LogoProps, type MaskType, MobileNav, type MobileNavFabAction, MobileNavItem, type MobileNavItemConfig, type MobileNavItemProps, type MobileNavProps, Navbar, NavbarCompanyProfile, type NavbarCompanyProfileProps, NavbarNotification, type NavbarNotificationProps, type NavbarProps, NavbarUserMenu, type NavbarUserMenuProps, type NotificationItem, PageHeader, type PageHeaderProps, type PaginatedResponse, type PaginationMeta, type PaginationParams, Popover, PopoverContent, PopoverTrigger, type RadioOption, type RadioOptionColor, RippleBackground, type RippleBackgroundProps, RippleEffect, type RippleEffectProps, RippleWrapper, type RippleWrapperProps, ScrollArea, ScrollBar, SectionHeader, SectionHeaderActions, type SectionHeaderActionsProps, SectionHeaderBadge, type SectionHeaderBadgeProps, SectionHeaderContent, type SectionHeaderContentProps, SectionHeaderIcon, type SectionHeaderIconProps, SectionHeaderRoot, type SectionHeaderRootProps, SectionHeaderSubtitle, type SectionHeaderSubtitleProps, SectionHeaderTitle, type SectionHeaderTitleProps, Select, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectOption, type SelectProps, SelectSeparator, SelectionLayout, type SelectionLayoutCardProps, type SelectionLayoutEmptyProps, type SelectionLayoutHeaderProps, type SelectionLayoutHeadlineProps, type SelectionLayoutListProps, type SelectionLayoutLogoProps, type SelectionLayoutMainProps, type SelectionLayoutProps, type SelectionLayoutSearchProps, type SelectionLayoutSidebarProps, type SelectionLayoutStatsProps, type SelectionLayoutTabProps, type SelectionLayoutTabsProps, Separator, Sidebar, type SidebarContextValue, type SidebarFooterMenuItem, type SidebarFooterProps, type SidebarFooterUser, type SidebarHeaderProps, type SidebarNavGroupProps, type SidebarNavItemProps, type SidebarNavProps, type SidebarProps, type SidebarSectionProps, SimpleTooltip, type SimpleTooltipProps, Skeleton, type SkeletonProps, Sparkline, type SparklineColor, StatsCard, type StatsCardChangeProps, type StatsCardChartProps, type ColorScheme as StatsCardColorScheme, type StatsCardContentProps, type StatsCardHeaderProps, type StatsCardIconProps, type StatsCardRootProps, type StatsCardSubtitleProps, type StatsCardTitleProps, type StatsCardTodayProps, type StatsCardValueProps, type Variant as StatsCardVariant, type StepState, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, ThemeProvider, ThemeToggle, type ThemeToggleProps, Toaster, type ToasterProps, Tooltip, TooltipAction, type TooltipActionProps, TooltipActions, type TooltipActionsProps, TooltipArrow, TooltipContent, type TooltipContentProps, TooltipDescription, type TooltipDescriptionProps, TooltipHeader, type TooltipHeaderProps, TooltipIcon, type TooltipIconProps, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTitle, type TooltipTitleProps, TooltipTrigger, type UseDataTableConfig, type UserMenuItemConfig, type ValidationSchema, Wizard, WizardContent, type WizardContentProps, type WizardContextValue, WizardNavigation, type WizardNavigationProps, WizardPanel, type WizardPanelProps, WizardProgress, type WizardProgressProps, type WizardProps, WizardProvider, type WizardStepConfig, WizardStepConnector, type WizardStepConnectorProps, WizardStepIndicator, type WizardStepIndicatorProps, WizardSteps, type WizardStepsProps, cn, itemCardBadgeVariants, itemCardIconVariants, itemCardVariants, loader, toast, useAvailableHeight, useDashboardLayout, useDataTable, useDataTableColumnVisibility, useDataTableDensity, useDataTableEmpty, useDataTableInstance, useDataTableLoading, useDataTableMeta, useDataTablePagination, useDataTableSelection, useDataTableSorting, useDataTableState, useDebounce, useDebouncedCallback, useFormFieldContext, useItemCard, useKanban, useKanbanOptional, useLoader, useMediaQuery, useSidebar, useSidebarOptional, useTheme, useWizardContext, useWizardContextOptional };
package/dist/index.js CHANGED
@@ -1423,6 +1423,32 @@ var DENSITY_CONFIG = {
1423
1423
  padding: "py-3 px-4"
1424
1424
  }
1425
1425
  };
1426
+ function useAvailableHeight(options = {}) {
1427
+ const { bottomOffset = 16, minHeight = 200, enabled = true } = options;
1428
+ const ref = React10.useRef(null);
1429
+ const [height, setHeight] = React10.useState(void 0);
1430
+ const calculate = React10.useCallback(() => {
1431
+ const el = ref.current;
1432
+ if (!el || !enabled) return;
1433
+ const rect = el.getBoundingClientRect();
1434
+ const available = window.innerHeight - rect.top - bottomOffset;
1435
+ setHeight(Math.max(minHeight, Math.round(available)));
1436
+ }, [bottomOffset, minHeight, enabled]);
1437
+ React10.useEffect(() => {
1438
+ if (!enabled) return;
1439
+ const frame = requestAnimationFrame(calculate);
1440
+ window.addEventListener("resize", calculate);
1441
+ return () => {
1442
+ cancelAnimationFrame(frame);
1443
+ window.removeEventListener("resize", calculate);
1444
+ };
1445
+ }, [calculate, enabled]);
1446
+ return {
1447
+ ref,
1448
+ height,
1449
+ style: height ? { maxHeight: `${height}px` } : void 0
1450
+ };
1451
+ }
1426
1452
  var Table = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
1427
1453
  "table",
1428
1454
  {
@@ -1506,6 +1532,8 @@ var DataTableContent = React10__namespace.memo(function DataTableContent2({
1506
1532
  stripedRows = false,
1507
1533
  highlightOnHover = true,
1508
1534
  onRowClick,
1535
+ scrollable = false,
1536
+ scrollBottomOffset = 16,
1509
1537
  className
1510
1538
  }) {
1511
1539
  const table = useDataTable();
@@ -1513,10 +1541,15 @@ var DataTableContent = React10__namespace.memo(function DataTableContent2({
1513
1541
  const { density } = useDataTableDensity();
1514
1542
  const { config: emptyStateConfig } = useDataTableEmptyStateConfig();
1515
1543
  const { isLoading, skeletonRows } = useDataTableLoadingState();
1544
+ const { ref, style: scrollStyle } = useAvailableHeight({
1545
+ bottomOffset: scrollBottomOffset,
1546
+ enabled: scrollable
1547
+ });
1516
1548
  const densityStyles = DENSITY_CONFIG[density];
1517
1549
  const cellClasses = cn(densityStyles.padding, densityStyles.fontSize);
1518
1550
  const columnCount = table.getVisibleLeafColumns().length;
1519
1551
  const hasRows = table.getRowModel().rows?.length > 0;
1552
+ const effectiveStickyHeader = stickyHeader || scrollable;
1520
1553
  if (!hasRows && isEmpty && !isLoading) {
1521
1554
  return /* @__PURE__ */ jsxRuntime.jsx(
1522
1555
  EmptyState,
@@ -1528,34 +1561,50 @@ var DataTableContent = React10__namespace.memo(function DataTableContent2({
1528
1561
  }
1529
1562
  );
1530
1563
  }
1531
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("rounded-md overflow-auto bg-card", className), children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
1532
- /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { className: cn(stickyHeader && "sticky top-0 z-10 bg-background"), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsxRuntime.jsx(
1533
- TableHead,
1534
- {
1535
- className: cn(cellClasses, "font-medium"),
1536
- style: { width: header.getSize() !== 150 ? header.getSize() : void 0 },
1537
- children: header.isPlaceholder ? null : reactTable.flexRender(
1538
- header.column.columnDef.header,
1539
- header.getContext()
1540
- )
1541
- },
1542
- header.id
1543
- )) }, headerGroup.id)) }),
1544
- /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: isLoading ? Array.from({ length: skeletonRows }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(TableRow, { className: "animate-pulse", children: Array.from({ length: columnCount || 4 }).map((_2, colIndex) => /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: cellClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded w-3/4" }) }, colIndex)) }, `skeleton-${index}`)) : table.getRowModel().rows.map((row, index) => /* @__PURE__ */ jsxRuntime.jsx(
1545
- TableRow,
1546
- {
1547
- "data-state": row.getIsSelected() && "selected",
1548
- className: cn(
1549
- highlightOnHover && "hover:bg-muted/50",
1550
- stripedRows && index % 2 === 1 && "bg-muted/30",
1551
- onRowClick && "cursor-pointer"
1564
+ return /* @__PURE__ */ jsxRuntime.jsx(
1565
+ "div",
1566
+ {
1567
+ ref,
1568
+ className: cn("rounded-md overflow-auto bg-card", className),
1569
+ style: scrollStyle,
1570
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
1571
+ /* @__PURE__ */ jsxRuntime.jsx(
1572
+ TableHeader,
1573
+ {
1574
+ className: cn(
1575
+ effectiveStickyHeader && "sticky top-0 z-10 bg-background shadow-[0_1px_0_0_hsl(var(--border))]"
1576
+ ),
1577
+ children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxRuntime.jsx(TableRow, { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsxRuntime.jsx(
1578
+ TableHead,
1579
+ {
1580
+ className: cn(cellClasses, "font-medium"),
1581
+ style: { width: header.getSize() !== 150 ? header.getSize() : void 0 },
1582
+ children: header.isPlaceholder ? null : reactTable.flexRender(
1583
+ header.column.columnDef.header,
1584
+ header.getContext()
1585
+ )
1586
+ },
1587
+ header.id
1588
+ )) }, headerGroup.id))
1589
+ }
1552
1590
  ),
1553
- onClick: onRowClick ? () => onRowClick(row) : void 0,
1554
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: cellClasses, children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
1555
- },
1556
- row.id
1557
- )) })
1558
- ] }) });
1591
+ /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: isLoading ? Array.from({ length: skeletonRows }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(TableRow, { className: "animate-pulse", children: Array.from({ length: columnCount || 4 }).map((_2, colIndex) => /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: cellClasses, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 bg-muted rounded w-3/4" }) }, colIndex)) }, `skeleton-${index}`)) : table.getRowModel().rows.map((row, index) => /* @__PURE__ */ jsxRuntime.jsx(
1592
+ TableRow,
1593
+ {
1594
+ "data-state": row.getIsSelected() && "selected",
1595
+ className: cn(
1596
+ highlightOnHover && "hover:bg-muted/50",
1597
+ stripedRows && index % 2 === 1 && "bg-muted/30",
1598
+ onRowClick && "cursor-pointer"
1599
+ ),
1600
+ onClick: onRowClick ? () => onRowClick(row) : void 0,
1601
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: cellClasses, children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
1602
+ },
1603
+ row.id
1604
+ )) })
1605
+ ] })
1606
+ }
1607
+ );
1559
1608
  });
1560
1609
  DataTableContent.displayName = "DataTable.Content";
1561
1610
  var DataTableToolbar = React10__namespace.memo(function DataTableToolbar2({
@@ -8686,6 +8735,7 @@ exports.itemCardIconVariants = itemCardIconVariants;
8686
8735
  exports.itemCardVariants = itemCardVariants;
8687
8736
  exports.loader = loader;
8688
8737
  exports.toast = toast;
8738
+ exports.useAvailableHeight = useAvailableHeight;
8689
8739
  exports.useDashboardLayout = useDashboardLayout;
8690
8740
  exports.useDataTable = useDataTable;
8691
8741
  exports.useDataTableColumnVisibility = useDataTableColumnVisibility;