@coldsmirk/ledger-mantine 0.3.0 → 0.4.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.cjs +123 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -2
- package/dist/index.d.ts +22 -2
- package/dist/index.js +124 -69
- package/dist/index.js.map +1 -1
- package/dist/styles.css +9 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
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";
|
|
3
|
+
import { BoxProps, ComboboxData, ElementProps, Factory, MantineBreakpoint, MantineColor, MantineRadius, MantineSize, MantineSpacing, PopoverProps, StylesApiProps, TableTdProps, TableThProps, TableTrProps, TextInputProps } from "@mantine/core";
|
|
4
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
5
|
import { CSSProperties, ComponentProps, ComponentType, JSX, KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref } from "react";
|
|
6
6
|
//#region src/icons.d.ts
|
|
@@ -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>;
|
|
@@ -935,6 +944,11 @@ 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
|
}
|
|
@@ -972,7 +986,7 @@ declare function DataTableSelectionBar<TData extends RowData$1>(props: DataTable
|
|
|
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;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
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";
|
|
3
|
+
import { BoxProps, ComboboxData, ElementProps, Factory, MantineBreakpoint, MantineColor, MantineRadius, MantineSize, MantineSpacing, PopoverProps, StylesApiProps, TableTdProps, TableThProps, TableTrProps, TextInputProps } from "@mantine/core";
|
|
4
4
|
import { CSSProperties, ComponentProps, ComponentType, JSX, KeyboardEvent, MouseEvent, ReactElement, ReactNode, Ref } from "react";
|
|
5
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";
|
|
6
6
|
//#region src/icons.d.ts
|
|
@@ -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>;
|
|
@@ -935,6 +944,11 @@ 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
|
}
|
|
@@ -972,7 +986,7 @@ declare function DataTableSelectionBar<TData extends RowData$1>(props: DataTable
|
|
|
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;
|