@overdoser/react-toolkit 0.0.11 → 0.0.13
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/components/Table/Table.d.ts +13 -1
- package/components/inputs/Select/Select.d.ts +6 -0
- package/index.js +1400 -1389
- package/llms.txt +17 -0
- package/manifest.json +3 -0
- package/package.json +1 -1
|
@@ -61,6 +61,18 @@ export interface TableProps<T extends Record<string, unknown>> {
|
|
|
61
61
|
style?: React.CSSProperties;
|
|
62
62
|
/** Column key to use as React `key` per row. Falls back to row index. */
|
|
63
63
|
rowKey?: keyof T & string;
|
|
64
|
+
/**
|
|
65
|
+
* Per-row class name. Pass a string to apply the same class to every row,
|
|
66
|
+
* or a function `(row, index) => className` to compute it dynamically (e.g.
|
|
67
|
+
* highlight rows matching a predicate). Returned `undefined` adds nothing.
|
|
68
|
+
*/
|
|
69
|
+
rowClassName?: string | ((row: T, index: number) => string | undefined);
|
|
70
|
+
/**
|
|
71
|
+
* Per-row inline style. Pass a `CSSProperties` object to apply the same
|
|
72
|
+
* style to every row, or a function `(row, index) => style` to compute it
|
|
73
|
+
* dynamically. Returned `undefined` adds nothing.
|
|
74
|
+
*/
|
|
75
|
+
rowStyle?: React.CSSProperties | ((row: T, index: number) => React.CSSProperties | undefined);
|
|
64
76
|
/** Content rendered when `data` is empty. @default 'No data' */
|
|
65
77
|
emptyMessage?: ReactNode;
|
|
66
78
|
/** When provided, renders a paginator below the table. */
|
|
@@ -80,6 +92,6 @@ export interface TableProps<T extends Record<string, unknown>> {
|
|
|
80
92
|
* page already sorted and sliced; pass `pagination.totalRows` so the
|
|
81
93
|
* paginator can compute page count.
|
|
82
94
|
*/
|
|
83
|
-
declare function TableInner<T extends Record<string, unknown>>({ data, columns, sortConfig: controlledSortConfig, onSort, multiSort, striped, hoverable, compact, className, style, rowKey, emptyMessage, pagination, classes, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
declare function TableInner<T extends Record<string, unknown>>({ data, columns, sortConfig: controlledSortConfig, onSort, multiSort, striped, hoverable, compact, className, style, rowKey, rowClassName, rowStyle, emptyMessage, pagination, classes, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
84
96
|
export declare const Table: typeof TableInner;
|
|
85
97
|
export {};
|
|
@@ -46,6 +46,12 @@ export interface SelectProps extends Omit<ComponentPropsWithRef<'select'>, 'onCh
|
|
|
46
46
|
onValuesChange?: (values: string[]) => void;
|
|
47
47
|
/** Clear the search query after each toggle in multi mode. @default true */
|
|
48
48
|
clearSearchOnSelect?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Multi-mode only. When `true`, the menu closes after each add/remove (and
|
|
51
|
+
* after a `Create` row click) — the user has to reopen to pick another.
|
|
52
|
+
* Set to `false` for the "stay open until done" pattern. @default true
|
|
53
|
+
*/
|
|
54
|
+
closeOnSelect?: boolean;
|
|
49
55
|
/**
|
|
50
56
|
* Multi-mode only. When `true`, an extra "Create '<query>'" row appears
|
|
51
57
|
* in the menu whenever the search query doesn't match an existing option.
|