@coldsmirk/ledger-mantine 0.1.1 → 0.2.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 +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/styles.css +10 -1
- 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, MantineSpacing, PopoverProps, StylesApiProps, TableTdProps, TableThProps, TableTrProps, TextInputProps } from "@mantine/core";
|
|
3
|
+
import { BoxProps, ComboboxData, ElementProps, Factory, MantineBreakpoint, MantineColor, MantineRadius, 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
|
|
@@ -972,7 +972,7 @@ declare function DataTableSelectionBar<TData extends RowData$1>(props: DataTable
|
|
|
972
972
|
//#region src/data-table.d.ts
|
|
973
973
|
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
974
|
interface DataTableCssVariables {
|
|
975
|
-
root: "--ledger-striped-color" | "--ledger-hover-color" | "--ledger-border-color";
|
|
975
|
+
root: "--ledger-striped-color" | "--ledger-hover-color" | "--ledger-border-color" | "--ledger-radius";
|
|
976
976
|
}
|
|
977
977
|
interface DataTableBaseProps<TData extends RowData$1> extends BoxProps, StylesApiProps<DataTableFactory>, ElementProps<"div"> {
|
|
978
978
|
/**
|
|
@@ -987,6 +987,12 @@ interface DataTableBaseProps<TData extends RowData$1> extends BoxProps, StylesAp
|
|
|
987
987
|
withColumnBorders?: boolean;
|
|
988
988
|
withRowBorders?: boolean;
|
|
989
989
|
borderColor?: MantineColor;
|
|
990
|
+
/**
|
|
991
|
+
* Corner radius of the table box — header, body, and footer as one rounded, clipping box;
|
|
992
|
+
* the `withTableBorder` frame follows it, so a framed table can be its own card (host
|
|
993
|
+
* vocabulary: `Paper.radius`).
|
|
994
|
+
*/
|
|
995
|
+
radius?: MantineRadius;
|
|
990
996
|
verticalSpacing?: MantineSpacing;
|
|
991
997
|
horizontalSpacing?: MantineSpacing;
|
|
992
998
|
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, MantineSpacing, PopoverProps, StylesApiProps, TableTdProps, TableThProps, TableTrProps, TextInputProps } from "@mantine/core";
|
|
3
|
+
import { BoxProps, ComboboxData, ElementProps, Factory, MantineBreakpoint, MantineColor, MantineRadius, 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
|
|
@@ -972,7 +972,7 @@ declare function DataTableSelectionBar<TData extends RowData$1>(props: DataTable
|
|
|
972
972
|
//#region src/data-table.d.ts
|
|
973
973
|
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
974
|
interface DataTableCssVariables {
|
|
975
|
-
root: "--ledger-striped-color" | "--ledger-hover-color" | "--ledger-border-color";
|
|
975
|
+
root: "--ledger-striped-color" | "--ledger-hover-color" | "--ledger-border-color" | "--ledger-radius";
|
|
976
976
|
}
|
|
977
977
|
interface DataTableBaseProps<TData extends RowData$1> extends BoxProps, StylesApiProps<DataTableFactory>, ElementProps<"div"> {
|
|
978
978
|
/**
|
|
@@ -987,6 +987,12 @@ interface DataTableBaseProps<TData extends RowData$1> extends BoxProps, StylesAp
|
|
|
987
987
|
withColumnBorders?: boolean;
|
|
988
988
|
withRowBorders?: boolean;
|
|
989
989
|
borderColor?: MantineColor;
|
|
990
|
+
/**
|
|
991
|
+
* Corner radius of the table box — header, body, and footer as one rounded, clipping box;
|
|
992
|
+
* the `withTableBorder` frame follows it, so a framed table can be its own card (host
|
|
993
|
+
* vocabulary: `Paper.radius`).
|
|
994
|
+
*/
|
|
995
|
+
radius?: MantineRadius;
|
|
990
996
|
verticalSpacing?: MantineSpacing;
|
|
991
997
|
horizontalSpacing?: MantineSpacing;
|
|
992
998
|
tabularNums?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { move } from "@dnd-kit/helpers";
|
|
3
3
|
import { DragDropProvider, PointerSensor, useDraggable } from "@dnd-kit/react";
|
|
4
4
|
import { useSortable } from "@dnd-kit/react/sortable";
|
|
5
|
-
import { ActionIcon, Box, Button, Center, Checkbox, CloseButton, EmptyState, Group, Loader, LoadingOverlay, MultiSelect, NumberInput, Pagination, Popover, Portal, Radio, ScrollArea, SegmentedControl, Select, Skeleton, Stack, Table, Text, TextInput, Tooltip, VisuallyHidden, createSafeContext, createVarsResolver, genericFactory, getThemeColor, useMantineClassNamesPrefix, useMantineIsHeadless, useMantineStylesTransform, useMantineTheme, useMantineWithStaticClasses, useProps, useStyles } from "@mantine/core";
|
|
5
|
+
import { ActionIcon, Box, Button, Center, Checkbox, CloseButton, EmptyState, Group, Loader, LoadingOverlay, MultiSelect, NumberInput, Pagination, Popover, Portal, Radio, ScrollArea, SegmentedControl, Select, Skeleton, Stack, Table, Text, TextInput, Tooltip, VisuallyHidden, createSafeContext, createVarsResolver, genericFactory, getRadius, getThemeColor, useMantineClassNamesPrefix, useMantineIsHeadless, useMantineStylesTransform, useMantineTheme, useMantineWithStaticClasses, useProps, useStyles } from "@mantine/core";
|
|
6
6
|
import clsx from "clsx";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { AutoScroller, Cursor, PointerActivationConstraints, PreventSelection } from "@dnd-kit/dom";
|
|
@@ -6381,11 +6381,12 @@ const defaultProps = {
|
|
|
6381
6381
|
function leafCol(column) {
|
|
6382
6382
|
return /* @__PURE__ */ jsx("col", { style: { width: `var(${columnWidthVar(column.id)})` } }, column.id);
|
|
6383
6383
|
}
|
|
6384
|
-
const varsResolver = createVarsResolver((theme, { stripedColor, highlightOnHoverColor, borderColor }) => {
|
|
6384
|
+
const varsResolver = createVarsResolver((theme, { stripedColor, highlightOnHoverColor, borderColor, radius }) => {
|
|
6385
6385
|
return { root: {
|
|
6386
6386
|
"--ledger-striped-color": stripedColor ? getThemeColor(stripedColor, theme) : void 0,
|
|
6387
6387
|
"--ledger-hover-color": highlightOnHoverColor ? getThemeColor(highlightOnHoverColor, theme) : void 0,
|
|
6388
|
-
"--ledger-border-color": borderColor ? getThemeColor(borderColor, theme) : void 0
|
|
6388
|
+
"--ledger-border-color": borderColor ? getThemeColor(borderColor, theme) : void 0,
|
|
6389
|
+
"--ledger-radius": radius === void 0 ? void 0 : getRadius(radius)
|
|
6389
6390
|
} };
|
|
6390
6391
|
});
|
|
6391
6392
|
const OPTION_KEY_SET = /* @__PURE__ */ new Set([
|
|
@@ -6506,7 +6507,7 @@ function DataTableFromOptions({ props }) {
|
|
|
6506
6507
|
});
|
|
6507
6508
|
}
|
|
6508
6509
|
function DataTableCore({ presentation, stylesProps, table }) {
|
|
6509
|
-
const { striped, stripedColor: _stripedColor, highlightOnHover, highlightOnHoverColor: _highlightOnHoverColor, withTableBorder, withColumnBorders, withRowBorders, borderColor: _borderColor, verticalSpacing, horizontalSpacing, tabularNums, tableMinWidth, virtualizedRows, virtualizedColumns, onEndReached, endReachedOffset, loadingMore, loadMoreError, loading, emptyState, error, onRetry, withColumnHeaders, withPaginationBar, pageSizeOptions, onRowClick, onRowActivate, onRowDoubleClick, onRowContextMenu, rowProps, headerRowProps, footerRowProps, viewportProps, labels: labelsProp, icons: iconsProp, handleRef, ref: rootRef, classNames, styles, unstyled, vars, className, style, attributes, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...others } = presentation;
|
|
6510
|
+
const { striped, stripedColor: _stripedColor, highlightOnHover, highlightOnHoverColor: _highlightOnHoverColor, withTableBorder, withColumnBorders, withRowBorders, borderColor: _borderColor, radius: _radius, verticalSpacing, horizontalSpacing, tabularNums, tableMinWidth, virtualizedRows, virtualizedColumns, onEndReached, endReachedOffset, loadingMore, loadMoreError, loading, emptyState, error, onRetry, withColumnHeaders, withPaginationBar, pageSizeOptions, onRowClick, onRowActivate, onRowDoubleClick, onRowContextMenu, rowProps, headerRowProps, footerRowProps, viewportProps, labels: labelsProp, icons: iconsProp, handleRef, ref: rootRef, classNames, styles, unstyled, vars, className, style, attributes, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...others } = presentation;
|
|
6510
6511
|
const getStyles = useStyles({
|
|
6511
6512
|
name: "DataTable",
|
|
6512
6513
|
classes,
|