infinity-ui-elements 1.8.40 → 1.8.43
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/components/Table/Table.d.ts +1 -2
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/Table.stories.d.ts.map +1 -1
- package/dist/index.esm.js +7 -14
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4320,8 +4320,8 @@ function TableBody({ rows, enableRowSelection, size, variant, showRowHover, cell
|
|
|
4320
4320
|
"bg-surface-fill-neutral-moderate", onRowClick && "cursor-pointer", isRowHovered &&
|
|
4321
4321
|
showRowHover &&
|
|
4322
4322
|
"bg-surface-fill-neutral-moderate", getRowClassName(row.original)), onClick: handleClick, onMouseEnter: () => setHoveredRow(row.id), onMouseLeave: () => setHoveredRow(null), children: [enableRowSelection && (jsxRuntime.jsx("td", { className: cn(tableCellVariants({ size }), "w-10", cellClassName), style: {
|
|
4323
|
-
paddingTop: "
|
|
4324
|
-
paddingBottom: "
|
|
4323
|
+
paddingTop: "16px",
|
|
4324
|
+
paddingBottom: "16px",
|
|
4325
4325
|
}, children: jsxRuntime.jsx(Checkbox, { checked: row.getIsSelected(), isIndeterminate: row.getIsSomeSelected(), onChange: row.getToggleSelectedHandler(), onClick: (e) => e.stopPropagation(), "aria-label": `Select row ${row.id}` }) })), row.getVisibleCells().map((cell, cellIndex) => {
|
|
4326
4326
|
const isCellFocused = focusedCell?.rowId === row.id &&
|
|
4327
4327
|
focusedCell?.cellId === cell.id;
|
|
@@ -4335,10 +4335,10 @@ function TableBody({ rows, enableRowSelection, size, variant, showRowHover, cell
|
|
|
4335
4335
|
minWidth: cell.column.columnDef.minSize,
|
|
4336
4336
|
maxWidth: cell.column.columnDef.maxSize,
|
|
4337
4337
|
}),
|
|
4338
|
-
paddingTop: "
|
|
4339
|
-
paddingBottom: "
|
|
4338
|
+
paddingTop: "16px",
|
|
4339
|
+
paddingBottom: "16px",
|
|
4340
4340
|
...(isFirstCell && { paddingLeft: "24px" }),
|
|
4341
|
-
...(isLastCell && { paddingRight: "
|
|
4341
|
+
...(isLastCell && { paddingRight: "16px" }),
|
|
4342
4342
|
}, tabIndex: 0, onFocus: () => setFocusedCell({ rowId: row.id, cellId: cell.id }), onBlur: () => setFocusedCell(null), children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id));
|
|
4343
4343
|
})] }, row.id));
|
|
4344
4344
|
}) }));
|
|
@@ -4352,7 +4352,7 @@ function renderDefaultEmptyState({ colSpan }) {
|
|
|
4352
4352
|
}
|
|
4353
4353
|
|
|
4354
4354
|
// ==================== Component ====================
|
|
4355
|
-
function TableComponent({ className, wrapperClassName, containerClassName, variant, size = "medium", table, enableRowSelection = false, enableSelectAll = false, isLoading = false, loading, loadingComponent, emptyComponent, enableHorizontalScroll = false, stickyHeader = false,
|
|
4355
|
+
function TableComponent({ className, wrapperClassName, containerClassName, variant, size = "medium", table, enableRowSelection = false, enableSelectAll = false, isLoading = false, loading, loadingComponent, emptyComponent, enableHorizontalScroll = false, stickyHeader = false, showRowHover = true, onRowClick, rowClassName, headerClassName, cellClassName, showHeaderBackground = true, loadingSkeletonRows, loadingSkeletonHeight, columnWidths, columnMinWidths, columnMaxWidths, ...props }, ref) {
|
|
4356
4356
|
// ==================== Computed Values ====================
|
|
4357
4357
|
const hasData = table.getRowModel().rows?.length > 0;
|
|
4358
4358
|
const headerGroups = table.getHeaderGroups();
|
|
@@ -4371,13 +4371,6 @@ function TableComponent({ className, wrapperClassName, containerClassName, varia
|
|
|
4371
4371
|
maxWidth: normalizeSizeValue(maxWidth),
|
|
4372
4372
|
};
|
|
4373
4373
|
}, [columnWidths, columnMinWidths, columnMaxWidths]);
|
|
4374
|
-
const containerStyle = React__namespace.useMemo(() => {
|
|
4375
|
-
if (!maxHeight)
|
|
4376
|
-
return undefined;
|
|
4377
|
-
return {
|
|
4378
|
-
maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight,
|
|
4379
|
-
};
|
|
4380
|
-
}, [maxHeight]);
|
|
4381
4374
|
// Resolve loading state: prefer 'loading' prop, fallback to 'isLoading' for backward compatibility
|
|
4382
4375
|
const resolvedLoading = typeof loading === "boolean" ? loading : Boolean(isLoading);
|
|
4383
4376
|
const skeletonRowCount = loadingSkeletonRows ?? 5;
|
|
@@ -4436,7 +4429,7 @@ function TableComponent({ className, wrapperClassName, containerClassName, varia
|
|
|
4436
4429
|
return renderDefaultEmptyState({ colSpan: table.getAllColumns().length });
|
|
4437
4430
|
};
|
|
4438
4431
|
// ==================== Render ====================
|
|
4439
|
-
return (jsxRuntime.jsx("div", { ref: ref, className: cn("w-full", wrapperClassName), ...props, children: jsxRuntime.jsx("div", { className: cn("relative", enableHorizontalScroll ? "overflow-x-auto" : "overflow-x-hidden",
|
|
4432
|
+
return (jsxRuntime.jsx("div", { ref: ref, className: cn("w-full", wrapperClassName), ...props, children: jsxRuntime.jsx("div", { className: cn("relative", enableHorizontalScroll ? "overflow-x-auto" : "overflow-x-hidden", containerClassName), children: jsxRuntime.jsxs("table", { className: cn(tableVariants({ variant, size }), className), children: [jsxRuntime.jsx(TableHeader, { headerGroups: headerGroups, enableRowSelection: enableRowSelection, enableSelectAll: enableSelectAll, showHeaderBackground: showHeaderBackground, stickyHeader: stickyHeader, size: size, headerClassName: headerClassName, onToggleAllRows: (e) => table.getToggleAllRowsSelectedHandler()(e), isAllRowsSelected: table.getIsAllRowsSelected(), isSomeRowsSelected: table.getIsSomeRowsSelected(), getColumnStyle: getColumnStyle }), resolvedLoading ? (jsxRuntime.jsx("tbody", { children: renderLoadingContent() })) : !hasData ? (jsxRuntime.jsx("tbody", { children: renderEmptyState() })) : (jsxRuntime.jsx(TableBody, { rows: table.getRowModel().rows, enableRowSelection: enableRowSelection, size: size || "medium", variant: variant || "default", showRowHover: showRowHover, cellClassName: cellClassName, onRowClick: onRowClick, getRowClassName: getRowClassName, handleRowClick: handleRowClickInternal, getColumnStyle: getColumnStyle }))] }) }) }));
|
|
4440
4433
|
}
|
|
4441
4434
|
// ==================== Export ====================
|
|
4442
4435
|
const Table = React__namespace.forwardRef(TableComponent);
|