@baseline-ui/core 0.22.1 → 0.24.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,9 +1,9 @@
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$2, Selection as Selection$1, ComboBoxStateOptions, ListData, ListOptions } 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, Node as Node$2, 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, Key as Key$1 } 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, AriaGridListOptions, GridListItemAria, Locale, Key as Key$1 } from 'react-aria';
5
5
  export { I18nProviderProps, useCollator, useDateFormatter, useNumberFormatter } from 'react-aria';
6
- import { Node as Node$1, DragItem, DOMAttributes, AriaLabelingProps, AriaValidationProps } from '@react-types/shared';
6
+ import { Node as Node$1, DragItem, DOMAttributes, AriaLabelingProps, AriaValidationProps, DOMProps } from '@react-types/shared';
7
7
  import { IconProps, SVGRProps } from '@baseline-ui/icons';
8
8
  import { Theme, Sprinkles } from '@baseline-ui/tokens';
9
9
  import { AriaTabListProps } from '@react-types/tabs';
@@ -11,6 +11,8 @@ import { ColorFieldProps, Color } from '@react-stately/color';
11
11
  import { OnRender, OnRenderStart, OnDragStart, OnDrag, OnDragEnd, OnResizeStart, OnResize, OnResizeEnd, OnRotateStart, OnRotate, OnRotateEnd, OnSnap, RotationPosition } from 'react-moveable';
12
12
  import { AriaToolbarProps } from '@react-aria/toolbar';
13
13
  import { UseTransitionProps } from '@react-spring/core';
14
+ import { AriaColorSwatchProps } from '@react-aria/color';
15
+ import { AriaActionGroupProps } from '@react-aria/actiongroup';
14
16
 
15
17
  declare type DragAndDropProps = Omit<DraggableCollectionStateOptions & DraggableCollectionOptions & DroppableCollectionOptions & DroppableCollectionStateOptions, "keyboardDelegate" | "dropTargetDelegate" | "shouldAcceptItemDrop" | "onDropEnter" | "onDropActivate" | "onDropExit" | "getDropOperation" | "collection" | "selectionManager" | "onRootDrop" | "onInsert" | "getAllowedDropOperations" | "getItems" | "onItemDrop"> & Partial<Pick<DraggableCollectionStateOptions, "getItems">> & {
16
18
  /**
@@ -41,7 +43,7 @@ interface BlockProps {
41
43
  * `data-block-id` to the root element of the block if a DOM node is
42
44
  * rendered.
43
45
  */
44
- "data-block-id"?: Key;
46
+ "data-block-id"?: string;
45
47
  }
46
48
  interface StylingProps extends BlockProps {
47
49
  /** The className applied to the root element of the component. */
@@ -49,6 +51,16 @@ interface StylingProps extends BlockProps {
49
51
  /** The style applied to the root element of the component. */
50
52
  style?: React.CSSProperties;
51
53
  }
54
+ interface Rect {
55
+ /** The left position of the rectangle. */
56
+ left: number;
57
+ /** The top position of the rectangle. */
58
+ top: number;
59
+ /** The width of the rectangle. */
60
+ width?: number;
61
+ /** The height of the rectangle. */
62
+ height?: number;
63
+ }
52
64
 
53
65
  /**
54
66
  * Check if the selector is inside an overlay content
@@ -57,17 +69,19 @@ interface StylingProps extends BlockProps {
57
69
  */
58
70
  declare function isInsideOverlayContent(selector: HTMLElement): Element | null;
59
71
 
72
+ /**
73
+ * Check if the given object is a `Rect`.
74
+ *
75
+ * @param rect
76
+ */
77
+ declare function isRect(rect: Rect): rect is Rect;
78
+
60
79
  interface ListOption<T = Record<string, any>> {
61
80
  id: string;
62
81
  label: string;
63
82
  description?: string;
64
83
  icon?: React.FC<IconProps>;
65
84
  data?: T;
66
- /**
67
- * The type of item.
68
- *
69
- * @default item
70
- */
71
85
  type?: "option";
72
86
  }
73
87
  interface ListSection {
@@ -77,7 +91,7 @@ interface ListSection {
77
91
  children: ListOption[];
78
92
  }
79
93
  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">> {
94
+ 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
95
  /**
82
96
  * The items to render in the listbox. Items have the following shape:
83
97
  *
@@ -99,7 +113,7 @@ interface ListBoxProps extends StylingProps, Omit<AriaListBoxProps<ListItem> & A
99
113
  * type ListItem = ListOption | ListSection;
100
114
  * ```
101
115
  */
102
- items: ListItem[];
116
+ items?: ListItem[];
103
117
  /**
104
118
  * The custom render function for the listbox options.
105
119
  *
@@ -151,7 +165,7 @@ interface ActionButtonProps extends ActionButtonSharedProps {
151
165
  *
152
166
  * @default primary
153
167
  */
154
- variant?: "primary" | "secondary" | "tertiary" | "ghost" | "popover" | "toolbar";
168
+ variant?: "primary" | "secondary" | "tertiary" | "ghost" | "popover" | "toolbar" | "success" | "warning" | "error";
155
169
  /** The button's label. */
156
170
  label: React.ReactNode;
157
171
  /** The button's icon before the label. */
@@ -329,16 +343,21 @@ interface PopoverContentProps extends Omit<AriaPopoverProps, "popoverRef" | "tri
329
343
  }
330
344
  interface PopoverTriggerProps {
331
345
  /** The contents of the popover trigger. */
332
- children: React.ReactNode | (({ isOpen, triggerProps, triggerRef, }: {
346
+ children?: React.ReactNode | (({ isOpen, triggerProps, triggerRef, }: {
333
347
  isOpen: boolean;
334
348
  triggerProps: AriaButtonProps<"button">;
335
349
  triggerRef: React.RefObject<HTMLElement>;
336
350
  }) => React.ReactNode);
351
+ /**
352
+ * Client rect to be used as anchor for the popover content when no child
353
+ * element is provided.
354
+ */
355
+ anchorRect?: Rect;
337
356
  }
338
357
 
339
358
  declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
340
359
 
341
- declare const PopoverTrigger: React.FC;
360
+ declare const PopoverTrigger: React.FC<PopoverTriggerProps>;
342
361
 
343
362
  declare const Popover: React.FC<PopoverProps>;
344
363
 
@@ -379,19 +398,6 @@ interface MenuProps extends MenuPopoverProps, MenuTriggerProps, Omit<AriaMenuPro
379
398
  * ```
380
399
  */
381
400
  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
401
  /**
396
402
  * A function that renders the trigger element of the component. The default
397
403
  * implementation renders an `ActionButton` component.
@@ -838,16 +844,26 @@ interface SelectProps extends Omit<AriaSelectOptions<ListItem> & SelectStateOpti
838
844
  * select menu.
839
845
  */
840
846
  renderTrigger?: (options: {
841
- buttonProps: Omit<ActionButtonProps, "variant" | "label">;
847
+ buttonProps: Omit<ActionButtonProps, "variant" | "label" | "elementType" | "iconStart" | "iconEnd">;
842
848
  valueProps: DOMAttributes;
843
849
  isOpen: boolean;
844
850
  selectedValue: ListItem | null;
845
851
  ref: React.RefObject<HTMLButtonElement>;
846
852
  }) => React.ReactNode;
847
853
  }
854
+ interface IconSelectProps extends Omit<SelectProps, "renderTrigger">, Pick<TooltipProps, "placement"> {
855
+ /** The icon to show at the start of the select component. */
856
+ icon: React.FC<IconProps>;
857
+ /** The aria label for the select component. */
858
+ "aria-label": string;
859
+ /** Whether to include a tooltip for the select component. */
860
+ includeTooltip?: boolean;
861
+ }
848
862
 
849
863
  declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
850
864
 
865
+ declare const IconSelect: React.ForwardRefExoticComponent<IconSelectProps & React.RefAttributes<HTMLDivElement>>;
866
+
851
867
  interface AvatarProps extends StylingProps {
852
868
  /**
853
869
  * The size of the component.
@@ -1173,31 +1189,40 @@ interface ColorInputProps extends OverlayTriggerProps, StylingProps, Pick<ColorF
1173
1189
  ref: React.RefObject<HTMLButtonElement>;
1174
1190
  colorName?: string | boolean;
1175
1191
  triggerProps: AriaButtonProps<"button">;
1192
+ labelId?: string;
1176
1193
  }) => React.ReactElement;
1177
1194
  }
1195
+ interface IconColorInputProps extends StylingProps, Omit<ColorInputProps, "renderTriggerButton" | "colorLabel" | "label" | "labelPosition">, Pick<TooltipProps, "placement"> {
1196
+ /** The icon to show at the start of the color input. */
1197
+ icon: React.FC<IconProps>;
1198
+ /** Whether to include a tooltip for the color input. */
1199
+ includeTooltip?: boolean;
1200
+ /** The aria label for the color input button. */
1201
+ "aria-label": string;
1202
+ /**
1203
+ * The variant of the color input button.
1204
+ *
1205
+ * @default standard
1206
+ */
1207
+ variant: "compact" | "standard";
1208
+ }
1178
1209
 
1179
1210
  declare const ColorInput: React.ForwardRefExoticComponent<ColorInputProps & React.RefAttributes<HTMLDivElement>>;
1180
1211
 
1181
- declare const ColorSwatch: React.FC<ColorSwatchProps>;
1182
- interface ColorSwatchProps {
1183
- color?: string;
1184
- isFocusVisible?: boolean;
1185
- isDisabled?: boolean;
1186
- isSelected?: boolean;
1187
- isPresentational?: boolean;
1188
- }
1189
-
1190
- declare const IconColorInputButton: React.ForwardRefExoticComponent<Omit<ColorInputButtonProps, "children" | "labelPosition"> & {
1212
+ declare const IconColorInputButton: React.ForwardRefExoticComponent<Omit<ColorInputButtonProps, "children" | "color" | "labelPosition"> & {
1191
1213
  icon: React.FC<IconProps>;
1192
- color?: string | undefined;
1214
+ color?: string | null | undefined;
1193
1215
  } & React.RefAttributes<HTMLButtonElement>>;
1194
- interface ColorInputButtonProps extends Omit<ActionButtonProps, "label"> {
1216
+ interface ColorInputButtonProps extends Omit<ActionButtonProps, "label">, Pick<ColorInputProps, "colorLabel"> {
1195
1217
  isOpen: boolean;
1196
1218
  "aria-label"?: string;
1197
- labelPosition: "top" | "start";
1198
- children: React.ReactNode;
1219
+ labelPosition?: "top" | "start";
1220
+ color: Color | null;
1221
+ colorName?: string | boolean;
1199
1222
  }
1200
1223
 
1224
+ declare const IconColorInput: React.ForwardRefExoticComponent<IconColorInputProps & React.RefAttributes<HTMLDivElement>>;
1225
+
1201
1226
  interface FreehandCanvasProps extends StylingProps, AriaLabelingProps {
1202
1227
  /** The className applicable to the SVG canvas. */
1203
1228
  canvasClassName?: string;
@@ -1333,7 +1358,7 @@ declare type TextProps<T extends keyof React.JSX.IntrinsicElements = "span"> = S
1333
1358
  elementType?: React.ElementType;
1334
1359
  };
1335
1360
 
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>>;
1361
+ 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
1362
 
1338
1363
  interface TransformProps {
1339
1364
  /** The `className` property assigned to the root element of the component. */
@@ -1713,6 +1738,11 @@ interface ColorPresetInlineInputProps extends Omit<RadioGroupProps, "items" | "d
1713
1738
  items: ColorPreset[];
1714
1739
  }
1715
1740
 
1741
+ /**
1742
+ * @deprecated Please use `ColorSwatchPicker` instead.
1743
+ *
1744
+ * TODO [>=0.26.0] Remove this component.
1745
+ */
1716
1746
  declare const ColorPresetInlineInput: React.ForwardRefExoticComponent<ColorPresetInlineInputProps & React.RefAttributes<HTMLDivElement>>;
1717
1747
 
1718
1748
  interface ToolbarProps extends StylingProps, AriaToolbarProps {
@@ -1736,11 +1766,6 @@ interface ToolbarProps extends StylingProps, AriaToolbarProps {
1736
1766
  * This prop is only relevant when `isCollapsible` is true.
1737
1767
  */
1738
1768
  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
1769
  /**
1745
1770
  * A function that renders a spacer element in the collapsible toolbar between
1746
1771
  * the toolbar buttons and the menu trigger. This prop is only relevant when
@@ -2065,7 +2090,7 @@ interface Item {
2065
2090
  alt?: string;
2066
2091
  label: string;
2067
2092
  }
2068
- 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"> {
2093
+ interface ImageGalleryProps extends StylingProps, Omit<ListBoxProps, "items" | "layout" | "grid" | "renderOption" | "renderDropIndicator" | "renderDragPreview" | "showSelectedIcon" | "orientation" | "shouldSelectOnPressUp" | "shouldFocusOnHover" | "dropIndicatorClassName" | "dropIndicatorStyle" | "shouldUseVirtualFocus" | "getItems" | "acceptedDragTypes" | "sectionClassName" | "sectionStyle"> {
2069
2094
  /**
2070
2095
  * An array of objects containing the image source, alt text, and label for
2071
2096
  * each image.
@@ -2087,13 +2112,13 @@ interface ImageGalleryProps extends StylingProps, Omit<ListBoxProps, "items" | "
2087
2112
  * ];
2088
2113
  * ```
2089
2114
  */
2090
- items: Item[];
2115
+ items?: Item[];
2091
2116
  /**
2092
- * The size of the images.
2117
+ * The width of the images.
2093
2118
  *
2094
2119
  * @default "sm"
2095
2120
  */
2096
- size?: "sm" | "md";
2121
+ imageWidth?: number | "sm" | "md";
2097
2122
  /**
2098
2123
  * The aspect ratio of the images.
2099
2124
  *
@@ -2110,11 +2135,30 @@ interface ImageGalleryProps extends StylingProps, Omit<ListBoxProps, "items" | "
2110
2135
  onListChange?: (items: Item[]) => void;
2111
2136
  /** A callback that is called when an image is deleted. */
2112
2137
  onDelete?: (keys: Selection$1) => void;
2138
+ /** A callback that is called when a key is pressed. */
2139
+ onKeyDown?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
2113
2140
  }
2114
2141
 
2115
2142
  declare const ImageGallery: React.ForwardRefExoticComponent<ImageGalleryProps & React.RefAttributes<HTMLDivElement>>;
2116
2143
 
2117
- 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 {
2144
+ interface ButtonSelectProps extends StylingProps, Pick<SelectProps, "isDisabled" | "validationState" | "onSelectionChange" | "selectedKey" | "defaultSelectedKey" | "items" | "showSelectedIcon" | "isOpen" | "defaultOpen">, Pick<ActionButtonProps, "onPress" | "excludeFromTabOrder">, AriaLabelingProps {
2145
+ /**
2146
+ * The size of the button.
2147
+ *
2148
+ * @default "md"
2149
+ */
2150
+ size?: "md" | "lg";
2151
+ /**
2152
+ * Whether to hide the label in the button.
2153
+ *
2154
+ * @default false
2155
+ */
2156
+ hideLabel?: boolean;
2157
+ }
2158
+
2159
+ declare const ButtonSelect: React.ForwardRefExoticComponent<ButtonSelectProps & React.RefAttributes<HTMLDivElement>>;
2160
+
2161
+ 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 {
2118
2162
  /** ID of the initially selected item */
2119
2163
  defaultSelectedKey?: string;
2120
2164
  /**
@@ -2191,6 +2235,125 @@ interface ComboBoxProps extends StylingProps, Omit<AriaComboBoxOptions<ListItem>
2191
2235
 
2192
2236
  declare const ComboBox: React.ForwardRefExoticComponent<ComboBoxProps & React.RefAttributes<HTMLDivElement>>;
2193
2237
 
2238
+ interface ColorSwatchProps extends Omit<AriaColorSwatchProps, "colorName">, StylingProps, DOMProps, AriaLabelingProps {
2239
+ /** Whether the swatch is focused by keyboard. */
2240
+ isFocusVisible?: boolean;
2241
+ /** Whether the swatch is selected. */
2242
+ isSelected?: boolean;
2243
+ /**
2244
+ * Whether the swatch is interactive. This is used to determine whether to
2245
+ * show hover styles.
2246
+ */
2247
+ isInteractive?: boolean;
2248
+ /**
2249
+ * Whether the swatch is disabled. This is used to determine whether to show
2250
+ * disabled styles.
2251
+ */
2252
+ isDisabled?: boolean;
2253
+ }
2254
+
2255
+ declare const ColorSwatch: React.ForwardRefExoticComponent<ColorSwatchProps & React.RefAttributes<HTMLDivElement>>;
2256
+
2257
+ declare type GridListProps = Omit<StylingProps & ListProps<ListOption> & AriaGridListOptions<ListOption> & {
2258
+ /**
2259
+ * The items to render in the grid list. Items have the following shape:
2260
+ *
2261
+ * ```ts
2262
+ * export type ListOption = {
2263
+ * id: string;
2264
+ * label: string;
2265
+ * description?: string;
2266
+ * icon?: React.FC<IconProps>;
2267
+ * data?: T;
2268
+ * };
2269
+ * ```
2270
+ */
2271
+ items: ListOption[];
2272
+ /**
2273
+ * Function to render a grid item. This is called for each item in the
2274
+ * list. The function receives the item, props for the grid item, and a
2275
+ * ref to the grid item element. It should return a React element
2276
+ * representing the item.
2277
+ *
2278
+ * The `checkBoxProps` property in the options object is used to pass
2279
+ * props to the checkbox rendered in the grid item. This property is
2280
+ * `undefined` when the grid list is not selectable.
2281
+ *
2282
+ * ```jsx
2283
+ * <GridList
2284
+ * items={items}
2285
+ * renderGridItem={(
2286
+ * item,
2287
+ * { rowProps, isDisabled, gridCellProps, checkBoxProps },
2288
+ * ref,
2289
+ * ) => (
2290
+ * <div
2291
+ * {...rowProps}
2292
+ * ref={ref}
2293
+ * style={{ opacity: isDisabled ? 0.5 : 1 }}
2294
+ * >
2295
+ * <Checkbox {...checkBoxProps} />
2296
+ * <Text>{item.label}</Text>
2297
+ * <ActionButton label="Click Me" />
2298
+ * </div>
2299
+ * )}
2300
+ * />;
2301
+ * ```
2302
+ *
2303
+ * @param item
2304
+ * @param options
2305
+ * @param ref
2306
+ */
2307
+ renderGridItem: (item: Node$1<ListOption>, options: GridListItemAria & {
2308
+ checkBoxProps?: CheckboxProps;
2309
+ }, ref: React.Ref<HTMLLIElement>) => React.ReactElement;
2310
+ }, "children" | "suppressTextValueWarning" | "allowDuplicateSelectionEvents" | "linkBehavior" | "keyboardDelegate" | "isVirtualized" | "filter">;
2311
+
2312
+ declare const GridList: React.ForwardRefExoticComponent<GridListProps & React.RefAttributes<HTMLUListElement>>;
2313
+
2314
+ interface ActionGroupProps extends StylingProps, Omit<AriaActionGroupProps<ListItem>, "children"> {
2315
+ /** The items to display in the action group. */
2316
+ items: ListItem[];
2317
+ /**
2318
+ * Represents the mode of selection for a component. This variable should be
2319
+ * assigned one of the following string values: "single" or "multiple".
2320
+ *
2321
+ * @default "single"
2322
+ */
2323
+ selectionMode?: "single" | "multiple";
2324
+ /** Whether to include a tooltip on the action group items. */
2325
+ includeTooltip?: boolean;
2326
+ }
2327
+
2328
+ declare const ActionGroup: React.ForwardRefExoticComponent<ActionGroupProps & React.RefAttributes<HTMLDivElement>>;
2329
+ declare const ActionGroupItem: React.FC<{
2330
+ item: Node$2<ListItem>;
2331
+ state: ListState<ListItem>;
2332
+ onAction?: (key: Key) => void;
2333
+ isDisabled?: boolean;
2334
+ includeTooltip?: boolean;
2335
+ }>;
2336
+
2337
+ interface ColorSwatchPickerProps extends StylingProps, Pick<ColorPresetInlineInputProps, "items" | "optionsContainerClassName" | "labelPosition">, Pick<ListBoxProps, "optionClassName" | "optionStyle">, AriaLabelingProps {
2338
+ /** The icon visible at the start of the picker. */
2339
+ icon?: React.FC<IconProps>;
2340
+ /**
2341
+ * The value of the selected item. This is useful if you want to control the
2342
+ * value of the picker.
2343
+ */
2344
+ value?: string;
2345
+ /** A function that is called when the selected item changes. */
2346
+ onChange?: (value: string) => void;
2347
+ /** The default value of the picker. */
2348
+ defaultValue?: string;
2349
+ /** The label for the picker. */
2350
+ label?: string;
2351
+ /** Whether the picker is disabled. */
2352
+ isDisabled?: boolean;
2353
+ }
2354
+
2355
+ declare const ColorSwatchPicker: React.ForwardRefExoticComponent<ColorSwatchPickerProps & React.RefAttributes<HTMLDivElement>>;
2356
+
2194
2357
  /**
2195
2358
  * A hook that creates an IntersectionObserver and observes a target element.
2196
2359
  *
@@ -2527,4 +2690,4 @@ interface DynamicListOptions<T> extends ListOptions<T> {
2527
2690
  }
2528
2691
  declare function useDynamicListData<T>(options: DynamicListOptions<T>): ListData<T>;
2529
2692
 
2530
- 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, useDynamicListData, useI18n, useImage, useIntersectionObserver, useIsFirstRender, useLocalStorage, useMutationObserver, usePortalContainer, useResizeObserver, useTextSelection, useUndoRedo, useUserPreferences };
2693
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, ActionButton, type ActionButtonProps, ActionGroup, ActionGroupItem, type ActionGroupProps, 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, ColorSwatchPicker, type ColorSwatchPickerProps, 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, GridList, type GridListProps, 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 };