@overdoser/react-toolkit 0.0.10 → 0.0.12
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/AGENTS.md +1 -1
- package/components/Table/Table.d.ts +13 -1
- package/index.js +1296 -1284
- package/llms.txt +16 -0
- package/manifest.json +2 -0
- package/package.json +1 -1
- package/recipes/multi-select-in-modal.tsx +7 -1
package/AGENTS.md
CHANGED
|
@@ -113,7 +113,7 @@ Full copy-paste-able files live alongside this doc. Each is one self-contained f
|
|
|
113
113
|
- [recipes/interactive-pie-chart.tsx](./recipes/interactive-pie-chart.tsx) — Metric/period filter for `PieChart`: all slices stay visible, the selector picks which metric drives the pie. Three exports: `InteractivePieChartTiles`, `InteractivePieChartNavigator`, `InteractivePieChartDropdown`.
|
|
114
114
|
- [recipes/trading-chart.tsx](./recipes/trading-chart.tsx) — Full-stack `TradingChart` with a resolution selector, in-memory datafeed adapter, and the SMA/EMA/Bollinger/RSI/Volume indicator stack. Swap `createMemoryDatafeed` for your own REST/WebSocket adapter; everything else carries over.
|
|
115
115
|
- [recipes/tag-input.tsx](./recipes/tag-input.tsx) — Tag-input pattern via `<Select multiple allowCreate>`: pick from existing tags or type a new one + Enter to create. `onCreate` persists the new tag back into the options list. Wired through `<FormField>` for react-hook-form integration.
|
|
116
|
-
- [recipes/multi-select-in-modal.tsx](./recipes/multi-select-in-modal.tsx) — `<Select multiple>` inside `<Modal size="sm">`. Default `portal={true}` lets the menu escape the modal's `overflow: hidden` and sit above the modal via `--crk-z-floating`, so the modal does NOT need to be sized to contain the menu.
|
|
116
|
+
- [recipes/multi-select-in-modal.tsx](./recipes/multi-select-in-modal.tsx) — `<Select multiple>` inside `<Modal size="sm">`. Default `portal={true}` lets the menu escape the modal's `overflow: hidden` and sit above the modal via `--crk-z-floating`, so the modal does NOT need to be sized to contain the menu. Pair with `closeOnBackdrop={false}` so a backdrop click closes the open menu only, not the modal.
|
|
117
117
|
|
|
118
118
|
## Anti-patterns to refuse
|
|
119
119
|
|
|
@@ -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 {};
|