@bwp-web/components 1.5.3 → 1.6.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.
package/dist/index.js CHANGED
@@ -430,6 +430,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
430
430
  function BiampWrapper({
431
431
  loading = false,
432
432
  children,
433
+ stickyTop,
433
434
  sx,
434
435
  ...props
435
436
  }) {
@@ -465,6 +466,21 @@ function BiampWrapper({
465
466
  children: /* @__PURE__ */ jsx(LinearProgress, {})
466
467
  }
467
468
  ),
469
+ stickyTop && /* @__PURE__ */ jsx(
470
+ Box,
471
+ {
472
+ sx: {
473
+ position: "sticky",
474
+ top: -16,
475
+ mt: -2,
476
+ mx: -2,
477
+ mb: 2,
478
+ zIndex: 1,
479
+ backgroundColor: ({ palette }) => palette.background.paper
480
+ },
481
+ children: stickyTop
482
+ }
483
+ ),
468
484
  children
469
485
  ]
470
486
  }
@@ -622,6 +638,9 @@ function BiampSidebarIcon({
622
638
  padding: 0,
623
639
  overflow: "hidden",
624
640
  color: "text.secondary",
641
+ "&.Mui-selected": {
642
+ color: "primary.main"
643
+ },
625
644
  ...sx
626
645
  },
627
646
  ...props,
@@ -1230,11 +1249,12 @@ function mergeSx(...inputs) {
1230
1249
  // src/BiampTable/cellSx.ts
1231
1250
  var stickyHoverBg = {
1232
1251
  ".MuiTableRow-hover:hover > &, .Mui-selected > &": {
1233
- bgcolor: ({ palette }) => palette.mode === "dark" ? palette.grey[800] : palette.grey[100]
1252
+ bgcolor: ({ palette }) => palette.background.info
1234
1253
  }
1235
1254
  };
1236
1255
  function cellSx(sticky, minWidth, zIndex) {
1237
1256
  if (sticky) {
1257
+ const isHeader = zIndex >= 3;
1238
1258
  return {
1239
1259
  position: "sticky",
1240
1260
  [sticky]: 0,
@@ -1242,8 +1262,8 @@ function cellSx(sticky, minWidth, zIndex) {
1242
1262
  width: 0,
1243
1263
  whiteSpace: "nowrap",
1244
1264
  textAlign: "center",
1245
- bgcolor: "background.paper",
1246
- ...zIndex < 3 && stickyHoverBg
1265
+ bgcolor: isHeader ? ({ palette }) => palette.mode === "dark" ? palette.grey[900] : palette.background.paper : "background.paper",
1266
+ ...!isHeader && stickyHoverBg
1247
1267
  };
1248
1268
  }
1249
1269
  const mw = minWidth ?? 40;
@@ -1603,7 +1623,7 @@ var headerSelectionCellSx = {
1603
1623
  position: "sticky",
1604
1624
  left: 0,
1605
1625
  zIndex: 3,
1606
- bgcolor: "background.paper"
1626
+ bgcolor: ({ palette }) => palette.mode === "dark" ? palette.grey[900] : palette.background.paper
1607
1627
  };
1608
1628
  var checkboxHiddenHeaderSx = { visibility: "hidden" };
1609
1629
  function BiampTable({
@@ -1794,7 +1814,6 @@ function BiampTableContainer({
1794
1814
  height: "100%",
1795
1815
  overflow: "hidden",
1796
1816
  pt: { xs: 0, md: 1.5 },
1797
- gap: { xs: 0, md: 1 },
1798
1817
  borderTop: withBorderTop ? ({ palette }) => `0.6px solid ${palette.divider}` : void 0,
1799
1818
  borderBottom: withBorderBottom ? ({ palette }) => `0.6px solid ${palette.divider}` : void 0,
1800
1819
  sx: { ...sx },