@homebound/beam 2.124.1 → 2.125.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.
@@ -318,6 +318,8 @@ function renderVirtual(style, id, columns, headerRows, filteredRows, firstRowMes
318
318
  tableRef.current = ref;
319
319
  }
320
320
  }, components: {
321
+ // Applying a zIndex: 2 to ensure it stays on top of sticky columns
322
+ TopItemList: react_1.default.forwardRef((props, ref) => ((0, jsx_runtime_1.jsx)("div", Object.assign({}, props, { ref: ref, style: { ...props.style, ...{ zIndex: 2 } } }), void 0))),
321
323
  List: VirtualRoot(listStyle, columns, id, firstLastColumnWidth, xss),
322
324
  Footer: () => (0, jsx_runtime_1.jsx)("div", { css: footerStyle }, void 0),
323
325
  },
@@ -28,6 +28,8 @@ export declare type GridTableApi<R extends Kinded> = {
28
28
  /** Returns the currently-selected rows. */
29
29
  getSelectedRows(): GridDataRow<R>[];
30
30
  getSelectedRows<K extends R["kind"]>(kind: K): GridDataRow<DiscriminateUnion<R, "kind", K>>[];
31
+ /** Deselects all rows */
32
+ clearSelections(): void;
31
33
  /** Sets the internal state of 'activeRowId' */
32
34
  setActiveRowId: (id: string | undefined) => void;
33
35
  };
@@ -39,5 +41,6 @@ export declare class GridTableApiImpl<R extends Kinded> implements GridTableApi<
39
41
  scrollToIndex(index: number): void;
40
42
  getSelectedRowIds(kind?: string): string[];
41
43
  getSelectedRows(kind?: string): any;
44
+ clearSelections(id?: string): void;
42
45
  setActiveRowId(id: string | undefined): void;
43
46
  }
@@ -59,6 +59,9 @@ class GridTableApiImpl {
59
59
  });
60
60
  return selected;
61
61
  }
62
+ clearSelections(id) {
63
+ this.rowState.selectRow("header", false);
64
+ }
62
65
  setActiveRowId(id) {
63
66
  this.rowState.activeRowId = id;
64
67
  }
@@ -41,7 +41,10 @@ function TextFieldBase(props) {
41
41
  .if(compact)
42
42
  .hPx(compactFieldHeight - maybeSmaller).$,
43
43
  ...Css_1.Css.bgWhite.gray900.if(contrast).bgGray700.white.$,
44
- ...(borderless ? Css_1.Css.bTransparent.$ : Css_1.Css.bGray300.if(contrast).bGray700.$),
44
+ // When borderless then perceived vertical alignments are misaligned. As there is no longer a border, then the field looks oddly indented.
45
+ // This typically happens in tables when a column has a mix of static text (i.e. "roll up" rows and table headers) and input fields.
46
+ // To remedy this perceived misalignment then we increase the width by the horizontal padding applied (16px), and set a negative margin left margin to re-center the field.
47
+ ...(borderless ? Css_1.Css.bTransparent.w("calc(100% + 16px)").ml(-1).$ : Css_1.Css.bGray300.if(contrast).bGray700.$),
45
48
  ...(!compound ? Css_1.Css.ba.$ : {}),
46
49
  },
47
50
  inputWrapperReadOnly: {
@@ -50,8 +53,6 @@ function TextFieldBase(props) {
50
53
  .if(compact)
51
54
  .mhPx(compactFieldHeight - maybeSmaller).$,
52
55
  ...Css_1.Css.gray900.if(contrast).white.$,
53
- // Make read-only fields vertically line up with editable fields in tables
54
- ...(borderless ? Css_1.Css.px1.$ : {}),
55
56
  },
56
57
  input: {
57
58
  ...Css_1.Css.w100.mw0.outline0.fg1.if(multiline).br4.$,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.124.1",
3
+ "version": "2.125.0",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -48,7 +48,7 @@
48
48
  "react-router": "^5.2.0",
49
49
  "react-router-dom": "^5.2.0",
50
50
  "react-stately": "^3.12.2",
51
- "react-virtuoso": "^2.4.0",
51
+ "react-virtuoso": "2.10.2",
52
52
  "tributejs": "^5.1.3",
53
53
  "trix": "^1.3.1",
54
54
  "use-debounce": "^7.0.1",