@epilot/volt-ui 1.1.25 → 1.1.26

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.
@@ -1,6 +1,7 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { MouseEvent } from "react";
3
3
  import { type SortingState, type RowSelectionState, type ColumnFiltersState, type VisibilityState, type ColumnDef, type Row, type ColumnSizingState, type ColumnPinningState } from "@tanstack/react-table";
4
+ import { type TableDensity } from "../../components/table/table";
4
5
  import { type DataTablePaginationConfig, type DataTableVirtualizationConfig, type DataTableCellOverflow } from "./data-table-context";
5
6
  export type DataTableProps<TData> = {
6
7
  /** Column definitions */
@@ -83,10 +84,12 @@ export type DataTableProps<TData> = {
83
84
  showHeaderBorder?: boolean;
84
85
  /** Show bottom borders on data rows. Default: true */
85
86
  showRowBorders?: boolean;
87
+ /** Cell density: compact, normal, or comfortable. Default: normal */
88
+ density?: TableDensity;
86
89
  /** Additional class name */
87
90
  className?: string;
88
91
  };
89
- declare function DataTable<TData>({ columns, data, children, getRowId, enableRowSelection, enableSorting, manualSorting, enableFiltering, manualFiltering, enableGlobalFilter, pagination, virtualization, sorting: controlledSorting, onSortingChange, defaultSorting, rowSelection: controlledRowSelection, onRowSelectionChange, defaultRowSelection, columnFilters: controlledColumnFilters, onColumnFiltersChange, columnVisibility: controlledColumnVisibility, onColumnVisibilityChange, globalFilter: controlledGlobalFilter, onGlobalFilterChange, onRowClick, clickableRowClassName, selectedRowClassName, cellOverflow, disableColumnResizing, resizeHandleVisibility, columnResizeMode, columnSizing: controlledColumnSizing, onColumnSizingChange, defaultColumnSizing, columnPinning: controlledColumnPinning, onColumnPinningChange, defaultColumnPinning, autoPinSelection, showHeaderBorder, showRowBorders, className, }: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element;
92
+ declare function DataTable<TData>({ columns, data, children, getRowId, enableRowSelection, enableSorting, manualSorting, enableFiltering, manualFiltering, enableGlobalFilter, pagination, virtualization, sorting: controlledSorting, onSortingChange, defaultSorting, rowSelection: controlledRowSelection, onRowSelectionChange, defaultRowSelection, columnFilters: controlledColumnFilters, onColumnFiltersChange, columnVisibility: controlledColumnVisibility, onColumnVisibilityChange, globalFilter: controlledGlobalFilter, onGlobalFilterChange, onRowClick, clickableRowClassName, selectedRowClassName, cellOverflow, disableColumnResizing, resizeHandleVisibility, columnResizeMode, columnSizing: controlledColumnSizing, onColumnSizingChange, defaultColumnSizing, columnPinning: controlledColumnPinning, onColumnPinningChange, defaultColumnPinning, autoPinSelection, showHeaderBorder, showRowBorders, density, className, }: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element;
90
93
  declare namespace DataTable {
91
94
  var displayName: string;
92
95
  }
@@ -1,5 +1,10 @@
1
1
  import * as React from "react";
2
- declare const Table: ({ className, ...props }: React.ComponentProps<"table">) => import("react/jsx-runtime").JSX.Element;
2
+ type TableDensity = "compact" | "normal" | "comfortable";
3
+ declare const TableDensityContext: React.Context<TableDensity>;
4
+ type TableProps = React.ComponentProps<"table"> & {
5
+ density?: TableDensity;
6
+ };
7
+ declare const Table: ({ className, density, ...props }: TableProps) => import("react/jsx-runtime").JSX.Element;
3
8
  declare const TableHeader: ({ className, ...props }: React.ComponentProps<"thead">) => import("react/jsx-runtime").JSX.Element;
4
9
  declare const TableBody: ({ className, ...props }: React.ComponentProps<"tbody">) => import("react/jsx-runtime").JSX.Element;
5
10
  declare const TableFooter: ({ className, ...props }: React.ComponentProps<"tfoot">) => import("react/jsx-runtime").JSX.Element;
@@ -10,15 +15,18 @@ type TableRowProps = React.ComponentProps<"tr"> & {
10
15
  declare const TableRow: ({ className, noHover, ...props }: TableRowProps) => import("react/jsx-runtime").JSX.Element;
11
16
  type TableHeadProps = React.ComponentProps<"th"> & {
12
17
  align?: "left" | "center" | "right";
18
+ density?: TableDensity;
13
19
  };
14
- declare const TableHead: ({ className, align, scope, ...props }: TableHeadProps) => import("react/jsx-runtime").JSX.Element;
20
+ declare const TableHead: ({ className, align, density, scope, ...props }: TableHeadProps) => import("react/jsx-runtime").JSX.Element;
15
21
  type TableCellProps = React.ComponentProps<"td"> & {
16
22
  align?: "left" | "center" | "right";
17
23
  numeric?: boolean;
24
+ density?: TableDensity;
18
25
  };
19
- declare const TableCell: ({ className, align, numeric, ...props }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
26
+ declare const TableCell: ({ className, align, numeric, density, ...props }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
20
27
  type TableCaptionProps = React.ComponentProps<"caption"> & {
21
28
  position?: "top" | "bottom";
22
29
  };
23
30
  declare const TableCaption: ({ className, position, ...props }: TableCaptionProps) => import("react/jsx-runtime").JSX.Element;
24
- export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption, };
31
+ export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption, TableDensityContext, };
32
+ export type { TableDensity };