@homebound/beam 2.417.10 → 2.418.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
@@ -1,7 +1,7 @@
1
1
  import * as csstype from 'csstype';
2
2
  import { Properties as Properties$1 } from 'csstype';
3
3
  import * as React$1 from 'react';
4
- import React__default, { PropsWithChildren, AriaAttributes, ReactNode, RefObject, ButtonHTMLAttributes, ReactElement, MutableRefObject, Dispatch, SetStateAction, KeyboardEvent, LabelHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, Key, HTMLAttributes, ReactPortal } from 'react';
4
+ import React__default, { PropsWithChildren, AriaAttributes, ReactNode, ReactElement, MutableRefObject, Dispatch, SetStateAction, RefObject, ButtonHTMLAttributes, KeyboardEvent, LabelHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, Key, HTMLAttributes, ReactPortal } from 'react';
5
5
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
6
6
  import { DOMProps, PressEvent, Key as Key$1 } from '@react-types/shared';
7
7
  import { VirtuosoHandle, ListRange } from 'react-virtuoso';
@@ -4491,6 +4491,45 @@ declare function Chips<X extends Only<ChipsXss, X>>(props: ChipsProps<X>): _emot
4491
4491
 
4492
4492
  type ResizedWidths = Record<string, number>;
4493
4493
 
4494
+ type InputStylePalette = "success" | "warning" | "caution" | "info";
4495
+ interface PresentationFieldProps {
4496
+ numberAlignment?: "left" | "right";
4497
+ /** Sets the label position or visibility. Defaults to "above" */
4498
+ labelStyle?: "inline" | "hidden" | "above" | "left";
4499
+ /** Defines the width property of the input field wrapper when using `labelStyle="left"`. */
4500
+ labelLeftFieldWidth?: number | string;
4501
+ labelSuffix?: LabelSuffixStyle;
4502
+ borderless?: boolean;
4503
+ borderOnHover?: boolean;
4504
+ compact?: boolean;
4505
+ typeScale?: Typography;
4506
+ visuallyDisabled?: false;
4507
+ errorInTooltip?: true;
4508
+ /** Allow the fields to grow to the width of its container. By default, fields will extend up to 550px */
4509
+ fullWidth?: boolean;
4510
+ /** Changes bg and hoverBg; Takes priority over `contrast`; Useful when showing many fields w/in a table that require user attention; In no way should be used as a replacement for error/focus state */
4511
+ inputStylePalette?: InputStylePalette;
4512
+ }
4513
+ type PresentationContextProps = {
4514
+ /** `inputStylePalette` omitted because it is too dependent on the individual field use case to be controlled at this level */
4515
+ fieldProps?: Omit<PresentationFieldProps, "inputStylePalette">;
4516
+ gridTableStyle?: GridStyle;
4517
+ wrap?: boolean;
4518
+ };
4519
+ declare function PresentationProvider(props: PropsWithChildren<PresentationContextProps>): _emotion_react_jsx_runtime.JSX.Element;
4520
+ /**
4521
+ * Label settings for required/optional fields.
4522
+ *
4523
+ * We may want to just hard-code this behavior, so that it's very consistent,
4524
+ * but for now making it configurable.
4525
+ */
4526
+ type LabelSuffixStyle = {
4527
+ /** The suffix to use for required fields. */
4528
+ required?: string;
4529
+ /** The suffix to use for explicitly optional (i.e. `required=false`) fields. */
4530
+ optional?: string;
4531
+ };
4532
+
4494
4533
  type Kinded = {
4495
4534
  kind: string;
4496
4535
  };
@@ -4499,6 +4538,7 @@ type RenderAs = "div" | "table" | "virtual";
4499
4538
  type Direction = "ASC" | "DESC";
4500
4539
  type MaybeFn<T> = T | (() => T);
4501
4540
  type GridCellAlignment = "left" | "right" | "center";
4541
+ type GridColumnBorder = "left" | "right";
4502
4542
  type GridTableScrollOptions = number | {
4503
4543
  /** The index of the row to scroll to */
4504
4544
  index: number;
@@ -4561,6 +4601,8 @@ type GridColumn<R extends Kinded> = {
4561
4601
  serverSideSortKey?: string;
4562
4602
  /** Allows the column to stay in place when the user scrolls horizontally */
4563
4603
  sticky?: "left" | "right";
4604
+ /** Draws a border on this column's left or right edge for every rendered cell. */
4605
+ border?: GridColumnBorder;
4564
4606
  /** Prevent column from supporting RowStyle.onClick/rowLink in order to avoid nested interactivity. Defaults to true */
4565
4607
  wrapAction?: false;
4566
4608
  /** Used as a signal to defer adding the row's level indentation styling */
@@ -4650,556 +4692,161 @@ declare const rowLinkRenderFn: (as: RenderAs, colSpan: number) => RenderCellFn<a
4650
4692
  /** Renders a cell that will fire the RowStyle.onClick. */
4651
4693
  declare const rowClickRenderFn: (as: RenderAs, api: GridTableApi<any>, colSpan: number) => RenderCellFn<any>;
4652
4694
 
4653
- interface GridTableCollapseToggleProps extends Pick<IconButtonProps, "compact"> {
4654
- row: GridDataRow<any>;
4655
- }
4656
- /** Provides a chevron icons to collapse/un-collapse for parent/child tables. */
4657
- declare function CollapseToggle(props: GridTableCollapseToggleProps): _emotion_react_jsx_runtime.JSX.Element | null;
4658
-
4659
- interface AvatarProps {
4660
- src: string | undefined;
4661
- name?: string;
4662
- size?: AvatarSize;
4663
- showName?: boolean;
4664
- disableTooltip?: boolean;
4665
- }
4666
- declare function Avatar({ src, name, size, showName, disableTooltip, ...others }: AvatarProps): _emotion_react_jsx_runtime.JSX.Element;
4667
- type AvatarSize = "sm" | "md" | "lg" | "xl";
4668
-
4669
- /** Base Interfaced */
4670
- interface BeamFocusableProps {
4671
- /** Whether the element should receive focus on render. */
4672
- autoFocus?: boolean;
4673
- forceFocusStyles?: boolean;
4674
- }
4675
- interface BeamButtonProps {
4695
+ /** Completely static look & feel, i.e. nothing that is based on row kinds/content. */
4696
+ interface GridStyle {
4697
+ /** Applied to the base div element. */
4698
+ rootCss?: Properties;
4676
4699
  /**
4677
- * Whether the interactive element is disabled.
4700
+ * Applied as the base body-row cell styling (commonly used for row separators).
4701
+ * This is applied to body rows broadly (including the last body row); use
4702
+ * `lastRowCellCss`/`lastRowCss` to adjust/cancel any final-row treatment.
4703
+ */
4704
+ betweenRowsCss?: Properties;
4705
+ /** Applied on the last row of the table, typically to override/cancel `betweenRowsCss`. */
4706
+ lastRowCss?: Properties;
4707
+ /** Applied on the first row of the table (could be the Header or Totals row). */
4708
+ firstRowCss?: Properties;
4709
+ /** Applied to every non-header row of the table */
4710
+ nonHeaderRowCss?: Properties;
4711
+ /** Applied to the first body row, i.e. if you want to cancel out `betweenRowsCss`. */
4712
+ firstBodyRowCss?: Properties;
4713
+ /** Applied to all cell divs (via a selector off the base div). */
4714
+ cellCss?: Properties;
4715
+ /**
4716
+ * Applied to the header row divs.
4678
4717
  *
4679
- * If a ReactNode, it's treated as a "disabled reason" that's shown in a tooltip.
4718
+ * NOTE `as=virtual`: When using a virtual table with the goal of adding space
4719
+ * between the header and the first row use `firstBodyRowCss` with a
4720
+ * margin-top instead. Using `headerCellCss` will not work since the header
4721
+ * rows are wrapper with Chrome rows.
4680
4722
  */
4681
- disabled?: boolean | ReactNode;
4682
- /** If function, then it is the handler that is called when the press is released over the target. Otherwise if string, it is the URL path for the link */
4683
- onClick: ((e: PressEvent) => void) | ((e: PressEvent) => Promise<void>) | string;
4684
- /** Text to be shown via a tooltip when the user hovers over the button */
4685
- tooltip?: ReactNode;
4686
- /** Whether to open link in a new tab. This only effects the element if the `onClick` is a `string`/URL. */
4687
- openInNew?: boolean;
4723
+ headerCellCss?: Properties;
4724
+ /** Applied to 'kind: "totals"' cells */
4725
+ totalsCellCss?: Properties;
4726
+ /** Applied to 'kind: "expandableHeader"' cells */
4727
+ expandableHeaderCss?: Properties;
4728
+ /** Applied to expandable header cells that are not the last table column. */
4729
+ expandableHeaderNonLastColumnCss?: Properties;
4730
+ /** Applied to the first cell of all rows, i.e. for table-wide padding or left-side borders. */
4731
+ firstCellCss?: Properties;
4732
+ /** Applied to the last cell of all rows, i.e. for table-wide padding or right-side borders. */
4733
+ lastCellCss?: Properties;
4734
+ /** Applied to any column that opts into `GridColumn.border`. */
4735
+ borderStyle?: Properties;
4736
+ /** Applied to every cell in the first table-head row (expandableHeader/header/totals). */
4737
+ firstRowCellCss?: Properties;
4738
+ /** Applied to the first cell in the first table-head row. */
4739
+ firstRowFirstCellCss?: Properties;
4740
+ /** Applied to the last cell in the first table-head row. */
4741
+ firstRowLastCellCss?: Properties;
4742
+ /** Applied to every cell in the last table-body row. */
4743
+ lastRowCellCss?: Properties;
4744
+ /** Applied to the first cell in the last table-body row. */
4745
+ lastRowFirstCellCss?: Properties;
4746
+ /** Applied to the last cell in the last table-body row. */
4747
+ lastRowLastCellCss?: Properties;
4748
+ /** Applied if there is a fallback/overflow message showing. */
4749
+ firstRowMessageCss?: Properties;
4750
+ /** Applied on hover if a row has a rowLink/onClick set. */
4751
+ rowHoverColor?: Palette | "none";
4752
+ /** Applied on hover of a row */
4753
+ nonHeaderRowHoverCss?: Properties;
4754
+ /** Default content to put into an empty cell */
4755
+ emptyCell?: ReactNode;
4756
+ presentationSettings?: Pick<PresentationFieldProps, "borderless" | "borderOnHover" | "typeScale"> & Pick<PresentationContextProps, "wrap">;
4757
+ /** Minimum table width in pixels. Used when calculating columns sizes */
4758
+ minWidthPx?: number;
4759
+ /** Css to apply at each level of a parent/child nested table. */
4760
+ levels?: Record<number, {
4761
+ /** Number of pixels to indent the row. This value will be subtracted from the "first content column" width. First content column is the first column that is not an 'action' column (i.e. non-checkbox or non-collapse button column) */
4762
+ rowIndent?: number;
4763
+ cellCss?: Properties;
4764
+ firstContentColumn?: Properties;
4765
+ }> | ((level: number) => {
4766
+ rowIndent?: number;
4767
+ cellCss?: Properties;
4768
+ firstContentColumn?: Properties;
4769
+ });
4770
+ /** Allows for customization of the background color used to denote an "active" row */
4771
+ activeBgColor?: Palette;
4772
+ /** Defines styles for the group row which holds the selected rows that have been filtered out */
4773
+ keptGroupRowCss?: Properties;
4774
+ /** Defines styles for the last row `keptGroup` to provide separation from the rest of the table */
4775
+ keptLastRowCss?: Properties;
4688
4776
  }
4689
- type TextFieldXss = Xss<"textAlign" | "justifyContent" | "fontWeight" | "fontSize" | "lineHeight">;
4690
- interface BeamTextFieldProps<X> extends BeamFocusableProps, PresentationFieldProps {
4691
- /** Whether the field is disabled. If a ReactNode, it's treated as a "disabled reason" that's shown in a tooltip. */
4692
- disabled?: boolean | ReactNode;
4693
- errorMsg?: string;
4694
- helperText?: string | ReactNode;
4695
- /** Input label */
4696
- label: string;
4697
- /** Marks the field as required or optional, the default is assumed ambiguous/unknown. */
4698
- required?: boolean;
4699
- value: string | undefined;
4700
- /** Handler called when the interactive element state changes. */
4701
- onChange: (value: string | undefined) => void;
4702
- /** Called when the component loses focus, mostly for BoundTextField to use. */
4703
- onBlur?: VoidFunction;
4704
- onFocus?: VoidFunction;
4705
- onEnter?: VoidFunction;
4706
- /** Whether the field is readOnly. If a ReactNode, it's treated as a "readOnly reason" that's shown in a tooltip. */
4707
- readOnly?: boolean | ReactNode;
4708
- placeholder?: string;
4709
- /** Styles overrides */
4710
- xss?: X;
4777
+ interface GridStyleDef {
4778
+ /** Changes the height of the rows when `rowHeight: fixed` to provide more space between rows for input fields. */
4779
+ inlineEditing?: boolean;
4780
+ /** Adds styling for grouped rows */
4781
+ grouped?: boolean;
4782
+ /** 'fixed' height rows do not allow text to wrap. 'flexible' allows for wrapping. Defaults to `flexible` */
4783
+ rowHeight?: "fixed" | "flexible";
4784
+ /** Enables cells Highlight and hover */
4785
+ cellHighlight?: boolean;
4786
+ /** Applies a white background to the whole table, including header and group rows. */
4787
+ allWhite?: boolean;
4788
+ /** Whether to apply a border around the whole table */
4789
+ bordered?: boolean;
4790
+ /** Whether to show a hover effect on rows. Defaults to true */
4791
+ rowHover?: boolean;
4792
+ /** Defines the vertical alignment of the content of the cells for the whole table (not including the 'header' rows). Defaults to `center` */
4793
+ vAlign?: "top" | "center" | "bottom";
4794
+ /** Defines the Typography for the table body's cells (not the header). This only applies to rows that are not nested/grouped */
4795
+ cellTypography?: Typography;
4796
+ /** Defines if the table should highlight the row on hover. Defaults to true */
4797
+ highlightOnHover?: boolean;
4711
4798
  }
4712
- interface TextFieldInternalProps {
4799
+ declare const getTableStyles: (props?: GridStyleDef) => GridStyle;
4800
+ /** Defines row-specific styling for each given row `kind` in `R` */
4801
+ type RowStyles<R extends Kinded> = {
4802
+ [P in R["kind"]]?: RowStyle<DiscriminateUnion<R, "kind", P>>;
4803
+ };
4804
+ interface RowStyle<R extends Kinded> {
4805
+ /** Applies this css to the wrapper row, i.e. for row-level hovers. */
4806
+ rowCss?: Properties | ((row: R) => Properties);
4807
+ /** Applies this css to each cell in the row. */
4808
+ cellCss?: Properties | ((row: R) => Properties);
4809
+ /** Renders the cell element, i.e. a link to get whole-row links. */
4810
+ renderCell?: RenderCellFn<R>;
4811
+ /** Whether the row should be a link. */
4812
+ rowLink?: (row: R) => string;
4813
+ /** Fired when the row is clicked, similar to rowLink but for actions that aren't 'go to this link'. */
4814
+ onClick?: (row: GridDataRow<R>, api: GridTableApi<R>) => void;
4815
+ }
4816
+ /** Our original table look & feel/style. */
4817
+ declare const defaultStyle: GridStyle;
4818
+ /** Tightens up the padding of rows, great for rows that have form elements in them. */
4819
+ declare const condensedStyle: GridStyle;
4820
+ /** Renders each row as a card.
4821
+ * TODO: Add `cardStyle` option to `getTableStyles` and remove this.
4822
+ * */
4823
+ declare const cardStyle: GridStyle;
4824
+
4825
+ /**
4826
+ * Manages loading/saving our currently-collapsed rows to session storage.
4827
+ *
4828
+ * This is useful for pages that the user has to go in-out/out-of a lot, and
4829
+ * want it to restore, as much as possible, like their previous visit. Granted,
4830
+ * we try to superdrawer most of these experiences to avoid the user having to
4831
+ * jump off-page.
4832
+ *
4833
+ * Unlike most of our other states, this is not directly reactive/an observable,
4834
+ * although we do reactive to collapsedRows changing to persist the new state.
4835
+ */
4836
+ declare class RowStorage<R extends Kinded> {
4837
+ private states;
4838
+ private historicalIds;
4839
+ constructor(states: RowStates<R>);
4840
+ load(persistCollapse: string): void;
4841
+ /** Once the first real-data load is done, we ignore historical ids so that we prefer any new data's `initCollapsed`. */
4842
+ done(): void;
4713
4843
  /**
4714
- * Denoting a field as 'compound' will remove existing borders on the returned field, including the 2px of height added by the borders.
4715
- * It is expected that the caller reintroduces the border to achieve the expected field height and handles the custom border logic of a Compound Field
4716
- * This is explicitly an internal property that is not exposed to any field's API.
4844
+ * Returns if this row had been collapsed.
4845
+ *
4846
+ * Technically we return `undefined` if a) there is no persisted state for this row, or b) we are
4847
+ * past the first real-data load, and thus should prefer new incoming rows' `initCollapsed` flag.
4717
4848
  */
4718
- compound?: boolean;
4719
- /** Forces focus styles for storybook purposes */
4720
- forceFocus?: true;
4721
- /** Forces hover styles for storybook purposes */
4722
- forceHover?: boolean;
4723
- }
4724
-
4725
- interface AvatarButtonProps extends AvatarProps, BeamButtonProps, BeamFocusableProps {
4726
- menuTriggerProps?: AriaButtonProps;
4727
- buttonRef?: RefObject<HTMLButtonElement>;
4728
- /** Storybook-only visual state overrides for snapshotting pseudo-interactions. */
4729
- __storyState?: {
4730
- hovered?: boolean;
4731
- focusVisible?: boolean;
4732
- pressed?: boolean;
4733
- };
4734
- }
4735
- declare function AvatarButton(props: AvatarButtonProps): _emotion_react_jsx_runtime.JSX.Element;
4736
- declare const hoverStyles: {
4737
- boxShadow: csstype.Property.BoxShadow | undefined;
4738
- };
4739
- declare const pressedOverlayCss: {
4740
- borderRadius: csstype.Property.BorderRadius<string | 0> | undefined;
4741
- } & {
4742
- backgroundColor: csstype.Property.BackgroundColor | undefined;
4743
- } & {
4744
- width: csstype.Property.Width<string | 0> | undefined;
4745
- } & {
4746
- height: csstype.Property.Height<string | 0> | undefined;
4747
- } & {
4748
- position: csstype.Property.Position | undefined;
4749
- } & {
4750
- top: csstype.Property.Top<string | 0> | undefined;
4751
- } & {
4752
- left: csstype.Property.Left<string | 0> | undefined;
4753
- } & {
4754
- opacity: csstype.Property.Opacity | undefined;
4755
- } & {
4756
- pointerEvents: csstype.Property.PointerEvents | undefined;
4757
- };
4758
-
4759
- interface ButtonProps extends BeamButtonProps, BeamFocusableProps {
4760
- label: ReactNode;
4761
- variant?: ButtonVariant;
4762
- size?: ButtonSize;
4763
- icon?: IconProps["icon"] | null;
4764
- /** Displays contents after the Button's label. Will be ignored for Buttons rendered as a link with an absolute URL */
4765
- endAdornment?: ReactNode;
4766
- /** HTML attributes to apply to the button element when it is being used to trigger a menu. */
4767
- menuTriggerProps?: AriaButtonProps;
4768
- buttonRef?: RefObject<HTMLElement>;
4769
- /** Allow for setting "submit" | "button" | "reset" on button element */
4770
- type?: ButtonHTMLAttributes<HTMLButtonElement>["type"];
4771
- /** Denotes if this button is used to download a resource. Uses the anchor tag with the `download` attribute */
4772
- download?: boolean;
4773
- contrast?: boolean;
4774
- /** Additional text to further customize button during an async request is in progress. */
4775
- labelInFlight?: string;
4776
- /** Shows pressed/active styles (useful when a menu is open) */
4777
- active?: boolean;
4778
- }
4779
- declare function Button(props: ButtonProps): _emotion_react_jsx_runtime.JSX.Element;
4780
- type ButtonSize = "sm" | "md" | "lg";
4781
- type ButtonVariant = "primary" | "secondary" | "secondaryBlack" | "tertiary" | "tertiaryDanger" | "caution" | "danger" | "quaternary" | "text" | "textSecondary";
4782
-
4783
- interface IconButtonProps extends BeamButtonProps, BeamFocusableProps {
4784
- /** The icon to use within the button. */
4785
- icon: IconProps["icon"];
4786
- color?: Palette;
4787
- bgColor?: Palette;
4788
- /** The size of the icon, in increments, defaults to 3 which is 24px. */
4789
- inc?: number;
4790
- /** HTML attributes to apply to the button element when it is being used to trigger a menu. */
4791
- menuTriggerProps?: AriaButtonProps;
4792
- buttonRef?: RefObject<HTMLButtonElement>;
4793
- /** Whether to show a 16x16px version of the IconButton */
4794
- compact?: boolean;
4795
- /** Whether to display the contrast variant */
4796
- contrast?: boolean;
4797
- /** Whether to display the circle variant */
4798
- circle?: boolean;
4799
- /** Indicates that the button is active/selected */
4800
- active?: boolean;
4801
- /** Denotes if this button is used to download a resource. Uses the anchor tag with the `download` attribute */
4802
- download?: boolean;
4803
- /** Provides label for screen readers - Will become a required soon */
4804
- label?: string;
4805
- }
4806
- declare function IconButton(props: IconButtonProps): _emotion_react_jsx_runtime.JSX.Element;
4807
- declare const iconButtonStylesHover: {
4808
- backgroundColor: csstype.Property.BackgroundColor | undefined;
4809
- };
4810
- declare const iconButtonContrastStylesHover: {
4811
- backgroundColor: csstype.Property.BackgroundColor | undefined;
4812
- };
4813
- declare const iconButtonCircleStylesHover: {
4814
- backgroundColor: csstype.Property.BackgroundColor | undefined;
4815
- } & {
4816
- borderColor: csstype.Property.BorderColor | undefined;
4817
- };
4818
-
4819
- interface NavLinkProps extends BeamFocusableProps {
4820
- /** active indicates the user is on the current page */
4821
- active?: boolean;
4822
- disabled?: boolean;
4823
- /** if `href` isn't provided, it is treated as a <button> */
4824
- href?: string;
4825
- label: ReactNode;
4826
- icon?: IconKey;
4827
- variant: NavLinkVariant;
4828
- openInNew?: boolean;
4829
- contrast?: boolean;
4830
- /** HTML attributes to apply to the button element when it is being used to trigger a menu. */
4831
- menuTriggerProps?: AriaButtonProps;
4832
- buttonRef?: RefObject<HTMLElement>;
4833
- }
4834
- type NavLinkVariant = "side" | "global";
4835
- declare function NavLink(props: NavLinkProps): JSX.Element;
4836
-
4837
- interface TextButtonTriggerProps extends Pick<ButtonProps, "label" | "variant" | "size" | "icon"> {
4838
- }
4839
- interface IconButtonTriggerProps extends Pick<IconButtonProps, "icon" | "color" | "compact" | "contrast" | "inc"> {
4840
- }
4841
- interface AvatarButtonTriggerProps extends Pick<AvatarButtonProps, "src" | "name" | "size"> {
4842
- }
4843
- interface NavLinkButtonTriggerProps extends Pick<NavLinkProps, "active" | "variant" | "icon"> {
4844
- navLabel: string;
4845
- }
4846
- interface OverlayTriggerProps {
4847
- trigger: TextButtonTriggerProps | IconButtonTriggerProps | AvatarButtonTriggerProps | NavLinkButtonTriggerProps;
4848
- /** Defaults to "left" */
4849
- placement?: "left" | "right";
4850
- /** Whether the Button is disabled. If a ReactNode, it's treated as a "disabled reason" that's shown in a tooltip. */
4851
- disabled?: boolean | ReactNode;
4852
- /** Text to be shown via a tooltip when the user hovers over the button */
4853
- tooltip?: ReactNode;
4854
- /** The component to be shown within the overlay */
4855
- children: ReactElement;
4856
- /** Props returned by the useMenuTrigger hook to be passed to the button element */
4857
- menuTriggerProps: AriaButtonProps;
4858
- /** Ref for the button element */
4859
- buttonRef: MutableRefObject<HTMLButtonElement | null>;
4860
- /** Result of the useMenuTriggerState hook */
4861
- state: MenuTriggerState;
4862
- /** Prop set the style of the button element */
4863
- variant?: ButtonVariant;
4864
- hideEndAdornment?: boolean;
4865
- showActiveBorder?: boolean;
4866
- contrast?: boolean;
4867
- }
4868
-
4869
- type EditColumnsButtonProps<R extends Kinded> = {
4870
- columns: GridColumn<R>[];
4871
- api: GridTableApi<R>;
4872
- defaultOpen?: boolean;
4873
- } & Pick<OverlayTriggerProps, "trigger" | "placement" | "disabled" | "tooltip">;
4874
- declare function EditColumnsButton<R extends Kinded>(props: EditColumnsButtonProps<R>): _emotion_react_jsx_runtime.JSX.Element;
4875
-
4876
- interface SelectToggleProps {
4877
- id: string;
4878
- disabled?: boolean | ReactNode;
4879
- }
4880
- /** Provides a checkbox to show/drive this row's selected state. */
4881
- declare function SelectToggle({ id, disabled }: SelectToggleProps): _emotion_react_jsx_runtime.JSX.Element;
4882
-
4883
- interface SortHeaderProps {
4884
- content: string;
4885
- xss?: Properties;
4886
- iconOnLeft?: boolean;
4887
- sortKey: string;
4888
- tooltipEl?: ReactNode;
4889
- }
4890
- /**
4891
- * Wraps column header names with up/down sorting icons.
4892
- *
4893
- * GridTable will use this automatically if the header content is just a text string.
4894
- *
4895
- * Alternatively, callers can also:
4896
- *
4897
- * - Instantiate this SortHeader directly with some customizations in `xss`, or
4898
- * - Write their own component that uses `GridSortContext` to access the column's
4899
- * current sort state + `toggleSort` function
4900
- */
4901
- declare function SortHeader(props: SortHeaderProps): _emotion_react_jsx_runtime.JSX.Element;
4902
-
4903
- /**
4904
- * Calculates an array of sizes for each of our columns.
4905
- *
4906
- * We originally supported CSS grid-template-column definitions which allowed fancier,
4907
- * dynamic/content-based widths, but have eventually dropped it mainly due to:
4908
- *
4909
- * 1. In virtual tables, a) the table never has all of the rows in DOM at a single time,
4910
- * so any "content-based" widths will change as you scroll the table, which is weird, and
4911
- * b) a sticky header and rows are put in different DOM parent elements by react-virtuoso,
4912
- * so wouldn't arrive at the same "content-based" widths.
4913
- *
4914
- * 2. Using CSS grid but still have a row-level div for hover/focus targeting required
4915
- * a "fake" `display: contents` div that couldn't have actually any styles applied to it.
4916
- *
4917
- * So we've just got with essentially fixed/deterministic widths, i.e. `px` or `percent` or
4918
- * `fr`.
4919
- *
4920
- * Disclaimer that we roll our own `fr` b/c we're not in CSS grid anymore.
4921
- */
4922
- declare function useSetupColumnSizes<R extends Kinded>(style: GridStyle, columns: GridColumnWithId<R>[], resizeRef: MutableRefObject<HTMLElement | null>, expandedColumnIds: string[], visibleColumnsStorageKey: string | undefined, disableColumnResizing: boolean): {
4923
- columnSizes: string[];
4924
- tableWidth: number | undefined;
4925
- resizedWidths: ResizedWidths;
4926
- setResizedWidth: (columnId: string, width: number) => void;
4927
- setResizedWidths: (widths: ResizedWidths | ((prev: ResizedWidths) => ResizedWidths)) => void;
4928
- resetColumnWidths: () => void;
4929
- };
4930
-
4931
- /** Provides default styling for a GridColumn representing a Date. */
4932
- declare function column<T extends Kinded>(columnDef: GridColumn<T>): GridColumn<T>;
4933
- /** Provides default styling for a GridColumn representing a Date. */
4934
- declare function dateColumn<T extends Kinded>(columnDef: GridColumn<T>): GridColumn<T>;
4935
- /**
4936
- * Provides default styling for a GridColumn representing a Numeric value (Price, percentage, PO #, etc.). */
4937
- declare function numericColumn<T extends Kinded>(columnDef: GridColumn<T>): GridColumn<T>;
4938
- /** Provides default styling for a GridColumn representing an Action. */
4939
- declare function actionColumn<T extends Kinded>(columnDef: GridColumn<T>): GridColumn<T>;
4940
- /**
4941
- * Provides default styling for a GridColumn containing a checkbox.
4942
- *
4943
- * We allow either no `columnDef` at all, or a partial column def (i.e. to say a Totals row should
4944
- * not have a `SelectToggle`, b/c we can provide the default behavior a `SelectToggle` for basically
4945
- * all rows.
4946
- */
4947
- declare function selectColumn<T extends Kinded>(columnDef?: Partial<GridColumn<T>>): GridColumn<T>;
4948
- /**
4949
- * Provides default styling for a GridColumn containing a collapse icon.
4950
- *
4951
- * We allow either no `columnDef` at all, or a partial column def (i.e. to say a Totals row should
4952
- * not have a `CollapseToggle`, b/c we can provide the default behavior a `CollapseToggle` for basically
4953
- * all rows.
4954
- */
4955
- declare function collapseColumn<T extends Kinded>(columnDef?: Partial<GridColumn<T>>): GridColumn<T>;
4956
- declare function parseWidthToPx(widthStr: string | undefined, tableWidth: number | undefined): number | null;
4957
- /**
4958
- * Calculates column widths using a flexible `calc()` definition that allows for consistent column alignment without the use of `<table />`, CSS Grid, etc layouts.
4959
- * Enforces only fixed-sized units (% and px)
4960
- */
4961
- declare function calcColumnSizes<R extends Kinded>(columns: GridColumnWithId<R>[], tableWidth: number | undefined, tableMinWidthPx: number | undefined, expandedColumnIds: string[], resizedWidths?: ResizedWidths): string[];
4962
- /** Assign column ids if missing. */
4963
- declare function assignDefaultColumnIds<T extends Kinded>(columns: GridColumn<T>[]): GridColumnWithId<T>[];
4964
- declare const generateColumnId: (columnIndex: number) => string;
4965
- declare function dragHandleColumn<T extends Kinded>(columnDef?: Partial<GridColumn<T>>): GridColumn<T>;
4966
-
4967
- /**
4968
- * Allows a caller to ask for the currently shown rows, given the current sorting/filtering.
4969
- *
4970
- * We will probably end up generalizing this into a GridTableApi that exposes more
4971
- * actions i.e. scrolling to a row and selection state.
4972
- */
4973
- interface GridRowLookup<R extends Kinded> {
4974
- /** Returns both the immediate next/prev rows, as well as `[kind].next/prev` values, ignoring headers. */
4975
- lookup(row: GridDataRow<R>, additionalFilter?: (row: GridDataRow<R>) => boolean): NextPrev<R> & {
4976
- [P in R["kind"]]: NextPrev<DiscriminateUnion<R, "kind", P>>;
4977
- };
4978
- /** Returns the list of currently filtered/sorted rows, without headers. */
4979
- currentList(): readonly GridDataRow<R>[];
4980
- /**
4981
- * Scroll's to the row with the given kind + id. Requires using `as=virtual`.
4982
- * Will skip re-scrolling to a row if it's already visible.
4983
- */
4984
- scrollTo(kind: R["kind"], id: string): void;
4985
- }
4986
- interface NextPrev<R extends Kinded> {
4987
- next: GridDataRow<R> | undefined;
4988
- prev: GridDataRow<R> | undefined;
4989
- }
4990
- declare function createRowLookup<R extends Kinded>(api: GridTableApiImpl<R>, virtuosoRef: MutableRefObject<VirtuosoHandle | null>, virtuosoRangeRef: MutableRefObject<ListRange | null>): GridRowLookup<R>;
4991
- /** Optionally takes into consideration if a row is already in view before attempting to scroll to it. */
4992
- declare function shouldSkipScrollTo(index: number, virtuosoRangeRef: MutableRefObject<ListRange | null>): boolean;
4993
-
4994
- /**
4995
- * A helper for making `Row` type aliases of simple/flat tables that are just header + data.
4996
- *
4997
- * Unlike `SimpleHeaderAndDataOf`, we keep `T` in a separate `data`, which is useful
4998
- * when rows are mobx proxies and we need proxy accesses to happen within the column
4999
- * rendering.
5000
- */
5001
- type SimpleHeaderAndData<T> = {
5002
- kind: "header";
5003
- } | {
5004
- kind: "data";
5005
- data: T;
5006
- id: string;
5007
- };
5008
- /** A const for a marker header row. */
5009
- declare const simpleHeader: {
5010
- kind: "header";
5011
- id: string;
5012
- data: undefined;
5013
- };
5014
- /** Like `simpleRows` but for `SimpleHeaderAndData`. */
5015
- declare function simpleDataRows<R extends SimpleHeaderAndData<D>, D>(data?: Array<D & {
5016
- id: string;
5017
- }> | undefined): GridDataRow<R>[];
5018
-
5019
- /**
5020
- * Manages loading/saving our currently-collapsed rows to session storage.
5021
- *
5022
- * This is useful for pages that the user has to go in-out/out-of a lot, and
5023
- * want it to restore, as much as possible, like their previous visit. Granted,
5024
- * we try to superdrawer most of these experiences to avoid the user having to
5025
- * jump off-page.
5026
- *
5027
- * Unlike most of our other states, this is not directly reactive/an observable,
5028
- * although we do reactive to collapsedRows changing to persist the new state.
5029
- */
5030
- declare class RowStorage<R extends Kinded> {
5031
- private states;
5032
- private historicalIds;
5033
- constructor(states: RowStates<R>);
5034
- load(persistCollapse: string): void;
5035
- /** Once the first real-data load is done, we ignore historical ids so that we prefer any new data's `initCollapsed`. */
5036
- done(): void;
5037
- /**
5038
- * Returns if this row had been collapsed.
5039
- *
5040
- * Technically we return `undefined` if a) there is no persisted state for this row, or b) we are
5041
- * past the first real-data load, and thus should prefer new incoming rows' `initCollapsed` flag.
5042
- */
5043
- wasCollapsed(id: string): boolean | undefined;
5044
- }
5045
-
5046
- /**
5047
- * Manages our tree of observable RowStates that manage each GridDataRow's behavior.
5048
- */
5049
- declare class RowStates<R extends Kinded> {
5050
- private map;
5051
- readonly table: TableState<R>;
5052
- readonly storage: RowStorage<R>;
5053
- private readonly header;
5054
- private keptGroupRow;
5055
- /** The first level of rows, i.e. not the header (or kept group), but the totals + top-level children. */
5056
- private topRows;
5057
- constructor(table: TableState<R>);
5058
- /** Returns a flat list of all of our RowStates. */
5059
- get allStates(): RowState<R>[];
5060
- /** Returns the `RowState` for the given `id`. We should probably require `kind`. */
5061
- get(id: string): RowState<R>;
5062
- /**
5063
- * Merge a new set of `rows` prop into our state.
5064
- *
5065
- * Any missing rows are marked as `wasRemoved` so we can consider them "kept" if they're also selected.
5066
- */
5067
- setRows(rows: GridDataRow<R>[]): void;
5068
- /** Fully delete `ids`, so they don't show up in kept rows anymore. */
5069
- delete(ids: string[]): void;
5070
- /** Implements special collapse behavior, which is just the header's collapse/uncollapse. */
5071
- toggleCollapsed(id: string): void;
5072
- get visibleRows(): RowState<R>[];
5073
- /** Returns kept rows, i.e. those that were user-selected but then client-side or server-side filtered. */
5074
- get keptRows(): RowState<R>[];
5075
- get collapsedRows(): RowState<R>[];
5076
- private createHeaderRow;
5077
- /** Create our synthetic "group row" for kept rows, that users never pass in, but we self-inject as needed. */
5078
- private createKeptGroupRow;
5079
- maybeSetRowDraggedOver(id: string, draggedOver: DraggedOver, requireSameParentRow?: GridDataRow<R> | undefined): void;
5080
- }
5081
-
5082
- declare enum DraggedOver {
5083
- None = 0,
5084
- Above = 1,// In this case this means higher on the screen which means a lower y value and a lower row index
5085
- Below = 2
5086
- }
5087
- /**
5088
- * A reactive/observable state of each GridDataRow's current behavior.
5089
- *
5090
- * We set up the RowStates in a tree, just like GridDataRow, to make business logic
5091
- * that uses parent/children easier to write, i.e. selected-ness and collapsed-ness.
5092
- */
5093
- declare class RowState<R extends Kinded> {
5094
- private states;
5095
- parent: RowState<R> | undefined;
5096
- /** Our row, not actually observed, b/c each `createRows` calc creates unstable rows. */
5097
- private _row;
5098
- /** Our data, only ref observed, so we don't crawl into GraphQL fragments. */
5099
- private _data;
5100
- /** Our children row states, as of the latest `props.rows`, without any filtering applied. */
5101
- children: RowState<R>[] | undefined;
5102
- /** Whether we are *directly* selected. */
5103
- selected: boolean;
5104
- /** Whether we are collapsed. */
5105
- collapsed: boolean;
5106
- /** Whether we are dragged over. */
5107
- isDraggedOver: DraggedOver;
5108
- /**
5109
- * Whether our `row` had been in `props.rows`, but then removed _while being
5110
- * selected_, i.e. potentially by server-side filters.
5111
- *
5112
- * We have had a large foot-gun where users "select a row", change the filters,
5113
- * the row disappears (filtered out), and the user clicks "Go!", but the table
5114
- * thinks their previously-selected row is gone (b/c it's not in view), and
5115
- * then the row is inappropriately deleted/unassociated/etc. (b/c in the user's
5116
- * head, it is "still selected").
5117
- *
5118
- * To avoid this, we by default keep selected rows, as "kept rows", to make
5119
- * extra sure the user wants them to go away.
5120
- *
5121
- * Soft-deleted rows are rows that were removed from `props.rows` (i.e. we
5122
- * suspect are just hidden by a changed server-side-filter), and hard-deleted
5123
- * rows are rows the page called `api.deleteRow` and confirmed it should be
5124
- * actively removed.
5125
- */
5126
- removed: false | "soft" | "hard";
5127
- private isCalculatingDirectMatch;
5128
- constructor(states: RowStates<R>, parent: RowState<R> | undefined, row: GridDataRow<R>);
5129
- /** Returns a stable-ish row identity that will only change if our `data` changes. */
5130
- get row(): GridDataRow<R>;
5131
- /** Accepts a new unstable row, i.e. each `createRows` creates a new row literal. */
5132
- set row(row: GridDataRow<R>);
5133
- /**
5134
- * Whether we match a client-side filter; true if no filter is in place.
5135
- *
5136
- * We should try and keep this based solely on "does/does not match the filter",
5137
- * and do any overrides for things like pinning/kept rows/etc. elsewhere.
5138
- */
5139
- get isMatched(): boolean;
5140
- /**
5141
- * Whether we are effectively selected, for `GridTableApi.getSelectedRows`.
5142
- *
5143
- * Note that we don't use "I'm selected || my parent is selected" logic here, because whether a child is selected
5144
- * is actually based on whether it was _visible at the time the parent was selected_. So, we can't just assume
5145
- * "a parent being selected means the child is also selected", and instead parents have to push selected-ness down
5146
- * to their visible children explicitly.
5147
- */
5148
- get isSelected(): boolean;
5149
- /** The UI state for checked/unchecked + "partially checked" for parents. */
5150
- get selectedState(): SelectedState;
5151
- /**
5152
- * A special SelectedState that "sees through"/ignores inferSelectedState, so the header works.
5153
- *
5154
- * I.e. a row might have `inferSelectedState: false`, so is showing unchecked, but the header
5155
- * wants to show partial-ness whenever any given child is selected.
5156
- */
5157
- get selectedStateForHeader(): SelectedState;
5158
- /**
5159
- * Called to explicitly select/unselect this row.
5160
- *
5161
- * This could be either because the user clicked directly on us, or because we're a visible
5162
- * child of a selected parent row.
5163
- */
5164
- select(selected: boolean): void;
5165
- /** Marks the row as removed from `props.rows`, to potentially become kept. */
5166
- markRemoved(): void;
5167
- toggleCollapsed(): void;
5168
- /** Whether this is a selected-but-filtered-out row that we should hoist to the top. */
5169
- get isKept(): boolean;
5170
- get isLastKeptRow(): boolean;
5171
- get key(): string;
5172
- get kind(): string;
5173
- get isActive(): boolean;
5174
- get level(): number;
5175
- private get inferSelectedState();
5176
- /** Returns this row and, if we're not collapsed, our children. */
5177
- get selfAndMaybeChildren(): RowState<R>[];
5178
- private get visibleChildren();
5179
- private get visibleDirectlyMatchedChildren();
5180
- /** The `visibleChildren`, but with the current sort config applied. */
5181
- private get visibleSortedChildren();
5182
- private get hasSelectableChildren();
5183
- /**
5184
- * Returns whether this row should act like a parent.
5185
- *
5186
- * This means "has children" and "does not have inferSelectedState: false"
5187
- * set. I.e. `inferSelectedState: false` allows a parent with children to
5188
- * still act as its own selectable identity.
5189
- *
5190
- * We also check `children.length > 0`, because sometimes pages will calc a
5191
- * row's children as `children = someList.map(...)`, and if the list is empty,
5192
- * they want the row to be selectable.
5193
- */
5194
- private get isParent();
5195
- private get isPinned();
5196
- get api(): GridRowApi<R>;
5197
- get isReservedKind(): boolean;
5198
- /** A dedicated method to "looking down" recursively, to avoid loops in `isMatched`. */
5199
- private get hasDirectlyMatchedChildren();
5200
- /** A dedicated method to "looking up" recursively, to avoid loops in `isMatched`. */
5201
- private get hasDirectlyMatchedParent();
5202
- private get isDirectlyMatched();
4849
+ wasCollapsed(id: string): boolean | undefined;
5203
4850
  }
5204
4851
 
5205
4852
  type SelectedState = "checked" | "unchecked" | "partial";
@@ -5280,244 +4927,180 @@ declare class TableState<R extends Kinded> {
5280
4927
  deleteRows(ids: string[]): void;
5281
4928
  maybeSetRowDraggedOver(id: string, draggedOver: DraggedOver, requireSameParentRow?: GridDataRow<R> | undefined): void;
5282
4929
  }
5283
- /** Provides a context for rows to access their table's `TableState`. */
5284
- declare const TableStateContext: React__default.Context<{
5285
- tableState: TableState<any>;
5286
- tableContainerRef?: React__default.MutableRefObject<HTMLElement | null>;
5287
- }>;
5288
- type ColumnSort = {
5289
- columnId: string;
5290
- direction: Direction;
5291
- };
5292
- type SortState = {
5293
- current?: ColumnSort;
5294
- /** The persistent sort is always applied first, i.e. for schedules, probably. */
5295
- persistent?: ColumnSort;
5296
- };
5297
- type SortOn = "client" | "server" | undefined;
5298
-
5299
- declare function sortRows<R extends Kinded>(columns: GridColumnWithId<R>[], rows: GridDataRow<R>[], sortState: SortState, caseSensitive: boolean): GridDataRow<R>[];
5300
- /** Creates a comparator for two GridDataRows based on the current sortState. */
5301
- declare function sortFn<R extends Kinded>(columns: GridColumnWithId<R>[], sortState: SortState, caseSensitive: boolean): (a: GridDataRow<R>, b: GridDataRow<R>) => number;
5302
- declare function ensureClientSideSortValueIsSortable(sortOn: SortOn, isHeader: boolean, column: GridColumnWithId<any>, idx: number, maybeContent: ReactNode | GridCellContent): void;
5303
-
5304
- /** If a column def return just string text for a given row, apply some default styling. */
5305
- declare function toContent(maybeContent: ReactNode | GridCellContent, isHeader: boolean, canSortColumn: boolean, isClientSideSorting: boolean, style: GridStyle, as: RenderAs, alignment: GridCellAlignment, column: GridColumnWithId<any>, isExpandableHeader: boolean, isExpandable: boolean, minStickyLeftOffset: number, isKeptSelectedRow: boolean): ReactNode;
5306
- declare function isGridCellContent(content: ReactNode | GridCellContent): content is GridCellContent;
5307
- type DragData<R extends Kinded> = {
5308
- rowRenderRef: React.RefObject<HTMLTableRowElement>;
5309
- onDragStart?: (row: GridDataRow<R>, event: React.DragEvent<HTMLElement>) => void;
5310
- onDragEnd?: (row: GridDataRow<R>, event: React.DragEvent<HTMLElement>) => void;
5311
- onDrop?: (row: GridDataRow<R>, event: React.DragEvent<HTMLElement>) => void;
5312
- onDragEnter?: (row: GridDataRow<R>, event: React.DragEvent<HTMLElement>) => void;
5313
- onDragOver?: (row: GridDataRow<R>, event: React.DragEvent<HTMLElement>) => void;
5314
- };
5315
- /** Return the content for a given column def applied to a given row. */
5316
- declare function applyRowFn<R extends Kinded>(column: GridColumnWithId<R>, row: GridDataRow<R>, api: GridRowApi<R>, level: number, expanded: boolean, dragData?: DragData<R>): ReactNode | GridCellContent;
5317
- declare const ASC: "ASC";
5318
- declare const DESC: "DESC";
5319
- declare const emptyCell: GridCellContent;
5320
- declare function getFirstOrLastCellCss<R extends Kinded>(style: GridStyle, columnIndex: number, columns: GridColumnWithId<R>[], colspan?: number): Properties;
5321
- /** A heuristic to detect the result of `React.createElement` / i.e. JSX. */
5322
- declare function isJSX(content: any): boolean;
5323
- declare function getAlignment(column: GridColumnWithId<any>, maybeContent: ReactNode | GridCellContent): GridCellAlignment;
5324
- declare function getJustification(column: GridColumnWithId<any>, maybeContent: ReactNode | GridCellContent, as: RenderAs, alignment: GridCellAlignment): {
5325
- textAlign: csstype.Property.TextAlign | undefined;
5326
- };
5327
- declare function maybeApplyFunction<T>(row: T, maybeFn: Properties | ((row: T) => Properties) | undefined): Properties | undefined;
5328
- declare function matchesFilter(maybeContent: ReactNode | GridCellContent, filter: string): boolean;
5329
- declare const HEADER = "header";
5330
- declare const TOTALS = "totals";
5331
- /** Tables expandable columns get an extra header. */
5332
- declare const EXPANDABLE_HEADER = "expandableHeader";
5333
- declare const KEPT_GROUP = "keptGroup";
5334
- declare const reservedRowKinds: string[];
5335
- declare const zIndices: {
5336
- stickyHeader: number;
5337
- stickyColumns: number;
5338
- expandableHeaderTitle: number;
5339
- expandableHeaderIcon: number;
4930
+ /** Provides a context for rows to access their table's `TableState`. */
4931
+ declare const TableStateContext: React__default.Context<{
4932
+ tableState: TableState<any>;
4933
+ tableContainerRef?: React__default.MutableRefObject<HTMLElement | null>;
4934
+ }>;
4935
+ type ColumnSort = {
4936
+ columnId: string;
4937
+ direction: Direction;
5340
4938
  };
5341
- /** Loads an array from sessionStorage, if it exists, or `undefined`. */
5342
- declare function loadArrayOrUndefined(key: string): any;
5343
- declare function insertAtIndex<T>(array: Array<T>, element: T, index: number): Array<T>;
5344
- declare function isCursorBelowMidpoint(target: HTMLElement, clientY: number): boolean;
5345
- declare function recursivelyGetContainingRow<R extends Kinded>(rowId: string, rowArray: GridDataRow<R>[], parent?: GridDataRow<R>): {
5346
- array: GridDataRow<R>[];
5347
- parent: GridDataRow<R> | undefined;
5348
- } | undefined;
5349
- declare function getTableRefWidthStyles(isVirtual: boolean): {
5350
- width: csstype.Property.Width<string | 0> | undefined;
4939
+ type SortState = {
4940
+ current?: ColumnSort;
4941
+ /** The persistent sort is always applied first, i.e. for schedules, probably. */
4942
+ persistent?: ColumnSort;
5351
4943
  };
4944
+ type SortOn = "client" | "server" | undefined;
5352
4945
 
5353
- declare function visit(rows: GridDataRow<any>[], fn: (row: GridDataRow<any>) => void): void;
4946
+ /**
4947
+ * Manages our tree of observable RowStates that manage each GridDataRow's behavior.
4948
+ */
4949
+ declare class RowStates<R extends Kinded> {
4950
+ private map;
4951
+ readonly table: TableState<R>;
4952
+ readonly storage: RowStorage<R>;
4953
+ private readonly header;
4954
+ private keptGroupRow;
4955
+ /** The first level of rows, i.e. not the header (or kept group), but the totals + top-level children. */
4956
+ private topRows;
4957
+ constructor(table: TableState<R>);
4958
+ /** Returns a flat list of all of our RowStates. */
4959
+ get allStates(): RowState<R>[];
4960
+ /** Returns the `RowState` for the given `id`. We should probably require `kind`. */
4961
+ get(id: string): RowState<R>;
4962
+ /**
4963
+ * Merge a new set of `rows` prop into our state.
4964
+ *
4965
+ * Any missing rows are marked as `wasRemoved` so we can consider them "kept" if they're also selected.
4966
+ */
4967
+ setRows(rows: GridDataRow<R>[]): void;
4968
+ /** Fully delete `ids`, so they don't show up in kept rows anymore. */
4969
+ delete(ids: string[]): void;
4970
+ /** Implements special collapse behavior, which is just the header's collapse/uncollapse. */
4971
+ toggleCollapsed(id: string): void;
4972
+ get visibleRows(): RowState<R>[];
4973
+ /** Returns kept rows, i.e. those that were user-selected but then client-side or server-side filtered. */
4974
+ get keptRows(): RowState<R>[];
4975
+ get collapsedRows(): RowState<R>[];
4976
+ private createHeaderRow;
4977
+ /** Create our synthetic "group row" for kept rows, that users never pass in, but we self-inject as needed. */
4978
+ private createKeptGroupRow;
4979
+ maybeSetRowDraggedOver(id: string, draggedOver: DraggedOver, requireSameParentRow?: GridDataRow<R> | undefined): void;
4980
+ }
5354
4981
 
5355
- type InputStylePalette = "success" | "warning" | "caution" | "info";
5356
- interface PresentationFieldProps {
5357
- numberAlignment?: "left" | "right";
5358
- /** Sets the label position or visibility. Defaults to "above" */
5359
- labelStyle?: "inline" | "hidden" | "above" | "left";
5360
- /** Defines the width property of the input field wrapper when using `labelStyle="left"`. */
5361
- labelLeftFieldWidth?: number | string;
5362
- labelSuffix?: LabelSuffixStyle;
5363
- borderless?: boolean;
5364
- borderOnHover?: boolean;
5365
- compact?: boolean;
5366
- typeScale?: Typography;
5367
- visuallyDisabled?: false;
5368
- errorInTooltip?: true;
5369
- /** Allow the fields to grow to the width of its container. By default, fields will extend up to 550px */
5370
- fullWidth?: boolean;
5371
- /** Changes bg and hoverBg; Takes priority over `contrast`; Useful when showing many fields w/in a table that require user attention; In no way should be used as a replacement for error/focus state */
5372
- inputStylePalette?: InputStylePalette;
4982
+ declare enum DraggedOver {
4983
+ None = 0,
4984
+ Above = 1,// In this case this means higher on the screen which means a lower y value and a lower row index
4985
+ Below = 2
5373
4986
  }
5374
- type PresentationContextProps = {
5375
- /** `inputStylePalette` omitted because it is too dependent on the individual field use case to be controlled at this level */
5376
- fieldProps?: Omit<PresentationFieldProps, "inputStylePalette">;
5377
- gridTableStyle?: GridStyle;
5378
- wrap?: boolean;
5379
- };
5380
- declare function PresentationProvider(props: PropsWithChildren<PresentationContextProps>): _emotion_react_jsx_runtime.JSX.Element;
5381
4987
  /**
5382
- * Label settings for required/optional fields.
4988
+ * A reactive/observable state of each GridDataRow's current behavior.
5383
4989
  *
5384
- * We may want to just hard-code this behavior, so that it's very consistent,
5385
- * but for now making it configurable.
4990
+ * We set up the RowStates in a tree, just like GridDataRow, to make business logic
4991
+ * that uses parent/children easier to write, i.e. selected-ness and collapsed-ness.
5386
4992
  */
5387
- type LabelSuffixStyle = {
5388
- /** The suffix to use for required fields. */
5389
- required?: string;
5390
- /** The suffix to use for explicitly optional (i.e. `required=false`) fields. */
5391
- optional?: string;
5392
- };
5393
-
5394
- /** Completely static look & feel, i.e. nothing that is based on row kinds/content. */
5395
- interface GridStyle {
5396
- /** Applied to the base div element. */
5397
- rootCss?: Properties;
4993
+ declare class RowState<R extends Kinded> {
4994
+ private states;
4995
+ parent: RowState<R> | undefined;
4996
+ /** Our row, not actually observed, b/c each `createRows` calc creates unstable rows. */
4997
+ private _row;
4998
+ /** Our data, only ref observed, so we don't crawl into GraphQL fragments. */
4999
+ private _data;
5000
+ /** Our children row states, as of the latest `props.rows`, without any filtering applied. */
5001
+ children: RowState<R>[] | undefined;
5002
+ /** Whether we are *directly* selected. */
5003
+ selected: boolean;
5004
+ /** Whether we are collapsed. */
5005
+ collapsed: boolean;
5006
+ /** Whether we are dragged over. */
5007
+ isDraggedOver: DraggedOver;
5398
5008
  /**
5399
- * Applied as the base body-row cell styling (commonly used for row separators).
5400
- * This is applied to body rows broadly (including the last body row); use
5401
- * `lastRowCellCss`/`lastRowCss` to adjust/cancel any final-row treatment.
5009
+ * Whether our `row` had been in `props.rows`, but then removed _while being
5010
+ * selected_, i.e. potentially by server-side filters.
5011
+ *
5012
+ * We have had a large foot-gun where users "select a row", change the filters,
5013
+ * the row disappears (filtered out), and the user clicks "Go!", but the table
5014
+ * thinks their previously-selected row is gone (b/c it's not in view), and
5015
+ * then the row is inappropriately deleted/unassociated/etc. (b/c in the user's
5016
+ * head, it is "still selected").
5017
+ *
5018
+ * To avoid this, we by default keep selected rows, as "kept rows", to make
5019
+ * extra sure the user wants them to go away.
5020
+ *
5021
+ * Soft-deleted rows are rows that were removed from `props.rows` (i.e. we
5022
+ * suspect are just hidden by a changed server-side-filter), and hard-deleted
5023
+ * rows are rows the page called `api.deleteRow` and confirmed it should be
5024
+ * actively removed.
5402
5025
  */
5403
- betweenRowsCss?: Properties;
5404
- /** Applied on the last row of the table, typically to override/cancel `betweenRowsCss`. */
5405
- lastRowCss?: Properties;
5406
- /** Applied on the first row of the table (could be the Header or Totals row). */
5407
- firstRowCss?: Properties;
5408
- /** Applied to every non-header row of the table */
5409
- nonHeaderRowCss?: Properties;
5410
- /** Applied to the first body row, i.e. if you want to cancel out `betweenRowsCss`. */
5411
- firstBodyRowCss?: Properties;
5412
- /** Applied to all cell divs (via a selector off the base div). */
5413
- cellCss?: Properties;
5026
+ removed: false | "soft" | "hard";
5027
+ private isCalculatingDirectMatch;
5028
+ constructor(states: RowStates<R>, parent: RowState<R> | undefined, row: GridDataRow<R>);
5029
+ /** Returns a stable-ish row identity that will only change if our `data` changes. */
5030
+ get row(): GridDataRow<R>;
5031
+ /** Accepts a new unstable row, i.e. each `createRows` creates a new row literal. */
5032
+ set row(row: GridDataRow<R>);
5414
5033
  /**
5415
- * Applied to the header row divs.
5034
+ * Whether we match a client-side filter; true if no filter is in place.
5416
5035
  *
5417
- * NOTE `as=virtual`: When using a virtual table with the goal of adding space
5418
- * between the header and the first row use `firstBodyRowCss` with a
5419
- * margin-top instead. Using `headerCellCss` will not work since the header
5420
- * rows are wrapper with Chrome rows.
5421
- */
5422
- headerCellCss?: Properties;
5423
- /** Applied to 'kind: "totals"' cells */
5424
- totalsCellCss?: Properties;
5425
- /** Applied to 'kind: "expandableHeader"' cells */
5426
- expandableHeaderCss?: Properties;
5427
- /** Applied to expandable header cells that are not the last table column. */
5428
- expandableHeaderNonLastColumnCss?: Properties;
5429
- /** Applied to the first cell of all rows, i.e. for table-wide padding or left-side borders. */
5430
- firstCellCss?: Properties;
5431
- /** Applied to the last cell of all rows, i.e. for table-wide padding or right-side borders. */
5432
- lastCellCss?: Properties;
5433
- /** Applied to every cell in the first table-head row (expandableHeader/header/totals). */
5434
- firstRowCellCss?: Properties;
5435
- /** Applied to the first cell in the first table-head row. */
5436
- firstRowFirstCellCss?: Properties;
5437
- /** Applied to the last cell in the first table-head row. */
5438
- firstRowLastCellCss?: Properties;
5439
- /** Applied to every cell in the last table-body row. */
5440
- lastRowCellCss?: Properties;
5441
- /** Applied to the first cell in the last table-body row. */
5442
- lastRowFirstCellCss?: Properties;
5443
- /** Applied to the last cell in the last table-body row. */
5444
- lastRowLastCellCss?: Properties;
5445
- /** Applied if there is a fallback/overflow message showing. */
5446
- firstRowMessageCss?: Properties;
5447
- /** Applied on hover if a row has a rowLink/onClick set. */
5448
- rowHoverColor?: Palette | "none";
5449
- /** Applied on hover of a row */
5450
- nonHeaderRowHoverCss?: Properties;
5451
- /** Default content to put into an empty cell */
5452
- emptyCell?: ReactNode;
5453
- presentationSettings?: Pick<PresentationFieldProps, "borderless" | "borderOnHover" | "typeScale"> & Pick<PresentationContextProps, "wrap">;
5454
- /** Minimum table width in pixels. Used when calculating columns sizes */
5455
- minWidthPx?: number;
5456
- /** Css to apply at each level of a parent/child nested table. */
5457
- levels?: Record<number, {
5458
- /** Number of pixels to indent the row. This value will be subtracted from the "first content column" width. First content column is the first column that is not an 'action' column (i.e. non-checkbox or non-collapse button column) */
5459
- rowIndent?: number;
5460
- cellCss?: Properties;
5461
- firstContentColumn?: Properties;
5462
- }> | ((level: number) => {
5463
- rowIndent?: number;
5464
- cellCss?: Properties;
5465
- firstContentColumn?: Properties;
5466
- });
5467
- /** Allows for customization of the background color used to denote an "active" row */
5468
- activeBgColor?: Palette;
5469
- /** Defines styles for the group row which holds the selected rows that have been filtered out */
5470
- keptGroupRowCss?: Properties;
5471
- /** Defines styles for the last row `keptGroup` to provide separation from the rest of the table */
5472
- keptLastRowCss?: Properties;
5473
- }
5474
- interface GridStyleDef {
5475
- /** Changes the height of the rows when `rowHeight: fixed` to provide more space between rows for input fields. */
5476
- inlineEditing?: boolean;
5477
- /** Adds styling for grouped rows */
5478
- grouped?: boolean;
5479
- /** 'fixed' height rows do not allow text to wrap. 'flexible' allows for wrapping. Defaults to `flexible` */
5480
- rowHeight?: "fixed" | "flexible";
5481
- /** Enables cells Highlight and hover */
5482
- cellHighlight?: boolean;
5483
- /** Applies a white background to the whole table, including header and group rows. */
5484
- allWhite?: boolean;
5485
- /** Whether to apply a border around the whole table */
5486
- bordered?: boolean;
5487
- /** Whether to show a hover effect on rows. Defaults to true */
5488
- rowHover?: boolean;
5489
- /** Defines the vertical alignment of the content of the cells for the whole table (not including the 'header' rows). Defaults to `center` */
5490
- vAlign?: "top" | "center" | "bottom";
5491
- /** Defines the Typography for the table body's cells (not the header). This only applies to rows that are not nested/grouped */
5492
- cellTypography?: Typography;
5493
- /** Defines if the table should highlight the row on hover. Defaults to true */
5494
- highlightOnHover?: boolean;
5495
- }
5496
- declare const getTableStyles: (props?: GridStyleDef) => GridStyle;
5497
- /** Defines row-specific styling for each given row `kind` in `R` */
5498
- type RowStyles<R extends Kinded> = {
5499
- [P in R["kind"]]?: RowStyle<DiscriminateUnion<R, "kind", P>>;
5500
- };
5501
- interface RowStyle<R extends Kinded> {
5502
- /** Applies this css to the wrapper row, i.e. for row-level hovers. */
5503
- rowCss?: Properties | ((row: R) => Properties);
5504
- /** Applies this css to each cell in the row. */
5505
- cellCss?: Properties | ((row: R) => Properties);
5506
- /** Renders the cell element, i.e. a link to get whole-row links. */
5507
- renderCell?: RenderCellFn<R>;
5508
- /** Whether the row should be a link. */
5509
- rowLink?: (row: R) => string;
5510
- /** Fired when the row is clicked, similar to rowLink but for actions that aren't 'go to this link'. */
5511
- onClick?: (row: GridDataRow<R>, api: GridTableApi<R>) => void;
5036
+ * We should try and keep this based solely on "does/does not match the filter",
5037
+ * and do any overrides for things like pinning/kept rows/etc. elsewhere.
5038
+ */
5039
+ get isMatched(): boolean;
5040
+ /**
5041
+ * Whether we are effectively selected, for `GridTableApi.getSelectedRows`.
5042
+ *
5043
+ * Note that we don't use "I'm selected || my parent is selected" logic here, because whether a child is selected
5044
+ * is actually based on whether it was _visible at the time the parent was selected_. So, we can't just assume
5045
+ * "a parent being selected means the child is also selected", and instead parents have to push selected-ness down
5046
+ * to their visible children explicitly.
5047
+ */
5048
+ get isSelected(): boolean;
5049
+ /** The UI state for checked/unchecked + "partially checked" for parents. */
5050
+ get selectedState(): SelectedState;
5051
+ /**
5052
+ * A special SelectedState that "sees through"/ignores inferSelectedState, so the header works.
5053
+ *
5054
+ * I.e. a row might have `inferSelectedState: false`, so is showing unchecked, but the header
5055
+ * wants to show partial-ness whenever any given child is selected.
5056
+ */
5057
+ get selectedStateForHeader(): SelectedState;
5058
+ /**
5059
+ * Called to explicitly select/unselect this row.
5060
+ *
5061
+ * This could be either because the user clicked directly on us, or because we're a visible
5062
+ * child of a selected parent row.
5063
+ */
5064
+ select(selected: boolean): void;
5065
+ /** Marks the row as removed from `props.rows`, to potentially become kept. */
5066
+ markRemoved(): void;
5067
+ toggleCollapsed(): void;
5068
+ /** Whether this is a selected-but-filtered-out row that we should hoist to the top. */
5069
+ get isKept(): boolean;
5070
+ get isLastKeptRow(): boolean;
5071
+ get key(): string;
5072
+ get kind(): string;
5073
+ get isActive(): boolean;
5074
+ get level(): number;
5075
+ private get inferSelectedState();
5076
+ /** Returns this row and, if we're not collapsed, our children. */
5077
+ get selfAndMaybeChildren(): RowState<R>[];
5078
+ private get visibleChildren();
5079
+ private get visibleDirectlyMatchedChildren();
5080
+ /** The `visibleChildren`, but with the current sort config applied. */
5081
+ private get visibleSortedChildren();
5082
+ private get hasSelectableChildren();
5083
+ /**
5084
+ * Returns whether this row should act like a parent.
5085
+ *
5086
+ * This means "has children" and "does not have inferSelectedState: false"
5087
+ * set. I.e. `inferSelectedState: false` allows a parent with children to
5088
+ * still act as its own selectable identity.
5089
+ *
5090
+ * We also check `children.length > 0`, because sometimes pages will calc a
5091
+ * row's children as `children = someList.map(...)`, and if the list is empty,
5092
+ * they want the row to be selectable.
5093
+ */
5094
+ private get isParent();
5095
+ private get isPinned();
5096
+ get api(): GridRowApi<R>;
5097
+ get isReservedKind(): boolean;
5098
+ /** A dedicated method to "looking down" recursively, to avoid loops in `isMatched`. */
5099
+ private get hasDirectlyMatchedChildren();
5100
+ /** A dedicated method to "looking up" recursively, to avoid loops in `isMatched`. */
5101
+ private get hasDirectlyMatchedParent();
5102
+ private get isDirectlyMatched();
5512
5103
  }
5513
- /** Our original table look & feel/style. */
5514
- declare const defaultStyle: GridStyle;
5515
- /** Tightens up the padding of rows, great for rows that have form elements in them. */
5516
- declare const condensedStyle: GridStyle;
5517
- /** Renders each row as a card.
5518
- * TODO: Add `cardStyle` option to `getTableStyles` and remove this.
5519
- * */
5520
- declare const cardStyle: GridStyle;
5521
5104
 
5522
5105
  interface RowProps<R extends Kinded> {
5523
5106
  as: RenderAs;
@@ -5596,6 +5179,33 @@ type GridDataRow<R extends Kinded> = {
5596
5179
  draggable?: boolean;
5597
5180
  } & IfAny<R, AnyObject, DiscriminateUnion<R, "kind", R["kind"]>>;
5598
5181
 
5182
+ /**
5183
+ * Allows a caller to ask for the currently shown rows, given the current sorting/filtering.
5184
+ *
5185
+ * We will probably end up generalizing this into a GridTableApi that exposes more
5186
+ * actions i.e. scrolling to a row and selection state.
5187
+ */
5188
+ interface GridRowLookup<R extends Kinded> {
5189
+ /** Returns both the immediate next/prev rows, as well as `[kind].next/prev` values, ignoring headers. */
5190
+ lookup(row: GridDataRow<R>, additionalFilter?: (row: GridDataRow<R>) => boolean): NextPrev<R> & {
5191
+ [P in R["kind"]]: NextPrev<DiscriminateUnion<R, "kind", P>>;
5192
+ };
5193
+ /** Returns the list of currently filtered/sorted rows, without headers. */
5194
+ currentList(): readonly GridDataRow<R>[];
5195
+ /**
5196
+ * Scroll's to the row with the given kind + id. Requires using `as=virtual`.
5197
+ * Will skip re-scrolling to a row if it's already visible.
5198
+ */
5199
+ scrollTo(kind: R["kind"], id: string): void;
5200
+ }
5201
+ interface NextPrev<R extends Kinded> {
5202
+ next: GridDataRow<R> | undefined;
5203
+ prev: GridDataRow<R> | undefined;
5204
+ }
5205
+ declare function createRowLookup<R extends Kinded>(api: GridTableApiImpl<R>, virtuosoRef: MutableRefObject<VirtuosoHandle | null>, virtuosoRangeRef: MutableRefObject<ListRange | null>): GridRowLookup<R>;
5206
+ /** Optionally takes into consideration if a row is already in view before attempting to scroll to it. */
5207
+ declare function shouldSkipScrollTo(index: number, virtuosoRangeRef: MutableRefObject<ListRange | null>): boolean;
5208
+
5599
5209
  /**
5600
5210
  * Creates an `api` handle to drive a `GridTable`.
5601
5211
  *
@@ -5939,6 +5549,106 @@ interface AutoSaveIndicatorProps {
5939
5549
  }
5940
5550
  declare function AutoSaveIndicator({ hideOnIdle, doNotReset }: AutoSaveIndicatorProps): _emotion_react_jsx_runtime.JSX.Element | null;
5941
5551
 
5552
+ interface AvatarProps {
5553
+ src: string | undefined;
5554
+ name?: string;
5555
+ size?: AvatarSize;
5556
+ showName?: boolean;
5557
+ disableTooltip?: boolean;
5558
+ }
5559
+ declare function Avatar({ src, name, size, showName, disableTooltip, ...others }: AvatarProps): _emotion_react_jsx_runtime.JSX.Element;
5560
+ type AvatarSize = "sm" | "md" | "lg" | "xl";
5561
+
5562
+ /** Base Interfaced */
5563
+ interface BeamFocusableProps {
5564
+ /** Whether the element should receive focus on render. */
5565
+ autoFocus?: boolean;
5566
+ forceFocusStyles?: boolean;
5567
+ }
5568
+ interface BeamButtonProps {
5569
+ /**
5570
+ * Whether the interactive element is disabled.
5571
+ *
5572
+ * If a ReactNode, it's treated as a "disabled reason" that's shown in a tooltip.
5573
+ */
5574
+ disabled?: boolean | ReactNode;
5575
+ /** If function, then it is the handler that is called when the press is released over the target. Otherwise if string, it is the URL path for the link */
5576
+ onClick: ((e: PressEvent) => void) | ((e: PressEvent) => Promise<void>) | string;
5577
+ /** Text to be shown via a tooltip when the user hovers over the button */
5578
+ tooltip?: ReactNode;
5579
+ /** Whether to open link in a new tab. This only effects the element if the `onClick` is a `string`/URL. */
5580
+ openInNew?: boolean;
5581
+ }
5582
+ type TextFieldXss = Xss<"textAlign" | "justifyContent" | "fontWeight" | "fontSize" | "lineHeight">;
5583
+ interface BeamTextFieldProps<X> extends BeamFocusableProps, PresentationFieldProps {
5584
+ /** Whether the field is disabled. If a ReactNode, it's treated as a "disabled reason" that's shown in a tooltip. */
5585
+ disabled?: boolean | ReactNode;
5586
+ errorMsg?: string;
5587
+ helperText?: string | ReactNode;
5588
+ /** Input label */
5589
+ label: string;
5590
+ /** Marks the field as required or optional, the default is assumed ambiguous/unknown. */
5591
+ required?: boolean;
5592
+ value: string | undefined;
5593
+ /** Handler called when the interactive element state changes. */
5594
+ onChange: (value: string | undefined) => void;
5595
+ /** Called when the component loses focus, mostly for BoundTextField to use. */
5596
+ onBlur?: VoidFunction;
5597
+ onFocus?: VoidFunction;
5598
+ onEnter?: VoidFunction;
5599
+ /** Whether the field is readOnly. If a ReactNode, it's treated as a "readOnly reason" that's shown in a tooltip. */
5600
+ readOnly?: boolean | ReactNode;
5601
+ placeholder?: string;
5602
+ /** Styles overrides */
5603
+ xss?: X;
5604
+ }
5605
+ interface TextFieldInternalProps {
5606
+ /**
5607
+ * Denoting a field as 'compound' will remove existing borders on the returned field, including the 2px of height added by the borders.
5608
+ * It is expected that the caller reintroduces the border to achieve the expected field height and handles the custom border logic of a Compound Field
5609
+ * This is explicitly an internal property that is not exposed to any field's API.
5610
+ */
5611
+ compound?: boolean;
5612
+ /** Forces focus styles for storybook purposes */
5613
+ forceFocus?: true;
5614
+ /** Forces hover styles for storybook purposes */
5615
+ forceHover?: boolean;
5616
+ }
5617
+
5618
+ interface AvatarButtonProps extends AvatarProps, BeamButtonProps, BeamFocusableProps {
5619
+ menuTriggerProps?: AriaButtonProps;
5620
+ buttonRef?: RefObject<HTMLButtonElement>;
5621
+ /** Storybook-only visual state overrides for snapshotting pseudo-interactions. */
5622
+ __storyState?: {
5623
+ hovered?: boolean;
5624
+ focusVisible?: boolean;
5625
+ pressed?: boolean;
5626
+ };
5627
+ }
5628
+ declare function AvatarButton(props: AvatarButtonProps): _emotion_react_jsx_runtime.JSX.Element;
5629
+ declare const hoverStyles: {
5630
+ boxShadow: csstype.Property.BoxShadow | undefined;
5631
+ };
5632
+ declare const pressedOverlayCss: {
5633
+ borderRadius: csstype.Property.BorderRadius<string | 0> | undefined;
5634
+ } & {
5635
+ backgroundColor: csstype.Property.BackgroundColor | undefined;
5636
+ } & {
5637
+ width: csstype.Property.Width<string | 0> | undefined;
5638
+ } & {
5639
+ height: csstype.Property.Height<string | 0> | undefined;
5640
+ } & {
5641
+ position: csstype.Property.Position | undefined;
5642
+ } & {
5643
+ top: csstype.Property.Top<string | 0> | undefined;
5644
+ } & {
5645
+ left: csstype.Property.Left<string | 0> | undefined;
5646
+ } & {
5647
+ opacity: csstype.Property.Opacity | undefined;
5648
+ } & {
5649
+ pointerEvents: csstype.Property.PointerEvents | undefined;
5650
+ };
5651
+
5942
5652
  interface AvatarGroupProps {
5943
5653
  avatars: {
5944
5654
  src: string | undefined;
@@ -6058,18 +5768,128 @@ interface UseSuperDrawerHook {
6058
5768
  */
6059
5769
  addCanCloseDrawerDetailCheck: (canCloseCheck: CanCloseCheck) => void;
6060
5770
  }
6061
- declare function useSuperDrawer(): UseSuperDrawerHook;
5771
+ declare function useSuperDrawer(): UseSuperDrawerHook;
5772
+
5773
+ interface BeamProviderProps extends PropsWithChildren<PresentationContextProps> {
5774
+ }
5775
+ declare function BeamProvider({ children, ...presentationProps }: BeamProviderProps): _emotion_react_jsx_runtime.JSX.Element;
5776
+
5777
+ interface ButtonProps extends BeamButtonProps, BeamFocusableProps {
5778
+ label: ReactNode;
5779
+ variant?: ButtonVariant;
5780
+ size?: ButtonSize;
5781
+ icon?: IconProps["icon"] | null;
5782
+ /** Displays contents after the Button's label. Will be ignored for Buttons rendered as a link with an absolute URL */
5783
+ endAdornment?: ReactNode;
5784
+ /** HTML attributes to apply to the button element when it is being used to trigger a menu. */
5785
+ menuTriggerProps?: AriaButtonProps;
5786
+ buttonRef?: RefObject<HTMLElement>;
5787
+ /** Allow for setting "submit" | "button" | "reset" on button element */
5788
+ type?: ButtonHTMLAttributes<HTMLButtonElement>["type"];
5789
+ /** Denotes if this button is used to download a resource. Uses the anchor tag with the `download` attribute */
5790
+ download?: boolean;
5791
+ contrast?: boolean;
5792
+ /** Additional text to further customize button during an async request is in progress. */
5793
+ labelInFlight?: string;
5794
+ /** Shows pressed/active styles (useful when a menu is open) */
5795
+ active?: boolean;
5796
+ }
5797
+ declare function Button(props: ButtonProps): _emotion_react_jsx_runtime.JSX.Element;
5798
+ type ButtonSize = "sm" | "md" | "lg";
5799
+ type ButtonVariant = "primary" | "secondary" | "secondaryBlack" | "tertiary" | "tertiaryDanger" | "caution" | "danger" | "quaternary" | "text" | "textSecondary";
5800
+
5801
+ interface DatePickerProps {
5802
+ value?: Date;
5803
+ onSelect: (value: Date) => void;
5804
+ disabledDays?: Matcher | Matcher[];
5805
+ dottedDays?: Matcher[];
5806
+ useYearPicker?: boolean;
5807
+ }
5808
+
5809
+ interface IconButtonProps extends BeamButtonProps, BeamFocusableProps {
5810
+ /** The icon to use within the button. */
5811
+ icon: IconProps["icon"];
5812
+ color?: Palette;
5813
+ bgColor?: Palette;
5814
+ /** The size of the icon, in increments, defaults to 3 which is 24px. */
5815
+ inc?: number;
5816
+ /** HTML attributes to apply to the button element when it is being used to trigger a menu. */
5817
+ menuTriggerProps?: AriaButtonProps;
5818
+ buttonRef?: RefObject<HTMLButtonElement>;
5819
+ /** Whether to show a 16x16px version of the IconButton */
5820
+ compact?: boolean;
5821
+ /** Whether to display the contrast variant */
5822
+ contrast?: boolean;
5823
+ /** Whether to display the circle variant */
5824
+ circle?: boolean;
5825
+ /** Indicates that the button is active/selected */
5826
+ active?: boolean;
5827
+ /** Denotes if this button is used to download a resource. Uses the anchor tag with the `download` attribute */
5828
+ download?: boolean;
5829
+ /** Provides label for screen readers - Will become a required soon */
5830
+ label?: string;
5831
+ }
5832
+ declare function IconButton(props: IconButtonProps): _emotion_react_jsx_runtime.JSX.Element;
5833
+ declare const iconButtonStylesHover: {
5834
+ backgroundColor: csstype.Property.BackgroundColor | undefined;
5835
+ };
5836
+ declare const iconButtonContrastStylesHover: {
5837
+ backgroundColor: csstype.Property.BackgroundColor | undefined;
5838
+ };
5839
+ declare const iconButtonCircleStylesHover: {
5840
+ backgroundColor: csstype.Property.BackgroundColor | undefined;
5841
+ } & {
5842
+ borderColor: csstype.Property.BorderColor | undefined;
5843
+ };
6062
5844
 
6063
- interface BeamProviderProps extends PropsWithChildren<PresentationContextProps> {
5845
+ interface NavLinkProps extends BeamFocusableProps {
5846
+ /** active indicates the user is on the current page */
5847
+ active?: boolean;
5848
+ disabled?: boolean;
5849
+ /** if `href` isn't provided, it is treated as a <button> */
5850
+ href?: string;
5851
+ label: ReactNode;
5852
+ icon?: IconKey;
5853
+ variant: NavLinkVariant;
5854
+ openInNew?: boolean;
5855
+ contrast?: boolean;
5856
+ /** HTML attributes to apply to the button element when it is being used to trigger a menu. */
5857
+ menuTriggerProps?: AriaButtonProps;
5858
+ buttonRef?: RefObject<HTMLElement>;
6064
5859
  }
6065
- declare function BeamProvider({ children, ...presentationProps }: BeamProviderProps): _emotion_react_jsx_runtime.JSX.Element;
5860
+ type NavLinkVariant = "side" | "global";
5861
+ declare function NavLink(props: NavLinkProps): JSX.Element;
6066
5862
 
6067
- interface DatePickerProps {
6068
- value?: Date;
6069
- onSelect: (value: Date) => void;
6070
- disabledDays?: Matcher | Matcher[];
6071
- dottedDays?: Matcher[];
6072
- useYearPicker?: boolean;
5863
+ interface TextButtonTriggerProps extends Pick<ButtonProps, "label" | "variant" | "size" | "icon"> {
5864
+ }
5865
+ interface IconButtonTriggerProps extends Pick<IconButtonProps, "icon" | "color" | "compact" | "contrast" | "inc"> {
5866
+ }
5867
+ interface AvatarButtonTriggerProps extends Pick<AvatarButtonProps, "src" | "name" | "size"> {
5868
+ }
5869
+ interface NavLinkButtonTriggerProps extends Pick<NavLinkProps, "active" | "variant" | "icon"> {
5870
+ navLabel: string;
5871
+ }
5872
+ interface OverlayTriggerProps {
5873
+ trigger: TextButtonTriggerProps | IconButtonTriggerProps | AvatarButtonTriggerProps | NavLinkButtonTriggerProps;
5874
+ /** Defaults to "left" */
5875
+ placement?: "left" | "right";
5876
+ /** Whether the Button is disabled. If a ReactNode, it's treated as a "disabled reason" that's shown in a tooltip. */
5877
+ disabled?: boolean | ReactNode;
5878
+ /** Text to be shown via a tooltip when the user hovers over the button */
5879
+ tooltip?: ReactNode;
5880
+ /** The component to be shown within the overlay */
5881
+ children: ReactElement;
5882
+ /** Props returned by the useMenuTrigger hook to be passed to the button element */
5883
+ menuTriggerProps: AriaButtonProps;
5884
+ /** Ref for the button element */
5885
+ buttonRef: MutableRefObject<HTMLButtonElement | null>;
5886
+ /** Result of the useMenuTriggerState hook */
5887
+ state: MenuTriggerState;
5888
+ /** Prop set the style of the button element */
5889
+ variant?: ButtonVariant;
5890
+ hideEndAdornment?: boolean;
5891
+ showActiveBorder?: boolean;
5892
+ contrast?: boolean;
6073
5893
  }
6074
5894
 
6075
5895
  type ButtonDatePickerProps = {
@@ -7881,6 +7701,191 @@ declare function Pagination(props: PaginationProps): _emotion_react_jsx_runtime.
7881
7701
  declare function toLimitAndOffset(page: PageSettings): OffsetAndLimit;
7882
7702
  declare function toPageNumberSize(page: PageSettings): PageNumberAndSize;
7883
7703
 
7704
+ interface GridTableCollapseToggleProps extends Pick<IconButtonProps, "compact"> {
7705
+ row: GridDataRow<any>;
7706
+ }
7707
+ /** Provides a chevron icons to collapse/un-collapse for parent/child tables. */
7708
+ declare function CollapseToggle(props: GridTableCollapseToggleProps): _emotion_react_jsx_runtime.JSX.Element | null;
7709
+
7710
+ type EditColumnsButtonProps<R extends Kinded> = {
7711
+ columns: GridColumn<R>[];
7712
+ api: GridTableApi<R>;
7713
+ defaultOpen?: boolean;
7714
+ } & Pick<OverlayTriggerProps, "trigger" | "placement" | "disabled" | "tooltip">;
7715
+ declare function EditColumnsButton<R extends Kinded>(props: EditColumnsButtonProps<R>): _emotion_react_jsx_runtime.JSX.Element;
7716
+
7717
+ interface SelectToggleProps {
7718
+ id: string;
7719
+ disabled?: boolean | ReactNode;
7720
+ }
7721
+ /** Provides a checkbox to show/drive this row's selected state. */
7722
+ declare function SelectToggle({ id, disabled }: SelectToggleProps): _emotion_react_jsx_runtime.JSX.Element;
7723
+
7724
+ interface SortHeaderProps {
7725
+ content: string;
7726
+ xss?: Properties;
7727
+ iconOnLeft?: boolean;
7728
+ sortKey: string;
7729
+ tooltipEl?: ReactNode;
7730
+ }
7731
+ /**
7732
+ * Wraps column header names with up/down sorting icons.
7733
+ *
7734
+ * GridTable will use this automatically if the header content is just a text string.
7735
+ *
7736
+ * Alternatively, callers can also:
7737
+ *
7738
+ * - Instantiate this SortHeader directly with some customizations in `xss`, or
7739
+ * - Write their own component that uses `GridSortContext` to access the column's
7740
+ * current sort state + `toggleSort` function
7741
+ */
7742
+ declare function SortHeader(props: SortHeaderProps): _emotion_react_jsx_runtime.JSX.Element;
7743
+
7744
+ /**
7745
+ * Calculates an array of sizes for each of our columns.
7746
+ *
7747
+ * We originally supported CSS grid-template-column definitions which allowed fancier,
7748
+ * dynamic/content-based widths, but have eventually dropped it mainly due to:
7749
+ *
7750
+ * 1. In virtual tables, a) the table never has all of the rows in DOM at a single time,
7751
+ * so any "content-based" widths will change as you scroll the table, which is weird, and
7752
+ * b) a sticky header and rows are put in different DOM parent elements by react-virtuoso,
7753
+ * so wouldn't arrive at the same "content-based" widths.
7754
+ *
7755
+ * 2. Using CSS grid but still have a row-level div for hover/focus targeting required
7756
+ * a "fake" `display: contents` div that couldn't have actually any styles applied to it.
7757
+ *
7758
+ * So we've just got with essentially fixed/deterministic widths, i.e. `px` or `percent` or
7759
+ * `fr`.
7760
+ *
7761
+ * Disclaimer that we roll our own `fr` b/c we're not in CSS grid anymore.
7762
+ */
7763
+ declare function useSetupColumnSizes<R extends Kinded>(style: GridStyle, columns: GridColumnWithId<R>[], resizeRef: MutableRefObject<HTMLElement | null>, expandedColumnIds: string[], visibleColumnsStorageKey: string | undefined, disableColumnResizing: boolean): {
7764
+ columnSizes: string[];
7765
+ tableWidth: number | undefined;
7766
+ resizedWidths: ResizedWidths;
7767
+ setResizedWidth: (columnId: string, width: number) => void;
7768
+ setResizedWidths: (widths: ResizedWidths | ((prev: ResizedWidths) => ResizedWidths)) => void;
7769
+ resetColumnWidths: () => void;
7770
+ };
7771
+
7772
+ /** Provides default styling for a GridColumn representing a Date. */
7773
+ declare function column<T extends Kinded>(columnDef: GridColumn<T>): GridColumn<T>;
7774
+ /** Provides default styling for a GridColumn representing a Date. */
7775
+ declare function dateColumn<T extends Kinded>(columnDef: GridColumn<T>): GridColumn<T>;
7776
+ /**
7777
+ * Provides default styling for a GridColumn representing a Numeric value (Price, percentage, PO #, etc.). */
7778
+ declare function numericColumn<T extends Kinded>(columnDef: GridColumn<T>): GridColumn<T>;
7779
+ /** Provides default styling for a GridColumn representing an Action. */
7780
+ declare function actionColumn<T extends Kinded>(columnDef: GridColumn<T>): GridColumn<T>;
7781
+ /**
7782
+ * Provides default styling for a GridColumn containing a checkbox.
7783
+ *
7784
+ * We allow either no `columnDef` at all, or a partial column def (i.e. to say a Totals row should
7785
+ * not have a `SelectToggle`, b/c we can provide the default behavior a `SelectToggle` for basically
7786
+ * all rows.
7787
+ */
7788
+ declare function selectColumn<T extends Kinded>(columnDef?: Partial<GridColumn<T>>): GridColumn<T>;
7789
+ /**
7790
+ * Provides default styling for a GridColumn containing a collapse icon.
7791
+ *
7792
+ * We allow either no `columnDef` at all, or a partial column def (i.e. to say a Totals row should
7793
+ * not have a `CollapseToggle`, b/c we can provide the default behavior a `CollapseToggle` for basically
7794
+ * all rows.
7795
+ */
7796
+ declare function collapseColumn<T extends Kinded>(columnDef?: Partial<GridColumn<T>>): GridColumn<T>;
7797
+ declare function parseWidthToPx(widthStr: string | undefined, tableWidth: number | undefined): number | null;
7798
+ /**
7799
+ * Calculates column widths using a flexible `calc()` definition that allows for consistent column alignment without the use of `<table />`, CSS Grid, etc layouts.
7800
+ * Enforces only fixed-sized units (% and px)
7801
+ */
7802
+ declare function calcColumnSizes<R extends Kinded>(columns: GridColumnWithId<R>[], tableWidth: number | undefined, tableMinWidthPx: number | undefined, expandedColumnIds: string[], resizedWidths?: ResizedWidths): string[];
7803
+ /** Assign column ids if missing. */
7804
+ declare function assignDefaultColumnIds<T extends Kinded>(columns: GridColumn<T>[]): GridColumnWithId<T>[];
7805
+ declare const generateColumnId: (columnIndex: number) => string;
7806
+ declare function dragHandleColumn<T extends Kinded>(columnDef?: Partial<GridColumn<T>>): GridColumn<T>;
7807
+
7808
+ /**
7809
+ * A helper for making `Row` type aliases of simple/flat tables that are just header + data.
7810
+ *
7811
+ * Unlike `SimpleHeaderAndDataOf`, we keep `T` in a separate `data`, which is useful
7812
+ * when rows are mobx proxies and we need proxy accesses to happen within the column
7813
+ * rendering.
7814
+ */
7815
+ type SimpleHeaderAndData<T> = {
7816
+ kind: "header";
7817
+ } | {
7818
+ kind: "data";
7819
+ data: T;
7820
+ id: string;
7821
+ };
7822
+ /** A const for a marker header row. */
7823
+ declare const simpleHeader: {
7824
+ kind: "header";
7825
+ id: string;
7826
+ data: undefined;
7827
+ };
7828
+ /** Like `simpleRows` but for `SimpleHeaderAndData`. */
7829
+ declare function simpleDataRows<R extends SimpleHeaderAndData<D>, D>(data?: Array<D & {
7830
+ id: string;
7831
+ }> | undefined): GridDataRow<R>[];
7832
+
7833
+ declare function sortRows<R extends Kinded>(columns: GridColumnWithId<R>[], rows: GridDataRow<R>[], sortState: SortState, caseSensitive: boolean): GridDataRow<R>[];
7834
+ /** Creates a comparator for two GridDataRows based on the current sortState. */
7835
+ declare function sortFn<R extends Kinded>(columns: GridColumnWithId<R>[], sortState: SortState, caseSensitive: boolean): (a: GridDataRow<R>, b: GridDataRow<R>) => number;
7836
+ declare function ensureClientSideSortValueIsSortable(sortOn: SortOn, isHeader: boolean, column: GridColumnWithId<any>, idx: number, maybeContent: ReactNode | GridCellContent): void;
7837
+
7838
+ /** If a column def return just string text for a given row, apply some default styling. */
7839
+ declare function toContent(maybeContent: ReactNode | GridCellContent, isHeader: boolean, canSortColumn: boolean, isClientSideSorting: boolean, style: GridStyle, as: RenderAs, alignment: GridCellAlignment, column: GridColumnWithId<any>, isExpandableHeader: boolean, isExpandable: boolean, minStickyLeftOffset: number, isKeptSelectedRow: boolean): ReactNode;
7840
+ declare function isGridCellContent(content: ReactNode | GridCellContent): content is GridCellContent;
7841
+ type DragData<R extends Kinded> = {
7842
+ rowRenderRef: React.RefObject<HTMLTableRowElement>;
7843
+ onDragStart?: (row: GridDataRow<R>, event: React.DragEvent<HTMLElement>) => void;
7844
+ onDragEnd?: (row: GridDataRow<R>, event: React.DragEvent<HTMLElement>) => void;
7845
+ onDrop?: (row: GridDataRow<R>, event: React.DragEvent<HTMLElement>) => void;
7846
+ onDragEnter?: (row: GridDataRow<R>, event: React.DragEvent<HTMLElement>) => void;
7847
+ onDragOver?: (row: GridDataRow<R>, event: React.DragEvent<HTMLElement>) => void;
7848
+ };
7849
+ /** Return the content for a given column def applied to a given row. */
7850
+ declare function applyRowFn<R extends Kinded>(column: GridColumnWithId<R>, row: GridDataRow<R>, api: GridRowApi<R>, level: number, expanded: boolean, dragData?: DragData<R>): ReactNode | GridCellContent;
7851
+ declare const ASC: "ASC";
7852
+ declare const DESC: "DESC";
7853
+ declare const emptyCell: GridCellContent;
7854
+ declare function getFirstOrLastCellCss<R extends Kinded>(style: GridStyle, columnIndex: number, columns: GridColumnWithId<R>[], colspan?: number): Properties;
7855
+ declare function getColumnBorderCss(border: GridColumnBorder | undefined, style: GridStyle): Properties;
7856
+ /** A heuristic to detect the result of `React.createElement` / i.e. JSX. */
7857
+ declare function isJSX(content: any): boolean;
7858
+ declare function getAlignment(column: GridColumnWithId<any>, maybeContent: ReactNode | GridCellContent): GridCellAlignment;
7859
+ declare function getJustification(column: GridColumnWithId<any>, maybeContent: ReactNode | GridCellContent, as: RenderAs, alignment: GridCellAlignment): {
7860
+ textAlign: csstype.Property.TextAlign | undefined;
7861
+ };
7862
+ declare function matchesFilter(maybeContent: ReactNode | GridCellContent, filter: string): boolean;
7863
+ declare const HEADER = "header";
7864
+ declare const TOTALS = "totals";
7865
+ /** Tables expandable columns get an extra header. */
7866
+ declare const EXPANDABLE_HEADER = "expandableHeader";
7867
+ declare const KEPT_GROUP = "keptGroup";
7868
+ declare const reservedRowKinds: string[];
7869
+ declare const zIndices: {
7870
+ stickyHeader: number;
7871
+ stickyColumns: number;
7872
+ expandableHeaderTitle: number;
7873
+ expandableHeaderIcon: number;
7874
+ };
7875
+ /** Loads an array from sessionStorage, if it exists, or `undefined`. */
7876
+ declare function loadArrayOrUndefined(key: string): any;
7877
+ declare function insertAtIndex<T>(array: Array<T>, element: T, index: number): Array<T>;
7878
+ declare function isCursorBelowMidpoint(target: HTMLElement, clientY: number): boolean;
7879
+ declare function recursivelyGetContainingRow<R extends Kinded>(rowId: string, rowArray: GridDataRow<R>[], parent?: GridDataRow<R>): {
7880
+ array: GridDataRow<R>[];
7881
+ parent: GridDataRow<R> | undefined;
7882
+ } | undefined;
7883
+ declare function getTableRefWidthStyles(isVirtual: boolean): {
7884
+ width: csstype.Property.Width<string | 0> | undefined;
7885
+ };
7886
+
7887
+ declare function visit(rows: GridDataRow<any>[], fn: (row: GridDataRow<any>) => void): void;
7888
+
7884
7889
  type Sizes = "sm" | "md" | "lg";
7885
7890
  type LoadingSkeletonProps = {
7886
7891
  rows?: number;
@@ -8343,4 +8348,4 @@ declare function resolveTooltip(disabled?: boolean | ReactNode, tooltip?: ReactN
8343
8348
  */
8344
8349
  declare function defaultTestId(label: string): string;
8345
8350
 
8346
- export { ASC, Accordion, AccordionList, type AccordionProps, type AccordionSize, AutoSaveIndicator, AutoSaveStatus, AutoSaveStatusContext, AutoSaveStatusProvider, Autocomplete, type AutocompleteProps, Avatar, AvatarButton, type AvatarButtonProps, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Banner, type BannerProps, type BannerTypes, BaseFilter, type BeamButtonProps, type BeamFocusableProps, BeamProvider, type BeamTextFieldProps, BoundCheckboxField, type BoundCheckboxFieldProps, BoundCheckboxGroupField, type BoundCheckboxGroupFieldProps, BoundChipSelectField, BoundDateField, type BoundDateFieldProps, BoundDateRangeField, type BoundDateRangeFieldProps, BoundForm, type BoundFormInputConfig, type BoundFormProps, type BoundFormRowInputs, BoundIconCardField, type BoundIconCardFieldProps, BoundIconCardGroupField, type BoundIconCardGroupFieldProps, BoundMultiLineSelectField, type BoundMultiLineSelectFieldProps, BoundMultiSelectField, type BoundMultiSelectFieldProps, BoundNumberField, type BoundNumberFieldProps, BoundRadioGroupField, type BoundRadioGroupFieldProps, BoundRichTextField, type BoundRichTextFieldProps, BoundSelectAndTextField, BoundSelectField, type BoundSelectFieldProps, BoundSwitchField, type BoundSwitchFieldProps, BoundTextAreaField, type BoundTextAreaFieldProps, BoundTextField, type BoundTextFieldProps, BoundToggleChipGroupField, type BoundToggleChipGroupFieldProps, BoundTreeSelectField, type BoundTreeSelectFieldProps, type Breakpoint, Breakpoints, Button, ButtonDatePicker, ButtonGroup, type ButtonGroupButton, type ButtonGroupProps, ButtonMenu, type ButtonMenuProps, ButtonModal, type ButtonModalProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, type CardTag, type CardType, type CheckFn, Checkbox, CheckboxGroup, type CheckboxGroupItemOption, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, ChipSelectField, type ChipSelectFieldProps, type ChipType, ChipTypes, type ChipValue, Chips, type ChipsProps, CollapseToggle, CollapsedContext, ConfirmCloseModal, Container, type ContentStack, Copy, CountBadge, type CountBadgeProps, Css, CssReset, DESC, DateField, type DateFieldMode, type DateFieldModeTuple, type DateFieldProps, type DateFilterValue, DateRangeField, type DateRangeFieldProps, type DateRangeFilterValue, type Direction, type DiscriminateUnion, type DividerMenuItemType, DnDGrid, DnDGridItemHandle, type DnDGridItemHandleProps, type DnDGridItemProps, type DnDGridProps, type DragData, EXPANDABLE_HEADER, EditColumnsButton, ErrorMessage, FieldGroup, type Filter, type FilterDefs, _FilterDropdownMenu as FilterDropdownMenu, type FilterImpls, FilterModal, _Filters as Filters, type Font, FormDivider, FormHeading, type FormHeadingProps, FormLines, type FormLinesProps, FormPageLayout, FormRow, type FormSectionConfig, type FormWidth, FullBleed, type GridCellAlignment, type GridCellContent, type GridColumn, type GridColumnWithId, type GridDataRow, type GridRowKind, type GridRowLookup, type GridSortConfig, type GridStyle, GridTable, type GridTableApi, type GridTableCollapseToggleProps, type GridTableDefaults, GridTableLayout, type GridTableLayoutProps, type GridTableProps, type GridTableScrollOptions, type GridTableXss, type GroupByHook, HB_QUIPS_FLAVOR, HB_QUIPS_MISSION, HEADER, type HasIdAndName, HbLoadingSpinner, HbSpinnerProvider, HelperText, Icon, IconButton, type IconButtonProps, IconCard, type IconCardProps, type IconKey, type IconMenuItemType, type IconProps, Icons, type IfAny, type ImageFitType, type ImageMenuItemType, type InfiniteScroll, type InputStylePalette, KEPT_GROUP, type Kinded, Loader, LoadingSkeleton, type LoadingSkeletonProps, type Margin, MaxLines, type MaxLinesProps, type MaybeFn, type MenuItem, type MenuSection, ModalBody, ModalFilterItem, ModalFooter, ModalHeader, type ModalProps, type ModalSize, MultiLineSelectField, type MultiLineSelectFieldProps, MultiSelectField, type MultiSelectFieldProps, NavLink, type NestedOption, type NestedOptionsOrLoad, NumberField, type NumberFieldProps, type NumberFieldType, type OffsetAndLimit, type OnRowDragEvent, type OnRowSelect, type Only, type OpenDetailOpts, type OpenInDrawerOpts, OpenModal, type OpenRightPaneOpts, type Optional, type Padding, type PageNumberAndSize, type PageSettings, Pagination, type PaginationConfig, Palette, type Pin, type Placement, type PresentationFieldProps, PresentationProvider, PreventBrowserScroll, type Properties, RIGHT_SIDEBAR_MIN_WIDTH, type RadioFieldOption, RadioGroupField, type RadioGroupFieldProps, type RenderAs, type RenderCellFn, ResponsiveGrid, type ResponsiveGridConfig, ResponsiveGridContext, ResponsiveGridItem, type ResponsiveGridItemProps, type ResponsiveGridProps, RichTextField, RichTextFieldImpl, type RichTextFieldProps, RightPaneContext, RightPaneLayout, type RightPaneLayoutContextProps, RightPaneProvider, RightSidebar, type RightSidebarProps, type RouteTab, type RouteTabWithContent, Row, type RowStyle, type RowStyles, ScrollShadows, ScrollableContent, ScrollableParent, SelectField, type SelectFieldProps, SelectToggle, type SelectedState, type SidebarContentProps, type SimpleHeaderAndData, SortHeader, type SortOn, type SortState, StaticField, type Step, Stepper, type StepperProps, SubmitButton, type SubmitButtonProps, SuperDrawerContent, SuperDrawerHeader, SuperDrawerWidth, Switch, type SwitchProps, TOTALS, type Tab, TabContent, type TabWithContent, TableState, TableStateContext, Tabs, TabsWithContent, Tag, type TagType, type TestIds, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldApi, type TextFieldInternalProps, type TextFieldProps, type TextFieldXss, Toast, ToggleButton, type ToggleButtonProps, ToggleChip, ToggleChipGroup, type ToggleChipGroupProps, type ToggleChipProps, ToggleChips, type ToggleChipsProps, Tooltip, TreeSelectField, type TreeSelectFieldProps, type TriggerNoticeProps, type Typography, type UseModalHook, type UsePersistedFilterProps, type UseQueryState, type UseRightPaneHook, type UseSnackbarHook, type UseSuperDrawerHook, type UseToastProps, type Value, type Xss, actionColumn, applyRowFn, assignDefaultColumnIds, booleanFilter, boundCheckboxField, boundCheckboxGroupField, boundDateField, boundDateRangeField, boundIconCardField, boundIconCardGroupField, boundMultiSelectField, boundMultilineSelectField, boundNumberField, boundRadioGroupField, boundRichTextField, boundSelectField, boundSwitchField, boundTextAreaField, boundTextField, boundToggleChipGroupField, boundTreeSelectField, calcColumnSizes, cardStyle, checkboxFilter, chipBaseStyles, chipDisabledStyles, chipHoverStyles, collapseColumn, column, condensedStyle, createRowLookup, dateColumn, dateFilter, dateFormats, dateRangeFilter, defaultPage, defaultRenderFn, defaultStyle, defaultTestId, dragHandleColumn, emptyCell, ensureClientSideSortValueIsSortable, filterTestIdPrefix, formatDate, formatDateRange, formatValue, generateColumnId, getAlignment, getDateFormat, getFirstOrLastCellCss, getJustification, getTableRefWidthStyles, getTableStyles, headerRenderFn, hoverStyles, iconButtonCircleStylesHover, iconButtonContrastStylesHover, iconButtonStylesHover, iconCardStylesHover, increment, insertAtIndex, isCursorBelowMidpoint, isGridCellContent, isJSX, isListBoxSection, isPersistentItem, isPersistentKey, isValidDate, listFieldPrefix, loadArrayOrUndefined, matchesFilter, maybeApplyFunction, maybeInc, maybeTooltip, multiFilter, navLink, newMethodMissingProxy, nonKindGridColumnKeys, numberRangeFilter, numericColumn, parseDate, parseDateRange, parseWidthToPx, persistentItemPrefix, pressedOverlayCss, px, recursivelyGetContainingRow, reservedRowKinds, resolveTooltip, rowClickRenderFn, rowLinkRenderFn, selectColumn, selectedStyles, setDefaultStyle, setGridTableDefaults, setRunningInJest, shouldSkipScrollTo, simpleDataRows, simpleHeader, singleFilter, sortFn, sortRows, switchFocusStyles, switchHoverStyles, switchSelectedHoverStyles, toContent, toLimitAndOffset, toPageNumberSize, toggleFilter, toggleFocusStyles, toggleHoverStyles, togglePressStyles, treeFilter, updateFilter, useAutoSaveStatus, useBreakpoint, useComputed, useDnDGridItem, type useDnDGridItemProps, useFilter, useGridTableApi, useGridTableLayoutState, useGroupBy, useHover, useModal, usePersistedFilter, useQueryState, useResponsiveGrid, useResponsiveGridItem, type useResponsiveGridProps, useRightPane, useRightPaneContext, useScrollableParent, useSessionStorage, useSetupColumnSizes, useSnackbar, useSuperDrawer, useTestIds, useToast, useTreeSelectFieldProvider, visit, zIndices };
8351
+ export { ASC, Accordion, AccordionList, type AccordionProps, type AccordionSize, AutoSaveIndicator, AutoSaveStatus, AutoSaveStatusContext, AutoSaveStatusProvider, Autocomplete, type AutocompleteProps, Avatar, AvatarButton, type AvatarButtonProps, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, Banner, type BannerProps, type BannerTypes, BaseFilter, type BeamButtonProps, type BeamFocusableProps, BeamProvider, type BeamTextFieldProps, BoundCheckboxField, type BoundCheckboxFieldProps, BoundCheckboxGroupField, type BoundCheckboxGroupFieldProps, BoundChipSelectField, BoundDateField, type BoundDateFieldProps, BoundDateRangeField, type BoundDateRangeFieldProps, BoundForm, type BoundFormInputConfig, type BoundFormProps, type BoundFormRowInputs, BoundIconCardField, type BoundIconCardFieldProps, BoundIconCardGroupField, type BoundIconCardGroupFieldProps, BoundMultiLineSelectField, type BoundMultiLineSelectFieldProps, BoundMultiSelectField, type BoundMultiSelectFieldProps, BoundNumberField, type BoundNumberFieldProps, BoundRadioGroupField, type BoundRadioGroupFieldProps, BoundRichTextField, type BoundRichTextFieldProps, BoundSelectAndTextField, BoundSelectField, type BoundSelectFieldProps, BoundSwitchField, type BoundSwitchFieldProps, BoundTextAreaField, type BoundTextAreaFieldProps, BoundTextField, type BoundTextFieldProps, BoundToggleChipGroupField, type BoundToggleChipGroupFieldProps, BoundTreeSelectField, type BoundTreeSelectFieldProps, type Breakpoint, Breakpoints, Button, ButtonDatePicker, ButtonGroup, type ButtonGroupButton, type ButtonGroupProps, ButtonMenu, type ButtonMenuProps, ButtonModal, type ButtonModalProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardProps, type CardTag, type CardType, type CheckFn, Checkbox, CheckboxGroup, type CheckboxGroupItemOption, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipProps, ChipSelectField, type ChipSelectFieldProps, type ChipType, ChipTypes, type ChipValue, Chips, type ChipsProps, CollapseToggle, CollapsedContext, ConfirmCloseModal, Container, type ContentStack, Copy, CountBadge, type CountBadgeProps, Css, CssReset, DESC, DateField, type DateFieldMode, type DateFieldModeTuple, type DateFieldProps, type DateFilterValue, DateRangeField, type DateRangeFieldProps, type DateRangeFilterValue, type Direction, type DiscriminateUnion, type DividerMenuItemType, DnDGrid, DnDGridItemHandle, type DnDGridItemHandleProps, type DnDGridItemProps, type DnDGridProps, type DragData, EXPANDABLE_HEADER, EditColumnsButton, ErrorMessage, FieldGroup, type Filter, type FilterDefs, _FilterDropdownMenu as FilterDropdownMenu, type FilterImpls, FilterModal, _Filters as Filters, type Font, FormDivider, FormHeading, type FormHeadingProps, FormLines, type FormLinesProps, FormPageLayout, FormRow, type FormSectionConfig, type FormWidth, FullBleed, type GridCellAlignment, type GridCellContent, type GridColumn, type GridColumnBorder, type GridColumnWithId, type GridDataRow, type GridRowKind, type GridRowLookup, type GridSortConfig, type GridStyle, GridTable, type GridTableApi, type GridTableCollapseToggleProps, type GridTableDefaults, GridTableLayout, type GridTableLayoutProps, type GridTableProps, type GridTableScrollOptions, type GridTableXss, type GroupByHook, HB_QUIPS_FLAVOR, HB_QUIPS_MISSION, HEADER, type HasIdAndName, HbLoadingSpinner, HbSpinnerProvider, HelperText, Icon, IconButton, type IconButtonProps, IconCard, type IconCardProps, type IconKey, type IconMenuItemType, type IconProps, Icons, type IfAny, type ImageFitType, type ImageMenuItemType, type InfiniteScroll, type InputStylePalette, KEPT_GROUP, type Kinded, Loader, LoadingSkeleton, type LoadingSkeletonProps, type Margin, MaxLines, type MaxLinesProps, type MaybeFn, type MenuItem, type MenuSection, ModalBody, ModalFilterItem, ModalFooter, ModalHeader, type ModalProps, type ModalSize, MultiLineSelectField, type MultiLineSelectFieldProps, MultiSelectField, type MultiSelectFieldProps, NavLink, type NestedOption, type NestedOptionsOrLoad, NumberField, type NumberFieldProps, type NumberFieldType, type OffsetAndLimit, type OnRowDragEvent, type OnRowSelect, type Only, type OpenDetailOpts, type OpenInDrawerOpts, OpenModal, type OpenRightPaneOpts, type Optional, type Padding, type PageNumberAndSize, type PageSettings, Pagination, type PaginationConfig, Palette, type Pin, type Placement, type PresentationFieldProps, PresentationProvider, PreventBrowserScroll, type Properties, RIGHT_SIDEBAR_MIN_WIDTH, type RadioFieldOption, RadioGroupField, type RadioGroupFieldProps, type RenderAs, type RenderCellFn, ResponsiveGrid, type ResponsiveGridConfig, ResponsiveGridContext, ResponsiveGridItem, type ResponsiveGridItemProps, type ResponsiveGridProps, RichTextField, RichTextFieldImpl, type RichTextFieldProps, RightPaneContext, RightPaneLayout, type RightPaneLayoutContextProps, RightPaneProvider, RightSidebar, type RightSidebarProps, type RouteTab, type RouteTabWithContent, Row, type RowStyle, type RowStyles, ScrollShadows, ScrollableContent, ScrollableParent, SelectField, type SelectFieldProps, SelectToggle, type SelectedState, type SidebarContentProps, type SimpleHeaderAndData, SortHeader, type SortOn, type SortState, StaticField, type Step, Stepper, type StepperProps, SubmitButton, type SubmitButtonProps, SuperDrawerContent, SuperDrawerHeader, SuperDrawerWidth, Switch, type SwitchProps, TOTALS, type Tab, TabContent, type TabWithContent, TableState, TableStateContext, Tabs, TabsWithContent, Tag, type TagType, type TestIds, TextAreaField, type TextAreaFieldProps, TextField, type TextFieldApi, type TextFieldInternalProps, type TextFieldProps, type TextFieldXss, Toast, ToggleButton, type ToggleButtonProps, ToggleChip, ToggleChipGroup, type ToggleChipGroupProps, type ToggleChipProps, ToggleChips, type ToggleChipsProps, Tooltip, TreeSelectField, type TreeSelectFieldProps, type TriggerNoticeProps, type Typography, type UseModalHook, type UsePersistedFilterProps, type UseQueryState, type UseRightPaneHook, type UseSnackbarHook, type UseSuperDrawerHook, type UseToastProps, type Value, type Xss, actionColumn, applyRowFn, assignDefaultColumnIds, booleanFilter, boundCheckboxField, boundCheckboxGroupField, boundDateField, boundDateRangeField, boundIconCardField, boundIconCardGroupField, boundMultiSelectField, boundMultilineSelectField, boundNumberField, boundRadioGroupField, boundRichTextField, boundSelectField, boundSwitchField, boundTextAreaField, boundTextField, boundToggleChipGroupField, boundTreeSelectField, calcColumnSizes, cardStyle, checkboxFilter, chipBaseStyles, chipDisabledStyles, chipHoverStyles, collapseColumn, column, condensedStyle, createRowLookup, dateColumn, dateFilter, dateFormats, dateRangeFilter, defaultPage, defaultRenderFn, defaultStyle, defaultTestId, dragHandleColumn, emptyCell, ensureClientSideSortValueIsSortable, filterTestIdPrefix, formatDate, formatDateRange, formatValue, generateColumnId, getAlignment, getColumnBorderCss, getDateFormat, getFirstOrLastCellCss, getJustification, getTableRefWidthStyles, getTableStyles, headerRenderFn, hoverStyles, iconButtonCircleStylesHover, iconButtonContrastStylesHover, iconButtonStylesHover, iconCardStylesHover, increment, insertAtIndex, isCursorBelowMidpoint, isGridCellContent, isJSX, isListBoxSection, isPersistentItem, isPersistentKey, isValidDate, listFieldPrefix, loadArrayOrUndefined, matchesFilter, maybeInc, maybeTooltip, multiFilter, navLink, newMethodMissingProxy, nonKindGridColumnKeys, numberRangeFilter, numericColumn, parseDate, parseDateRange, parseWidthToPx, persistentItemPrefix, pressedOverlayCss, px, recursivelyGetContainingRow, reservedRowKinds, resolveTooltip, rowClickRenderFn, rowLinkRenderFn, selectColumn, selectedStyles, setDefaultStyle, setGridTableDefaults, setRunningInJest, shouldSkipScrollTo, simpleDataRows, simpleHeader, singleFilter, sortFn, sortRows, switchFocusStyles, switchHoverStyles, switchSelectedHoverStyles, toContent, toLimitAndOffset, toPageNumberSize, toggleFilter, toggleFocusStyles, toggleHoverStyles, togglePressStyles, treeFilter, updateFilter, useAutoSaveStatus, useBreakpoint, useComputed, useDnDGridItem, type useDnDGridItemProps, useFilter, useGridTableApi, useGridTableLayoutState, useGroupBy, useHover, useModal, usePersistedFilter, useQueryState, useResponsiveGrid, useResponsiveGridItem, type useResponsiveGridProps, useRightPane, useRightPaneContext, useScrollableParent, useSessionStorage, useSetupColumnSizes, useSnackbar, useSuperDrawer, useTestIds, useToast, useTreeSelectFieldProvider, visit, zIndices };