@homebound/beam 4.47.4 → 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.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
- /** Whether to apply a border around the whole table */
6364
- bordered?: boolean;
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
- /** Whether to apply a border around the whole table */
6364
- bordered?: boolean;
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
- ...bordered && {
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: bordered ? {
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: bordered ? {
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: bordered ? {
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: bordered ? {
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 using `bordered`.
6691
- lastRowFirstCellCss: bordered ? {
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: bordered ? {
6696
+ lastRowLastCellCss: borderAll ? {
6695
6697
  borderBottomRightRadius: "bbrr_8px"
6696
6698
  } : void 0,
6697
6699
  presentationSettings: {
@@ -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) {