@coldsmirk/ledger-mantine 0.3.1 → 0.5.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.cts CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
- import { n as defaultLabels, t as DataTableLabels } from "./labels-ChBqD1II.cjs";
3
- import { BoxProps, ComboboxData, ElementProps, Factory, MantineBreakpoint, MantineColor, MantineRadius, MantineSpacing, PopoverProps, StylesApiProps, TableTdProps, TableThProps, TableTrProps, TextInputProps } from "@mantine/core";
4
- import { Cell as Cell$1, CellData, Column as Column$1, ColumnDef as ColumnDef$1, ColumnFiltersState, ColumnFiltersState as ColumnFiltersState$1, ColumnOrderState, ColumnOrderState as ColumnOrderState$1, ColumnPinningState, ColumnPinningState as ColumnPinningState$1, ColumnSizingState, ColumnSizingState as ColumnSizingState$1, ColumnVisibilityState, ColumnVisibilityState as ColumnVisibilityState$1, ExpandedState, ExpandedState as ExpandedState$1, FilterFn, FilterFnOption, GroupingState, GroupingState as GroupingState$1, Header as Header$1, HeaderGroup as HeaderGroup$1, PaginationState, PaginationState as PaginationState$1, ReactTable, Row as Row$1, RowData, RowData as RowData$1, RowPinningState, RowPinningState as RowPinningState$1, RowSelectionState, RowSelectionState as RowSelectionState$1, SortingState, SortingState as SortingState$1, TableFeatures, TableOptions, flexRender } from "@tanstack/react-table";
5
- import { CSSProperties, ComponentProps, ComponentType, JSX, KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref } from "react";
2
+ import { n as defaultLabels, t as DataTableLabels } from "./labels-D-6FCakH.cjs";
3
+ import { BoxProps, ComboboxData, ElementProps, Factory, MantineBreakpoint, MantineColor, MantineRadius, MantineSize, MantineSpacing, PopoverProps, StylesApiProps, TableTdProps, TableThProps, TableTrProps, TextInputProps } from "@mantine/core";
4
+ import { Cell as Cell$1, CellData, Column as Column$1, ColumnDef as ColumnDef$1, ColumnFiltersState, ColumnFiltersState as ColumnFiltersState$1, ColumnOrderState, ColumnOrderState as ColumnOrderState$1, ColumnPinningState, ColumnPinningState as ColumnPinningState$1, ColumnSizingState, ColumnSizingState as ColumnSizingState$1, ColumnVisibilityState, ColumnVisibilityState as ColumnVisibilityState$1, ExpandedState, ExpandedState as ExpandedState$1, FilterFn, FilterFnOption, GroupingState, GroupingState as GroupingState$1, Header as Header$1, HeaderGroup as HeaderGroup$1, PaginationState, PaginationState as PaginationState$1, ReactTable, Row as Row$1, RowData, RowData as RowData$1, RowPinningState, RowPinningState as RowPinningState$1, RowSelectionState, RowSelectionState as RowSelectionState$1, SortingState, SortingState as SortingState$1, TableFeatures, TableOptions, aggregationFn_count, aggregationFn_extent, aggregationFn_first, aggregationFn_last, aggregationFn_max, aggregationFn_mean, aggregationFn_median, aggregationFn_min, aggregationFn_sum, aggregationFn_unique, aggregationFn_uniqueCount, flexRender } from "@tanstack/react-table";
5
+ import { CSSProperties, ComponentProps, ComponentType, JSX as JSX$1, KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref } from "react";
6
6
  //#region src/icons.d.ts
7
7
  /**
8
8
  * What a replacement icon receives — the two knobs the chrome actually turns. Lucide icons are
@@ -51,7 +51,7 @@ interface DataTableIcons {
51
51
  unpin: DataTableIconComponent;
52
52
  pinEnd: DataTableIconComponent;
53
53
  }
54
- declare const defaultIcons: DataTableIcons;
54
+ export declare const defaultIcons: DataTableIcons;
55
55
  //#endregion
56
56
  //#region src/element-props.d.ts
57
57
  /**
@@ -97,17 +97,17 @@ declare const ledgerFeatures: {
97
97
  paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
98
98
  sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
99
99
  aggregationFns: {
100
- count: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number>;
101
- extent: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, [(number | Date) | undefined, (number | Date) | undefined]>;
102
- first: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, unknown>;
103
- last: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, unknown>;
104
- max: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, (number | Date) | undefined>;
105
- mean: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number | undefined>;
106
- median: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number | undefined>;
107
- min: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, (number | Date) | undefined>;
108
- sum: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number>;
109
- unique: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, unknown[]>;
110
- uniqueCount: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number>;
100
+ count: typeof aggregationFn_count;
101
+ extent: typeof aggregationFn_extent;
102
+ first: typeof aggregationFn_first;
103
+ last: typeof aggregationFn_last;
104
+ max: typeof aggregationFn_max;
105
+ mean: typeof aggregationFn_mean;
106
+ median: typeof aggregationFn_median;
107
+ min: typeof aggregationFn_min;
108
+ sum: typeof aggregationFn_sum;
109
+ unique: typeof aggregationFn_unique;
110
+ uniqueCount: typeof aggregationFn_uniqueCount;
111
111
  };
112
112
  filterFns: {
113
113
  "ledger-date-range": FilterFn<any, any>;
@@ -149,7 +149,7 @@ type LedgerFeatures = typeof ledgerFeatures;
149
149
  * TanStack's column helper, pre-bound to the canonical feature set — consumers keep the v8
150
150
  * calling shape (`createColumnHelper<Person>()`), never managing `TFeatures` themselves.
151
151
  */
152
- declare function createColumnHelper<TData extends RowData$1>(): import("@tanstack/react-table").ColumnHelper<{
152
+ export declare function createColumnHelper<TData extends RowData$1>(): import("@tanstack/react-table").ColumnHelper<{
153
153
  cellSpanningFeature: import("@tanstack/react-table").TableFeature;
154
154
  columnFacetingFeature: import("@tanstack/react-table").TableFeature;
155
155
  columnFilteringFeature: import("@tanstack/react-table").TableFeature;
@@ -174,17 +174,17 @@ declare function createColumnHelper<TData extends RowData$1>(): import("@tanstac
174
174
  paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
175
175
  sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
176
176
  aggregationFns: {
177
- count: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number>;
178
- extent: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, [(number | Date) | undefined, (number | Date) | undefined]>;
179
- first: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, unknown>;
180
- last: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, unknown>;
181
- max: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, (number | Date) | undefined>;
182
- mean: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number | undefined>;
183
- median: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number | undefined>;
184
- min: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, (number | Date) | undefined>;
185
- sum: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number>;
186
- unique: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, unknown[]>;
187
- uniqueCount: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number>;
177
+ count: typeof aggregationFn_count;
178
+ extent: typeof aggregationFn_extent;
179
+ first: typeof aggregationFn_first;
180
+ last: typeof aggregationFn_last;
181
+ max: typeof aggregationFn_max;
182
+ mean: typeof aggregationFn_mean;
183
+ median: typeof aggregationFn_median;
184
+ min: typeof aggregationFn_min;
185
+ sum: typeof aggregationFn_sum;
186
+ unique: typeof aggregationFn_unique;
187
+ uniqueCount: typeof aggregationFn_uniqueCount;
188
188
  };
189
189
  filterFns: {
190
190
  "ledger-date-range": FilterFn<any, any>;
@@ -331,6 +331,11 @@ interface DataTableEditContext<TData extends RowData$1, TValue> {
331
331
  * editor is one of many identical controls in the grid, told apart by the column it edits.
332
332
  */
333
333
  label: string;
334
+ /**
335
+ * The Mantine size the cell's controls are drawn at — the table's `size` a step down
336
+ * (docs/styling.md#size) — so an editor fits the row it opens in.
337
+ */
338
+ size: MantineSize;
334
339
  }
335
340
  interface DataTableInstantEditContext<TData extends RowData$1, TValue> {
336
341
  row: Row<TData>;
@@ -357,6 +362,10 @@ interface DataTableInstantEditContext<TData extends RowData$1, TValue> {
357
362
  * Localized accessible name for the control (`labels.editColumn` over the column title).
358
363
  */
359
364
  label: string;
365
+ /**
366
+ * The Mantine size the cell's controls are drawn at (docs/styling.md#size).
367
+ */
368
+ size: MantineSize;
360
369
  }
361
370
  interface DataTableEditCommit<TData extends RowData$1> {
362
371
  row: Row<TData>;
@@ -903,7 +912,7 @@ interface DataTableColumnsPanelProps<TData extends RowData$1> {
903
912
  className?: string;
904
913
  style?: CSSProperties;
905
914
  }
906
- declare function DataTableColumnsPanel<TData extends RowData$1>(props: DataTableColumnsPanelProps<TData>): import("react").JSX.Element;
915
+ export declare function DataTableColumnsPanel<TData extends RowData$1>(props: DataTableColumnsPanelProps<TData>): import("react").JSX.Element;
907
916
  //#endregion
908
917
  //#region src/csv.d.ts
909
918
  interface ToCsvOptions {
@@ -928,20 +937,25 @@ interface ToCsvOptions {
928
937
  */
929
938
  escapeFormulas?: boolean;
930
939
  }
931
- declare function toCsv<TData extends RowData$1>(table: TableInstance<TData>, options?: ToCsvOptions): string;
940
+ export declare function toCsv<TData extends RowData$1>(table: TableInstance<TData>, options?: ToCsvOptions): string;
932
941
  //#endregion
933
942
  //#region src/pagination-bar.d.ts
934
943
  interface DataTablePaginationProps<TData extends RowData$1> {
935
944
  table: TableInstance<TData>;
936
945
  pageSizeOptions?: number[];
937
946
  labels?: Partial<DataTableLabels>;
947
+ /**
948
+ * The size of the table the bar stands under (docs/styling.md#size); `sm`, the table's own
949
+ * default, unless said.
950
+ */
951
+ size?: MantineSize;
938
952
  className?: string;
939
953
  style?: CSSProperties;
940
954
  }
941
955
  /**
942
956
  * Standalone compound (`DataTable.Pagination`) — place it anywhere, theme it via defaultProps.
943
957
  */
944
- declare function DataTablePagination<TData extends RowData$1>(props: DataTablePaginationProps<TData>): import("react").JSX.Element;
958
+ export declare function DataTablePagination<TData extends RowData$1>(props: DataTablePaginationProps<TData>): import("react").JSX.Element;
945
959
  //#endregion
946
960
  //#region src/search.d.ts
947
961
  interface DataTableSearchProps<TData extends RowData$1> extends Omit<TextInputProps, "value" | "defaultValue" | "onChange"> {
@@ -953,7 +967,7 @@ interface DataTableSearchProps<TData extends RowData$1> extends Omit<TextInputPr
953
967
  labels?: Partial<DataTableLabels>;
954
968
  icons?: Partial<DataTableIcons>;
955
969
  }
956
- declare function DataTableSearch<TData extends RowData$1>(props: DataTableSearchProps<TData>): import("react").JSX.Element;
970
+ export declare function DataTableSearch<TData extends RowData$1>(props: DataTableSearchProps<TData>): import("react").JSX.Element;
957
971
  //#endregion
958
972
  //#region src/selection-bar.d.ts
959
973
  interface DataTableSelectionBarProps<TData extends RowData$1> {
@@ -967,12 +981,12 @@ interface DataTableSelectionBarProps<TData extends RowData$1> {
967
981
  className?: string;
968
982
  style?: CSSProperties;
969
983
  }
970
- declare function DataTableSelectionBar<TData extends RowData$1>(props: DataTableSelectionBarProps<TData>): import("react").JSX.Element | null;
984
+ export declare function DataTableSelectionBar<TData extends RowData$1>(props: DataTableSelectionBarProps<TData>): import("react").JSX.Element | null;
971
985
  //#endregion
972
986
  //#region src/data-table.d.ts
973
987
  type DataTableStylesNames = "root" | "main" | "header" | "scroller" | "footer" | "table" | "thead" | "tbody" | "tfoot" | "headerRow" | "headerCell" | "headerLabel" | "headerActions" | "sortIndicator" | "resizer" | "filterPopover" | "row" | "cell" | "selectionCell" | "expanderCell" | "detailPanel" | "cellEditor" | "instantCell" | "instantSpinner" | "rowDragCell" | "rowDragOverlay" | "footerRow" | "footerCell" | "empty" | "loaderRow" | "loaderRowContent" | "paginationBar";
974
988
  interface DataTableCssVariables {
975
- root: "--ledger-striped-color" | "--ledger-hover-color" | "--ledger-border-color" | "--ledger-radius";
989
+ root: "--ledger-striped-color" | "--ledger-hover-color" | "--ledger-border-color" | "--ledger-radius" | "--ledger-font-size";
976
990
  }
977
991
  interface DataTableBaseProps<TData extends RowData$1> extends BoxProps, StylesApiProps<DataTableFactory>, ElementProps<"div"> {
978
992
  /**
@@ -999,6 +1013,12 @@ interface DataTableBaseProps<TData extends RowData$1> extends BoxProps, StylesAp
999
1013
  * vocabulary: `Paper.radius`).
1000
1014
  */
1001
1015
  radius?: MantineRadius;
1016
+ /**
1017
+ * The table's size (docs/styling.md#size): the type, the cell padding, a row's height and
1018
+ * the size of every control drawn in a cell, as one Mantine size — `sm` by default, which is
1019
+ * Mantine's own `Table`. The two spacing props override the size's padding when set.
1020
+ */
1021
+ size?: MantineSize;
1002
1022
  verticalSpacing?: MantineSpacing;
1003
1023
  horizontalSpacing?: MantineSpacing;
1004
1024
  tabularNums?: boolean;
@@ -1106,7 +1126,7 @@ type DataTableFactory = Factory<{
1106
1126
  ref: HTMLDivElement;
1107
1127
  stylesNames: DataTableStylesNames;
1108
1128
  vars: DataTableCssVariables;
1109
- signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX.Element;
1129
+ signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX$1.Element;
1110
1130
  staticComponents: {
1111
1131
  Search: typeof DataTableSearch;
1112
1132
  ColumnsPanel: typeof DataTableColumnsPanel;
@@ -1114,12 +1134,12 @@ type DataTableFactory = Factory<{
1114
1134
  SelectionBar: typeof DataTableSelectionBar;
1115
1135
  };
1116
1136
  }>;
1117
- declare const DataTable: (<TData extends RowData$1>(props: DataTableProps<TData>) => JSX.Element) & import("@mantine/core").ThemeExtend<{
1137
+ export declare const DataTable: (<TData extends RowData$1>(props: DataTableProps<TData>) => JSX$1.Element) & import("@mantine/core").ThemeExtend<{
1118
1138
  props: DataTableProps;
1119
1139
  ref: HTMLDivElement;
1120
1140
  stylesNames: DataTableStylesNames;
1121
1141
  vars: DataTableCssVariables;
1122
- signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX.Element;
1142
+ signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX$1.Element;
1123
1143
  staticComponents: {
1124
1144
  Search: typeof DataTableSearch;
1125
1145
  ColumnsPanel: typeof DataTableColumnsPanel;
@@ -1131,7 +1151,7 @@ declare const DataTable: (<TData extends RowData$1>(props: DataTableProps<TData>
1131
1151
  ref: HTMLDivElement;
1132
1152
  stylesNames: DataTableStylesNames;
1133
1153
  vars: DataTableCssVariables;
1134
- signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX.Element;
1154
+ signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX$1.Element;
1135
1155
  staticComponents: {
1136
1156
  Search: typeof DataTableSearch;
1137
1157
  ColumnsPanel: typeof DataTableColumnsPanel;
@@ -1149,7 +1169,7 @@ declare const DataTable: (<TData extends RowData$1>(props: DataTableProps<TData>
1149
1169
  ref: HTMLDivElement;
1150
1170
  stylesNames: DataTableStylesNames;
1151
1171
  vars: DataTableCssVariables;
1152
- signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX.Element;
1172
+ signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX$1.Element;
1153
1173
  staticComponents: {
1154
1174
  Search: typeof DataTableSearch;
1155
1175
  ColumnsPanel: typeof DataTableColumnsPanel;
@@ -1162,7 +1182,7 @@ declare const DataTable: (<TData extends RowData$1>(props: DataTableProps<TData>
1162
1182
  ref: HTMLDivElement;
1163
1183
  stylesNames: DataTableStylesNames;
1164
1184
  vars: DataTableCssVariables;
1165
- signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX.Element;
1185
+ signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX$1.Element;
1166
1186
  staticComponents: {
1167
1187
  Search: typeof DataTableSearch;
1168
1188
  ColumnsPanel: typeof DataTableColumnsPanel;
@@ -1177,25 +1197,25 @@ declare const DataTable: (<TData extends RowData$1>(props: DataTableProps<TData>
1177
1197
  /**
1178
1198
  * A plain text editor: `meta.edit: textEditor()`.
1179
1199
  */
1180
- declare function textEditor(): DataTableEditRenderer<any, any>;
1200
+ export declare function textEditor(): DataTableEditRenderer<any, any>;
1181
1201
  /**
1182
1202
  * A numeric editor; an emptied input holds `null`, never `0`.
1183
1203
  */
1184
- declare function numberEditor(): DataTableEditRenderer<any, any>;
1204
+ export declare function numberEditor(): DataTableEditRenderer<any, any>;
1185
1205
  /**
1186
1206
  * A single-pick editor over the given options. In cell mode the dropdown opens immediately and
1187
1207
  * picking an option commits at once — one cell is the whole session; in row mode it is one
1188
1208
  * draft-bound field among the row's others, and the row's own commit decides.
1189
1209
  */
1190
- declare function selectEditor(options: ComboboxData): DataTableEditRenderer<any, any>;
1210
+ export declare function selectEditor(options: ComboboxData): DataTableEditRenderer<any, any>;
1191
1211
  /**
1192
1212
  * A live checkbox for an instant column: `meta.edit: { instant: checkboxEditor() }`. Each
1193
1213
  * toggle commits the flipped value; the host disables it while its own write is out.
1194
1214
  */
1195
- declare function checkboxEditor(): DataTableInstantEditRenderer<any, any>;
1215
+ export declare function checkboxEditor(): DataTableInstantEditRenderer<any, any>;
1196
1216
  //#endregion
1197
1217
  //#region src/use-data-table.d.ts
1198
- declare function useDataTable<TData extends RowData$1>(options: UseDataTableOptions<TData>): TableInstance<TData>;
1218
+ export declare function useDataTable<TData extends RowData$1>(options: UseDataTableOptions<TData>): TableInstance<TData>;
1199
1219
  //#endregion
1200
- export { type Cell, type Column, type ColumnDef, type ColumnFiltersState, type ColumnOrderState, type ColumnPinningState, type ColumnSizingState, type ColumnVisibilityState, DataTable, type DataTableBaseProps, DataTableColumnsPanel, type DataTableColumnsPanelProps, type DataTableCssVariables, type DataTableEditCommit, type DataTableEditConfig, type DataTableEditContext, type DataTableEditMode, type DataTableEditRenderer, type DataTableEditTrigger, type DataTableEditingCell, type DataTableElementProps, type DataTableExportMeta, type DataTableFactory, type DataTableFilterConfig, type DataTableFilterVariant, type DataTableHandle, type DataTableIconComponent, type DataTableIconProps, type DataTableIcons, type DataTableInstantEditConfig, type DataTableInstantEditContext, type DataTableInstantEditRenderer, type DataTableLabels, DataTablePagination, type DataTablePaginationProps, type DataTablePersistState, type DataTablePersistableSlice, type DataTableProps, type DataTableRowEditCommit, type DataTableRowReorder, type DataTableScrollOptions, DataTableSearch, type DataTableSearchProps, DataTableSelectionBar, type DataTableSelectionBarProps, type DataTableStylesNames, type ExpandedState, type GroupingState, type Header, type HeaderGroup, type LedgerCellEditor, type LedgerEditingController, type LedgerFeatures, type LedgerInstantEditingController, type LedgerMeta, type LedgerRowEditingController, type LedgerRowEditor, type PaginationState, type Row, type RowData, type RowPinningState, type RowSelectionState, type SortingState, type TableInstance, type ToCsvOptions, type UseDataTableOptions, checkboxEditor, createColumnHelper, defaultIcons, defaultLabels, flexRender, numberEditor, selectEditor, textEditor, toCsv, useDataTable };
1220
+ export { type Cell, type Column, type ColumnDef, type ColumnFiltersState, type ColumnOrderState, type ColumnPinningState, type ColumnSizingState, type ColumnVisibilityState, type DataTableBaseProps, type DataTableColumnsPanelProps, type DataTableCssVariables, type DataTableEditCommit, type DataTableEditConfig, type DataTableEditContext, type DataTableEditMode, type DataTableEditRenderer, type DataTableEditTrigger, type DataTableEditingCell, type DataTableElementProps, type DataTableExportMeta, type DataTableFactory, type DataTableFilterConfig, type DataTableFilterVariant, type DataTableHandle, type DataTableIconComponent, type DataTableIconProps, type DataTableIcons, type DataTableInstantEditConfig, type DataTableInstantEditContext, type DataTableInstantEditRenderer, type DataTableLabels, type DataTablePaginationProps, type DataTablePersistState, type DataTablePersistableSlice, type DataTableProps, type DataTableRowEditCommit, type DataTableRowReorder, type DataTableScrollOptions, type DataTableSearchProps, type DataTableSelectionBarProps, type DataTableStylesNames, type ExpandedState, type GroupingState, type Header, type HeaderGroup, type LedgerCellEditor, type LedgerEditingController, type LedgerFeatures, type LedgerInstantEditingController, type LedgerMeta, type LedgerRowEditingController, type LedgerRowEditor, type PaginationState, type Row, type RowData, type RowPinningState, type RowSelectionState, type SortingState, type TableInstance, type ToCsvOptions, type UseDataTableOptions, defaultLabels, flexRender };
1201
1221
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
- import { n as defaultLabels, t as DataTableLabels } from "./labels-ChBqD1II.js";
3
- import { BoxProps, ComboboxData, ElementProps, Factory, MantineBreakpoint, MantineColor, MantineRadius, MantineSpacing, PopoverProps, StylesApiProps, TableTdProps, TableThProps, TableTrProps, TextInputProps } from "@mantine/core";
4
- import { CSSProperties, ComponentProps, ComponentType, JSX, KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref } from "react";
5
- import { Cell as Cell$1, CellData, Column as Column$1, ColumnDef as ColumnDef$1, ColumnFiltersState, ColumnFiltersState as ColumnFiltersState$1, ColumnOrderState, ColumnOrderState as ColumnOrderState$1, ColumnPinningState, ColumnPinningState as ColumnPinningState$1, ColumnSizingState, ColumnSizingState as ColumnSizingState$1, ColumnVisibilityState, ColumnVisibilityState as ColumnVisibilityState$1, ExpandedState, ExpandedState as ExpandedState$1, FilterFn, FilterFnOption, GroupingState, GroupingState as GroupingState$1, Header as Header$1, HeaderGroup as HeaderGroup$1, PaginationState, PaginationState as PaginationState$1, ReactTable, Row as Row$1, RowData, RowData as RowData$1, RowPinningState, RowPinningState as RowPinningState$1, RowSelectionState, RowSelectionState as RowSelectionState$1, SortingState, SortingState as SortingState$1, TableFeatures, TableOptions, flexRender } from "@tanstack/react-table";
2
+ import { n as defaultLabels, t as DataTableLabels } from "./labels-D-6FCakH.js";
3
+ import { BoxProps, ComboboxData, ElementProps, Factory, MantineBreakpoint, MantineColor, MantineRadius, MantineSize, MantineSpacing, PopoverProps, StylesApiProps, TableTdProps, TableThProps, TableTrProps, TextInputProps } from "@mantine/core";
4
+ import { CSSProperties, ComponentProps, ComponentType, JSX as JSX$1, KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref } from "react";
5
+ import { Cell as Cell$1, CellData, Column as Column$1, ColumnDef as ColumnDef$1, ColumnFiltersState, ColumnFiltersState as ColumnFiltersState$1, ColumnOrderState, ColumnOrderState as ColumnOrderState$1, ColumnPinningState, ColumnPinningState as ColumnPinningState$1, ColumnSizingState, ColumnSizingState as ColumnSizingState$1, ColumnVisibilityState, ColumnVisibilityState as ColumnVisibilityState$1, ExpandedState, ExpandedState as ExpandedState$1, FilterFn, FilterFnOption, GroupingState, GroupingState as GroupingState$1, Header as Header$1, HeaderGroup as HeaderGroup$1, PaginationState, PaginationState as PaginationState$1, ReactTable, Row as Row$1, RowData, RowData as RowData$1, RowPinningState, RowPinningState as RowPinningState$1, RowSelectionState, RowSelectionState as RowSelectionState$1, SortingState, SortingState as SortingState$1, TableFeatures, TableOptions, aggregationFn_count, aggregationFn_extent, aggregationFn_first, aggregationFn_last, aggregationFn_max, aggregationFn_mean, aggregationFn_median, aggregationFn_min, aggregationFn_sum, aggregationFn_unique, aggregationFn_uniqueCount, flexRender } from "@tanstack/react-table";
6
6
  //#region src/icons.d.ts
7
7
  /**
8
8
  * What a replacement icon receives — the two knobs the chrome actually turns. Lucide icons are
@@ -51,7 +51,7 @@ interface DataTableIcons {
51
51
  unpin: DataTableIconComponent;
52
52
  pinEnd: DataTableIconComponent;
53
53
  }
54
- declare const defaultIcons: DataTableIcons;
54
+ export declare const defaultIcons: DataTableIcons;
55
55
  //#endregion
56
56
  //#region src/element-props.d.ts
57
57
  /**
@@ -97,17 +97,17 @@ declare const ledgerFeatures: {
97
97
  paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
98
98
  sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
99
99
  aggregationFns: {
100
- count: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number>;
101
- extent: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, [(number | Date) | undefined, (number | Date) | undefined]>;
102
- first: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, unknown>;
103
- last: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, unknown>;
104
- max: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, (number | Date) | undefined>;
105
- mean: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number | undefined>;
106
- median: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number | undefined>;
107
- min: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, (number | Date) | undefined>;
108
- sum: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number>;
109
- unique: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, unknown[]>;
110
- uniqueCount: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number>;
100
+ count: typeof aggregationFn_count;
101
+ extent: typeof aggregationFn_extent;
102
+ first: typeof aggregationFn_first;
103
+ last: typeof aggregationFn_last;
104
+ max: typeof aggregationFn_max;
105
+ mean: typeof aggregationFn_mean;
106
+ median: typeof aggregationFn_median;
107
+ min: typeof aggregationFn_min;
108
+ sum: typeof aggregationFn_sum;
109
+ unique: typeof aggregationFn_unique;
110
+ uniqueCount: typeof aggregationFn_uniqueCount;
111
111
  };
112
112
  filterFns: {
113
113
  "ledger-date-range": FilterFn<any, any>;
@@ -149,7 +149,7 @@ type LedgerFeatures = typeof ledgerFeatures;
149
149
  * TanStack's column helper, pre-bound to the canonical feature set — consumers keep the v8
150
150
  * calling shape (`createColumnHelper<Person>()`), never managing `TFeatures` themselves.
151
151
  */
152
- declare function createColumnHelper<TData extends RowData$1>(): import("@tanstack/react-table").ColumnHelper<{
152
+ export declare function createColumnHelper<TData extends RowData$1>(): import("@tanstack/react-table").ColumnHelper<{
153
153
  cellSpanningFeature: import("@tanstack/react-table").TableFeature;
154
154
  columnFacetingFeature: import("@tanstack/react-table").TableFeature;
155
155
  columnFilteringFeature: import("@tanstack/react-table").TableFeature;
@@ -174,17 +174,17 @@ declare function createColumnHelper<TData extends RowData$1>(): import("@tanstac
174
174
  paginatedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
175
175
  sortedRowModel: (table: import("@tanstack/react-table").Table<any, any>) => () => import("@tanstack/react-table").RowModel<any, any>;
176
176
  aggregationFns: {
177
- count: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number>;
178
- extent: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, [(number | Date) | undefined, (number | Date) | undefined]>;
179
- first: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, unknown>;
180
- last: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, unknown>;
181
- max: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, (number | Date) | undefined>;
182
- mean: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number | undefined>;
183
- median: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number | undefined>;
184
- min: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, (number | Date) | undefined>;
185
- sum: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number>;
186
- unique: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, unknown[]>;
187
- uniqueCount: import("@tanstack/react-table").AggregationFnDef<any, any, unknown, number>;
177
+ count: typeof aggregationFn_count;
178
+ extent: typeof aggregationFn_extent;
179
+ first: typeof aggregationFn_first;
180
+ last: typeof aggregationFn_last;
181
+ max: typeof aggregationFn_max;
182
+ mean: typeof aggregationFn_mean;
183
+ median: typeof aggregationFn_median;
184
+ min: typeof aggregationFn_min;
185
+ sum: typeof aggregationFn_sum;
186
+ unique: typeof aggregationFn_unique;
187
+ uniqueCount: typeof aggregationFn_uniqueCount;
188
188
  };
189
189
  filterFns: {
190
190
  "ledger-date-range": FilterFn<any, any>;
@@ -331,6 +331,11 @@ interface DataTableEditContext<TData extends RowData$1, TValue> {
331
331
  * editor is one of many identical controls in the grid, told apart by the column it edits.
332
332
  */
333
333
  label: string;
334
+ /**
335
+ * The Mantine size the cell's controls are drawn at — the table's `size` a step down
336
+ * (docs/styling.md#size) — so an editor fits the row it opens in.
337
+ */
338
+ size: MantineSize;
334
339
  }
335
340
  interface DataTableInstantEditContext<TData extends RowData$1, TValue> {
336
341
  row: Row<TData>;
@@ -357,6 +362,10 @@ interface DataTableInstantEditContext<TData extends RowData$1, TValue> {
357
362
  * Localized accessible name for the control (`labels.editColumn` over the column title).
358
363
  */
359
364
  label: string;
365
+ /**
366
+ * The Mantine size the cell's controls are drawn at (docs/styling.md#size).
367
+ */
368
+ size: MantineSize;
360
369
  }
361
370
  interface DataTableEditCommit<TData extends RowData$1> {
362
371
  row: Row<TData>;
@@ -903,7 +912,7 @@ interface DataTableColumnsPanelProps<TData extends RowData$1> {
903
912
  className?: string;
904
913
  style?: CSSProperties;
905
914
  }
906
- declare function DataTableColumnsPanel<TData extends RowData$1>(props: DataTableColumnsPanelProps<TData>): import("react").JSX.Element;
915
+ export declare function DataTableColumnsPanel<TData extends RowData$1>(props: DataTableColumnsPanelProps<TData>): import("react").JSX.Element;
907
916
  //#endregion
908
917
  //#region src/csv.d.ts
909
918
  interface ToCsvOptions {
@@ -928,20 +937,25 @@ interface ToCsvOptions {
928
937
  */
929
938
  escapeFormulas?: boolean;
930
939
  }
931
- declare function toCsv<TData extends RowData$1>(table: TableInstance<TData>, options?: ToCsvOptions): string;
940
+ export declare function toCsv<TData extends RowData$1>(table: TableInstance<TData>, options?: ToCsvOptions): string;
932
941
  //#endregion
933
942
  //#region src/pagination-bar.d.ts
934
943
  interface DataTablePaginationProps<TData extends RowData$1> {
935
944
  table: TableInstance<TData>;
936
945
  pageSizeOptions?: number[];
937
946
  labels?: Partial<DataTableLabels>;
947
+ /**
948
+ * The size of the table the bar stands under (docs/styling.md#size); `sm`, the table's own
949
+ * default, unless said.
950
+ */
951
+ size?: MantineSize;
938
952
  className?: string;
939
953
  style?: CSSProperties;
940
954
  }
941
955
  /**
942
956
  * Standalone compound (`DataTable.Pagination`) — place it anywhere, theme it via defaultProps.
943
957
  */
944
- declare function DataTablePagination<TData extends RowData$1>(props: DataTablePaginationProps<TData>): import("react").JSX.Element;
958
+ export declare function DataTablePagination<TData extends RowData$1>(props: DataTablePaginationProps<TData>): import("react").JSX.Element;
945
959
  //#endregion
946
960
  //#region src/search.d.ts
947
961
  interface DataTableSearchProps<TData extends RowData$1> extends Omit<TextInputProps, "value" | "defaultValue" | "onChange"> {
@@ -953,7 +967,7 @@ interface DataTableSearchProps<TData extends RowData$1> extends Omit<TextInputPr
953
967
  labels?: Partial<DataTableLabels>;
954
968
  icons?: Partial<DataTableIcons>;
955
969
  }
956
- declare function DataTableSearch<TData extends RowData$1>(props: DataTableSearchProps<TData>): import("react").JSX.Element;
970
+ export declare function DataTableSearch<TData extends RowData$1>(props: DataTableSearchProps<TData>): import("react").JSX.Element;
957
971
  //#endregion
958
972
  //#region src/selection-bar.d.ts
959
973
  interface DataTableSelectionBarProps<TData extends RowData$1> {
@@ -967,12 +981,12 @@ interface DataTableSelectionBarProps<TData extends RowData$1> {
967
981
  className?: string;
968
982
  style?: CSSProperties;
969
983
  }
970
- declare function DataTableSelectionBar<TData extends RowData$1>(props: DataTableSelectionBarProps<TData>): import("react").JSX.Element | null;
984
+ export declare function DataTableSelectionBar<TData extends RowData$1>(props: DataTableSelectionBarProps<TData>): import("react").JSX.Element | null;
971
985
  //#endregion
972
986
  //#region src/data-table.d.ts
973
987
  type DataTableStylesNames = "root" | "main" | "header" | "scroller" | "footer" | "table" | "thead" | "tbody" | "tfoot" | "headerRow" | "headerCell" | "headerLabel" | "headerActions" | "sortIndicator" | "resizer" | "filterPopover" | "row" | "cell" | "selectionCell" | "expanderCell" | "detailPanel" | "cellEditor" | "instantCell" | "instantSpinner" | "rowDragCell" | "rowDragOverlay" | "footerRow" | "footerCell" | "empty" | "loaderRow" | "loaderRowContent" | "paginationBar";
974
988
  interface DataTableCssVariables {
975
- root: "--ledger-striped-color" | "--ledger-hover-color" | "--ledger-border-color" | "--ledger-radius";
989
+ root: "--ledger-striped-color" | "--ledger-hover-color" | "--ledger-border-color" | "--ledger-radius" | "--ledger-font-size";
976
990
  }
977
991
  interface DataTableBaseProps<TData extends RowData$1> extends BoxProps, StylesApiProps<DataTableFactory>, ElementProps<"div"> {
978
992
  /**
@@ -999,6 +1013,12 @@ interface DataTableBaseProps<TData extends RowData$1> extends BoxProps, StylesAp
999
1013
  * vocabulary: `Paper.radius`).
1000
1014
  */
1001
1015
  radius?: MantineRadius;
1016
+ /**
1017
+ * The table's size (docs/styling.md#size): the type, the cell padding, a row's height and
1018
+ * the size of every control drawn in a cell, as one Mantine size — `sm` by default, which is
1019
+ * Mantine's own `Table`. The two spacing props override the size's padding when set.
1020
+ */
1021
+ size?: MantineSize;
1002
1022
  verticalSpacing?: MantineSpacing;
1003
1023
  horizontalSpacing?: MantineSpacing;
1004
1024
  tabularNums?: boolean;
@@ -1106,7 +1126,7 @@ type DataTableFactory = Factory<{
1106
1126
  ref: HTMLDivElement;
1107
1127
  stylesNames: DataTableStylesNames;
1108
1128
  vars: DataTableCssVariables;
1109
- signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX.Element;
1129
+ signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX$1.Element;
1110
1130
  staticComponents: {
1111
1131
  Search: typeof DataTableSearch;
1112
1132
  ColumnsPanel: typeof DataTableColumnsPanel;
@@ -1114,12 +1134,12 @@ type DataTableFactory = Factory<{
1114
1134
  SelectionBar: typeof DataTableSelectionBar;
1115
1135
  };
1116
1136
  }>;
1117
- declare const DataTable: (<TData extends RowData$1>(props: DataTableProps<TData>) => JSX.Element) & import("@mantine/core").ThemeExtend<{
1137
+ export declare const DataTable: (<TData extends RowData$1>(props: DataTableProps<TData>) => JSX$1.Element) & import("@mantine/core").ThemeExtend<{
1118
1138
  props: DataTableProps;
1119
1139
  ref: HTMLDivElement;
1120
1140
  stylesNames: DataTableStylesNames;
1121
1141
  vars: DataTableCssVariables;
1122
- signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX.Element;
1142
+ signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX$1.Element;
1123
1143
  staticComponents: {
1124
1144
  Search: typeof DataTableSearch;
1125
1145
  ColumnsPanel: typeof DataTableColumnsPanel;
@@ -1131,7 +1151,7 @@ declare const DataTable: (<TData extends RowData$1>(props: DataTableProps<TData>
1131
1151
  ref: HTMLDivElement;
1132
1152
  stylesNames: DataTableStylesNames;
1133
1153
  vars: DataTableCssVariables;
1134
- signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX.Element;
1154
+ signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX$1.Element;
1135
1155
  staticComponents: {
1136
1156
  Search: typeof DataTableSearch;
1137
1157
  ColumnsPanel: typeof DataTableColumnsPanel;
@@ -1149,7 +1169,7 @@ declare const DataTable: (<TData extends RowData$1>(props: DataTableProps<TData>
1149
1169
  ref: HTMLDivElement;
1150
1170
  stylesNames: DataTableStylesNames;
1151
1171
  vars: DataTableCssVariables;
1152
- signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX.Element;
1172
+ signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX$1.Element;
1153
1173
  staticComponents: {
1154
1174
  Search: typeof DataTableSearch;
1155
1175
  ColumnsPanel: typeof DataTableColumnsPanel;
@@ -1162,7 +1182,7 @@ declare const DataTable: (<TData extends RowData$1>(props: DataTableProps<TData>
1162
1182
  ref: HTMLDivElement;
1163
1183
  stylesNames: DataTableStylesNames;
1164
1184
  vars: DataTableCssVariables;
1165
- signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX.Element;
1185
+ signature: <TData extends RowData$1>(props: DataTableProps<TData>) => JSX$1.Element;
1166
1186
  staticComponents: {
1167
1187
  Search: typeof DataTableSearch;
1168
1188
  ColumnsPanel: typeof DataTableColumnsPanel;
@@ -1177,25 +1197,25 @@ declare const DataTable: (<TData extends RowData$1>(props: DataTableProps<TData>
1177
1197
  /**
1178
1198
  * A plain text editor: `meta.edit: textEditor()`.
1179
1199
  */
1180
- declare function textEditor(): DataTableEditRenderer<any, any>;
1200
+ export declare function textEditor(): DataTableEditRenderer<any, any>;
1181
1201
  /**
1182
1202
  * A numeric editor; an emptied input holds `null`, never `0`.
1183
1203
  */
1184
- declare function numberEditor(): DataTableEditRenderer<any, any>;
1204
+ export declare function numberEditor(): DataTableEditRenderer<any, any>;
1185
1205
  /**
1186
1206
  * A single-pick editor over the given options. In cell mode the dropdown opens immediately and
1187
1207
  * picking an option commits at once — one cell is the whole session; in row mode it is one
1188
1208
  * draft-bound field among the row's others, and the row's own commit decides.
1189
1209
  */
1190
- declare function selectEditor(options: ComboboxData): DataTableEditRenderer<any, any>;
1210
+ export declare function selectEditor(options: ComboboxData): DataTableEditRenderer<any, any>;
1191
1211
  /**
1192
1212
  * A live checkbox for an instant column: `meta.edit: { instant: checkboxEditor() }`. Each
1193
1213
  * toggle commits the flipped value; the host disables it while its own write is out.
1194
1214
  */
1195
- declare function checkboxEditor(): DataTableInstantEditRenderer<any, any>;
1215
+ export declare function checkboxEditor(): DataTableInstantEditRenderer<any, any>;
1196
1216
  //#endregion
1197
1217
  //#region src/use-data-table.d.ts
1198
- declare function useDataTable<TData extends RowData$1>(options: UseDataTableOptions<TData>): TableInstance<TData>;
1218
+ export declare function useDataTable<TData extends RowData$1>(options: UseDataTableOptions<TData>): TableInstance<TData>;
1199
1219
  //#endregion
1200
- export { type Cell, type Column, type ColumnDef, type ColumnFiltersState, type ColumnOrderState, type ColumnPinningState, type ColumnSizingState, type ColumnVisibilityState, DataTable, type DataTableBaseProps, DataTableColumnsPanel, type DataTableColumnsPanelProps, type DataTableCssVariables, type DataTableEditCommit, type DataTableEditConfig, type DataTableEditContext, type DataTableEditMode, type DataTableEditRenderer, type DataTableEditTrigger, type DataTableEditingCell, type DataTableElementProps, type DataTableExportMeta, type DataTableFactory, type DataTableFilterConfig, type DataTableFilterVariant, type DataTableHandle, type DataTableIconComponent, type DataTableIconProps, type DataTableIcons, type DataTableInstantEditConfig, type DataTableInstantEditContext, type DataTableInstantEditRenderer, type DataTableLabels, DataTablePagination, type DataTablePaginationProps, type DataTablePersistState, type DataTablePersistableSlice, type DataTableProps, type DataTableRowEditCommit, type DataTableRowReorder, type DataTableScrollOptions, DataTableSearch, type DataTableSearchProps, DataTableSelectionBar, type DataTableSelectionBarProps, type DataTableStylesNames, type ExpandedState, type GroupingState, type Header, type HeaderGroup, type LedgerCellEditor, type LedgerEditingController, type LedgerFeatures, type LedgerInstantEditingController, type LedgerMeta, type LedgerRowEditingController, type LedgerRowEditor, type PaginationState, type Row, type RowData, type RowPinningState, type RowSelectionState, type SortingState, type TableInstance, type ToCsvOptions, type UseDataTableOptions, checkboxEditor, createColumnHelper, defaultIcons, defaultLabels, flexRender, numberEditor, selectEditor, textEditor, toCsv, useDataTable };
1220
+ export { type Cell, type Column, type ColumnDef, type ColumnFiltersState, type ColumnOrderState, type ColumnPinningState, type ColumnSizingState, type ColumnVisibilityState, type DataTableBaseProps, type DataTableColumnsPanelProps, type DataTableCssVariables, type DataTableEditCommit, type DataTableEditConfig, type DataTableEditContext, type DataTableEditMode, type DataTableEditRenderer, type DataTableEditTrigger, type DataTableEditingCell, type DataTableElementProps, type DataTableExportMeta, type DataTableFactory, type DataTableFilterConfig, type DataTableFilterVariant, type DataTableHandle, type DataTableIconComponent, type DataTableIconProps, type DataTableIcons, type DataTableInstantEditConfig, type DataTableInstantEditContext, type DataTableInstantEditRenderer, type DataTableLabels, type DataTablePaginationProps, type DataTablePersistState, type DataTablePersistableSlice, type DataTableProps, type DataTableRowEditCommit, type DataTableRowReorder, type DataTableScrollOptions, type DataTableSearchProps, type DataTableSelectionBarProps, type DataTableStylesNames, type ExpandedState, type GroupingState, type Header, type HeaderGroup, type LedgerCellEditor, type LedgerEditingController, type LedgerFeatures, type LedgerInstantEditingController, type LedgerMeta, type LedgerRowEditingController, type LedgerRowEditor, type PaginationState, type Row, type RowData, type RowPinningState, type RowSelectionState, type SortingState, type TableInstance, type ToCsvOptions, type UseDataTableOptions, defaultLabels, flexRender };
1201
1221
  //# sourceMappingURL=index.d.ts.map