@homebound/beam 2.114.0 → 2.116.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.
@@ -259,6 +259,8 @@ export declare type GridColumn<R extends Kinded, S = {}> = {
259
259
  serverSideSortKey?: S;
260
260
  /** Allows the column to stay in place when the user scrolls horizontally */
261
261
  sticky?: "left" | "right";
262
+ /** Prevent column from supporting RowStyle.onClick/rowLink in order to avoid nested interactivity. Defaults to true */
263
+ wrapAction?: false;
262
264
  };
263
265
  export declare const nonKindGridColumnKeys: string[];
264
266
  /** Allows rendering a specific cell. */
@@ -487,6 +487,7 @@ function GridRow(props) {
487
487
  let currentColspan = 1;
488
488
  const rowNode = ((0, jsx_runtime_1.jsx)(Row, Object.assign({ css: rowCss }, others, { "data-gridrow": true }, getCount(row.id), { children: columns.map((column, columnIndex) => {
489
489
  var _a, _b, _c, _d, _e;
490
+ const { wrapAction = true } = column;
490
491
  if (column.mw) {
491
492
  // Validate the column's minWidth definition if set.
492
493
  if (!column.mw.endsWith("px") && !column.mw.endsWith("%")) {
@@ -569,11 +570,11 @@ function GridRow(props) {
569
570
  },
570
571
  ...(column.mw ? Css_1.Css.mw(column.mw).$ : {}),
571
572
  };
572
- const renderFn = (rowStyle === null || rowStyle === void 0 ? void 0 : rowStyle.renderCell) || (rowStyle === null || rowStyle === void 0 ? void 0 : rowStyle.rowLink)
573
+ const renderFn = ((rowStyle === null || rowStyle === void 0 ? void 0 : rowStyle.renderCell) || (rowStyle === null || rowStyle === void 0 ? void 0 : rowStyle.rowLink)) && wrapAction
573
574
  ? rowLinkRenderFn(as)
574
575
  : isHeader
575
576
  ? headerRenderFn(columns, column, sortState, setSortKey, as)
576
- : (rowStyle === null || rowStyle === void 0 ? void 0 : rowStyle.onClick)
577
+ : (rowStyle === null || rowStyle === void 0 ? void 0 : rowStyle.onClick) && wrapAction
577
578
  ? rowClickRenderFn(as, api)
578
579
  : defaultRenderFn(as);
579
580
  return renderFn(columnIndex, cellCss, content, row, rowStyle);
@@ -41,6 +41,7 @@ function selectColumn(columnDef) {
41
41
  align: "center",
42
42
  // Defining `w: 48px` to accommodate for the `16px` wide checkbox and `16px` of padding on either side.
43
43
  w: "48px",
44
+ wrapAction: false,
44
45
  // Use any of the user's per-row kind methods if they have them.
45
46
  ...columnDef,
46
47
  };
@@ -63,6 +64,7 @@ function collapseColumn(columnDef) {
63
64
  align: "center",
64
65
  // Defining `w: 38px` based on the designs
65
66
  w: "38px",
67
+ wrapAction: false,
66
68
  ...columnDef,
67
69
  };
68
70
  return (0, index_1.newMethodMissingProxy)(base, (key) => {
@@ -13,7 +13,7 @@ exports.defaultStyle = {
13
13
  indentOneCss: Css_1.Css.pl4.$,
14
14
  indentTwoCss: Css_1.Css.pl7.$,
15
15
  headerCellCss: Css_1.Css.nowrap.py1.bgGray100.aife.$,
16
- firstRowMessageCss: Css_1.Css.px1.py2.$,
16
+ firstRowMessageCss: Css_1.Css.tc.py3.$,
17
17
  };
18
18
  /** Tightens up the padding of rows, great for rows that have form elements in them. */
19
19
  exports.condensedStyle = {
@@ -21,6 +21,7 @@ exports.condensedStyle = {
21
21
  headerCellCss: Css_1.Css.bgGray100.tinyEm.$,
22
22
  cellCss: Css_1.Css.aic.sm.py1.px2.$,
23
23
  rootCss: Css_1.Css.dg.gray700.xs.$,
24
+ firstRowMessageCss: Css_1.Css.tc.py2.$,
24
25
  };
25
26
  /** Renders each row as a card. */
26
27
  exports.cardStyle = {
@@ -44,6 +45,7 @@ exports.beamFixedStyle = {
44
45
  cellCss: Css_1.Css.gray900.xs.bgWhite.aic.nowrap.pxPx(12).hPx(36).boxShadow(`inset 0 -1px 0 ${Css_1.Palette.Gray100}`).$,
45
46
  emptyCell: "-",
46
47
  presentationSettings: { borderless: true, typeScale: "xs", wrap: false },
48
+ firstRowMessageCss: Css_1.Css.tc.py3.$,
47
49
  // Included as a hacky "treat indent as deprecated for this table" hint to GridTable
48
50
  levels: {},
49
51
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.114.0",
3
+ "version": "2.116.1",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",