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

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.
@@ -1326,18 +1326,20 @@
1326
1326
  return this.row[this.column.accessor] !== null ? this.row[this.column.accessor].toString() : "null";
1327
1327
  }
1328
1328
  }
1329
- const table = "_table_1dg64_9";
1330
- const hideHeader = "_hideHeader_1dg64_19";
1331
- const hideHeaderNoBorder = "_hideHeaderNoBorder_1dg64_28";
1332
- const headerCell = "_headerCell_1dg64_32";
1333
- const headerCellButton = "_headerCellButton_1dg64_40";
1334
- const bodyRow = "_bodyRow_1dg64_49";
1335
- const bodyCell = "_bodyCell_1dg64_54";
1329
+ const table = "_table_fhbur_9";
1330
+ const hideHeader = "_hideHeader_fhbur_20";
1331
+ const hideHeaderNoBorder = "_hideHeaderNoBorder_fhbur_29";
1332
+ const headerCell = "_headerCell_fhbur_33";
1333
+ const stickyHeader = "_stickyHeader_fhbur_42";
1334
+ const headerCellButton = "_headerCellButton_fhbur_49";
1335
+ const bodyRow = "_bodyRow_fhbur_58";
1336
+ const bodyCell = "_bodyCell_fhbur_62";
1336
1337
  const defaultStyles$f = {
1337
1338
  table,
1338
1339
  hideHeader,
1339
1340
  hideHeaderNoBorder,
1340
1341
  headerCell,
1342
+ stickyHeader,
1341
1343
  headerCellButton,
1342
1344
  bodyRow,
1343
1345
  bodyCell
@@ -1346,6 +1348,7 @@
1346
1348
  columns,
1347
1349
  data,
1348
1350
  hideHeader: hideHeader2 = false,
1351
+ stickyHeader: stickyHeader2 = false,
1349
1352
  styles: styles2
1350
1353
  }) {
1351
1354
  const [sortState, setSortState] = hooks.useState(() => {
@@ -1384,9 +1387,13 @@
1384
1387
  children: jsxRuntime.jsx("tr", {
1385
1388
  children: table2.columns.map((column, index) => {
1386
1389
  var _a;
1390
+ let columnStyle = mergeStyles(styles2.headerCell, (_a = column.styles) == null ? void 0 : _a.headerCell);
1391
+ if (stickyHeader2) {
1392
+ columnStyle = mergeStyles(columnStyle, styles2.stickyHeader);
1393
+ }
1387
1394
  return jsxRuntime.jsx("th", {
1388
1395
  scope: "col",
1389
- className: mergeStyles(styles2.headerCell, (_a = column.styles) == null ? void 0 : _a.headerCell),
1396
+ className: columnStyle,
1390
1397
  children: jsxRuntime.jsx(HeaderCell, {
1391
1398
  styles: mergeStyles(styles2, column.styles),
1392
1399
  onClick: () => sortByColumn(index),
@@ -1866,11 +1873,11 @@
1866
1873
  })]
1867
1874
  });
1868
1875
  });
1869
- const borderTop = "_borderTop_1yz7f_9";
1870
- const section = "_section_1yz7f_14";
1871
- const fullWidth = "_fullWidth_1yz7f_57";
1872
- const header = "_header_1yz7f_96";
1873
- const content = "_content_1yz7f_133";
1876
+ const borderTop = "_borderTop_gph7y_9";
1877
+ const section = "_section_gph7y_13";
1878
+ const fullWidth = "_fullWidth_gph7y_19";
1879
+ const header = "_header_gph7y_95";
1880
+ const content = "_content_gph7y_132";
1874
1881
  const defaultStyles$9 = {
1875
1882
  borderTop,
1876
1883
  section,
@@ -2337,13 +2344,13 @@
2337
2344
  return preact.cloneElement(t, { className: i });
2338
2345
  });
2339
2346
  };
2340
- const transitionContainer = "_transitionContainer_1syip_1";
2341
- const blur = "_blur_1syip_12";
2342
- const modalBox = "_modalBox_1syip_17";
2343
- const enter = "_enter_1syip_26";
2344
- const exitDone = "_exitDone_1syip_27";
2345
- const enterActive = "_enterActive_1syip_38";
2346
- const exitActive = "_exitActive_1syip_49";
2347
+ const transitionContainer = "_transitionContainer_48fp9_1";
2348
+ const blur = "_blur_48fp9_11";
2349
+ const modalBox = "_modalBox_48fp9_16";
2350
+ const enter = "_enter_48fp9_25";
2351
+ const exitDone = "_exitDone_48fp9_26";
2352
+ const enterActive = "_enterActive_48fp9_37";
2353
+ const exitActive = "_exitActive_48fp9_48";
2347
2354
  const styles$6 = {
2348
2355
  transitionContainer,
2349
2356
  blur,