@guardian/interactive-component-library 0.1.0-alpha.37 → 0.1.0-alpha.38

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.
@@ -1330,18 +1330,20 @@ class CellModel {
1330
1330
  return this.row[this.column.accessor] !== null ? this.row[this.column.accessor].toString() : "null";
1331
1331
  }
1332
1332
  }
1333
- const table = "_table_1dg64_9";
1334
- const hideHeader = "_hideHeader_1dg64_19";
1335
- const hideHeaderNoBorder = "_hideHeaderNoBorder_1dg64_28";
1336
- const headerCell = "_headerCell_1dg64_32";
1337
- const headerCellButton = "_headerCellButton_1dg64_40";
1338
- const bodyRow = "_bodyRow_1dg64_49";
1339
- const bodyCell = "_bodyCell_1dg64_54";
1333
+ const table = "_table_fhbur_9";
1334
+ const hideHeader = "_hideHeader_fhbur_20";
1335
+ const hideHeaderNoBorder = "_hideHeaderNoBorder_fhbur_29";
1336
+ const headerCell = "_headerCell_fhbur_33";
1337
+ const stickyHeader = "_stickyHeader_fhbur_42";
1338
+ const headerCellButton = "_headerCellButton_fhbur_49";
1339
+ const bodyRow = "_bodyRow_fhbur_58";
1340
+ const bodyCell = "_bodyCell_fhbur_62";
1340
1341
  const defaultStyles$f = {
1341
1342
  table,
1342
1343
  hideHeader,
1343
1344
  hideHeaderNoBorder,
1344
1345
  headerCell,
1346
+ stickyHeader,
1345
1347
  headerCellButton,
1346
1348
  bodyRow,
1347
1349
  bodyCell
@@ -1350,6 +1352,7 @@ function Table({
1350
1352
  columns,
1351
1353
  data,
1352
1354
  hideHeader: hideHeader2 = false,
1355
+ stickyHeader: stickyHeader2 = false,
1353
1356
  styles: styles2
1354
1357
  }) {
1355
1358
  const [sortState, setSortState] = useState(() => {
@@ -1388,9 +1391,13 @@ function Table({
1388
1391
  children: jsx("tr", {
1389
1392
  children: table2.columns.map((column, index) => {
1390
1393
  var _a;
1394
+ let columnStyle = mergeStyles(styles2.headerCell, (_a = column.styles) == null ? void 0 : _a.headerCell);
1395
+ if (stickyHeader2) {
1396
+ columnStyle = mergeStyles(columnStyle, styles2.stickyHeader);
1397
+ }
1391
1398
  return jsx("th", {
1392
1399
  scope: "col",
1393
- className: mergeStyles(styles2.headerCell, (_a = column.styles) == null ? void 0 : _a.headerCell),
1400
+ className: columnStyle,
1394
1401
  children: jsx(HeaderCell, {
1395
1402
  styles: mergeStyles(styles2, column.styles),
1396
1403
  onClick: () => sortByColumn(index),
@@ -1870,11 +1877,11 @@ const ToplineResult = forwardRef(({
1870
1877
  })]
1871
1878
  });
1872
1879
  });
1873
- const borderTop = "_borderTop_1yz7f_9";
1874
- const section = "_section_1yz7f_14";
1875
- const fullWidth = "_fullWidth_1yz7f_57";
1876
- const header = "_header_1yz7f_96";
1877
- const content = "_content_1yz7f_133";
1880
+ const borderTop = "_borderTop_gph7y_9";
1881
+ const section = "_section_gph7y_13";
1882
+ const fullWidth = "_fullWidth_gph7y_19";
1883
+ const header = "_header_gph7y_95";
1884
+ const content = "_content_gph7y_132";
1878
1885
  const defaultStyles$9 = {
1879
1886
  borderTop,
1880
1887
  section,