@worldresources/wri-design-systems 2.194.3 → 2.194.4

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.d.ts CHANGED
@@ -1250,6 +1250,8 @@ type TableColumn = {
1250
1250
  label: string;
1251
1251
  sortable?: boolean;
1252
1252
  width?: string;
1253
+ /** Optional custom renderer for this column cell. */
1254
+ cell?: (row: any) => ReactNode;
1253
1255
  /** When true, this column sticks to the left during horizontal scroll. */
1254
1256
  sticky?: boolean;
1255
1257
  };
@@ -1260,7 +1262,7 @@ type TableRenderRowContext = {
1260
1262
  type TableProps = {
1261
1263
  columns: TableColumn[];
1262
1264
  data?: any;
1263
- renderRow: (row: any, context?: TableRenderRowContext) => ReactNode;
1265
+ renderRow?: (row: any, context?: TableRenderRowContext) => ReactNode;
1264
1266
  striped?: boolean;
1265
1267
  stickyHeader?: boolean;
1266
1268
  selectable?: boolean;
@@ -1280,6 +1282,7 @@ type TableProps = {
1280
1282
  onPageSizeChange?: (pageSize: number) => void;
1281
1283
  onPageChange?: (page: number) => void;
1282
1284
  onAllItemsSelected?: (checked: boolean) => void;
1285
+ onRowSelected?: (row: any, checked: boolean) => void;
1283
1286
  loading?: boolean;
1284
1287
  /** When set, the table scrolls vertically within this height and horizontally when it overflows its container (e.g. '400px', '60vh'). */
1285
1288
  height?: string;
@@ -1287,7 +1290,7 @@ type TableProps = {
1287
1290
  labels?: Partial<TableLabels>;
1288
1291
  };
1289
1292
 
1290
- declare const Table: ({ columns, data, renderRow, striped, stickyHeader, pagination, selectable, selectedRows, variant, onSortColumn, onPageSizeChange, onPageChange, onAllItemsSelected, loading, height, labels, }: TableProps) => _emotion_react_jsx_runtime.JSX.Element;
1293
+ declare const Table: ({ columns, data, renderRow, striped, stickyHeader, pagination, selectable, selectedRows, variant, onSortColumn, onPageSizeChange, onPageChange, onAllItemsSelected, onRowSelected, loading, height, labels, }: TableProps) => _emotion_react_jsx_runtime.JSX.Element;
1291
1294
 
1292
1295
  declare const TableRow: React__default.ForwardRefExoticComponent<Table$1.RowProps & React__default.RefAttributes<HTMLTableRowElement>>;
1293
1296
  declare const TableCell: React__default.ForwardRefExoticComponent<Table$1.CellProps & React__default.RefAttributes<HTMLTableCellElement>>;