trotl-table 1.0.104 → 1.0.105
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/README.md +4 -3
- package/dist/Table.cjs.js +4 -4
- package/dist/Table.cjs.js.map +1 -1
- package/dist/Table.esm.js +4 -4
- package/dist/Table.esm.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -121,16 +121,17 @@ export default function Demo() {
|
|
|
121
121
|
- `tableId`: unique string ID for the table
|
|
122
122
|
- `columns`: array of `{ header, accessor }`
|
|
123
123
|
- `data`: array of row objects
|
|
124
|
-
- `styles`: optional table theme.
|
|
124
|
+
- `styles`: optional table theme. Supported themes use fine horizontal separators and outlined action icons:
|
|
125
125
|
- `"professional"`: graphite-navy header and slate-blue selection/focus states.
|
|
126
126
|
- `"power"`: bold charcoal header with warm amber selection/focus states and ivory row banding.
|
|
127
127
|
- `"lady"`: refined plum header with rose selection/focus states and soft blush row banding.
|
|
128
|
+
- `"amazing"`: airy white audit-table styling with a pale slate header, uppercase muted labels, fine separators, and generous `60px` rows. The header and group headers are `42px` tall.
|
|
128
129
|
- Missing or unrecognized values retain the default appearance.
|
|
129
130
|
- `isGrouped`: enable grouped mode (true/false)
|
|
130
131
|
- `groupKey`: key to group rows by
|
|
131
132
|
- `extraSearchTerm`: string to filter + highlight rows
|
|
132
|
-
- `rowHeight`: row height in px (default `34`). Ignored with any supported theme
|
|
133
|
-
- `groupHeaderHeight`: group header height in px (default `36`). Ignored with any supported theme
|
|
133
|
+
- `rowHeight`: row height in px (default `34`). Ignored with any supported theme: `"amazing"` uses `60px`; the other themes use `30px`.
|
|
134
|
+
- `groupHeaderHeight`: group header height in px (default `36`). Ignored with any supported theme: `"amazing"` uses `42px`; the other themes use `32px`.
|
|
134
135
|
- `mobileColumnCount`: number of data columns shown at viewport widths of 768px or less (1 or 2; default `2`). The full row details are shown in a modal when a mobile row is clicked.
|
|
135
136
|
- `mobileRowClick`: optional callback `(row) => {}` invoked instead of opening the built-in details modal when a mobile row is clicked. Clicks on row controls and action buttons keep their existing behavior.
|
|
136
137
|
- On mobile, when `enableMouseRightClick` actions are provided, double-tapping a row opens the same context menu as a right click (a single tap then opens details after a short ~280ms delay).
|
package/dist/Table.cjs.js
CHANGED
|
@@ -9762,9 +9762,9 @@ function TableInner({
|
|
|
9762
9762
|
timeoutLoading = 5,
|
|
9763
9763
|
t
|
|
9764
9764
|
}) {
|
|
9765
|
-
const hasTheme = ["professional", "power", "lady"].includes(styles);
|
|
9766
|
-
const rowHeight = hasTheme ? 30 : requestedRowHeight;
|
|
9767
|
-
const groupHeaderHeight = hasTheme ? 32 : requestedGroupHeaderHeight;
|
|
9765
|
+
const hasTheme = ["professional", "power", "lady", "amazing"].includes(styles);
|
|
9766
|
+
const rowHeight = hasTheme ? styles === "amazing" ? 60 : 30 : requestedRowHeight;
|
|
9767
|
+
const groupHeaderHeight = hasTheme ? styles === "amazing" ? 42 : 32 : requestedGroupHeaderHeight;
|
|
9768
9768
|
const virtualizedListRef = React.useRef(null);
|
|
9769
9769
|
React.useEffect(() => {
|
|
9770
9770
|
virtualizedListRef.current?.recomputeRowHeights();
|
|
@@ -11485,7 +11485,7 @@ function TableInner({
|
|
|
11485
11485
|
}
|
|
11486
11486
|
}, [useExternalDndContext, enableExternalRowDrop, externalDrop]);
|
|
11487
11487
|
const tableMarkup = /*#__PURE__*/React.createElement("div", {
|
|
11488
|
-
className: "table-container",
|
|
11488
|
+
className: hasTheme ? "table-container table-themed" : "table-container",
|
|
11489
11489
|
"data-table-style": hasTheme ? styles : undefined,
|
|
11490
11490
|
ref: setTableRef,
|
|
11491
11491
|
style: useExternalDndContext && enableExternalRowDrop ? {
|