@juspay/svelte-ui-components 2.91.1 → 2.92.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.
@@ -669,6 +669,7 @@
669
669
  <th
670
670
  class="table-header"
671
671
  class:table-header-sticky={isStickyHeader}
672
+ class:table-col-highlighted={headerColumn?.highlighted === true}
672
673
  data-pw={headerColumn?.testId ?? null}
673
674
  style:text-align={headerColumn?.align ?? null}
674
675
  style:max-width={headerColumn?.maxWidth ?? null}
@@ -848,6 +849,7 @@
848
849
  typeof cellValue === 'boolean'}
849
850
  <td
850
851
  class="table-content"
852
+ class:table-col-highlighted={keyedColumn?.highlighted === true}
851
853
  data-pw={typeof getCellTestId === 'function'
852
854
  ? getCellTestId(row, cellValue, rowIndex)
853
855
  : null}
@@ -1180,6 +1182,20 @@
1180
1182
  color: var(--table-content-color, var(--table-content-font-color, #111827));
1181
1183
  }
1182
1184
 
1185
+ /* Column highlight (TableColumn.highlighted). Row hover keeps higher
1186
+ specificity and row selection is declared later at equal specificity, so
1187
+ both row states paint over the column wash. */
1188
+ .table-header.table-col-highlighted {
1189
+ background-color: var(
1190
+ --table-col-highlight-header-background,
1191
+ var(--table-col-highlight-background, #f3f9ff)
1192
+ );
1193
+ }
1194
+
1195
+ .table-content.table-col-highlighted {
1196
+ background-color: var(--table-col-highlight-background, #f3f9ff);
1197
+ }
1198
+
1183
1199
  .table-row {
1184
1200
  border-bottom: var(--table-row-border, 1px solid #f3f4f6);
1185
1201
  background-color: var(--table-row-background);
@@ -202,6 +202,14 @@ export type TableColumn = {
202
202
  * ellipsizes with the full value available on the native title tooltip.
203
203
  */
204
204
  maxWidth?: string;
205
+ /**
206
+ * Paints this column's header and body cells with the highlight wash —
207
+ * `--table-col-highlight-background` (body) and
208
+ * `--table-col-highlight-header-background` (header; falls back to the body
209
+ * wash). Use to emphasize a selected/pivot column. Row hover and row
210
+ * selection still paint over the wash.
211
+ */
212
+ highlighted?: boolean;
205
213
  /** Opt-in header filter dropdown (see TableColumnFilterConfig). */
206
214
  filter?: TableColumnFilterConfig;
207
215
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/svelte-ui-components",
3
- "version": "2.91.1",
3
+ "version": "2.92.0",
4
4
  "description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
5
5
  "keywords": [
6
6
  "svelte",