@homebound/beam 4.34.0 → 4.35.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
@@ -5715,6 +5715,8 @@ declare class TableState<R extends Kinded> {
5715
5715
  * have `row.selectable !== false`.
5716
5716
  */
5717
5717
  get selectedRows(): RowState<R>[];
5718
+ /** How many leaf rows are selected, for `GridTableLayout`'s selection summary; see `GridDataRow.childrenCount`. */
5719
+ get selectedLeafRowCount(): number;
5718
5720
  /** Returns kept group row, with the latest kept children, if any. */
5719
5721
  get keptRowGroup(): GridDataRow<R>;
5720
5722
  /** Returns kept rows, i.e. those that were user-selected but then client-side or server-side filtered. */
@@ -5874,6 +5876,8 @@ declare class RowState<R extends Kinded> {
5874
5876
  * to their visible children explicitly.
5875
5877
  */
5876
5878
  get isSelected(): boolean;
5879
+ /** This row's share of `TableState.selectedLeafRowCount`, see `GridDataRow.childrenCount`. */
5880
+ get selectedLeafRowCount(): number;
5877
5881
  /** The UI state for checked/unchecked + "partially checked" for parents. */
5878
5882
  get selectedState(): SelectedState;
5879
5883
  /**
@@ -6018,6 +6022,8 @@ type GridDataRow<R extends Kinded> = {
6018
6022
  selectable?: false;
6019
6023
  /** Whether this row should infer its selected state based on its children's selected state */
6020
6024
  inferSelectedState?: false;
6025
+ /** Total children, e.g. when they load lazily; a selected row counts as this many in `getSelectedLeafRowCount`. */
6026
+ childrenCount?: number;
6021
6027
  /** Whether this row is draggable, usually to allow drag & drop reordering of rows */
6022
6028
  draggable?: boolean;
6023
6029
  /** Image src for the row, to be used for card view */
@@ -6091,6 +6097,8 @@ type GridTableApi<R extends Kinded> = {
6091
6097
  getSelectedRows(): GridDataRow<R>[];
6092
6098
  /** Returns the currently-selected rows of the given `kind`. */
6093
6099
  getSelectedRows<K extends R["kind"]>(kind: K): GridDataRow<DiscriminateUnion<R, "kind", K>>[];
6100
+ /** Returns how many leaf rows are selected; see `GridDataRow.childrenCount`. */
6101
+ getSelectedLeafRowCount(): number;
6094
6102
  /** Set selected state of a row by id. */
6095
6103
  selectRow(id: string, selected?: boolean): void;
6096
6104
  /** De-selects all selected rows. */
@@ -6152,6 +6160,7 @@ declare class GridTableApiImpl<R extends Kinded> implements GridTableApi<R> {
6152
6160
  private getSelectedRowIdsImpl;
6153
6161
  getSelectedRows(kind?: string): any;
6154
6162
  private getSelectedRowsImpl;
6163
+ getSelectedLeafRowCount(): number;
6155
6164
  getVisibleRows(kind?: string): any;
6156
6165
  private getVisibleRowsImpl;
6157
6166
  getVisibleRowIds(kind?: string): any;
@@ -9507,6 +9516,8 @@ type GridTableLayoutProps<F extends Record<string, unknown>, R extends Kinded, X
9507
9516
  emptyFallback?: string;
9508
9517
  /** Inline buttons, icon buttons, and an optional overflow menu (`kind: "menu"`). */
9509
9518
  actions?: HeaderAction[];
9519
+ /** Shows "N Rows Selected · Clear" before the columns selector; Clear deselects every row. */
9520
+ selectionSummary?: boolean;
9510
9521
  hideEditColumns?: boolean;
9511
9522
  totalCount?: number;
9512
9523
  /** When true, shows a view toggle button and renders the table with `as="card"` when in card view. */
@@ -9994,9 +10005,13 @@ declare function SelectedOptionPillList(props: SelectedOptionPillListProps): Rea
9994
10005
 
9995
10006
  type SelectionSummaryPillProps = {
9996
10007
  text: string;
10008
+ /** How many are selected, shown alone when `numberOnly`. */
10009
+ count: number;
9997
10010
  onClick: () => void;
9998
10011
  /** If a ReactNode, that reason is shown in a tooltip. */
9999
10012
  disabled?: boolean | ReactNode;
10013
+ /** Shows just `count` and an × instead of the text, e.g. on small screens. `text` stays the accessible name. */
10014
+ numberOnly?: boolean;
10000
10015
  /** Storybook-only visual state overrides for snapshotting pseudo-interactions. */
10001
10016
  __storyState?: {
10002
10017
  hovered?: boolean;
package/dist/index.d.ts CHANGED
@@ -5715,6 +5715,8 @@ declare class TableState<R extends Kinded> {
5715
5715
  * have `row.selectable !== false`.
5716
5716
  */
5717
5717
  get selectedRows(): RowState<R>[];
5718
+ /** How many leaf rows are selected, for `GridTableLayout`'s selection summary; see `GridDataRow.childrenCount`. */
5719
+ get selectedLeafRowCount(): number;
5718
5720
  /** Returns kept group row, with the latest kept children, if any. */
5719
5721
  get keptRowGroup(): GridDataRow<R>;
5720
5722
  /** Returns kept rows, i.e. those that were user-selected but then client-side or server-side filtered. */
@@ -5874,6 +5876,8 @@ declare class RowState<R extends Kinded> {
5874
5876
  * to their visible children explicitly.
5875
5877
  */
5876
5878
  get isSelected(): boolean;
5879
+ /** This row's share of `TableState.selectedLeafRowCount`, see `GridDataRow.childrenCount`. */
5880
+ get selectedLeafRowCount(): number;
5877
5881
  /** The UI state for checked/unchecked + "partially checked" for parents. */
5878
5882
  get selectedState(): SelectedState;
5879
5883
  /**
@@ -6018,6 +6022,8 @@ type GridDataRow<R extends Kinded> = {
6018
6022
  selectable?: false;
6019
6023
  /** Whether this row should infer its selected state based on its children's selected state */
6020
6024
  inferSelectedState?: false;
6025
+ /** Total children, e.g. when they load lazily; a selected row counts as this many in `getSelectedLeafRowCount`. */
6026
+ childrenCount?: number;
6021
6027
  /** Whether this row is draggable, usually to allow drag & drop reordering of rows */
6022
6028
  draggable?: boolean;
6023
6029
  /** Image src for the row, to be used for card view */
@@ -6091,6 +6097,8 @@ type GridTableApi<R extends Kinded> = {
6091
6097
  getSelectedRows(): GridDataRow<R>[];
6092
6098
  /** Returns the currently-selected rows of the given `kind`. */
6093
6099
  getSelectedRows<K extends R["kind"]>(kind: K): GridDataRow<DiscriminateUnion<R, "kind", K>>[];
6100
+ /** Returns how many leaf rows are selected; see `GridDataRow.childrenCount`. */
6101
+ getSelectedLeafRowCount(): number;
6094
6102
  /** Set selected state of a row by id. */
6095
6103
  selectRow(id: string, selected?: boolean): void;
6096
6104
  /** De-selects all selected rows. */
@@ -6152,6 +6160,7 @@ declare class GridTableApiImpl<R extends Kinded> implements GridTableApi<R> {
6152
6160
  private getSelectedRowIdsImpl;
6153
6161
  getSelectedRows(kind?: string): any;
6154
6162
  private getSelectedRowsImpl;
6163
+ getSelectedLeafRowCount(): number;
6155
6164
  getVisibleRows(kind?: string): any;
6156
6165
  private getVisibleRowsImpl;
6157
6166
  getVisibleRowIds(kind?: string): any;
@@ -9507,6 +9516,8 @@ type GridTableLayoutProps<F extends Record<string, unknown>, R extends Kinded, X
9507
9516
  emptyFallback?: string;
9508
9517
  /** Inline buttons, icon buttons, and an optional overflow menu (`kind: "menu"`). */
9509
9518
  actions?: HeaderAction[];
9519
+ /** Shows "N Rows Selected · Clear" before the columns selector; Clear deselects every row. */
9520
+ selectionSummary?: boolean;
9510
9521
  hideEditColumns?: boolean;
9511
9522
  totalCount?: number;
9512
9523
  /** When true, shows a view toggle button and renders the table with `as="card"` when in card view. */
@@ -9994,9 +10005,13 @@ declare function SelectedOptionPillList(props: SelectedOptionPillListProps): Rea
9994
10005
 
9995
10006
  type SelectionSummaryPillProps = {
9996
10007
  text: string;
10008
+ /** How many are selected, shown alone when `numberOnly`. */
10009
+ count: number;
9997
10010
  onClick: () => void;
9998
10011
  /** If a ReactNode, that reason is shown in a tooltip. */
9999
10012
  disabled?: boolean | ReactNode;
10013
+ /** Shows just `count` and an × instead of the text, e.g. on small screens. `text` stays the accessible name. */
10014
+ numberOnly?: boolean;
10000
10015
  /** Storybook-only visual state overrides for snapshotting pseudo-interactions. */
10001
10016
  __storyState?: {
10002
10017
  hovered?: boolean;