@juspay/svelte-ui-components 2.108.1 → 2.109.0

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.
@@ -49,6 +49,7 @@
49
49
  toolbarSlot,
50
50
  rowNumberColumn = false,
51
51
  rowNumberLabel = '#',
52
+ summaryRowIndex = null,
52
53
  headerTooltipIcon,
53
54
  headerTooltipPosition,
54
55
  usePortal = false
@@ -796,6 +797,8 @@
796
797
  class="table-row"
797
798
  class:table-row-clickable={isRowClickable}
798
799
  class:table-row-selected={rowSelected}
800
+ class:table-summary-row={summaryRowIndex !== null &&
801
+ originalIndex === summaryRowIndex}
799
802
  data-pw={typeof getRowTestId === 'function' ? getRowTestId(row, rowIndex) : null}
800
803
  onclick={isRowClickable
801
804
  ? () => handleRowClick(rowIndex, row, originalIndex)
@@ -1253,6 +1256,17 @@
1253
1256
  background-color: var(--table-row-selected-background, #eff6ff);
1254
1257
  }
1255
1258
 
1259
+ /* Summary/period-total row (summaryRowIndex): both the row and its cells,
1260
+ since a themed --table-content-background would otherwise paint over a
1261
+ row-level background. Falls back to the regular cell background. */
1262
+ .table-summary-row {
1263
+ background-color: var(--table-summary-row-background, var(--table-content-background));
1264
+ }
1265
+
1266
+ .table-summary-row > .table-content {
1267
+ background-color: var(--table-summary-row-background, var(--table-content-background));
1268
+ }
1269
+
1256
1270
  /* ── C2-1 Checkbox column ───────────────────────────────────────────────── */
1257
1271
  .table-checkbox-col {
1258
1272
  width: var(--table-checkbox-col-width, 44px);
@@ -396,6 +396,15 @@ export type OptionalTableProperties = {
396
396
  }]>;
397
397
  /** Prepends a sequential row-number column (1-based, pagination-aware). */
398
398
  rowNumberColumn?: boolean;
399
+ /**
400
+ * Index (into the consumer-supplied `rows`, pre-sort/pre-filter) of a
401
+ * summary/period-total row that renders with a distinct background — the
402
+ * DataGrid-parity `summaryRowIndex`. The row is matched by its original
403
+ * position, so it keeps its highlight through sort, search, and pagination.
404
+ * Background comes from `--table-summary-row-background` (falls back to the
405
+ * regular cell background when unset). Pass `null`/omit for no summary row.
406
+ */
407
+ summaryRowIndex?: number | null;
399
408
  /** Header label for the row-number column. Defaults to `'#'`. */
400
409
  rowNumberLabel?: string;
401
410
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/svelte-ui-components",
3
- "version": "2.108.1",
3
+ "version": "2.109.0",
4
4
  "description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
5
5
  "keywords": [
6
6
  "svelte",