@bwp-web/components 1.5.3 → 1.6.1
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/README.md +40 -33
- package/dist/BiampSidebar/BiampSidebar.d.ts.map +1 -1
- package/dist/BiampTable/BiampTable.d.ts.map +1 -1
- package/dist/BiampTable/BiampTableContainer.d.ts.map +1 -1
- package/dist/BiampTable/cellSx.d.ts +1 -1
- package/dist/BiampTable/cellSx.d.ts.map +1 -1
- package/dist/BiampWrapper/BiampWrapper.d.ts +10 -1
- package/dist/BiampWrapper/BiampWrapper.d.ts.map +1 -1
- package/dist/index.cjs +26 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.
|
|
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
|
-
|
|
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 },
|
|
@@ -2759,7 +2778,7 @@ function SegmentedButton({
|
|
|
2759
2778
|
}) {
|
|
2760
2779
|
const theme = useTheme();
|
|
2761
2780
|
const isDarkMode = theme.palette.mode === "dark";
|
|
2762
|
-
const backgroundColor = active ? isDarkMode ? theme.palette.grey[
|
|
2781
|
+
const backgroundColor = active ? isDarkMode ? theme.palette.grey[800] : theme.palette.common.white : "transparent";
|
|
2763
2782
|
const textColor = active ? theme.palette.text.primary : theme.palette.text.secondary;
|
|
2764
2783
|
const border = active ? "solid" : void 0;
|
|
2765
2784
|
return /* @__PURE__ */ jsx23(
|
|
@@ -2799,7 +2818,7 @@ function SegmentedButtonGroup({ children, sx, ...props }) {
|
|
|
2799
2818
|
borderRadius: "6px",
|
|
2800
2819
|
gap: 1,
|
|
2801
2820
|
sx: {
|
|
2802
|
-
backgroundColor: isDarkMode ? theme.palette.grey[
|
|
2821
|
+
backgroundColor: isDarkMode ? theme.palette.grey[900] : theme.palette.grey[100],
|
|
2803
2822
|
...sx
|
|
2804
2823
|
},
|
|
2805
2824
|
...props,
|