@homebound/beam 4.47.3 → 4.48.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.cjs +17 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +17 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -6360,8 +6360,11 @@ type GridStyleDef = {
|
|
|
6360
6360
|
cellHighlight?: boolean;
|
|
6361
6361
|
/** Applies a white background to the whole table, including header and group rows. */
|
|
6362
6362
|
allWhite?: boolean;
|
|
6363
|
-
/**
|
|
6364
|
-
|
|
6363
|
+
/**
|
|
6364
|
+
* Which outer table borders to draw. `"all"` borders the whole table, `"top"` only the first head row.
|
|
6365
|
+
* `true` / `false` are shorthand for `"all"` / `"none"`. Defaults to `"none"`.
|
|
6366
|
+
*/
|
|
6367
|
+
bordered?: boolean | "all" | "top" | "none";
|
|
6365
6368
|
/** Whether to show a hover effect on clickable rows (those with rowLink/onClick). Defaults to true */
|
|
6366
6369
|
rowHover?: boolean;
|
|
6367
6370
|
/** Vertical alignment of body cell content (not headers). Defaults to `top` for flexible rows and `center` for fixed rows. */
|
package/dist/index.d.ts
CHANGED
|
@@ -6360,8 +6360,11 @@ type GridStyleDef = {
|
|
|
6360
6360
|
cellHighlight?: boolean;
|
|
6361
6361
|
/** Applies a white background to the whole table, including header and group rows. */
|
|
6362
6362
|
allWhite?: boolean;
|
|
6363
|
-
/**
|
|
6364
|
-
|
|
6363
|
+
/**
|
|
6364
|
+
* Which outer table borders to draw. `"all"` borders the whole table, `"top"` only the first head row.
|
|
6365
|
+
* `true` / `false` are shorthand for `"all"` / `"none"`. Defaults to `"none"`.
|
|
6366
|
+
*/
|
|
6367
|
+
bordered?: boolean | "all" | "top" | "none";
|
|
6365
6368
|
/** Whether to show a hover effect on clickable rows (those with rowLink/onClick). Defaults to true */
|
|
6366
6369
|
rowHover?: boolean;
|
|
6367
6370
|
/** Vertical alignment of body cell content (not headers). Defaults to `top` for flexible rows and `center` for fixed rows. */
|
package/dist/index.js
CHANGED
|
@@ -6445,6 +6445,8 @@ function memoizedTableStyles() {
|
|
|
6445
6445
|
} = props;
|
|
6446
6446
|
const key = safeKeys(props).sort().map((k) => `${k}_${props[k]}`).join("|");
|
|
6447
6447
|
if (!cache[key]) {
|
|
6448
|
+
const borderAll = bordered === true || bordered === "all";
|
|
6449
|
+
const borderTop = borderAll || bordered === "top";
|
|
6448
6450
|
const alignItems = vAlign === "center" ? "center" : vAlign === "top" ? "flex-start" : "flex-end";
|
|
6449
6451
|
const groupedLevels = {
|
|
6450
6452
|
0: {
|
|
@@ -6503,7 +6505,7 @@ function memoizedTableStyles() {
|
|
|
6503
6505
|
"--backgroundColor": "var(--b-surface)"
|
|
6504
6506
|
}]
|
|
6505
6507
|
},
|
|
6506
|
-
...
|
|
6508
|
+
...borderAll && {
|
|
6507
6509
|
borderLeftStyle: "bls_solid",
|
|
6508
6510
|
borderLeftWidth: "blw_1px",
|
|
6509
6511
|
borderRightStyle: "brs_solid",
|
|
@@ -6642,14 +6644,14 @@ function memoizedTableStyles() {
|
|
|
6642
6644
|
} : {}
|
|
6643
6645
|
}
|
|
6644
6646
|
},
|
|
6645
|
-
firstCellCss:
|
|
6647
|
+
firstCellCss: borderAll ? {
|
|
6646
6648
|
borderLeftStyle: "bls_solid",
|
|
6647
6649
|
borderLeftWidth: "blw_1px",
|
|
6648
6650
|
borderColor: ["bc_var", {
|
|
6649
6651
|
"--borderColor": "var(--b-surface-separator)"
|
|
6650
6652
|
}]
|
|
6651
6653
|
} : void 0,
|
|
6652
|
-
lastCellCss:
|
|
6654
|
+
lastCellCss: borderAll ? {
|
|
6653
6655
|
borderRightStyle: "brs_solid",
|
|
6654
6656
|
borderRightWidth: "brw_1px",
|
|
6655
6657
|
borderColor: ["bc_var", {
|
|
@@ -6661,7 +6663,7 @@ function memoizedTableStyles() {
|
|
|
6661
6663
|
"--borderColor": "var(--b-surface-separator)"
|
|
6662
6664
|
}]
|
|
6663
6665
|
},
|
|
6664
|
-
firstRowCellCss:
|
|
6666
|
+
firstRowCellCss: borderTop ? {
|
|
6665
6667
|
borderTopStyle: "bts_solid",
|
|
6666
6668
|
borderTopWidth: "btw_1px",
|
|
6667
6669
|
borderColor: ["bc_var", {
|
|
@@ -6676,8 +6678,8 @@ function memoizedTableStyles() {
|
|
|
6676
6678
|
borderTopRightRadius: "btrr_8px"
|
|
6677
6679
|
} : void 0,
|
|
6678
6680
|
// Keep `betweenRowsCss` on all body rows, but on the final body row
|
|
6679
|
-
// remove the inset shadow and, when bordered, replace it with a true bottom border.
|
|
6680
|
-
lastRowCellCss:
|
|
6681
|
+
// remove the inset shadow and, when fully bordered, replace it with a true bottom border.
|
|
6682
|
+
lastRowCellCss: borderAll ? {
|
|
6681
6683
|
boxShadow: "bsh0",
|
|
6682
6684
|
borderBottomStyle: "bbs_solid",
|
|
6683
6685
|
borderBottomWidth: "bbw_1px",
|
|
@@ -6687,11 +6689,11 @@ function memoizedTableStyles() {
|
|
|
6687
6689
|
} : {
|
|
6688
6690
|
boxShadow: "bsh0"
|
|
6689
6691
|
},
|
|
6690
|
-
// Only apply bottom corner radii to the final body-row cells when
|
|
6691
|
-
lastRowFirstCellCss:
|
|
6692
|
+
// Only apply bottom corner radii to the final body-row cells when fully bordered.
|
|
6693
|
+
lastRowFirstCellCss: borderAll ? {
|
|
6692
6694
|
borderBottomLeftRadius: "bblr_8px"
|
|
6693
6695
|
} : void 0,
|
|
6694
|
-
lastRowLastCellCss:
|
|
6696
|
+
lastRowLastCellCss: borderAll ? {
|
|
6695
6697
|
borderBottomRightRadius: "bbrr_8px"
|
|
6696
6698
|
} : void 0,
|
|
6697
6699
|
presentationSettings: {
|
|
@@ -14732,7 +14734,7 @@ function VirtualGridTableView({
|
|
|
14732
14734
|
}), children: fetchMoreInProgress && /* @__PURE__ */ jsx54("div", { className: "h5 df aic jcc", children: /* @__PURE__ */ jsx54(Loader, { size: "xs" }) }) });
|
|
14733
14735
|
}
|
|
14734
14736
|
}), [columns, fetchMoreInProgress, id, stickyOffset, style, xss]);
|
|
14735
|
-
const virtuosoKey =
|
|
14737
|
+
const virtuosoKey = visibleDataRows.length > 0 ? "with-data" : "virtuoso";
|
|
14736
14738
|
return /* @__PURE__ */ jsx54(
|
|
14737
14739
|
Virtuoso,
|
|
14738
14740
|
{
|
|
@@ -14829,7 +14831,7 @@ function CardView({
|
|
|
14829
14831
|
} = useScrollStorage(id, persistScrollPosition);
|
|
14830
14832
|
const savedScrollIndex = getScrollIndex();
|
|
14831
14833
|
const validatedScrollIndex = savedScrollIndex !== void 0 && savedScrollIndex > 0 && savedScrollIndex < cardRows.length ? savedScrollIndex : void 0;
|
|
14832
|
-
const virtuosoKey =
|
|
14834
|
+
const virtuosoKey = cardRows.length > 0 ? "with-data" : "virtuoso";
|
|
14833
14835
|
if (runningInJest) {
|
|
14834
14836
|
return /* @__PURE__ */ jsx54("div", { ...trussProps34({
|
|
14835
14837
|
...{
|
|
@@ -27886,6 +27888,7 @@ function GridTableLayoutComponent(props) {
|
|
|
27886
27888
|
const rightPane = resolveWithRightPaneOptions(withRightPane);
|
|
27887
27889
|
const tid = useTestIds(props);
|
|
27888
27890
|
const host = useGridTableLayoutHost();
|
|
27891
|
+
const insetHandled = useContentInsetHandled();
|
|
27889
27892
|
const includeColumnGutters = host.kind === "document-scroll" || host.kind === "modal";
|
|
27890
27893
|
const columns = tableProps.columns;
|
|
27891
27894
|
const hasHideableColumns = useMemo49(() => {
|
|
@@ -27944,7 +27947,7 @@ function GridTableLayoutComponent(props) {
|
|
|
27944
27947
|
}
|
|
27945
27948
|
);
|
|
27946
27949
|
const cardAs = view === "card" ? "card" : void 0;
|
|
27947
|
-
const tableStyle = useMemo49(() => getDefaultStyle(tableProps.style), [tableProps.style]);
|
|
27950
|
+
const tableStyle = useMemo49(() => getDefaultStyle(tableProps.style, insetHandled), [tableProps.style, insetHandled]);
|
|
27948
27951
|
const tableBody = /* @__PURE__ */ jsx204(Fragment44, { children: isGridTableProps(tableProps) ? /* @__PURE__ */ jsx204(
|
|
27949
27952
|
GridTable,
|
|
27950
27953
|
{
|
|
@@ -27987,9 +27990,9 @@ function GridTableLayoutComponent(props) {
|
|
|
27987
27990
|
);
|
|
27988
27991
|
}
|
|
27989
27992
|
var GridTableLayout = React17.memo(GridTableLayoutComponent);
|
|
27990
|
-
function getDefaultStyle(style) {
|
|
27993
|
+
function getDefaultStyle(style, insetHandled) {
|
|
27991
27994
|
if (style !== void 0 && !isGridStyleDef(style)) return style;
|
|
27992
|
-
return { allWhite: true, ...style };
|
|
27995
|
+
return { allWhite: true, ...!insetHandled && { bordered: "top" }, ...style };
|
|
27993
27996
|
}
|
|
27994
27997
|
function validateColumns(columns) {
|
|
27995
27998
|
for (const col of columns) {
|