@baseline-ui/core 0.56.0 → 0.57.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.mts CHANGED
@@ -788,6 +788,14 @@ interface ItemProps$1<T> extends LinkDOMProps {
788
788
 
789
789
  type ItemElement<T> = ReactElement<ItemProps$1<T>> | null;
790
790
  type ItemRenderer<T> = (item: T) => ItemElement<T>;
791
+ type LoadingState = 'loading' | 'sorting' | 'loadingMore' | 'error' | 'idle' | 'filtering';
792
+
793
+ interface AsyncLoadable {
794
+ /** Whether the items are currently loading. */
795
+ isLoading?: boolean, // possibly isLoadingMore
796
+ /** Handler that is called when more items should be loaded, e.g. while scrolling near the bottom. */
797
+ onLoadMore?: () => any
798
+ }
791
799
 
792
800
  interface SectionProps<T> {
793
801
  /** Rendered contents of the section, e.g. a header. */
@@ -827,6 +835,22 @@ interface Expandable {
827
835
  onExpandedChange?: (keys: Set<Key>) => any
828
836
  }
829
837
 
838
+ interface Sortable {
839
+ /** The current sorted column and direction. */
840
+ sortDescriptor?: SortDescriptor,
841
+ /** Handler that is called when the sorted column or direction changes. */
842
+ onSortChange?: (descriptor: SortDescriptor) => any
843
+ }
844
+
845
+ interface SortDescriptor {
846
+ /** The key of the column to sort by. */
847
+ column: Key,
848
+ /** The direction to sort by. */
849
+ direction: SortDirection
850
+ }
851
+
852
+ type SortDirection = 'ascending' | 'descending';
853
+
830
854
  interface KeyboardDelegate {
831
855
  /** Returns the key visually below the given one, or `null` for none. */
832
856
  getKeyBelow?(key: Key): Key | null,
@@ -2611,6 +2635,18 @@ declare function filterDOMProps(props: DOMProps & AriaLabelingProps & LinkDOMPro
2611
2635
  */
2612
2636
  declare function useObjectRef<T>(ref?: ((instance: T | null) => (() => void) | void) | MutableRefObject<T | null> | null): MutableRefObject<T | null>;
2613
2637
 
2638
+ interface LoadMoreSentinelProps extends Omit<AsyncLoadable, 'isLoading'> {
2639
+ collection: Collection<any>;
2640
+ /**
2641
+ * The amount of offset from the bottom of your scrollable region that should trigger load more.
2642
+ * Uses a percentage value relative to the scroll body's client height. Load more is then triggered
2643
+ * when your current scroll position's distance from the bottom of the currently loaded list of items is less than
2644
+ * or equal to the provided value. (e.g. 1 = 100% of the scroll region's height).
2645
+ * @default 1
2646
+ */
2647
+ scrollOffset?: number;
2648
+ }
2649
+
2614
2650
  interface FocusScopeProps {
2615
2651
  /** The contents of the focus scope. */
2616
2652
  children: ReactNode;
@@ -3240,6 +3276,16 @@ interface GridNode<T> extends Node$1<T> {
3240
3276
  indexOfType?: number
3241
3277
  }
3242
3278
 
3279
+ interface GridState<T, C extends GridCollection<T>> {
3280
+ collection: C;
3281
+ /** A set of keys for rows that are disabled. */
3282
+ disabledKeys: Set<Key>;
3283
+ /** A selection manager to read and update row selection state. */
3284
+ selectionManager: SelectionManager;
3285
+ /** Whether keyboard navigation is disabled, such as when the arrow keys should be handled by a component within a cell. */
3286
+ isKeyboardNavigationDisabled: boolean;
3287
+ }
3288
+
3243
3289
  interface AriaLinkOptions extends AriaLinkProps {
3244
3290
  /** Whether the link is disabled. */
3245
3291
  isDisabled?: boolean;
@@ -3792,6 +3838,108 @@ interface AriaSwitchProps extends SwitchProps$1, AriaSwitchBase {}
3792
3838
 
3793
3839
 
3794
3840
 
3841
+ /** Widths that result in a constant pixel value for the same Table width. */
3842
+ type ColumnStaticSize = number | `${number}` | `${number}%`; // match regex: /^(\d+)(?=%$)/
3843
+ /**
3844
+ * Widths that change size in relation to the remaining space and in ratio to other dynamic columns.
3845
+ * All numbers must be integers and greater than 0.
3846
+ * FR units take up remaining, if any, space in the table.
3847
+ */
3848
+ type ColumnDynamicSize = `${number}fr`; // match regex: /^(\d+)(?=fr$)/
3849
+ /** All possible sizes a column can be assigned. */
3850
+ type ColumnSize = ColumnStaticSize | ColumnDynamicSize;
3851
+
3852
+ interface TableProps$2<T> extends MultipleSelection, Sortable {
3853
+ /** The elements that make up the table. Includes the TableHeader, TableBody, Columns, and Rows. */
3854
+ children: [ReactElement<TableHeaderProps$2<T>>, ReactElement<TableBodyProps$2<T>>],
3855
+ /** A list of row keys to disable. */
3856
+ disabledKeys?: Iterable<Key>,
3857
+ /**
3858
+ * Whether pressing the escape key should clear selection in the table or not.
3859
+ *
3860
+ * Most experiences should not modify this option as it eliminates a keyboard user's ability to
3861
+ * easily clear selection. Only use if the escape key is being handled externally or should not
3862
+ * trigger selection clearing contextually.
3863
+ * @default 'clearSelection'
3864
+ */
3865
+ escapeKeyBehavior?: 'clearSelection' | 'none',
3866
+ /** Whether selection should occur on press up instead of press down. */
3867
+ shouldSelectOnPressUp?: boolean
3868
+ }
3869
+
3870
+ interface TableHeaderProps$2<T> {
3871
+ /** A list of table columns. */
3872
+ columns?: readonly T[],
3873
+ /** A list of `Column(s)` or a function. If the latter, a list of columns must be provided using the `columns` prop. */
3874
+ children: ColumnElement<T> | ColumnElement<T>[] | ColumnRenderer<T>
3875
+ }
3876
+
3877
+ type ColumnElement<T> = ReactElement<ColumnProps$2<T>>;
3878
+ type ColumnRenderer<T> = (item: T) => ColumnElement<T>;
3879
+ interface ColumnProps$2<T> {
3880
+ /** Rendered contents of the column if `children` contains child columns. */
3881
+ title?: ReactNode,
3882
+ /** Static child columns or content to render as the column header. */
3883
+ children: ReactNode | ColumnElement<T> | ColumnElement<T>[],
3884
+ /** A list of child columns used when dynamically rendering nested child columns. */
3885
+ childColumns?: T[],
3886
+ /** The width of the column. */
3887
+ width?: ColumnSize | null,
3888
+ /** The minimum width of the column. */
3889
+ minWidth?: ColumnStaticSize | null,
3890
+ /** The maximum width of the column. */
3891
+ maxWidth?: ColumnStaticSize | null,
3892
+ /** The default width of the column. */
3893
+ defaultWidth?: ColumnSize | null,
3894
+ /** Whether the column allows resizing. */
3895
+ allowsResizing?: boolean,
3896
+ /** Whether the column allows sorting. */
3897
+ allowsSorting?: boolean,
3898
+ /** Whether a column is a [row header](https://www.w3.org/TR/wai-aria-1.1/#rowheader) and should be announced by assistive technology during row navigation. */
3899
+ isRowHeader?: boolean,
3900
+ /** A string representation of the column's contents, used for accessibility announcements. */
3901
+ textValue?: string
3902
+ }
3903
+
3904
+ type RowElement<T> = ReactElement<RowProps$2<T>>;
3905
+ interface TableBodyProps$2<T> extends Omit<AsyncLoadable, 'isLoading'> {
3906
+ /** The contents of the table body. Supports static items or a function for dynamic rendering. */
3907
+ children: RowElement<T> | RowElement<T>[] | ((item: T) => RowElement<T>),
3908
+ /** A list of row objects in the table body used when dynamically rendering rows. */
3909
+ items?: Iterable<T>,
3910
+ /** The current loading state of the table. */
3911
+ loadingState?: LoadingState
3912
+ }
3913
+
3914
+ interface RowProps$2<T> extends LinkDOMProps {
3915
+ /**
3916
+ * A list of child item objects used when dynamically rendering row children. Requires the feature flag to be
3917
+ * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows.
3918
+ * @version alpha
3919
+ * @private
3920
+ */
3921
+ UNSTABLE_childItems?: Iterable<T>,
3922
+ // TODO: update when async loading is supported for expandable rows
3923
+ // /** Whether this row has children, even if not loaded yet. */
3924
+ // hasChildItems?: boolean,
3925
+ /** Rendered contents of the row or row child items. */
3926
+ children: CellElement | CellElement[] | CellRenderer,
3927
+ /** A string representation of the row's contents, used for features like typeahead. */
3928
+ textValue?: string // ???
3929
+ }
3930
+
3931
+ interface CellProps$2 {
3932
+ /** The contents of the cell. */
3933
+ children: ReactNode,
3934
+ /** A string representation of the cell's contents, used for features like typeahead. */
3935
+ textValue?: string,
3936
+ /** Indicates how many columns the data cell spans. */
3937
+ colSpan?: number
3938
+ }
3939
+
3940
+ type CellElement = ReactElement<CellProps$2>;
3941
+ type CellRenderer = (columnKey: Key) => CellElement;
3942
+
3795
3943
  interface TableCollection<T> extends GridCollection<T> {
3796
3944
  // TODO perhaps elaborate on this? maybe not clear enough, essentially returns the table header rows (e.g. in a tiered headers table, will return the nodes containing the top tier column, next tier, etc)
3797
3945
  /** A list of header row nodes in the table. */
@@ -3806,6 +3954,21 @@ interface TableCollection<T> extends GridCollection<T> {
3806
3954
  body: GridNode<T>
3807
3955
  }
3808
3956
 
3957
+ interface TableState<T> extends GridState<T, TableCollection<T>> {
3958
+ /** A collection of rows and columns in the table. */
3959
+ collection: TableCollection<T>;
3960
+ /** Whether the row selection checkboxes should be displayed. */
3961
+ showSelectionCheckboxes: boolean;
3962
+ /** The current sorted column and direction. */
3963
+ sortDescriptor: SortDescriptor | null;
3964
+ /** Calls the provided onSortChange handler with the provided column key and sort direction. */
3965
+ sort(columnKey: Key, direction?: 'ascending' | 'descending'): void;
3966
+ /** Whether keyboard navigation is disabled, such as when the arrow keys should be handled by a component within a cell. */
3967
+ isKeyboardNavigationDisabled: boolean;
3968
+ /** Set whether keyboard navigation is disabled, such as when the arrow keys should be handled by a component within a cell. */
3969
+ setKeyboardNavigationDisabled: (val: boolean) => void;
3970
+ }
3971
+
3809
3972
  declare let _Item: <T>(props: ItemProps$1<T>) => JSX.Element;
3810
3973
 
3811
3974
  /*
@@ -4204,6 +4367,12 @@ interface TreeData<T extends object> {
4204
4367
  */
4205
4368
  declare function useTreeData<T extends object>(options: TreeOptions<T>): TreeData<T>;
4206
4369
 
4370
+ interface StyleProps {
4371
+ /** The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. */
4372
+ className?: string;
4373
+ /** The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element. */
4374
+ style?: CSSProperties;
4375
+ }
4207
4376
  type ClassNameOrFunction<T> = string | ((values: T & {
4208
4377
  defaultClassName: string | undefined;
4209
4378
  }) => string);
@@ -4604,6 +4773,255 @@ interface ListBoxProps$1<T> extends Omit<AriaListBoxProps<T>, 'children' | 'labe
4604
4773
  interface ListBoxItemRenderProps extends ItemRenderProps {
4605
4774
  }
4606
4775
 
4776
+ interface TableRenderProps {
4777
+ /**
4778
+ * Whether the table is currently focused.
4779
+ * @selector [data-focused]
4780
+ */
4781
+ isFocused: boolean;
4782
+ /**
4783
+ * Whether the table is currently keyboard focused.
4784
+ * @selector [data-focus-visible]
4785
+ */
4786
+ isFocusVisible: boolean;
4787
+ /**
4788
+ * Whether the table is currently the active drop target.
4789
+ * @selector [data-drop-target]
4790
+ */
4791
+ isDropTarget: boolean;
4792
+ /**
4793
+ * State of the table.
4794
+ */
4795
+ state: TableState<unknown>;
4796
+ }
4797
+ interface TableProps$1 extends Omit<TableProps$2<any>, 'children'>, StyleRenderProps<TableRenderProps, 'table' | 'div'>, SlotProps, AriaLabelingProps, GlobalDOMAttributes<HTMLTableElement> {
4798
+ /**
4799
+ * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
4800
+ * @default 'react-aria-Table'
4801
+ */
4802
+ className?: ClassNameOrFunction<TableRenderProps>;
4803
+ /** The elements that make up the table. Includes the TableHeader, TableBody, Columns, and Rows. */
4804
+ children?: ReactNode;
4805
+ /**
4806
+ * How multiple selection should behave in the collection.
4807
+ * @default "toggle"
4808
+ */
4809
+ selectionBehavior?: SelectionBehavior;
4810
+ /**
4811
+ * Whether `disabledKeys` applies to all interactions, or only selection.
4812
+ * @default "all"
4813
+ */
4814
+ disabledBehavior?: DisabledBehavior;
4815
+ /** Handler that is called when a user performs an action on the row. */
4816
+ onRowAction?: (key: Key) => void;
4817
+ /** The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the Table. */
4818
+ dragAndDropHooks?: DragAndDropHooks;
4819
+ }
4820
+ interface TableHeaderRenderProps {
4821
+ /**
4822
+ * Whether the table header is currently hovered with a mouse.
4823
+ * @selector [data-hovered]
4824
+ */
4825
+ isHovered: boolean;
4826
+ }
4827
+ interface TableHeaderProps$1<T> extends StyleRenderProps<TableHeaderRenderProps, 'thead' | 'div'>, HoverEvents, GlobalDOMAttributes<HTMLTableSectionElement> {
4828
+ /**
4829
+ * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
4830
+ * @default 'react-aria-TableHeader'
4831
+ */
4832
+ className?: ClassNameOrFunction<TableHeaderRenderProps>;
4833
+ /** A list of table columns. */
4834
+ columns?: Iterable<T>;
4835
+ /** A list of `Column(s)` or a function. If the latter, a list of columns must be provided using the `columns` prop. */
4836
+ children?: ReactNode | ((item: T) => ReactElement);
4837
+ /** Values that should invalidate the column cache when using dynamic collections. */
4838
+ dependencies?: ReadonlyArray<any>;
4839
+ }
4840
+ interface ColumnRenderProps {
4841
+ /**
4842
+ * Whether the column is currently hovered with a mouse.
4843
+ * @selector [data-hovered]
4844
+ */
4845
+ isHovered: boolean;
4846
+ /**
4847
+ * Whether the column is currently in a pressed state.
4848
+ * @selector [data-pressed]
4849
+ */
4850
+ isPressed: boolean;
4851
+ /**
4852
+ * Whether the column is currently focused.
4853
+ * @selector [data-focused]
4854
+ */
4855
+ isFocused: boolean;
4856
+ /**
4857
+ * Whether the column is currently keyboard focused.
4858
+ * @selector [data-focus-visible]
4859
+ */
4860
+ isFocusVisible: boolean;
4861
+ /**
4862
+ * Whether the column allows sorting.
4863
+ * @selector [data-allows-sorting]
4864
+ */
4865
+ allowsSorting: boolean;
4866
+ /**
4867
+ * The current sort direction.
4868
+ * @selector [data-sort-direction="ascending | descending"]
4869
+ */
4870
+ sortDirection: SortDirection | undefined;
4871
+ /**
4872
+ * Whether the column is currently being resized.
4873
+ * @selector [data-resizing]
4874
+ */
4875
+ isResizing: boolean;
4876
+ /**
4877
+ * Triggers sorting for this column in the given direction.
4878
+ */
4879
+ sort(direction: SortDirection): void;
4880
+ /**
4881
+ * Starts column resizing if the table is contained in a `<ResizableTableContainer>` element.
4882
+ */
4883
+ startResize(): void;
4884
+ }
4885
+ interface ColumnProps$1 extends RenderProps<ColumnRenderProps, 'th' | 'div'>, GlobalDOMAttributes<HTMLTableHeaderCellElement> {
4886
+ /**
4887
+ * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
4888
+ * @default 'react-aria-Column'
4889
+ */
4890
+ className?: ClassNameOrFunction<ColumnRenderProps>;
4891
+ /** The unique id of the column. */
4892
+ id?: Key;
4893
+ /** Whether the column allows sorting. */
4894
+ allowsSorting?: boolean;
4895
+ /** Whether a column is a [row header](https://www.w3.org/TR/wai-aria-1.1/#rowheader) and should be announced by assistive technology during row navigation. */
4896
+ isRowHeader?: boolean;
4897
+ /** A string representation of the column's contents, used for accessibility announcements. */
4898
+ textValue?: string;
4899
+ /** The width of the column. This prop only applies when the `<Table>` is wrapped in a `<ResizableTableContainer>`. */
4900
+ width?: ColumnSize | null;
4901
+ /** The default width of the column. This prop only applies when the `<Table>` is wrapped in a `<ResizableTableContainer>`. */
4902
+ defaultWidth?: ColumnSize | null;
4903
+ /** The minimum width of the column. This prop only applies when the `<Table>` is wrapped in a `<ResizableTableContainer>`. */
4904
+ minWidth?: ColumnStaticSize | null;
4905
+ /** The maximum width of the column. This prop only applies when the `<Table>` is wrapped in a `<ResizableTableContainer>`. */
4906
+ maxWidth?: ColumnStaticSize | null;
4907
+ }
4908
+ interface TableBodyRenderProps {
4909
+ /**
4910
+ * Whether the table body has no rows and should display its empty state.
4911
+ * @selector [data-empty]
4912
+ */
4913
+ isEmpty: boolean;
4914
+ /**
4915
+ * Whether the Table is currently the active drop target.
4916
+ * @selector [data-drop-target]
4917
+ */
4918
+ isDropTarget: boolean;
4919
+ }
4920
+ interface TableBodyProps$1<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, StyleRenderProps<TableBodyRenderProps, 'tbody' | 'div'>, GlobalDOMAttributes<HTMLTableSectionElement> {
4921
+ /**
4922
+ * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
4923
+ * @default 'react-aria-TableBody'
4924
+ */
4925
+ className?: ClassNameOrFunction<TableBodyRenderProps>;
4926
+ /** Provides content to display when there are no rows in the table. */
4927
+ renderEmptyState?: (props: TableBodyRenderProps) => ReactNode;
4928
+ }
4929
+ interface RowRenderProps extends ItemRenderProps {
4930
+ /** Whether the row's children have keyboard focus. */
4931
+ isFocusVisibleWithin: boolean;
4932
+ /** The unique id of the row. */
4933
+ id?: Key;
4934
+ }
4935
+ interface RowProps$1<T> extends StyleRenderProps<RowRenderProps, 'tr' | 'div'>, LinkDOMProps, HoverEvents, PressEvents, Omit<GlobalDOMAttributes<HTMLTableRowElement>, 'onClick'> {
4936
+ /**
4937
+ * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
4938
+ * @default 'react-aria-Row'
4939
+ */
4940
+ className?: ClassNameOrFunction<RowRenderProps>;
4941
+ /** A list of columns used when dynamically rendering cells. */
4942
+ columns?: Iterable<T>;
4943
+ /** The cells within the row. Supports static items or a function for dynamic rendering. */
4944
+ children?: ReactNode | ((item: T) => ReactElement);
4945
+ /** The object value that this row represents. When using dynamic collections, this is set automatically. */
4946
+ value?: T;
4947
+ /** Values that should invalidate the cell cache when using dynamic collections. */
4948
+ dependencies?: ReadonlyArray<any>;
4949
+ /** A string representation of the row's contents, used for features like typeahead. */
4950
+ textValue?: string;
4951
+ /** Whether the row is disabled. */
4952
+ isDisabled?: boolean;
4953
+ /**
4954
+ * Handler that is called when a user performs an action on the row. The exact user event depends on
4955
+ * the collection's `selectionBehavior` prop and the interaction modality.
4956
+ */
4957
+ onAction?: () => void;
4958
+ /** The unique id of the row. */
4959
+ id?: Key;
4960
+ }
4961
+ interface CellRenderProps {
4962
+ /**
4963
+ * Whether the cell is currently in a pressed state.
4964
+ * @selector [data-pressed]
4965
+ */
4966
+ isPressed: boolean;
4967
+ /**
4968
+ * Whether the cell is currently focused.
4969
+ * @selector [data-focused]
4970
+ */
4971
+ isFocused: boolean;
4972
+ /**
4973
+ * Whether the cell is currently keyboard focused.
4974
+ * @selector [data-focus-visible]
4975
+ */
4976
+ isFocusVisible: boolean;
4977
+ /**
4978
+ * Whether the cell is currently hovered with a mouse.
4979
+ * @selector [data-hovered]
4980
+ */
4981
+ isHovered: boolean;
4982
+ /**
4983
+ * Whether the parent row is currently selected.
4984
+ * @selector [data-selected]
4985
+ */
4986
+ isSelected: boolean;
4987
+ /**
4988
+ * The unique id of the cell.
4989
+ **/
4990
+ id?: Key;
4991
+ /**
4992
+ * The index of the column that this cell belongs to. Respects col spanning.
4993
+ */
4994
+ columnIndex?: number | null;
4995
+ }
4996
+ interface CellProps$1 extends RenderProps<CellRenderProps, 'td' | 'div'>, GlobalDOMAttributes<HTMLTableCellElement> {
4997
+ /**
4998
+ * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
4999
+ * @default 'react-aria-Cell'
5000
+ */
5001
+ className?: ClassNameOrFunction<CellRenderProps>;
5002
+ /** The unique id of the cell. */
5003
+ id?: Key;
5004
+ /** A string representation of the cell's contents, used for features like typeahead. */
5005
+ textValue?: string;
5006
+ /** Indicates how many columns the data cell spans. */
5007
+ colSpan?: number;
5008
+ }
5009
+ interface TableLoadMoreItemProps extends Omit<LoadMoreSentinelProps, 'collection'>, StyleProps, DOMRenderProps<'tr' | 'div', undefined>, GlobalDOMAttributes<HTMLTableRowElement> {
5010
+ /**
5011
+ * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.
5012
+ * @default 'react-aria-TableLoadMoreItem'
5013
+ */
5014
+ className?: string;
5015
+ /**
5016
+ * The load more spinner to render when loading additional items.
5017
+ */
5018
+ children?: ReactNode;
5019
+ /**
5020
+ * Whether or not the loading spinner should be rendered or not.
5021
+ */
5022
+ isLoading?: boolean;
5023
+ }
5024
+
4607
5025
  declare class Point$1 {
4608
5026
  /** The x-coordinate of the point. */
4609
5027
  x: number;
@@ -5621,6 +6039,9 @@ declare function isUrl(value: string, lenient?: boolean): boolean;
5621
6039
  */
5622
6040
  declare function getOsSpecificKeyboardShortcutLabel(keyboardShortcut: string, useSymbol?: boolean): string;
5623
6041
 
6042
+ declare const clamp: (value: number, min: number, max: number) => number;
6043
+
6044
+ declare const capitalize: (str: string) => string;
5624
6045
  /**
5625
6046
  * Parses the given text using DOMParser and retrieves the plain text content of
5626
6047
  * the HTML document body.
@@ -5788,6 +6209,11 @@ interface StylingWithUIState<T = object> {
5788
6209
  style?: React__default.CSSProperties | ((props: UIStateOptions<T>) => React__default.CSSProperties);
5789
6210
  }
5790
6211
  interface ActionButtonSharedProps extends Omit<AriaButtonProps<"button" | "div">, "rel" | "href" | "target" | "children">, Omit<StylingProps, "className" | "style">, StylingWithUIState {
6212
+ /**
6213
+ * A slot name for the component. Used to integrate with React Aria Components'
6214
+ * context system (e.g., `slot="drag"` for drag handles in Table rows).
6215
+ */
6216
+ slot?: string | null;
5791
6217
  }
5792
6218
  interface ActionButtonProps extends ActionButtonSharedProps {
5793
6219
  /**
@@ -6836,6 +7262,11 @@ interface CheckboxProps extends Omit<CheckboxProps$1, "children" | "className" |
6836
7262
  * @default end
6837
7263
  */
6838
7264
  labelPosition?: "start" | "end";
7265
+ /**
7266
+ * The slot attribute for composition with parent components like Table.
7267
+ * Pass `null` to explicitly opt out of slot context lookup.
7268
+ */
7269
+ slot?: string | null;
6839
7270
  }
6840
7271
 
6841
7272
  declare const Checkbox: React__default.ForwardRefExoticComponent<CheckboxProps & React__default.RefAttributes<HTMLLabelElement>>;
@@ -8810,9 +9241,22 @@ declare function useFrameDimensions(): {
8810
9241
  };
8811
9242
  declare const FrameProvider: React__default.FC<FrameProviderProps>;
8812
9243
 
8813
- declare const DateField: React__default.ForwardRefExoticComponent<StylingProps & Omit<Omit<DateFieldStateOptions<DateValue>, "locale"> & AriaDateFieldProps<DateValue>, "isRequired" | "isInvalid" | "validationState" | "validate" | "createCalendar"> & Pick<SharedInputProps, "label" | "validationState" | "variant" | "labelPosition"> & InputMessage & React__default.RefAttributes<HTMLDivElement>>;
9244
+ type DateFieldPickerType = "none" | "presentation" | "calendar";
9245
+ type DateFieldProps = StylingProps & Omit<Omit<DateFieldStateOptions, "locale"> & AriaDateFieldProps<DateValue>, "validationState" | "isInvalid" | "isRequired" | "validate" | "createCalendar"> & Pick<SharedInputProps, "variant" | "labelPosition" | "validationState" | "label"> & InputMessage & {
9246
+ /**
9247
+ * Controls the calendar picker integration.
9248
+ * - `"none"`: No calendar icon or picker (default).
9249
+ * - `"presentation"`: Trailing calendar icon, non-interactive.
9250
+ * - `"calendar"`: Trailing calendar icon button that opens a Calendar popover.
9251
+ *
9252
+ * @default "none"
9253
+ */
9254
+ pickerType?: DateFieldPickerType;
9255
+ };
8814
9256
 
8815
- type DateFieldProps = StylingProps & Omit<Omit<DateFieldStateOptions, "locale"> & AriaDateFieldProps<DateValue>, "validationState" | "isInvalid" | "isRequired" | "validate" | "createCalendar"> & Pick<SharedInputProps, "variant" | "labelPosition" | "validationState" | "label"> & InputMessage;
9257
+ declare const DateField: React__default.ForwardRefExoticComponent<StylingProps & Omit<Omit<DateFieldStateOptions<DateValue>, "locale"> & AriaDateFieldProps<DateValue>, "isRequired" | "isInvalid" | "validationState" | "validate" | "createCalendar"> & Pick<SharedInputProps, "label" | "validationState" | "variant" | "labelPosition"> & InputMessage & {
9258
+ pickerType?: DateFieldPickerType;
9259
+ } & React__default.RefAttributes<HTMLDivElement>>;
8816
9260
 
8817
9261
  interface Breakpoints {
8818
9262
  mobile: number;
@@ -9047,6 +9491,13 @@ declare const VIRTUALIZER_LAYOUT_DEFAULT_OPTIONS: {
9047
9491
  preserveAspectRatio: boolean;
9048
9492
  };
9049
9493
  };
9494
+ TABLE: {
9495
+ layout: typeof TableLayout;
9496
+ layoutOptions: {
9497
+ rowHeight: number;
9498
+ headingHeight: number;
9499
+ };
9500
+ };
9050
9501
  };
9051
9502
 
9052
9503
  interface CodeProps extends Omit<StylingProps, keyof BlockProps> {
@@ -9162,6 +9613,45 @@ interface KbdProps extends Omit<StylingProps, "data-block-id" | "data-block-clas
9162
9613
 
9163
9614
  declare const Kbd: React__default.ForwardRefExoticComponent<KbdProps & React__default.RefAttributes<HTMLSpanElement>>;
9164
9615
 
9616
+ type TableProps = TableProps$1;
9617
+ type TableHeaderProps<T extends object = object> = TableHeaderProps$1<T>;
9618
+ type LoadMoreProps = {
9619
+ /**
9620
+ * Called when the table scrolls near the end of the currently loaded rows.
9621
+ * TableBody automatically renders an internal loading sentinel when this is provided.
9622
+ */
9623
+ onLoadMore: TableLoadMoreItemProps["onLoadMore"];
9624
+ /** Whether the automatic loading indicator should be visible. Also suppresses re-triggering while a fetch is in flight. */
9625
+ isLoading?: TableLoadMoreItemProps["isLoading"];
9626
+ /**
9627
+ * Distance from the end of the scroll region that triggers loading, as a fraction of the container height.
9628
+ * @default 1 (100% of container height — triggers when the sentinel enters view)
9629
+ */
9630
+ scrollOffset?: TableLoadMoreItemProps["scrollOffset"];
9631
+ } | {
9632
+ onLoadMore?: never;
9633
+ isLoading?: never;
9634
+ scrollOffset?: never;
9635
+ };
9636
+ type TableBodyProps<T extends object = object> = TableBodyProps$1<T> & LoadMoreProps;
9637
+ type ColumnProps = Omit<ColumnProps$1, "width" | "defaultWidth" | "minWidth" | "maxWidth">;
9638
+ type RowProps<T extends object = object> = RowProps$1<T>;
9639
+ type CellProps = CellProps$1;
9640
+
9641
+ declare const Table: React__default.ForwardRefExoticComponent<TableProps$1 & React__default.RefAttributes<HTMLDivElement | HTMLTableElement>>;
9642
+ declare const TableHeader: React__default.ForwardRefExoticComponent<TableHeaderProps & React__default.RefAttributes<HTMLTableSectionElement>>;
9643
+ declare const Column: React__default.ForwardRefExoticComponent<ColumnProps & React__default.RefAttributes<HTMLTableCellElement>>;
9644
+ declare const TableBody: React__default.ForwardRefExoticComponent<TableBodyProps & React__default.RefAttributes<HTMLDivElement | HTMLTableSectionElement>>;
9645
+ declare const Row: React__default.ForwardRefExoticComponent<RowProps & React__default.RefAttributes<HTMLTableRowElement>>;
9646
+ declare const Cell: React__default.ForwardRefExoticComponent<CellProps$1 & React__default.RefAttributes<HTMLTableCellElement>>;
9647
+
9648
+ interface UseTableDragAndDropOptions<T extends object = object> extends DragAndDropOptions<T> {
9649
+ /** Ref to the scrollable container element. When provided, auto-scroll
9650
+ * activates when dragging near container edges. */
9651
+ scrollRef?: React__default.RefObject<HTMLElement>;
9652
+ }
9653
+ declare function useTableDragAndDrop<T extends object = object>(options: UseTableDragAndDropOptions<T>): DragAndDrop<T>;
9654
+
9165
9655
  interface SkeletonProps {
9166
9656
  /** The className applied to the root element of the component. */
9167
9657
  className?: string;
@@ -9581,4 +10071,4 @@ declare namespace reactStately {
9581
10071
  export { type reactStately_Color as Color, type reactStately_ListData as ListData, type reactStately_TreeData as TreeData, reactStately_useListData as useListData, reactStately_useTreeData as useTreeData };
9582
10072
  }
9583
10073
 
9584
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionGroup, ActionGroupItem, type ActionGroupProps, ActionIconButton, type ActionIconButtonProps, Actionable, type ActionableProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Autocomplete, type AutocompleteProps, Avatar, type AvatarProps, type BlockProps, type BoundaryAxis, Box, type BoxProps, ButtonSelect, type ButtonSelectProps, Calendar, type CalendarHeaderVariant, type CalendarProps, type CalendarSize, Checkbox, type CheckboxProps, Code, type CodeProps, ColorInput, type ColorInputProps, type ColorPreset, ColorSwatch, ColorSwatchPicker, type ColorSwatchPickerProps, type ColorSwatchProps, ComboBox, type ComboBoxProps, DateField, type DateFieldProps, DateFormat, type DateFormatProps, DefaultListOption, type Device, DeviceProvider, DeviceProviderContext, type DeviceProviderProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, Disclosure, type DisclosureProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorHandle, type EditorProps, FileUpload, type FileUploadProps, FocusScope, Focusable, type FocusableProps, FrameProvider, type FrameProviderProps, FreehandCanvas, type FreehandCanvasProps, GlobalToastRegion, GridLayout, GridList, type GridListProps, Group, type GroupProps, type HorizontalBoundaryBehavior, I18nProvider, type I18nProviderProps, type I18nResult, Icon, IconColorInput, IconColorInputButton, type IconColorInputProps, type IconComponentProps$1 as IconComponentProps, type IconProps, IconSelect, type IconSelectProps, IconSlider, type IconSliderProps, ImageDropZone, type ImageDropZoneProps, ImageGallery, type ImageGalleryProps, type ImperativePanelGroupHandle, type ImperativePanelHandle, InlineAlert, type InlineAlertProps, Kbd, type KbdProps, type Key, Link, type LinkProps, ListBox, type ListBoxProps, type ListHandle$1 as ListHandle, ListLayout, type ListOption, LocaleAwareGridLayout, Markdown, type MarkdownProps, Menu, type MenuItem, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, type MessageFormatter, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Panel, PanelGroup, type PanelGroupProps, type PanelProps, PanelResizeHandle, type PanelResizeHandleProps, PointPicker, PointPickerContent, type PointPickerContentProps, PointPickerDisplay, type PointPickerDisplayProps, type PointPickerProps, Popover, PopoverContent, type PopoverContentHandle, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, type PressEvent, Pressable, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, RangeCalendar, type RangeCalendarProps, Reaction, type ReactionProps, type Rect, type SVGRProps, ScrollControlButton, type ScrollControlButtonProps, SearchInput, type SearchInputProps, Select, type SelectProps, Separator, type SeparatorProps, Size, Skeleton, type SkeletonProps, Slider, type SliderProps, StatusCard, type StatusCardProps, type StylingProps, Switch, type SwitchProps, TabItem, type TabItemProps, TableLayout, Tabs, type TabsProps, Tag, TagGroup, type TagGroupProps, type TagProps, type TagVariant, TaggedPagination, type TaggedPaginationProps, Text, TextInput, type TextInputProps, type TextProps, ThemeProvider, type ThemeProviderProps, TimeField, type TimeFieldProps, type ToastProps, ToastQueue, ToggleButton, type ToggleButtonProps, ToggleIconButton, type ToggleIconButtonProps, Toolbar, type ToolbarProps, Tooltip, type TooltipProps, type TreeListItem, TreeView, type TreeViewProps, UNSAFE_ListBox, type UNSAFE_ListBoxProps, reactAria as UNSAFE_aria, reactStately as UNSAFE_stately, VIRTUALIZER_LAYOUT_DEFAULT_OPTIONS, Virtualizer, type VirtualizerProps, VisuallyHidden, WaterfallLayout, announce, booleanOrObjectToConfig, calculateFontSizeToFitWidth, classNames, cleanKeyFromGlobImport, clearAnnouncer, defineMessages, destroyAnnouncer, directionVar, disableAnimations, enableAnimations, filterDOMProps, filterTruthyValues, findFocusableElements, getAbsoluteBounds, getAbsolutePosition, getActiveElement, getHTMLElement, getOsSpecificKeyboardShortcutLabel, getOwnerDocument, getPlainText, getSvgPathFromStroke, getTextDimensions, iconMap, invariant, isFocusableElement, isInIframe, isInShadowDOM, isInputThatOpensKeyboard, isInsideOverlayContent, isRect, isUrl, lightenColor, mergeProps, mergeRefs, parseColor, useCollator, useDateFormatter, useDevice, useDragAndDrop, useFilter, useFocusRing, useFocusVisible, useFrameDimensions, useI18n, useId, useImage, useInteractionModality, useIntersectionObserver, useIsFirstRender, useKeyboard, useListData, useLiveInteractionModality, useLocalStorage, useLocale, useMutationObserver, useNumberFormatter, useObjectRef, usePointProximity, usePortalContainer, usePreventFocus, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
10074
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionGroup, ActionGroupItem, type ActionGroupProps, ActionIconButton, type ActionIconButtonProps, Actionable, type ActionableProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Autocomplete, type AutocompleteProps, Avatar, type AvatarProps, type BlockProps, type BoundaryAxis, Box, type BoxProps, ButtonSelect, type ButtonSelectProps, Calendar, type CalendarHeaderVariant, type CalendarProps, type CalendarSize, Cell, type CellProps, Checkbox, type CheckboxProps, Code, type CodeProps, ColorInput, type ColorInputProps, type ColorPreset, ColorSwatch, ColorSwatchPicker, type ColorSwatchPickerProps, type ColorSwatchProps, Column, type ColumnProps, ComboBox, type ComboBoxProps, DateField, type DateFieldPickerType, type DateFieldProps, DateFormat, type DateFormatProps, DefaultListOption, type Device, DeviceProvider, DeviceProviderContext, type DeviceProviderProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, Disclosure, type DisclosureProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorHandle, type EditorProps, FileUpload, type FileUploadProps, FocusScope, Focusable, type FocusableProps, FrameProvider, type FrameProviderProps, FreehandCanvas, type FreehandCanvasProps, GlobalToastRegion, GridLayout, GridList, type GridListProps, Group, type GroupProps, type HorizontalBoundaryBehavior, I18nProvider, type I18nProviderProps, type I18nResult, Icon, IconColorInput, IconColorInputButton, type IconColorInputProps, type IconComponentProps$1 as IconComponentProps, type IconProps, IconSelect, type IconSelectProps, IconSlider, type IconSliderProps, ImageDropZone, type ImageDropZoneProps, ImageGallery, type ImageGalleryProps, type ImperativePanelGroupHandle, type ImperativePanelHandle, InlineAlert, type InlineAlertProps, Kbd, type KbdProps, type Key, Link, type LinkProps, ListBox, type ListBoxProps, type ListHandle$1 as ListHandle, ListLayout, type ListOption, LocaleAwareGridLayout, Markdown, type MarkdownProps, Menu, type MenuItem, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, type MessageFormatter, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Panel, PanelGroup, type PanelGroupProps, type PanelProps, PanelResizeHandle, type PanelResizeHandleProps, PointPicker, PointPickerContent, type PointPickerContentProps, PointPickerDisplay, type PointPickerDisplayProps, type PointPickerProps, Popover, PopoverContent, type PopoverContentHandle, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, type PressEvent, Pressable, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, RangeCalendar, type RangeCalendarProps, Reaction, type ReactionProps, type Rect, Row, type RowProps, type SVGRProps, ScrollControlButton, type ScrollControlButtonProps, SearchInput, type SearchInputProps, Select, type SelectProps, Separator, type SeparatorProps, Size, Skeleton, type SkeletonProps, Slider, type SliderProps, StatusCard, type StatusCardProps, type StylingProps, Switch, type SwitchProps, TabItem, type TabItemProps, Table, TableBody, type TableBodyProps, TableHeader, type TableHeaderProps, TableLayout, type TableProps, Tabs, type TabsProps, Tag, TagGroup, type TagGroupProps, type TagProps, type TagVariant, TaggedPagination, type TaggedPaginationProps, Text, TextInput, type TextInputProps, type TextProps, ThemeProvider, type ThemeProviderProps, TimeField, type TimeFieldProps, type ToastProps, ToastQueue, ToggleButton, type ToggleButtonProps, ToggleIconButton, type ToggleIconButtonProps, Toolbar, type ToolbarProps, Tooltip, type TooltipProps, type TreeListItem, TreeView, type TreeViewProps, UNSAFE_ListBox, type UNSAFE_ListBoxProps, reactAria as UNSAFE_aria, reactStately as UNSAFE_stately, type UseTableDragAndDropOptions, VIRTUALIZER_LAYOUT_DEFAULT_OPTIONS, Virtualizer, type VirtualizerProps, VisuallyHidden, WaterfallLayout, announce, booleanOrObjectToConfig, calculateFontSizeToFitWidth, capitalize, clamp, classNames, cleanKeyFromGlobImport, clearAnnouncer, defineMessages, destroyAnnouncer, directionVar, disableAnimations, enableAnimations, filterDOMProps, filterTruthyValues, findFocusableElements, getAbsoluteBounds, getAbsolutePosition, getActiveElement, getHTMLElement, getOsSpecificKeyboardShortcutLabel, getOwnerDocument, getPlainText, getSvgPathFromStroke, getTextDimensions, iconMap, invariant, isFocusableElement, isInIframe, isInShadowDOM, isInputThatOpensKeyboard, isInsideOverlayContent, isRect, isUrl, lightenColor, mergeProps, mergeRefs, parseColor, useCollator, useDateFormatter, useDevice, useDragAndDrop, useFilter, useFocusRing, useFocusVisible, useFrameDimensions, useI18n, useId, useImage, useInteractionModality, useIntersectionObserver, useIsFirstRender, useKeyboard, useListData, useLiveInteractionModality, useLocalStorage, useLocale, useMutationObserver, useNumberFormatter, useObjectRef, usePointProximity, usePortalContainer, usePreventFocus, useResizeObserver, useTableDragAndDrop, useTextSelection, useUndoRedo, useUserPreferences };