@baseline-ui/core 0.22.0 → 0.23.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.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { Key, Dispatch, SetStateAction } from 'react';
2
- import { DraggableCollectionStateOptions, DroppableCollectionStateOptions, Orientation, ListState, SliderStateOptions, ToggleProps, OverlayTriggerProps, OverlayTriggerState, MenuTriggerProps, TooltipTriggerProps, NumberFieldStateOptions, ListProps, SelectStateOptions, Item as Item$1, Selection as Selection$1, ComboBoxStateOptions } from 'react-stately';
2
+ import { DraggableCollectionStateOptions, DroppableCollectionStateOptions, Orientation, ListState, SliderStateOptions, ToggleProps, OverlayTriggerProps, OverlayTriggerState, MenuTriggerProps, TooltipTriggerProps, NumberFieldStateOptions, ListProps, SelectStateOptions, Item as Item$2, Selection as Selection$1, ComboBoxStateOptions, ListData, ListOptions } from 'react-stately';
3
3
  import * as react_aria from 'react-aria';
4
- import { DraggableCollectionOptions, DroppableCollectionOptions, AriaListBoxProps, AriaListBoxOptions, OptionAria, AriaButtonProps, AriaSliderProps, AriaSwitchProps, AriaSearchFieldProps, AriaPopoverProps, useOverlayTrigger, AriaMenuProps, AriaMenuTriggerProps, AriaLinkOptions, SeparatorProps as SeparatorProps$1, AriaProgressBarProps, AriaTextFieldProps, AriaTooltipProps, AriaPositionProps, OverlayProps, AriaToggleButtonProps, AriaCheckboxProps, AriaNumberFieldProps, I18nProviderProps as I18nProviderProps$1, LocalizedStrings, useNumberFormatter, useDateFormatter, AriaTagGroupProps, AriaSelectOptions, AriaDialogProps, DropOptions, ClipboardProps, PressProps, AriaRadioGroupProps, AriaModalOverlayProps, AriaComboBoxOptions, AriaComboBoxProps, Locale } from 'react-aria';
4
+ import { DraggableCollectionOptions, DroppableCollectionOptions, AriaListBoxProps, AriaListBoxOptions, OptionAria, AriaButtonProps, AriaSliderProps, AriaSwitchProps, AriaSearchFieldProps, AriaPopoverProps, useOverlayTrigger, AriaMenuProps, AriaMenuTriggerProps, AriaLinkOptions, SeparatorProps as SeparatorProps$1, AriaProgressBarProps, AriaTextFieldProps, AriaTooltipProps, AriaPositionProps, OverlayProps, AriaToggleButtonProps, AriaCheckboxProps, AriaNumberFieldProps, I18nProviderProps as I18nProviderProps$1, LocalizedStrings, useNumberFormatter, useDateFormatter, AriaTagGroupProps, AriaSelectOptions, AriaDialogProps, DropOptions, ClipboardProps, PressProps, AriaRadioGroupProps, AriaModalOverlayProps, AriaComboBoxOptions, AriaComboBoxProps, Locale, Key as Key$1 } from 'react-aria';
5
5
  export { I18nProviderProps, useCollator, useDateFormatter, useNumberFormatter } from 'react-aria';
6
6
  import { Node as Node$1, DragItem, DOMAttributes, AriaLabelingProps, AriaValidationProps } from '@react-types/shared';
7
7
  import { IconProps, SVGRProps } from '@baseline-ui/icons';
@@ -49,6 +49,16 @@ interface StylingProps extends BlockProps {
49
49
  /** The style applied to the root element of the component. */
50
50
  style?: React.CSSProperties;
51
51
  }
52
+ interface Rect {
53
+ /** The left position of the rectangle. */
54
+ left: number;
55
+ /** The top position of the rectangle. */
56
+ top: number;
57
+ /** The width of the rectangle. */
58
+ width?: number;
59
+ /** The height of the rectangle. */
60
+ height?: number;
61
+ }
52
62
 
53
63
  /**
54
64
  * Check if the selector is inside an overlay content
@@ -57,17 +67,19 @@ interface StylingProps extends BlockProps {
57
67
  */
58
68
  declare function isInsideOverlayContent(selector: HTMLElement): Element | null;
59
69
 
60
- interface ListOption {
70
+ /**
71
+ * Check if the given object is a `Rect`.
72
+ *
73
+ * @param rect
74
+ */
75
+ declare function isRect(rect: Rect): rect is Rect;
76
+
77
+ interface ListOption<T = Record<string, any>> {
61
78
  id: string;
62
79
  label: string;
63
80
  description?: string;
64
81
  icon?: React.FC<IconProps>;
65
- data?: Record<string, any>;
66
- /**
67
- * The type of item.
68
- *
69
- * @default item
70
- */
82
+ data?: T;
71
83
  type?: "option";
72
84
  }
73
85
  interface ListSection {
@@ -77,7 +89,7 @@ interface ListSection {
77
89
  children: ListOption[];
78
90
  }
79
91
  declare type ListItem = ListOption | ListSection;
80
- interface ListBoxProps extends StylingProps, Omit<AriaListBoxProps<ListItem> & AriaListBoxOptions<ListItem>, "children" | "linkBehavior" | "isVirtualized" | "keyboardDelegate">, Omit<DragAndDropProps, "preview" | "enableReorder" | "orientation" | "layout">, Partial<Pick<DragAndDropProps, "enableReorder" | "orientation" | "layout">> {
92
+ interface ListBoxProps extends StylingProps, Omit<AriaListBoxProps<ListItem> & AriaListBoxOptions<ListItem>, "children" | "linkBehavior" | "isVirtualized" | "keyboardDelegate" | "items">, Omit<DragAndDropProps, "preview" | "enableReorder" | "orientation" | "layout">, Partial<Pick<DragAndDropProps, "enableReorder" | "orientation" | "layout">> {
81
93
  /**
82
94
  * The items to render in the listbox. Items have the following shape:
83
95
  *
@@ -99,7 +111,7 @@ interface ListBoxProps extends StylingProps, Omit<AriaListBoxProps<ListItem> & A
99
111
  * type ListItem = ListOption | ListSection;
100
112
  * ```
101
113
  */
102
- items: ListItem[];
114
+ items?: ListItem[];
103
115
  /**
104
116
  * The custom render function for the listbox options.
105
117
  *
@@ -329,16 +341,21 @@ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "tri
329
341
  }
330
342
  interface PopoverTriggerProps {
331
343
  /** The contents of the popover trigger. */
332
- children: React.ReactNode | (({ isOpen, triggerProps, triggerRef, }: {
344
+ children?: React.ReactNode | (({ isOpen, triggerProps, triggerRef, }: {
333
345
  isOpen: boolean;
334
346
  triggerProps: AriaButtonProps<"button">;
335
347
  triggerRef: React.RefObject<HTMLElement>;
336
348
  }) => React.ReactNode);
349
+ /**
350
+ * Client rect to be used as anchor for the popover content when no child
351
+ * element is provided.
352
+ */
353
+ anchorRect?: Rect;
337
354
  }
338
355
 
339
356
  declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
340
357
 
341
- declare const PopoverTrigger: React.FC;
358
+ declare const PopoverTrigger: React.FC<PopoverTriggerProps>;
342
359
 
343
360
  declare const Popover: React.FC<PopoverProps>;
344
361
 
@@ -379,19 +396,6 @@ interface MenuProps extends MenuPopoverProps, MenuTriggerProps, Omit<AriaMenuPro
379
396
  * ```
380
397
  */
381
398
  items: MenuItem[];
382
- /**
383
- * The `children` property is used to render the trigger element of the
384
- * component.
385
- *
386
- * ```tsx
387
- * <Menu>
388
- * <ActionButton label="Label">
389
- * </Menu>
390
- * ```
391
- *
392
- * @deprecated Use `renderTrigger` instead.
393
- */
394
- children?: React.ReactNode;
395
399
  /**
396
400
  * A function that renders the trigger element of the component. The default
397
401
  * implementation renders an `ActionButton` component.
@@ -714,26 +718,26 @@ declare type DateFormatProps = Parameters<typeof useDateFormatter>[0] & {
714
718
 
715
719
  declare const DateFormat: React.FC<DateFormatProps>;
716
720
 
717
- interface Item {
721
+ interface Item$1 {
718
722
  id: string;
719
723
  label: string;
720
724
  variant?: "neutral" | "red" | "green" | "blue" | "high-contrast";
721
725
  icon?: React.FC<SVGRProps>;
722
726
  }
723
- interface TagGroupProps extends StylingProps, Omit<AriaTagGroupProps<Item>, "children" | "errorMessage" | "description">, Omit<ListProps<Item>, "children" | "collection" | "filter"> {
727
+ interface TagGroupProps extends StylingProps, Omit<AriaTagGroupProps<Item$1>, "children" | "errorMessage" | "description">, Omit<ListProps<Item$1>, "children" | "collection" | "filter"> {
724
728
  /**
725
729
  * The items to display in the tag group.
726
730
  *
727
731
  * Type Item = { id: string; label: string; variant?: "neutral" | "red" |
728
732
  * "green" | "blue" | "high-contrast"; icon?: React.FC<SVGRProps>; }
729
733
  */
730
- items: Item[];
734
+ items: Item$1[];
731
735
  /**
732
736
  * The variant of the tag group.
733
737
  *
734
738
  * @default "neutral"
735
739
  */
736
- variant?: Item["variant"];
740
+ variant?: Item$1["variant"];
737
741
  /** The label for the tag group. */
738
742
  "aria-label": string;
739
743
  }
@@ -838,16 +842,26 @@ interface SelectProps extends Omit<AriaSelectOptions<ListItem> & SelectStateOpti
838
842
  * select menu.
839
843
  */
840
844
  renderTrigger?: (options: {
841
- buttonProps: Omit<ActionButtonProps, "variant" | "label">;
845
+ buttonProps: Omit<ActionButtonProps, "variant" | "label" | "elementType" | "iconStart" | "iconEnd">;
842
846
  valueProps: DOMAttributes;
843
847
  isOpen: boolean;
844
848
  selectedValue: ListItem | null;
845
849
  ref: React.RefObject<HTMLButtonElement>;
846
850
  }) => React.ReactNode;
847
851
  }
852
+ interface IconSelectProps extends Omit<SelectProps, "renderTrigger">, Pick<TooltipProps, "placement"> {
853
+ /** The icon to show at the start of the select component. */
854
+ icon: React.FC<IconProps>;
855
+ /** The aria label for the select component. */
856
+ "aria-label": string;
857
+ /** Whether to include a tooltip for the select component. */
858
+ includeTooltip?: boolean;
859
+ }
848
860
 
849
861
  declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
850
862
 
863
+ declare const IconSelect: React.ForwardRefExoticComponent<IconSelectProps & React.RefAttributes<HTMLDivElement>>;
864
+
851
865
  interface AvatarProps extends StylingProps {
852
866
  /**
853
867
  * The size of the component.
@@ -879,7 +893,7 @@ interface AvatarProps extends StylingProps {
879
893
 
880
894
  declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
881
895
 
882
- declare type ItemProps = React.ComponentProps<typeof Item$1> & StylingProps & {
896
+ declare type ItemProps = React.ComponentProps<typeof Item$2> & StylingProps & {
883
897
  key?: Key;
884
898
  icon?: React.FC<SVGRProps>;
885
899
  value?: string;
@@ -1173,8 +1187,23 @@ interface ColorInputProps extends OverlayTriggerProps, StylingProps, Pick<ColorF
1173
1187
  ref: React.RefObject<HTMLButtonElement>;
1174
1188
  colorName?: string | boolean;
1175
1189
  triggerProps: AriaButtonProps<"button">;
1190
+ labelId?: string;
1176
1191
  }) => React.ReactElement;
1177
1192
  }
1193
+ interface IconColorInputProps extends StylingProps, Omit<ColorInputProps, "renderTriggerButton" | "colorLabel" | "label" | "labelPosition">, Pick<TooltipProps, "placement"> {
1194
+ /** The icon to show at the start of the color input. */
1195
+ icon: React.FC<IconProps>;
1196
+ /** Whether to include a tooltip for the color input. */
1197
+ includeTooltip?: boolean;
1198
+ /** The aria label for the color input button. */
1199
+ "aria-label": string;
1200
+ /**
1201
+ * The variant of the color input button.
1202
+ *
1203
+ * @default standard
1204
+ */
1205
+ variant: "compact" | "standard";
1206
+ }
1178
1207
 
1179
1208
  declare const ColorInput: React.ForwardRefExoticComponent<ColorInputProps & React.RefAttributes<HTMLDivElement>>;
1180
1209
 
@@ -1187,17 +1216,20 @@ interface ColorSwatchProps {
1187
1216
  isPresentational?: boolean;
1188
1217
  }
1189
1218
 
1190
- declare const IconColorInputButton: React.ForwardRefExoticComponent<Omit<ColorInputButtonProps, "children" | "labelPosition"> & {
1219
+ declare const IconColorInputButton: React.ForwardRefExoticComponent<Omit<ColorInputButtonProps, "children" | "color" | "labelPosition"> & {
1191
1220
  icon: React.FC<IconProps>;
1192
- color?: string | undefined;
1221
+ color?: string | null | undefined;
1193
1222
  } & React.RefAttributes<HTMLButtonElement>>;
1194
- interface ColorInputButtonProps extends Omit<ActionButtonProps, "label"> {
1223
+ interface ColorInputButtonProps extends Omit<ActionButtonProps, "label">, Pick<ColorInputProps, "colorLabel"> {
1195
1224
  isOpen: boolean;
1196
1225
  "aria-label"?: string;
1197
- labelPosition: "top" | "start";
1198
- children: React.ReactNode;
1226
+ labelPosition?: "top" | "start";
1227
+ color: Color | null;
1228
+ colorName?: string | boolean;
1199
1229
  }
1200
1230
 
1231
+ declare const IconColorInput: React.ForwardRefExoticComponent<IconColorInputProps & React.RefAttributes<HTMLDivElement>>;
1232
+
1201
1233
  interface FreehandCanvasProps extends StylingProps, AriaLabelingProps {
1202
1234
  /** The className applicable to the SVG canvas. */
1203
1235
  canvasClassName?: string;
@@ -1333,7 +1365,7 @@ declare type TextProps<T extends keyof React.JSX.IntrinsicElements = "span"> = S
1333
1365
  elementType?: React.ElementType;
1334
1366
  };
1335
1367
 
1336
- declare const Text: React.ForwardRefExoticComponent<Pick<TextProps<"span">, "className" | "style" | "dir" | "slot" | "title" | "children" | "autoFocus" | "onFocus" | "onBlur" | "id" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-details" | "onDrop" | "onDragStart" | "onDragEnd" | "data-block-id" | "type" | "color" | "size" | "content" | "translate" | "hidden" | "elementType" | "role" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
1368
+ declare const Text: React.ForwardRefExoticComponent<Pick<TextProps<"span">, "onDrop" | "onDragStart" | "onDragEnd" | "type" | "className" | "style" | "dir" | "slot" | "title" | "children" | "autoFocus" | "onFocus" | "onBlur" | "id" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-details" | "data-block-id" | "color" | "size" | "content" | "translate" | "hidden" | "elementType" | "role" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
1337
1369
 
1338
1370
  interface TransformProps {
1339
1371
  /** The `className` property assigned to the root element of the component. */
@@ -1736,11 +1768,6 @@ interface ToolbarProps extends StylingProps, AriaToolbarProps {
1736
1768
  * This prop is only relevant when `isCollapsible` is true.
1737
1769
  */
1738
1770
  collapsibleMenuProps?: Omit<MenuProps, "items" | "onAction" | "placement" | "disabledKeys">;
1739
- /**
1740
- * The trigger to use for the menu when the toolbar is collapsible. This prop
1741
- * is only relevant when `isCollapsible` is true.
1742
- */
1743
- collapsibleMenuTrigger?: React.ReactNode;
1744
1771
  /**
1745
1772
  * A function that renders a spacer element in the collapsible toolbar between
1746
1773
  * the toolbar buttons and the menu trigger. This prop is only relevant when
@@ -2059,7 +2086,13 @@ interface AudioPlayerProps extends StylingProps, AriaLabelingProps {
2059
2086
 
2060
2087
  declare const AudioPlayer: React.ForwardRefExoticComponent<AudioPlayerProps & React.RefAttributes<HTMLDivElement>>;
2061
2088
 
2062
- interface ImageGalleryProps extends StylingProps, Omit<ListBoxProps, "items" | "layout" | "grid" | "renderOption" | "renderDropIndicator" | "renderDragPreview" | "UNSAFE_state" | "showSelectedIcon" | "orientation" | "shouldSelectOnPressUp" | "shouldFocusOnHover" | "dropIndicatorClassName" | "dropIndicatorStyle" | "shouldUseVirtualFocus" | "getItems" | "acceptedDragTypes" | "sectionClassName" | "sectionStyle"> {
2089
+ interface Item {
2090
+ id: string;
2091
+ src?: string;
2092
+ alt?: string;
2093
+ label: string;
2094
+ }
2095
+ interface ImageGalleryProps extends StylingProps, Omit<ListBoxProps, "items" | "layout" | "grid" | "renderOption" | "renderDropIndicator" | "renderDragPreview" | "showSelectedIcon" | "orientation" | "shouldSelectOnPressUp" | "shouldFocusOnHover" | "dropIndicatorClassName" | "dropIndicatorStyle" | "shouldUseVirtualFocus" | "getItems" | "acceptedDragTypes" | "sectionClassName" | "sectionStyle"> {
2063
2096
  /**
2064
2097
  * An array of objects containing the image source, alt text, and label for
2065
2098
  * each image.
@@ -2081,18 +2114,13 @@ interface ImageGalleryProps extends StylingProps, Omit<ListBoxProps, "items" | "
2081
2114
  * ];
2082
2115
  * ```
2083
2116
  */
2084
- items: {
2085
- id: string;
2086
- src: string;
2087
- alt?: string;
2088
- label: string;
2089
- }[];
2117
+ items?: Item[];
2090
2118
  /**
2091
- * The size of the images.
2119
+ * The width of the images.
2092
2120
  *
2093
2121
  * @default "sm"
2094
2122
  */
2095
- size?: "sm" | "md";
2123
+ imageWidth?: number | "sm" | "md";
2096
2124
  /**
2097
2125
  * The aspect ratio of the images.
2098
2126
  *
@@ -2105,13 +2133,34 @@ interface ImageGalleryProps extends StylingProps, Omit<ListBoxProps, "items" | "
2105
2133
  * @default "cover"
2106
2134
  */
2107
2135
  fit?: "contain" | "cover";
2136
+ /** A callback that is called when the list of images or selection is updated. */
2137
+ onListChange?: (items: Item[]) => void;
2108
2138
  /** A callback that is called when an image is deleted. */
2109
2139
  onDelete?: (keys: Selection$1) => void;
2140
+ /** A callback that is called when a key is pressed. */
2141
+ onKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
2110
2142
  }
2111
2143
 
2112
2144
  declare const ImageGallery: React.ForwardRefExoticComponent<ImageGalleryProps & React.RefAttributes<HTMLDivElement>>;
2113
2145
 
2114
- interface ComboBoxProps extends StylingProps, Omit<AriaComboBoxOptions<ListItem>, "items" | "children" | "inputRef" | "popoverRef" | "listBoxRef" | "buttonRef" | "validationState" | "errorMessage" | "description">, Omit<AriaComboBoxProps<ListItem>, "items" | "children" | "errorMessage" | "description" | "validationState">, Omit<ListBoxProps, "autoFocus" | "onBlur" | "onFocus" | "onSelectionChange" | "selectionBehavior" | "selectionMode" | "selectedKeys" | "defaultSelectedKeys" | "renderDropIndicator" | "renderDragPreview" | "UNSAFE_state" | "dropIndicatorClassName" | "dropIndicatorStyle" | keyof DragAndDropProps>, AriaValidationProps, Omit<ComboBoxStateOptions<ListItem>, "items" | "children" | "errorMessage" | "description" | "validationState" | "selectedKey">, InputMessage {
2146
+ interface ButtonSelectProps extends StylingProps, Pick<SelectProps, "isDisabled" | "validationState" | "onSelectionChange" | "selectedKey" | "defaultSelectedKey" | "items" | "showSelectedIcon" | "isOpen" | "defaultOpen">, Pick<ActionButtonProps, "onPress" | "excludeFromTabOrder">, AriaLabelingProps {
2147
+ /**
2148
+ * The size of the button.
2149
+ *
2150
+ * @default "md"
2151
+ */
2152
+ size?: "md" | "lg";
2153
+ /**
2154
+ * Whether to hide the label in the button.
2155
+ *
2156
+ * @default false
2157
+ */
2158
+ hideLabel?: boolean;
2159
+ }
2160
+
2161
+ declare const ButtonSelect: React.ForwardRefExoticComponent<ButtonSelectProps & React.RefAttributes<HTMLDivElement>>;
2162
+
2163
+ interface ComboBoxProps extends StylingProps, Omit<AriaComboBoxOptions<ListItem>, "items" | "children" | "inputRef" | "popoverRef" | "listBoxRef" | "buttonRef" | "validationState" | "errorMessage" | "description">, Omit<AriaComboBoxProps<ListItem>, "items" | "children" | "errorMessage" | "description" | "validationState">, Omit<ListBoxProps, "autoFocus" | "onBlur" | "onFocus" | "onSelectionChange" | "selectionBehavior" | "selectionMode" | "selectedKeys" | "defaultSelectedKeys" | "renderDropIndicator" | "renderDragPreview" | "dropIndicatorClassName" | "dropIndicatorStyle" | keyof DragAndDropProps>, AriaValidationProps, Omit<ComboBoxStateOptions<ListItem>, "items" | "children" | "errorMessage" | "description" | "validationState" | "selectedKey">, InputMessage {
2115
2164
  /** ID of the initially selected item */
2116
2165
  defaultSelectedKey?: string;
2117
2166
  /**
@@ -2503,7 +2552,7 @@ interface TextSelectionProps {
2503
2552
  * @param element - The element to use to get the owner window. Defaults to
2504
2553
  * `document.body`.
2505
2554
  */
2506
- declare function useDevice(element?: Element | null | undefined): "tablet" | "desktop" | "mobile";
2555
+ declare function useDevice(element?: Element | null | undefined): "desktop" | "tablet" | "mobile";
2507
2556
 
2508
2557
  /**
2509
2558
  * Custom hook for accessing PortalContainerProviderContext. This hook allows
@@ -2517,4 +2566,11 @@ declare function useDevice(element?: Element | null | undefined): "tablet" | "de
2517
2566
  */
2518
2567
  declare function usePortalContainer(_portalContainer?: HTMLElement): HTMLElement | undefined;
2519
2568
 
2520
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionIconButton, type ActionIconButtonProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorPresetInlineInput, type ColorPresetInlineInputProps, ColorSwatch, type ColorSwatchProps, ComboBox, type ComboBoxProps, DateFormat, type DateFormatProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorHandle, type EditorProps, FileUpload, type FileUploadProps, FreehandCanvas, type FreehandCanvasProps, Group, type GroupProps, I18nProvider, type I18nResult, IconColorInputButton, ImageDropZone, type ImageDropZoneProps, ImageGallery, type ImageGalleryProps, InlineAlert, type InlineAlertProps, Link, type LinkProps, ListBox, type ListBoxProps, type ListOption, Markdown, type MarkdownProps, Menu, type MenuItem, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, Reaction, type ReactionProps, ScrollControlButton, type ScrollControlButtonProps, SearchInput, type SearchInputProps, Select, type SelectProps, Separator, type SeparatorProps, Slider, type SliderProps, type StylingProps, Switch, type SwitchProps, TabItem, type TabItemProps, Tabs, type TabsProps, TagGroup, type TagGroupProps, Text, TextInput, type TextInputProps, type TextProps, ThemeProvider, type ThemeProviderProps, ToggleButton, type ToggleButtonProps, ToggleIconButton, type ToggleIconButtonProps, Toolbar, type ToolbarProps, Tooltip, type TooltipProps, Transform, type TransformProps, Transition, type TransitionProps, defineMessages, isInsideOverlayContent, useDevice, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, usePortalContainer, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
2569
+ interface DynamicListOptions<T> extends ListOptions<T> {
2570
+ onListChange?: (items: T[]) => void;
2571
+ onSelectionChange?: (selectedKeys: Selection$1) => void;
2572
+ getKey?: (item: T) => Key$1;
2573
+ }
2574
+ declare function useDynamicListData<T>(options: DynamicListOptions<T>): ListData<T>;
2575
+
2576
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionIconButton, type ActionIconButtonProps, AlertDialog, type AlertDialogProps, AudioPlayer, type AudioPlayerProps, Avatar, type AvatarProps, type BlockProps, Box, type BoxProps, ButtonSelect, type ButtonSelectProps, Checkbox, type CheckboxProps, ColorInput, type ColorInputProps, type ColorPreset, ColorPresetInlineInput, type ColorPresetInlineInputProps, ColorSwatch, type ColorSwatchProps, ComboBox, type ComboBoxProps, DateFormat, type DateFormatProps, Dialog, type DialogProps, DialogTitle, type DialogTitleProps, DomNodeRenderer, type DomNodeRendererProps, Drawer, type DrawerProps, Editor, type EditorHandle, type EditorProps, FileUpload, type FileUploadProps, FreehandCanvas, type FreehandCanvasProps, Group, type GroupProps, I18nProvider, type I18nResult, IconColorInput, IconColorInputButton, type IconColorInputProps, IconSelect, type IconSelectProps, ImageDropZone, type ImageDropZoneProps, ImageGallery, type ImageGalleryProps, InlineAlert, type InlineAlertProps, Link, type LinkProps, ListBox, type ListBoxProps, type ListOption, Markdown, type MarkdownProps, Menu, type MenuItem, type MenuProps, type MessageDescriptor, MessageFormat, type MessageFormatProps, Modal, ModalClose, ModalContent, type ModalContentProps, type ModalProps, ModalTrigger, NumberFormat, type NumberFormatProps, NumberInput, type NumberInputProps, Pagination, type PaginationProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, PortalContainerProvider, type PortalProps, Preview, type PreviewProps, ProgressBar, type ProgressBarProps, ProgressSpinner, type ProgressSpinnerProps, RadioGroup, type RadioGroupProps, Reaction, type ReactionProps, type Rect, ScrollControlButton, type ScrollControlButtonProps, SearchInput, type SearchInputProps, Select, type SelectProps, Separator, type SeparatorProps, Slider, type SliderProps, type StylingProps, Switch, type SwitchProps, TabItem, type TabItemProps, Tabs, type TabsProps, TagGroup, type TagGroupProps, Text, TextInput, type TextInputProps, type TextProps, ThemeProvider, type ThemeProviderProps, ToggleButton, type ToggleButtonProps, ToggleIconButton, type ToggleIconButtonProps, Toolbar, type ToolbarProps, Tooltip, type TooltipProps, Transform, type TransformProps, Transition, type TransitionProps, defineMessages, isInsideOverlayContent, isRect, useDevice, useDynamicListData, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, usePortalContainer, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };