@epilot/volt-ui 1.1.20 → 1.1.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/components/alert-dialog/alert-dialog.d.ts +1 -1
- package/dist/components/data-table/data-table-context.d.ts +9 -2
- package/dist/components/data-table/data-table-resize-handle.d.ts +4 -2
- package/dist/components/data-table/data-table.d.ts +3 -3
- package/dist/components/data-table/hooks/index.d.ts +1 -0
- package/dist/components/data-table/hooks/use-data-table-content.d.ts +1 -0
- package/dist/index.cjs.js +27 -67
- package/dist/index.es.js +8264 -11041
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ declare const AlertDialogHeader: ({ className, ...props }: React.ComponentProps<
|
|
|
10
10
|
declare const AlertDialogFooter: ({ className, ...props }: React.ComponentProps<"div">) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare const AlertDialogTitle: ({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare const AlertDialogDescription: ({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
declare const AlertDialogAction: ({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & {
|
|
13
|
+
declare const AlertDialogAction: ({ className, variant, size, destructive, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & {
|
|
14
14
|
variant?: ButtonVariant;
|
|
15
15
|
size?: ButtonSize;
|
|
16
16
|
destructive?: boolean;
|
|
@@ -45,8 +45,6 @@ export type DataTableContextValue<TData> = {
|
|
|
45
45
|
clickableRowClassName?: string;
|
|
46
46
|
/** Custom class for selected rows. Default: 'data-[state=selected]:bg-accent-a3' */
|
|
47
47
|
selectedRowClassName?: string;
|
|
48
|
-
/** Column sizing mode. 'fixed' maintains column widths with scroll, 'fluid' squeezes to fit. Default: 'fixed' */
|
|
49
|
-
sizing?: "fixed" | "fluid";
|
|
50
48
|
/** Controls how cell content handles overflow. 'grow' expands cells (default), 'wrap' wraps text, 'truncate' shows ellipsis. */
|
|
51
49
|
cellOverflow?: DataTableCellOverflow;
|
|
52
50
|
/** Whether column resizing is disabled (enabled by default) */
|
|
@@ -55,10 +53,19 @@ export type DataTableContextValue<TData> = {
|
|
|
55
53
|
showHeaderBorder?: boolean;
|
|
56
54
|
/** Show bottom borders on data rows. Default: true */
|
|
57
55
|
showRowBorders?: boolean;
|
|
56
|
+
/** Controls when resize handles are visible. 'always' shows handles persistently, 'onHeaderHover' only shows on header row hover. Default: 'onHeaderHover' */
|
|
57
|
+
resizeHandleVisibility?: "always" | "onHeaderHover";
|
|
58
58
|
};
|
|
59
59
|
export type DataTableVirtualizerContextValue = {
|
|
60
60
|
virtualizer: Virtualizer<HTMLDivElement, Element>;
|
|
61
61
|
scrollContainerRef: RefObject<HTMLDivElement>;
|
|
62
62
|
} | null;
|
|
63
|
+
export type DataTableContentContextValue = {
|
|
64
|
+
/** Sync column widths to visual values before resize starts (prevents snap/jump) */
|
|
65
|
+
syncColumnWidthsBeforeResize: () => void;
|
|
66
|
+
/** Width of the spacer column to fill remaining container space (0 if columns fill or exceed container) */
|
|
67
|
+
spacerWidth: number;
|
|
68
|
+
} | null;
|
|
63
69
|
export declare const DataTableContext: import("react").Context<DataTableContextValue<any> | null>;
|
|
64
70
|
export declare const DataTableVirtualizerContext: import("react").Context<DataTableVirtualizerContextValue>;
|
|
71
|
+
export declare const DataTableContentContext: import("react").Context<DataTableContentContextValue>;
|
|
@@ -3,13 +3,15 @@ export type DataTableResizeHandleProps<TData, TValue> = {
|
|
|
3
3
|
header: Header<TData, TValue>;
|
|
4
4
|
/** Accessible label for the resize handle. Recommended for i18n and accessibility. Receives column.id as parameter. */
|
|
5
5
|
ariaLabel?: string | ((columnId: string) => string);
|
|
6
|
+
/** Whether the handle is visible. When false, handle is hidden but becomes visible on direct hover. */
|
|
7
|
+
isVisible?: boolean;
|
|
6
8
|
className?: string;
|
|
7
9
|
};
|
|
8
10
|
/**
|
|
9
11
|
* Resize handle for column headers.
|
|
10
|
-
*
|
|
12
|
+
* Subtly visible by default, more prominent on hover and during drag.
|
|
11
13
|
*/
|
|
12
|
-
declare function DataTableResizeHandle<TData, TValue>({ header, ariaLabel, className, }: DataTableResizeHandleProps<TData, TValue>): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
declare function DataTableResizeHandle<TData, TValue>({ header, ariaLabel, isVisible, className, }: DataTableResizeHandleProps<TData, TValue>): import("react/jsx-runtime").JSX.Element | null;
|
|
13
15
|
declare namespace DataTableResizeHandle {
|
|
14
16
|
var displayName: string;
|
|
15
17
|
}
|
|
@@ -57,12 +57,12 @@ export type DataTableProps<TData> = {
|
|
|
57
57
|
clickableRowClassName?: string;
|
|
58
58
|
/** Custom class for selected rows. Default: 'data-[state=selected]:bg-accent-a3' */
|
|
59
59
|
selectedRowClassName?: string;
|
|
60
|
-
/** Column sizing mode. 'fixed' maintains column widths with scroll, 'fluid' squeezes to fit. Default: 'fixed' */
|
|
61
|
-
sizing?: "fixed" | "fluid";
|
|
62
60
|
/** Controls how cell content handles overflow. 'grow' expands cells (default), 'wrap' wraps text, 'truncate' shows ellipsis. Can be overridden per-column via column meta. */
|
|
63
61
|
cellOverflow?: DataTableCellOverflow;
|
|
64
62
|
/** Disable column width resizing (enabled by default) */
|
|
65
63
|
disableColumnResizing?: boolean;
|
|
64
|
+
/** Controls when resize handles are visible. 'always' shows handles persistently, 'onHeaderHover' only shows on header row hover. Default: 'onHeaderHover' */
|
|
65
|
+
resizeHandleVisibility?: "always" | "onHeaderHover";
|
|
66
66
|
/** Resize mode: 'onChange' updates during drag, 'onEnd' updates when drag finishes. Default: 'onEnd' */
|
|
67
67
|
columnResizeMode?: "onChange" | "onEnd";
|
|
68
68
|
/** Controlled column sizing state */
|
|
@@ -86,7 +86,7 @@ export type DataTableProps<TData> = {
|
|
|
86
86
|
/** Additional class name */
|
|
87
87
|
className?: string;
|
|
88
88
|
};
|
|
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,
|
|
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;
|
|
90
90
|
declare namespace DataTable {
|
|
91
91
|
var displayName: string;
|
|
92
92
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useDataTableContent(): import("../data-table-context").DataTableContentContextValue;
|