@optilogic/core 1.0.0-beta.7 → 1.0.0-beta.9

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.cts CHANGED
@@ -118,7 +118,7 @@ declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$
118
118
  * Badge variant styles using class-variance-authority.
119
119
  */
120
120
  declare const badgeVariants: (props?: ({
121
- variant?: "default" | "destructive" | "outline" | "secondary" | "muted" | "success" | "warning" | "accent" | null | undefined;
121
+ variant?: "default" | "destructive" | "outline" | "secondary" | "success" | "warning" | "muted" | "accent" | null | undefined;
122
122
  } & class_variance_authority_types.ClassProp) | undefined) => string;
123
123
  interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
124
124
  }
@@ -515,7 +515,7 @@ declare const AlertDialogCancel: React$1.ForwardRefExoticComponent<Omit<AlertDia
515
515
  */
516
516
  declare const cardVariants: (props?: ({
517
517
  size?: "sm" | "lg" | "auto" | "md" | "xl" | "full" | null | undefined;
518
- hover?: "none" | "scale" | "border" | "lift" | "glow" | "border-success" | "border-warning" | "border-destructive" | "border-muted" | null | undefined;
518
+ hover?: "none" | "scale" | "lift" | "glow" | "border" | "border-success" | "border-warning" | "border-destructive" | "border-muted" | null | undefined;
519
519
  interactive?: boolean | null | undefined;
520
520
  padding?: "sm" | "lg" | "none" | "md" | null | undefined;
521
521
  } & class_variance_authority_types.ClassProp) | undefined) => string;
@@ -584,7 +584,7 @@ interface CardFooterProps extends React$1.HTMLAttributes<HTMLDivElement> {
584
584
  */
585
585
  declare const CardFooter: React$1.ForwardRefExoticComponent<CardFooterProps & React$1.RefAttributes<HTMLDivElement>>;
586
586
  declare const cardImageVariants: (props?: ({
587
- aspectRatio?: "video" | "auto" | "square" | "wide" | "portrait" | null | undefined;
587
+ aspectRatio?: "auto" | "video" | "square" | "wide" | "portrait" | null | undefined;
588
588
  position?: "fill" | "top" | "bottom" | null | undefined;
589
589
  } & class_variance_authority_types.ClassProp) | undefined) => string;
590
590
  interface CardImageProps extends React$1.ImgHTMLAttributes<HTMLImageElement>, VariantProps<typeof cardImageVariants> {
@@ -694,7 +694,7 @@ interface SelectableCardProps extends CardProps {
694
694
  */
695
695
  declare const SelectableCard: React$1.ForwardRefExoticComponent<SelectableCardProps & React$1.RefAttributes<HTMLDivElement>>;
696
696
  declare const cardGridVariants: (props?: ({
697
- columns?: 1 | 2 | 3 | 4 | "auto" | null | undefined;
697
+ columns?: 1 | "auto" | 2 | 3 | 4 | null | undefined;
698
698
  gap?: "sm" | "lg" | "none" | "md" | "xl" | null | undefined;
699
699
  } & class_variance_authority_types.ClassProp) | undefined) => string;
700
700
  interface CardGridProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardGridVariants> {
@@ -858,6 +858,110 @@ interface TableCaptionProps extends React$1.HTMLAttributes<HTMLTableCaptionEleme
858
858
  }
859
859
  declare const TableCaption: React$1.ForwardRefExoticComponent<TableCaptionProps & React$1.RefAttributes<HTMLTableCaptionElement>>;
860
860
 
861
+ /**
862
+ * Column definition for the DataTable.
863
+ */
864
+ interface DataTableColumn<T> {
865
+ /** Unique key identifying this column */
866
+ key: string;
867
+ /** Header label (string or ReactNode) */
868
+ header: string | React$1.ReactNode;
869
+ /**
870
+ * Custom cell renderer. When omitted the table renders
871
+ * `String(accessor(row))` or `String(row[key])`.
872
+ */
873
+ cell?: (row: T, rowIndex: number) => React$1.ReactNode;
874
+ /** Accessor function to pull the raw value from a row (used for sorting & default rendering) */
875
+ accessor?: (row: T) => string | number | boolean | null | undefined;
876
+ /** Whether this column is sortable (default false) */
877
+ sortable?: boolean;
878
+ /** Custom sort comparator. Receives two rows, return negative / 0 / positive. */
879
+ sortFn?: (a: T, b: T) => number;
880
+ /** Text alignment */
881
+ align?: "left" | "center" | "right";
882
+ /** Extra class name applied to every `<td>` in this column */
883
+ className?: string;
884
+ /** Extra class name applied to the `<th>` for this column */
885
+ headerClassName?: string;
886
+ /** Tailwind width class or inline width, e.g. "w-[100px]" */
887
+ width?: string;
888
+ }
889
+ /** Sort descriptor */
890
+ interface DataTableSort {
891
+ /** Column key */
892
+ key: string;
893
+ /** Direction */
894
+ direction: "asc" | "desc";
895
+ }
896
+ /**
897
+ * Props for the DataTable component.
898
+ */
899
+ interface DataTableProps<T> {
900
+ /** Array of row data */
901
+ data: T[];
902
+ /** Column definitions */
903
+ columns: DataTableColumn<T>[];
904
+ /** Return a stable unique key for each row */
905
+ getRowKey: (row: T, index: number) => string;
906
+ /** Default sort (uncontrolled) */
907
+ defaultSort?: DataTableSort;
908
+ /** Controlled sort */
909
+ sort?: DataTableSort | null;
910
+ /** Called when sort changes (controlled) */
911
+ onSortChange?: (sort: DataTableSort | null) => void;
912
+ /**
913
+ * Enable the search bar. Pass `true` for defaults or a config object.
914
+ * Search is always controlled by the consumer via `searchValue` /
915
+ * `onSearchChange`, or managed internally when omitted.
916
+ */
917
+ searchable?: boolean;
918
+ /** Placeholder text for the search input */
919
+ searchPlaceholder?: string;
920
+ /** Controlled search value */
921
+ searchValue?: string;
922
+ /** Called when the search value changes */
923
+ onSearchChange?: (value: string) => void;
924
+ /** Custom search predicate. When omitted, a case-insensitive substring
925
+ * match across all columns (using accessor / row[key]) is used. */
926
+ searchFn?: (row: T, query: string) => boolean;
927
+ /** Pass a number to enable pagination with that default page size */
928
+ pageSize?: number;
929
+ /** Options shown in the rows-per-page selector */
930
+ pageSizeOptions?: number[];
931
+ /** Controlled current page (0-indexed) */
932
+ currentPage?: number;
933
+ /** Called when page changes */
934
+ onPageChange?: (page: number) => void;
935
+ /** Called when page size changes */
936
+ onPageSizeChange?: (size: number) => void;
937
+ /** Enable selection mode: "checkbox" adds a checkbox column, "highlight" selects on row click */
938
+ selectable?: "checkbox" | "highlight";
939
+ /** Currently selected row keys */
940
+ selectedRows?: string[];
941
+ /** Called when selection changes */
942
+ onSelectedRowsChange?: (keys: string[]) => void;
943
+ /** Called when a row is clicked (independent of selection) */
944
+ onRowClick?: (row: T, index: number) => void;
945
+ /** Dynamic row class name */
946
+ rowClassName?: (row: T, index: number) => string;
947
+ /** Row keys that should be pinned to the top */
948
+ pinnedRows?: string[];
949
+ /** Custom toolbar rendered between search bar and table */
950
+ toolbar?: React$1.ReactNode;
951
+ /** Custom empty state */
952
+ emptyState?: React$1.ReactNode;
953
+ /** Table caption */
954
+ caption?: string;
955
+ /** Show loading state */
956
+ loading?: boolean;
957
+ /** Class name for the outermost wrapper */
958
+ className?: string;
959
+ }
960
+ declare function DataTable<T>({ data, columns, getRowKey, defaultSort, sort: controlledSort, onSortChange, searchable, searchPlaceholder, searchValue: controlledSearchValue, onSearchChange, searchFn, pageSize: defaultPageSize, pageSizeOptions, currentPage: controlledPage, onPageChange, onPageSizeChange, selectable, selectedRows: controlledSelectedRows, onSelectedRowsChange, onRowClick, rowClassName, pinnedRows, toolbar, emptyState, caption, loading, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
961
+ declare namespace DataTable {
962
+ var displayName: string;
963
+ }
964
+
861
965
  interface ModalProps {
862
966
  /**
863
967
  * Whether the modal is open
@@ -2609,4 +2713,4 @@ type SortingConfig = {
2609
2713
  onSort: (field: string) => void;
2610
2714
  };
2611
2715
 
2612
- export { ALL_THEMES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, type AutocompleteOption, type AutocompleteProps, Badge, type BadgeProps, Board, BoardContent, type BoardContentProps, BoardHeader, type BoardHeaderProps, type BoardProps, Button, type ButtonProps, CYBERPUNK_THEME, Calendar, type CalendarProps, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardGrid, type CardGridProps, CardHeader, type CardHeaderProps, CardImage, type CardImageProps, CardList, type CardListProps, type CardProps, CardTitle, type CardTitleProps, type CellEditEvent, CellEditor, type CellEditorProps$1 as CellEditorProps, type CellPosition, Checkbox, type CheckboxProps, Chip, type ChipProps, type ColorFieldConfig, type ColumnDef, ConfirmationModal, type ConfirmationModalProps, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, DARK_ELEGANT_THEME, DataGrid, type DataGridContextValue, type DataGridInternalState, type DataGridProps, type DataGridState, type DateFilterOperator, DatePicker, DatePickerInput, type DatePickerInputProps, type DatePickerProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type EditingCell, type EditorType, FOREST_THEME, FUTURISTIC_THEME, type FilterConfig, type FilterOperator, FilterPopover, type FilterPopoverProps$1 as FilterPopoverProps, type FilterType, GREEN_THEME, type GridCellProps, HeaderCell, type HeaderCellProps$1 as HeaderCellProps, IconButton, type IconButtonProps, Input, type InputProps, Label, type LabelProps, LoadingSpinner, type LoadingSpinnerProps, MINIMALIST_LIGHT_THEME, Modal, ModalButton, type ModalButtonProps, type ModalProps, NATURE_THEME, type NumberFilterOperator, OCEAN_THEME, OPTILOGIC_LEGACY_THEME, PRESET_THEMES, type PaginationConfig, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, Progress, type ProgressProps, ResizablePanel, type ResizablePanelProps, ResizeHandle, type ResizeHandleProps, SCIFI_THEME, SUNSET_THEME, type SearchConfig, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, SelectableCard, type SelectableCardProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SortConfig, type SortingConfig, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, type TextFilterOperator, Textarea, type TextareaProps, type Theme, type ThemeHSL, type ThemeHex, ThemePicker, type ThemePickerProps, Toaster, type ToasterProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UseContextMenuResult, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, applyFilterOperator, applyFilters, applySorting, applyTheme, areThemesEqual, badgeVariants, boardVariants, buttonVariants, cardActionsVariants, cardGridVariants, cardImageVariants, cardListVariants, cardVariants, cloneTheme, cn, exportTheme, getCellValue, getCurrentTheme, getDefaultTheme, getPresetTheme, hexToHsl, iconButtonVariants, importTheme, isPresetTheme, labelVariants, loadingSpinnerVariants, themeToHsl, useColumnResize, useColumnResizeManager, useConfirmation, useContextMenu, useDataGridState, useKeyboardNavigation, validateTheme };
2716
+ export { ALL_THEMES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, type AutocompleteOption, type AutocompleteProps, Badge, type BadgeProps, Board, BoardContent, type BoardContentProps, BoardHeader, type BoardHeaderProps, type BoardProps, Button, type ButtonProps, CYBERPUNK_THEME, Calendar, type CalendarProps, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardGrid, type CardGridProps, CardHeader, type CardHeaderProps, CardImage, type CardImageProps, CardList, type CardListProps, type CardProps, CardTitle, type CardTitleProps, type CellEditEvent, CellEditor, type CellEditorProps$1 as CellEditorProps, type CellPosition, Checkbox, type CheckboxProps, Chip, type ChipProps, type ColorFieldConfig, type ColumnDef, ConfirmationModal, type ConfirmationModalProps, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, DARK_ELEGANT_THEME, DataGrid, type DataGridContextValue, type DataGridInternalState, type DataGridProps, type DataGridState, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, type DateFilterOperator, DatePicker, DatePickerInput, type DatePickerInputProps, type DatePickerProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type EditingCell, type EditorType, FOREST_THEME, FUTURISTIC_THEME, type FilterConfig, type FilterOperator, FilterPopover, type FilterPopoverProps$1 as FilterPopoverProps, type FilterType, GREEN_THEME, type GridCellProps, HeaderCell, type HeaderCellProps$1 as HeaderCellProps, IconButton, type IconButtonProps, Input, type InputProps, Label, type LabelProps, LoadingSpinner, type LoadingSpinnerProps, MINIMALIST_LIGHT_THEME, Modal, ModalButton, type ModalButtonProps, type ModalProps, NATURE_THEME, type NumberFilterOperator, OCEAN_THEME, OPTILOGIC_LEGACY_THEME, PRESET_THEMES, type PaginationConfig, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, Progress, type ProgressProps, ResizablePanel, type ResizablePanelProps, ResizeHandle, type ResizeHandleProps, SCIFI_THEME, SUNSET_THEME, type SearchConfig, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, SelectableCard, type SelectableCardProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SortConfig, type SortingConfig, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, type TextFilterOperator, Textarea, type TextareaProps, type Theme, type ThemeHSL, type ThemeHex, ThemePicker, type ThemePickerProps, Toaster, type ToasterProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UseContextMenuResult, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, applyFilterOperator, applyFilters, applySorting, applyTheme, areThemesEqual, badgeVariants, boardVariants, buttonVariants, cardActionsVariants, cardGridVariants, cardImageVariants, cardListVariants, cardVariants, cloneTheme, cn, exportTheme, getCellValue, getCurrentTheme, getDefaultTheme, getPresetTheme, hexToHsl, iconButtonVariants, importTheme, isPresetTheme, labelVariants, loadingSpinnerVariants, themeToHsl, useColumnResize, useColumnResizeManager, useConfirmation, useContextMenu, useDataGridState, useKeyboardNavigation, validateTheme };
package/dist/index.d.ts CHANGED
@@ -118,7 +118,7 @@ declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$
118
118
  * Badge variant styles using class-variance-authority.
119
119
  */
120
120
  declare const badgeVariants: (props?: ({
121
- variant?: "default" | "destructive" | "outline" | "secondary" | "muted" | "success" | "warning" | "accent" | null | undefined;
121
+ variant?: "default" | "destructive" | "outline" | "secondary" | "success" | "warning" | "muted" | "accent" | null | undefined;
122
122
  } & class_variance_authority_types.ClassProp) | undefined) => string;
123
123
  interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
124
124
  }
@@ -515,7 +515,7 @@ declare const AlertDialogCancel: React$1.ForwardRefExoticComponent<Omit<AlertDia
515
515
  */
516
516
  declare const cardVariants: (props?: ({
517
517
  size?: "sm" | "lg" | "auto" | "md" | "xl" | "full" | null | undefined;
518
- hover?: "none" | "scale" | "border" | "lift" | "glow" | "border-success" | "border-warning" | "border-destructive" | "border-muted" | null | undefined;
518
+ hover?: "none" | "scale" | "lift" | "glow" | "border" | "border-success" | "border-warning" | "border-destructive" | "border-muted" | null | undefined;
519
519
  interactive?: boolean | null | undefined;
520
520
  padding?: "sm" | "lg" | "none" | "md" | null | undefined;
521
521
  } & class_variance_authority_types.ClassProp) | undefined) => string;
@@ -584,7 +584,7 @@ interface CardFooterProps extends React$1.HTMLAttributes<HTMLDivElement> {
584
584
  */
585
585
  declare const CardFooter: React$1.ForwardRefExoticComponent<CardFooterProps & React$1.RefAttributes<HTMLDivElement>>;
586
586
  declare const cardImageVariants: (props?: ({
587
- aspectRatio?: "video" | "auto" | "square" | "wide" | "portrait" | null | undefined;
587
+ aspectRatio?: "auto" | "video" | "square" | "wide" | "portrait" | null | undefined;
588
588
  position?: "fill" | "top" | "bottom" | null | undefined;
589
589
  } & class_variance_authority_types.ClassProp) | undefined) => string;
590
590
  interface CardImageProps extends React$1.ImgHTMLAttributes<HTMLImageElement>, VariantProps<typeof cardImageVariants> {
@@ -694,7 +694,7 @@ interface SelectableCardProps extends CardProps {
694
694
  */
695
695
  declare const SelectableCard: React$1.ForwardRefExoticComponent<SelectableCardProps & React$1.RefAttributes<HTMLDivElement>>;
696
696
  declare const cardGridVariants: (props?: ({
697
- columns?: 1 | 2 | 3 | 4 | "auto" | null | undefined;
697
+ columns?: 1 | "auto" | 2 | 3 | 4 | null | undefined;
698
698
  gap?: "sm" | "lg" | "none" | "md" | "xl" | null | undefined;
699
699
  } & class_variance_authority_types.ClassProp) | undefined) => string;
700
700
  interface CardGridProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardGridVariants> {
@@ -858,6 +858,110 @@ interface TableCaptionProps extends React$1.HTMLAttributes<HTMLTableCaptionEleme
858
858
  }
859
859
  declare const TableCaption: React$1.ForwardRefExoticComponent<TableCaptionProps & React$1.RefAttributes<HTMLTableCaptionElement>>;
860
860
 
861
+ /**
862
+ * Column definition for the DataTable.
863
+ */
864
+ interface DataTableColumn<T> {
865
+ /** Unique key identifying this column */
866
+ key: string;
867
+ /** Header label (string or ReactNode) */
868
+ header: string | React$1.ReactNode;
869
+ /**
870
+ * Custom cell renderer. When omitted the table renders
871
+ * `String(accessor(row))` or `String(row[key])`.
872
+ */
873
+ cell?: (row: T, rowIndex: number) => React$1.ReactNode;
874
+ /** Accessor function to pull the raw value from a row (used for sorting & default rendering) */
875
+ accessor?: (row: T) => string | number | boolean | null | undefined;
876
+ /** Whether this column is sortable (default false) */
877
+ sortable?: boolean;
878
+ /** Custom sort comparator. Receives two rows, return negative / 0 / positive. */
879
+ sortFn?: (a: T, b: T) => number;
880
+ /** Text alignment */
881
+ align?: "left" | "center" | "right";
882
+ /** Extra class name applied to every `<td>` in this column */
883
+ className?: string;
884
+ /** Extra class name applied to the `<th>` for this column */
885
+ headerClassName?: string;
886
+ /** Tailwind width class or inline width, e.g. "w-[100px]" */
887
+ width?: string;
888
+ }
889
+ /** Sort descriptor */
890
+ interface DataTableSort {
891
+ /** Column key */
892
+ key: string;
893
+ /** Direction */
894
+ direction: "asc" | "desc";
895
+ }
896
+ /**
897
+ * Props for the DataTable component.
898
+ */
899
+ interface DataTableProps<T> {
900
+ /** Array of row data */
901
+ data: T[];
902
+ /** Column definitions */
903
+ columns: DataTableColumn<T>[];
904
+ /** Return a stable unique key for each row */
905
+ getRowKey: (row: T, index: number) => string;
906
+ /** Default sort (uncontrolled) */
907
+ defaultSort?: DataTableSort;
908
+ /** Controlled sort */
909
+ sort?: DataTableSort | null;
910
+ /** Called when sort changes (controlled) */
911
+ onSortChange?: (sort: DataTableSort | null) => void;
912
+ /**
913
+ * Enable the search bar. Pass `true` for defaults or a config object.
914
+ * Search is always controlled by the consumer via `searchValue` /
915
+ * `onSearchChange`, or managed internally when omitted.
916
+ */
917
+ searchable?: boolean;
918
+ /** Placeholder text for the search input */
919
+ searchPlaceholder?: string;
920
+ /** Controlled search value */
921
+ searchValue?: string;
922
+ /** Called when the search value changes */
923
+ onSearchChange?: (value: string) => void;
924
+ /** Custom search predicate. When omitted, a case-insensitive substring
925
+ * match across all columns (using accessor / row[key]) is used. */
926
+ searchFn?: (row: T, query: string) => boolean;
927
+ /** Pass a number to enable pagination with that default page size */
928
+ pageSize?: number;
929
+ /** Options shown in the rows-per-page selector */
930
+ pageSizeOptions?: number[];
931
+ /** Controlled current page (0-indexed) */
932
+ currentPage?: number;
933
+ /** Called when page changes */
934
+ onPageChange?: (page: number) => void;
935
+ /** Called when page size changes */
936
+ onPageSizeChange?: (size: number) => void;
937
+ /** Enable selection mode: "checkbox" adds a checkbox column, "highlight" selects on row click */
938
+ selectable?: "checkbox" | "highlight";
939
+ /** Currently selected row keys */
940
+ selectedRows?: string[];
941
+ /** Called when selection changes */
942
+ onSelectedRowsChange?: (keys: string[]) => void;
943
+ /** Called when a row is clicked (independent of selection) */
944
+ onRowClick?: (row: T, index: number) => void;
945
+ /** Dynamic row class name */
946
+ rowClassName?: (row: T, index: number) => string;
947
+ /** Row keys that should be pinned to the top */
948
+ pinnedRows?: string[];
949
+ /** Custom toolbar rendered between search bar and table */
950
+ toolbar?: React$1.ReactNode;
951
+ /** Custom empty state */
952
+ emptyState?: React$1.ReactNode;
953
+ /** Table caption */
954
+ caption?: string;
955
+ /** Show loading state */
956
+ loading?: boolean;
957
+ /** Class name for the outermost wrapper */
958
+ className?: string;
959
+ }
960
+ declare function DataTable<T>({ data, columns, getRowKey, defaultSort, sort: controlledSort, onSortChange, searchable, searchPlaceholder, searchValue: controlledSearchValue, onSearchChange, searchFn, pageSize: defaultPageSize, pageSizeOptions, currentPage: controlledPage, onPageChange, onPageSizeChange, selectable, selectedRows: controlledSelectedRows, onSelectedRowsChange, onRowClick, rowClassName, pinnedRows, toolbar, emptyState, caption, loading, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
961
+ declare namespace DataTable {
962
+ var displayName: string;
963
+ }
964
+
861
965
  interface ModalProps {
862
966
  /**
863
967
  * Whether the modal is open
@@ -2609,4 +2713,4 @@ type SortingConfig = {
2609
2713
  onSort: (field: string) => void;
2610
2714
  };
2611
2715
 
2612
- export { ALL_THEMES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, type AutocompleteOption, type AutocompleteProps, Badge, type BadgeProps, Board, BoardContent, type BoardContentProps, BoardHeader, type BoardHeaderProps, type BoardProps, Button, type ButtonProps, CYBERPUNK_THEME, Calendar, type CalendarProps, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardGrid, type CardGridProps, CardHeader, type CardHeaderProps, CardImage, type CardImageProps, CardList, type CardListProps, type CardProps, CardTitle, type CardTitleProps, type CellEditEvent, CellEditor, type CellEditorProps$1 as CellEditorProps, type CellPosition, Checkbox, type CheckboxProps, Chip, type ChipProps, type ColorFieldConfig, type ColumnDef, ConfirmationModal, type ConfirmationModalProps, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, DARK_ELEGANT_THEME, DataGrid, type DataGridContextValue, type DataGridInternalState, type DataGridProps, type DataGridState, type DateFilterOperator, DatePicker, DatePickerInput, type DatePickerInputProps, type DatePickerProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type EditingCell, type EditorType, FOREST_THEME, FUTURISTIC_THEME, type FilterConfig, type FilterOperator, FilterPopover, type FilterPopoverProps$1 as FilterPopoverProps, type FilterType, GREEN_THEME, type GridCellProps, HeaderCell, type HeaderCellProps$1 as HeaderCellProps, IconButton, type IconButtonProps, Input, type InputProps, Label, type LabelProps, LoadingSpinner, type LoadingSpinnerProps, MINIMALIST_LIGHT_THEME, Modal, ModalButton, type ModalButtonProps, type ModalProps, NATURE_THEME, type NumberFilterOperator, OCEAN_THEME, OPTILOGIC_LEGACY_THEME, PRESET_THEMES, type PaginationConfig, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, Progress, type ProgressProps, ResizablePanel, type ResizablePanelProps, ResizeHandle, type ResizeHandleProps, SCIFI_THEME, SUNSET_THEME, type SearchConfig, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, SelectableCard, type SelectableCardProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SortConfig, type SortingConfig, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, type TextFilterOperator, Textarea, type TextareaProps, type Theme, type ThemeHSL, type ThemeHex, ThemePicker, type ThemePickerProps, Toaster, type ToasterProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UseContextMenuResult, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, applyFilterOperator, applyFilters, applySorting, applyTheme, areThemesEqual, badgeVariants, boardVariants, buttonVariants, cardActionsVariants, cardGridVariants, cardImageVariants, cardListVariants, cardVariants, cloneTheme, cn, exportTheme, getCellValue, getCurrentTheme, getDefaultTheme, getPresetTheme, hexToHsl, iconButtonVariants, importTheme, isPresetTheme, labelVariants, loadingSpinnerVariants, themeToHsl, useColumnResize, useColumnResizeManager, useConfirmation, useContextMenu, useDataGridState, useKeyboardNavigation, validateTheme };
2716
+ export { ALL_THEMES, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Autocomplete, type AutocompleteOption, type AutocompleteProps, Badge, type BadgeProps, Board, BoardContent, type BoardContentProps, BoardHeader, type BoardHeaderProps, type BoardProps, Button, type ButtonProps, CYBERPUNK_THEME, Calendar, type CalendarProps, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardGrid, type CardGridProps, CardHeader, type CardHeaderProps, CardImage, type CardImageProps, CardList, type CardListProps, type CardProps, CardTitle, type CardTitleProps, type CellEditEvent, CellEditor, type CellEditorProps$1 as CellEditorProps, type CellPosition, Checkbox, type CheckboxProps, Chip, type ChipProps, type ColorFieldConfig, type ColumnDef, ConfirmationModal, type ConfirmationModalProps, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, DARK_ELEGANT_THEME, DataGrid, type DataGridContextValue, type DataGridInternalState, type DataGridProps, type DataGridState, DataTable, type DataTableColumn, type DataTableProps, type DataTableSort, type DateFilterOperator, DatePicker, DatePickerInput, type DatePickerInputProps, type DatePickerProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type EditingCell, type EditorType, FOREST_THEME, FUTURISTIC_THEME, type FilterConfig, type FilterOperator, FilterPopover, type FilterPopoverProps$1 as FilterPopoverProps, type FilterType, GREEN_THEME, type GridCellProps, HeaderCell, type HeaderCellProps$1 as HeaderCellProps, IconButton, type IconButtonProps, Input, type InputProps, Label, type LabelProps, LoadingSpinner, type LoadingSpinnerProps, MINIMALIST_LIGHT_THEME, Modal, ModalButton, type ModalButtonProps, type ModalProps, NATURE_THEME, type NumberFilterOperator, OCEAN_THEME, OPTILOGIC_LEGACY_THEME, PRESET_THEMES, type PaginationConfig, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, Progress, type ProgressProps, ResizablePanel, type ResizablePanelProps, ResizeHandle, type ResizeHandleProps, SCIFI_THEME, SUNSET_THEME, type SearchConfig, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, SelectableCard, type SelectableCardProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SortConfig, type SortingConfig, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, TabsList, TabsTrigger, type TextFilterOperator, Textarea, type TextareaProps, type Theme, type ThemeHSL, type ThemeHex, ThemePicker, type ThemePickerProps, Toaster, type ToasterProps, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, type TooltipProps, TooltipProvider, TooltipRoot, TooltipTrigger, type UseContextMenuResult, accordionContentVariants, accordionItemVariants, accordionTriggerVariants, applyFilterOperator, applyFilters, applySorting, applyTheme, areThemesEqual, badgeVariants, boardVariants, buttonVariants, cardActionsVariants, cardGridVariants, cardImageVariants, cardListVariants, cardVariants, cloneTheme, cn, exportTheme, getCellValue, getCurrentTheme, getDefaultTheme, getPresetTheme, hexToHsl, iconButtonVariants, importTheme, isPresetTheme, labelVariants, loadingSpinnerVariants, themeToHsl, useColumnResize, useColumnResizeManager, useConfirmation, useContextMenu, useDataGridState, useKeyboardNavigation, validateTheme };