@sproutsocial/seeds-react-menu 1.2.0 → 1.2.2

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
@@ -6,7 +6,7 @@ import * as _sproutsocial_seeds_react_box from '@sproutsocial/seeds-react-box';
6
6
  import { TypeBoxProps } from '@sproutsocial/seeds-react-box';
7
7
  export { TypeBoxProps as TypeMenuFooterProps } from '@sproutsocial/seeds-react-box';
8
8
  import * as React$1 from 'react';
9
- import React__default, { ReactNode } from 'react';
9
+ import React__default from 'react';
10
10
  import { TypePopoutProps } from '@sproutsocial/seeds-react-popout';
11
11
  import { TypeTokenInputProps, TypeTokenSpec } from '@sproutsocial/seeds-react-token-input';
12
12
  import * as _sproutsocial_seeds_react_text from '@sproutsocial/seeds-react-text';
@@ -34,9 +34,9 @@ interface TypeMenuGroupBaseProps extends TypeMenuGroupStyledProps, Omit<React.Co
34
34
  type TypeMenuGroupProps<I extends TypeMenuItemProps = TypeMenuItemProps> = TypeMenuGroupBaseProps & TypeChildrenOrItems<I>;
35
35
 
36
36
  /**
37
- * @link https://seeds.sproutsocial.com/components/menu-group/
37
+ * @link https://seeds.sproutsocial.com/components/seeds-react-menu/#menugroup
38
38
  *
39
- * @description MenuGroup is used to group lists of {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/MenuItem | MenuItems}.
39
+ * @description MenuGroup is used to group lists of {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menuitem MenuItems}.
40
40
  *
41
41
  * @example
42
42
  * <ActionMenu>
@@ -50,7 +50,8 @@ type TypeMenuGroupProps<I extends TypeMenuItemProps = TypeMenuItemProps> = TypeM
50
50
  * </MenuContent>
51
51
  * </ActionMenu>
52
52
  *
53
- * @see {@link https://seeds.sproutsocial.com/components/menu-item/ | MenuItem}
53
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menuitem MenuItem}
54
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menucontent MenuContent}
54
55
  */
55
56
  declare const MenuGroup: {
56
57
  <I extends TypeMenuItemProps = TypeMenuItemProps>({ titleAs, children: childrenProp, title, color, isSingleSelect, id, menuItems, MenuItemComponent, ...rest }: TypeMenuGroupProps<I>): react_jsx_runtime.JSX.Element | null;
@@ -66,8 +67,11 @@ interface TypeDownshiftComboboxProps extends Partial<UseComboboxProps<TypeIntern
66
67
  interface TypeDownshiftSelectProps extends Partial<UseSelectProps<TypeInternalItemProps>> {
67
68
  }
68
69
  interface TypeDownshiftMultiSelectProps extends Partial<Omit<UseMultipleSelectionProps<TypeInternalItemProps>, "stateReducer" | "onStateChange" | "getA11yStatusMessage">> {
70
+ /** Optional override to the built-in getA11yStatusMessage function for multiple selection*/
69
71
  getA11yMultiStatusMessage?: UseMultipleSelectionProps<TypeInternalItemProps>["getA11yStatusMessage"];
72
+ /** Optional override to the built-in onStateChange function for multiple selection*/
70
73
  onMultiSelectStateChange?: UseMultipleSelectionProps<TypeInternalItemProps>["onStateChange"];
74
+ /** Optional override to the built-in stateReducer function for multiple selection*/
71
75
  multiSelectStateReducer?: UseMultipleSelectionProps<TypeInternalItemProps>["stateReducer"];
72
76
  }
73
77
  interface TypeDownshiftComboboxReturnValue extends Partial<UseComboboxReturnValue<TypeInternalItemProps>> {
@@ -122,7 +126,7 @@ interface TypeMenuProviderProps {
122
126
  menuContext: TypeMenuContext;
123
127
  }
124
128
  interface TypeMenuToggleContext extends TypeMenuContext {
125
- ref?: (arg0: React__default.ElementRef<any> | HTMLElement) => void;
129
+ ref?: React__default.RefObject<any> | ((arg0: React__default.ElementRef<any> | HTMLElement) => void);
126
130
  toggle?: () => void;
127
131
  show?: () => void;
128
132
  hide?: () => void;
@@ -175,8 +179,14 @@ declare const MenuContentProvider: ({ children, menuContext, }: TypeMenuProvider
175
179
  declare const useMenuContentContext: () => TypeMenuContext;
176
180
 
177
181
  interface TypeMenuRootOwnProps {
182
+ /** The element that is or contains an element that will toggle the menu when clicked.
183
+ * May contain labels, buttons, inputs or other content as needed. */
178
184
  menuToggleElement: React__default.ReactElement<any>;
185
+ /** Props to pass through to the underlying Popout.
186
+ * Any Popout prop is valid except those explicitly omitted. */
179
187
  popoutProps?: Partial<Omit<TypePopoutProps, "isOpen" | "setIsOpen" | "content" | "children">>;
188
+ /** The width of the Popout content.
189
+ * Defaults to 200px or the width of the toggle element, whichever is greater.*/
180
190
  width?: TypePopoutProps["width"];
181
191
  }
182
192
  interface TypeMenuRootProps extends Partial<TypeMenuContextProps>, Pick<TypeMenuProviderProps, "children">, TypeMenuRootOwnProps {
@@ -189,12 +199,9 @@ interface TypeMenuPopoutProps extends Pick<Partial<TypeMenuContextProps>, "openM
189
199
  }
190
200
  declare const MenuPopout: ({ content, width, isOpen, openMenu, closeMenu, focusLockProps, ...popoutProps }: TypeMenuPopoutProps) => react_jsx_runtime.JSX.Element;
191
201
  /**
192
- * @link https://seeds.sproutsocial.com/components/menu-root/
193
- *
194
- * @description MenuRoot is a utility component used to handle {@link https://github.com/sproutsocial/seeds/blob/dev/seeds-react/seeds-react-menu/src/MenuContext.tsx | MenuContext}. This component should rarely, if ever, be used directly unless building a custom menu type.
202
+ * @description MenuRoot is a utility component used to handle React Context for our Menus. This component should rarely, if ever, be used directly unless building a custom menu type.
195
203
  */
196
204
  declare const MenuRoot: ({ children, menuToggleElement, popoutProps: { placement, focusLockProps, ...popoutProps }, width, ...contextProps }: TypeMenuRootProps) => react_jsx_runtime.JSX.Element;
197
- declare const MenuRootNoPopout: ({ children, menuToggleElement, ...contextProps }: TypeMenuRootProps) => react_jsx_runtime.JSX.Element;
198
205
 
199
206
  interface TypeInternalItemProps<Item = TypeMenuItemProps> {
200
207
  id: string;
@@ -204,20 +211,28 @@ interface TypeInternalItemProps<Item = TypeMenuItemProps> {
204
211
  menuGroupProps?: TypeMenuGroupBaseProps;
205
212
  }
206
213
  interface TypeHigherOrderComponentProps extends TypeMenuRootOwnProps {
214
+ /** Overrides the default MenuRoot component. Only necessary for specialized use cases.*/
207
215
  MenuRootComponent?: React.ComponentType<TypeMenuRootProps>;
208
216
  }
209
- type TypeChildrenOrItems<I extends TypeMenuItemProps = TypeMenuItemProps> = {
210
- /** Allows menu items to be passed in as children. Cannot be used with the items prop.*/
211
- children: TypeMenuRootProps["children"];
217
+ type TypeBaseChildrenOrItems<I extends TypeMenuItemProps = TypeMenuItemProps> = {
218
+ /** Allows menu items to be passed in as children. Cannot be used with the menuItems prop.*/
219
+ children?: TypeNotEmptyChildren;
220
+ /** Allows menu items to be passed in as objects. Cannot be used with the children prop.
221
+ * The type of each menu item, I, must be or extend TypeMenuItemProps. */
222
+ menuItems?: I[];
223
+ /** Allows a custom MenuItem component to be used when rendering using the menuItems prop.
224
+ * MenuItemComponent's prop type must match the type of the menuItems, I. */
225
+ MenuItemComponent?: React.ComponentType<I>;
226
+ };
227
+ type TypeChildrenOrItems<I extends TypeMenuItemProps = TypeMenuItemProps> = TypeBaseChildrenOrItems<I> & ({
228
+ children: TypeNotEmptyChildren;
212
229
  menuItems?: never;
213
230
  MenuItemComponent?: never;
214
231
  } | {
215
232
  children?: never;
216
- /** Allows menu items to be passed in as objects. Cannot be used with the children prop.*/
217
233
  menuItems: I[];
218
- /** Allows a custom MenuItem component to be used when rendering using the items prop.*/
219
234
  MenuItemComponent?: React.ComponentType<I>;
220
- };
235
+ });
221
236
  type TypeNotEmptyChildren = React.ReactChild | React.ReactFragment | React.ReactPortal;
222
237
  type TypeInputEventListeners = "onKeyDown" | "onChange" | "onInput" | "onBlur" | "onClick" | "refKey";
223
238
  type TypeDownshiftMergedInputProps<B> = Pick<UseComboboxGetInputPropsOptions, TypeInputEventListeners> & Omit<Partial<B>, TypeInputEventListeners>;
@@ -265,11 +280,13 @@ interface TypeMenuHeaderProps extends Omit<React$1.ComponentPropsWithoutRef<"div
265
280
  }
266
281
 
267
282
  /**
268
- * @link https://seeds.sproutsocial.com/components/menu-header/
283
+ * @link https://seeds.sproutsocial.com/components/seeds-react-menu/#menuheader
269
284
  *
270
285
  * @description MenuHeader is a container used to hold header content within a Menu.
271
286
  *
272
- * @see {@link https://seeds.sproutsocial.com/components/menu-footer/ | MenuFooter}
287
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menufooter MenuFooter}
288
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menusearchinput MenuSearchInput}
289
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menusearchtokeninput MenuSearchTokenInput}
273
290
  */
274
291
  declare const MenuHeader: ({ children, title, leftAction, rightAction, ...rest }: TypeMenuHeaderProps) => react_jsx_runtime.JSX.Element;
275
292
 
@@ -278,9 +295,9 @@ type TypeMenuContentProps<I extends TypeMenuItemProps = TypeMenuItemProps> = Omi
278
295
  } & TypeChildrenOrItems<I>;
279
296
 
280
297
  /**
281
- * @link https://seeds.sproutsocial.com/components/menu-content/
298
+ * @link https://seeds.sproutsocial.com/components/seeds-react-menu/#menucontent
282
299
  *
283
- * @description MenuContent is used to contain lists or grouped lists of {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/MenuItem | MenuItems}.
300
+ * @description MenuContent is used to contain lists or grouped lists of {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menuitem MenuItems}.
284
301
  *
285
302
  * @example
286
303
  * <ActionMenu>
@@ -296,8 +313,8 @@ type TypeMenuContentProps<I extends TypeMenuItemProps = TypeMenuItemProps> = Omi
296
313
  * <MenuFooter>Footer</MenuFooter>
297
314
  * </ActionMenu>
298
315
  *
299
- * @see {@link https://seeds.sproutsocial.com/components/menu-item/ | MenuItem}
300
- * @see {@link https://seeds.sproutsocial.com/components/menu-group/ | MenuGroup}
316
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menuitem MenuItem}
317
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menugroup MenuGroup}
301
318
  */
302
319
  declare const MenuContent: {
303
320
  <I extends TypeMenuItemProps = TypeMenuItemProps>({ id, children: childrenProp, menuItems, MenuItemComponent, onKeyDown, innerRef, ...rest }: TypeMenuContentProps<I>): react_jsx_runtime.JSX.Element | null;
@@ -305,54 +322,87 @@ declare const MenuContent: {
305
322
  };
306
323
 
307
324
  /**
308
- * @link https://seeds.sproutsocial.com/components/menu-footer/
325
+ * @link https://seeds.sproutsocial.com/components/seeds-react-menu/#menufooter
309
326
  *
310
327
  * @description MenuFooter is a container used to hold footer content within a Menu.
311
328
  *
312
- * @see {@link https://seeds.sproutsocial.com/components/menu-header/ | MenuHeader}
329
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menuheader MenuHeader}
313
330
  */
314
331
  declare const MenuFooter: ({ children, ...rest }: TypeBoxProps) => react_jsx_runtime.JSX.Element;
315
332
 
316
- declare const MenuLabel: ({ children, ...rest }: Partial<TypeLabelProps>) => react_jsx_runtime.JSX.Element;
333
+ interface TypeMenuLabelProps extends Omit<TypeLabelProps, "htmlFor"> {
334
+ children: React__default.ReactNode;
335
+ /** Whether making a selection in the associated menu is required. */
336
+ required?: boolean;
337
+ /** ID of the associated form element. This prop is never valid to pass into MenuLabel
338
+ * because MenuLabel passes its own htmlFor prop to the underlying Label component.*/
339
+ htmlFor?: never;
340
+ }
341
+ /**
342
+ * @link https://seeds.sproutsocial.com/components/seeds-react-menu/#menulabel
343
+ *
344
+ * @description MenuLabel extends Label to create an accessible label for a Menu's toggle element.
345
+ * A MenuLabel will automatically be associated with the corresponding menuToggleElement,
346
+ * so an `htmlFor` prop is not necessary or allowed.
347
+ *
348
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menutogglebutton MenuToggleButton}
349
+ * @see {@link https://seeds.sproutsocial.com/components/label/ Label}
350
+ */
351
+ declare const MenuLabel: ({ children, required, ...rest }: TypeMenuLabelProps) => react_jsx_runtime.JSX.Element;
317
352
 
318
- interface TypeMenuToggleButtonProps extends Partial<TypeButtonProps> {
319
- children: ReactNode;
353
+ interface TypeMenuToggleButtonProps extends TypeButtonProps {
320
354
  }
321
- declare const MenuToggleButton: ({ children, ...rest }: TypeMenuToggleButtonProps) => react_jsx_runtime.JSX.Element;
355
+ /**
356
+ * @link https://seeds.sproutsocial.com/components/seeds-react-menu/#menutogglebutton
357
+ * @param props - MenuToggleButton accepts all the same props as Button.
358
+ * @description MenuToggleButton extends the Button component to create a toggle for a menu.
359
+ * @see {@link https://seeds.sproutsocial.com/components/button/ Button}
360
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menulabel MenuLabel}
361
+ */
362
+ declare const MenuToggleButton: (props: TypeMenuToggleButtonProps) => react_jsx_runtime.JSX.Element;
322
363
 
323
- type TypeGetIsItemVisibleFn = (item: TypeMenuContext["items"][number], inputValue: string) => boolean;
364
+ type TypeGetIsItemVisibleFn = (item: TypeInternalItemProps, inputValue: string) => boolean;
324
365
 
325
366
  interface TypeMenuSearchInputProps extends TypeInputProps {
367
+ /** A function that can be passed to override the default filtering logic */
326
368
  getIsItemVisible?: TypeGetIsItemVisibleFn;
327
369
  }
328
370
  /**
329
- * <input
330
- * aria-activedescendant=""
331
- * aria-autocomplete="list"
332
- * aria-controls="downshift-:r1:-menu"
333
- * aria-expanded="true"
334
- * />
335
- */
336
- /**
337
- * @link https://seeds.sproutsocial.com/components/menu-header/
371
+ * @link https://seeds.sproutsocial.com/components/seeds-react-menu/#menusearchinput
338
372
  *
339
373
  * @description MenuSearchInput is search input that can be added to the MenuHeader to filter the items.
374
+ *
375
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menuheader MenuHeader}
376
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menusearchtokeninput MenuSearchTokenInput}
340
377
  */
341
378
  declare const MenuSearchInput: ({ getIsItemVisible, inputProps, ...restInputProps }: TypeMenuSearchInputProps) => react_jsx_runtime.JSX.Element;
342
379
 
343
380
  interface TypeMenuTokenInputProps extends TypeTokenInputProps {
344
- getTokenProps?: (itemId: TypeInternalItemProps["id"]) => Partial<TypeTokenSpec>;
381
+ /** A function that can be passed to override the default token props */
382
+ getTokenProps?: (itemId: string) => Partial<TypeTokenSpec>;
383
+ /** Specify the menu context to use. MenuToggleContext is the default.
384
+ * This prop is only needed for specialized use cases. */
345
385
  MenuContext?: typeof MenuToggleContext | typeof MenuContentContext;
346
386
  }
387
+ /**
388
+ * @description MenuTokenInput is the basis of the MenuSearchTokenInput and AutocompleteTokenInput components
389
+ *
390
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menusearchinput MenuSearchInput}
391
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menusearchtokeninput MenuSearchTokenInput}
392
+ */
347
393
  declare const MenuTokenInput: ({ inputProps, getTokenProps, onKeyDown, MenuContext, ...tokenInputProps }: TypeMenuTokenInputProps) => react_jsx_runtime.JSX.Element;
348
394
 
349
395
  interface TypeMenuSearchTokenInputProps extends TypeMenuTokenInputProps {
396
+ /** A function that can be passed to override the default filtering logic */
350
397
  getIsItemVisible?: TypeGetIsItemVisibleFn;
351
398
  }
352
399
  /**
353
- * @link https://seeds.sproutsocial.com/components/menu-search-token-input/
400
+ * @link https://seeds.sproutsocial.com/components/seeds-react-menu/#menusearchtokeninput
401
+ *
402
+ * @description MenuSearchTokenInput is a token input that can be added to the MenuHeader to filter the items.
354
403
  *
355
- * @description MenuSearchTokenInput is search token input that can be added to the MenuHeader to filter the items.
404
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menuheader MenuHeader}
405
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menusearchinput MenuSearchInput}
356
406
  */
357
407
  declare const MenuSearchTokenInput: ({ getIsItemVisible, getTokenProps, onChange, inputProps: { value: inputPropsValue, ...inputProps }, value, ...tokenInputProps }: TypeMenuSearchTokenInputProps) => react_jsx_runtime.JSX.Element;
358
408
 
@@ -367,8 +417,8 @@ type TypeActionMenuProps<I extends TypeMenuItemProps = TypeMenuItemProps> = Type
367
417
  * @description An ActionMenu contains a list of clickable items like buttons or links. ActionMenus do not hold a selection.
368
418
  *
369
419
  * **To select menu items:**
370
- * @see {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/SingleSelectMenu | SingleSelectMenu}
371
- * @see {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/MultiSelectMenu | MultiSelectMenu}
420
+ * @see {@link https://seeds.sproutsocial.com/components/single-select-menu SingleSelectMenu}
421
+ * @see {@link https://seeds.sproutsocial.com/components/multi-select-menu MultiSelectMenu}
372
422
  */
373
423
  declare const ActionMenu: <I extends TypeMenuItemProps = TypeMenuItemProps>({ children: childrenProp, menuItems, MenuItemComponent, stateReducer: externalStateReducer, MenuRootComponent, ...useSelectProps }: TypeActionMenuProps<I>) => react_jsx_runtime.JSX.Element;
374
424
 
@@ -377,12 +427,13 @@ interface TypeSingleSelectMenuBaseProps extends TypeHigherOrderComponentProps, T
377
427
  type TypeSingleSelectMenuProps<I extends TypeMenuItemProps = TypeMenuItemProps> = TypeSingleSelectMenuBaseProps & TypeChildrenOrItems<I>;
378
428
 
379
429
  /**
380
- * @link https://seeds.sproutsocial.com/components/singleselect-menu/
430
+ * @link https://seeds.sproutsocial.com/components/single-select-menu/
381
431
  *
382
- * @description A SingleSelectMenu allows a single selection of a {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/MenuItem | MenuItem} from a list or groups or lists.
432
+ * @description A SingleSelectMenu allows a single selection of a {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menuitem MenuItem} from a list or groups or lists.
383
433
  *
384
- * **To trigger actions from a menu:**
385
- * @see {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/ActionMenu | ActionMenu}
434
+ * @see {@link https://seeds.sproutsocial.com/components/action-menu/ ActionMenu} for triggering actions from a menu
435
+ * @see {@link https://seeds.sproutsocial.com/components/multi-select-menu/ MultiSelectMenu} for selecting multiple items
436
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menugroup MenuGroup}'s isSingleSelect prop to create a single select group within a MultiSelectMenu
386
437
  */
387
438
  declare const SingleSelectMenu: <I extends TypeMenuItemProps = TypeMenuItemProps>({ children: childrenProp, stateReducer: externalStateReducer, menuItems, MenuItemComponent, MenuRootComponent, ...useSelectProps }: TypeSingleSelectMenuProps<I>) => react_jsx_runtime.JSX.Element;
388
439
 
@@ -391,11 +442,12 @@ interface TypeMultiSelectMenuBaseProps extends TypeHigherOrderComponentProps, Ty
391
442
  type TypeMultiSelectMenuProps<I extends TypeMenuItemProps = TypeMenuItemProps> = TypeMultiSelectMenuBaseProps & TypeChildrenOrItems<I>;
392
443
 
393
444
  /**
394
- * @link https://seeds.sproutsocial.com/components/multiselect-menu/
445
+ * @link https://seeds.sproutsocial.com/components/multi-select-menu/
395
446
  *
396
- * @description A MultiSelectMenu allows multiple {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/MenuItem | MenuItems} to be selected from a list or groups of lists.
447
+ * @description A MultiSelectMenu allows multiple {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menuitem MenuItems} to be selected from a list or groups of lists.
397
448
  *
398
- * @see {@link https://seeds.sproutsocial.com/components/menu-group/ | MenuGroup}
449
+ * @see {@link https://seeds.sproutsocial.com/components/single-select-menu/ SingleSelectMenu}
450
+ * @see {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menugroup MenuGroup}
399
451
  */
400
452
  declare const MultiSelectMenu: <I extends TypeMenuItemProps = TypeMenuItemProps>({ children: childrenProp, menuItems, MenuItemComponent, onSelectedItemChange: externalOnSelectedItemChange, stateReducer: externalStateReducer, MenuRootComponent, getA11yMultiStatusMessage, onMultiSelectStateChange, multiSelectStateReducer, ...useSelectProps }: TypeMultiSelectMenuProps<I>) => react_jsx_runtime.JSX.Element;
401
453
 
@@ -415,29 +467,34 @@ declare const SubmenuItem: {
415
467
  interface TypeListboxToggleButtonProps extends TypeMenuToggleButtonProps {
416
468
  invalid?: boolean;
417
469
  }
418
- declare const StyledListboxToggleButton: styled_components.StyledComponent<({ children, ...rest }: TypeMenuToggleButtonProps) => react_jsx_runtime.JSX.Element, styled_components.DefaultTheme, TypeListboxToggleButtonProps, never>;
470
+ declare const StyledListboxToggleButton: styled_components.StyledComponent<(props: TypeMenuToggleButtonProps) => react_jsx_runtime.JSX.Element, styled_components.DefaultTheme, TypeListboxToggleButtonProps, never>;
419
471
  interface TypeStyledChevronProps {
420
472
  $isOpen?: boolean;
421
473
  invalid?: boolean;
422
474
  }
423
475
  declare const ListboxToggleButton: ({ children, ...buttonProps }: TypeListboxToggleButtonProps) => react_jsx_runtime.JSX.Element;
424
476
 
425
- type TypeSingleAutocompleteProps<I extends TypeMenuItemProps = TypeMenuItemProps> = TypeHigherOrderComponentProps & TypeChildrenOrItems<I> & TypeDownshiftComboboxProps & {
477
+ type TypeBaseAutocompleteProps = TypeHigherOrderComponentProps & TypeDownshiftComboboxProps & {
478
+ /** A function that can be passed to override the default filtering logic */
426
479
  getIsItemVisible?: TypeGetIsItemVisibleFn;
480
+ /** Set multiSelect to true to allow multiple selections.
481
+ * Default: false*/
482
+ multiSelect?: boolean;
427
483
  };
428
- type TypeMultiAutocompleteProps<I extends TypeMenuItemProps = TypeMenuItemProps> = TypeSingleAutocompleteProps<I> & TypeDownshiftMultiSelectProps & {
429
- showSelectedItemsInDropdown?: boolean;
430
- };
431
- type TypeAutocompleteProps<I extends TypeMenuItemProps = TypeMenuItemProps> = (TypeSingleAutocompleteProps<I> & {
484
+ type TypeSingleAutocompleteProps<I extends TypeMenuItemProps = TypeMenuItemProps> = TypeBaseAutocompleteProps & {
432
485
  multiSelect?: false;
433
- }) | (TypeMultiAutocompleteProps<I> & {
434
- multiSelect: true;
435
- });
486
+ } & TypeChildrenOrItems<I>;
487
+ type TypeMultiAutocompleteProps<I extends TypeMenuItemProps = TypeMenuItemProps> = TypeBaseAutocompleteProps & TypeDownshiftMultiSelectProps & {
488
+ multiSelect?: true;
489
+ /** Determines whether a multiselect autocomplete will display selected items in the dropdown */
490
+ showSelectedItemsInDropdown?: boolean;
491
+ } & TypeChildrenOrItems<I>;
492
+ type TypeAutocompleteProps<I extends TypeMenuItemProps = TypeMenuItemProps> = TypeSingleAutocompleteProps<I> | TypeMultiAutocompleteProps<I>;
436
493
 
437
494
  /**
438
495
  * @link https://seeds.sproutsocial.com/components/autocomplete/
439
496
  *
440
- * @description A Autocomplete allows selecting a {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/MenuItem | MenuItems} to be selected from a list or groups of lists to populate an input.
497
+ * @description A Autocomplete allows selecting {@link https://seeds.sproutsocial.com/components/seeds-react-menu/#menuitem MenuItems} from a list or groups of lists to populate an input.
441
498
  *
442
499
  */
443
500
  declare const Autocomplete: <I extends TypeMenuItemProps = TypeMenuItemProps>({ multiSelect, ...rest }: TypeAutocompleteProps<I>) => react_jsx_runtime.JSX.Element;
@@ -466,10 +523,13 @@ interface TypeNestedMenuHeaderProps extends TypeMenuHeaderProps {
466
523
  backArrowLabel?: string;
467
524
  }
468
525
  interface TypeNestedMenuItemProps extends TypeMenuItemProps {
526
+ /** The id of the menu to be displayed when this item is selected. */
469
527
  childMenuId?: string;
470
528
  }
471
529
  interface TypeNestedMenuProps<I extends TypeMenuItemProps = TypeNestedMenuItemProps> extends Omit<TypeActionMenuBaseProps, "MenuRootComponent"> {
530
+ /** The id of the menu to display when the NestedMenu is opened. */
472
531
  initialMenuId: string;
532
+ /** An optional callback to fire when the back button is clicked.*/
473
533
  onBackButtonClick?: (menuId: string) => void;
474
534
  /** Sets the default localized label for the back arrow in all child menus.
475
535
  * This label can be overridden by including backArrowLabel in a menu's menuHeaderProps. */
@@ -553,4 +613,4 @@ declare const useMenuChildren: <I extends TypeMenuItemProps = TypeMenuItemProps>
553
613
  declare const useSelectStateReducer: Required<UseSelectProps<TypeInternalItemProps>>["stateReducer"];
554
614
  declare const useSelectStateReducerForMulti: Required<UseSelectProps<TypeInternalItemProps>>["stateReducer"];
555
615
 
556
- export { ActionMenu, Autocomplete, AutocompleteInput, AutocompleteSelect, AutocompleteTokenInput, CustomPopoutContent, INPUT_TYPES, type InputType, ListboxToggleButton, MenuContent, MenuContentContext, MenuContentProvider, MenuFooter, MenuGroup, MenuHeader, MenuItem, MenuItemAction, MenuItemActionLeft, MenuItemActionRight, MenuItemContainer, MenuItemRow, MenuItemText, MenuLabel, MenuPopout, MenuRoot, MenuRootNoPopout, MenuSearchInput, MenuSearchTokenInput, MenuToggleButton, MenuToggleContext, MenuToggleProvider, MenuTokenInput, MultiSelectMenu, NestedMenu, NestedMenuContent, NestedMenuContext, NestedMenuHeader, NestedMenuItem, NestedMenuProvider, SingleSelectMenu, StyledListboxToggleButton, StyledMenuGroup, StyledMenuGroupUl, StyledMenuItem, StyledTitle, SubmenuItem, type TypeActionMenuBaseProps, type TypeActionMenuProps, type TypeAutocompleteInputProps, type TypeAutocompleteProps, type TypeAutocompleteTokenInputProps, type TypeChildrenOrItems, type TypeDownshiftComboboxProps, type TypeDownshiftComboboxReturnValue, type TypeDownshiftMergedInputProps, type TypeDownshiftMultiSelectProps, type TypeDownshiftMultiSelectReturnValue, type TypeDownshiftSelectProps, type TypeDownshiftSelectReturnValue, type TypeHigherOrderComponentProps, type TypeInternalItemProps, type TypeItemElement, type TypeListboxToggleButtonProps, type TypeMapMenuItemsProps, type TypeMenuChildren, type TypeMenuContentElement, type TypeMenuContentProps, type TypeMenuContext, type TypeMenuContextBaseProps, type TypeMenuContextProps, type TypeMenuGroupBaseProps, type TypeMenuGroupElement, type TypeMenuGroupProps, type TypeMenuGroupStyledProps, type TypeMenuHeaderProps, type TypeMenuItemProps, type TypeMenuItemStyledProps, type TypeMenuPopoutProps, type TypeMenuProviderProps, type TypeMenuRootOwnProps, type TypeMenuRootProps, type TypeMenuSearchInputProps, type TypeMenuSearchTokenInputProps, type TypeMenuToggleButtonProps, type TypeMenuToggleContext, type TypeMenuToggleProviderProps, type TypeMenuTokenInputProps, type TypeMultiAutocompleteProps, type TypeMultiSelectMenuBaseProps, type TypeMultiSelectMenuProps, type TypeNestedMenuContext, type TypeNestedMenuHeaderProps, type TypeNestedMenuItemProps, type TypeNestedMenuMapProps, type TypeNestedMenuProps, type TypeNestedMenuProviderProps, type TypeNotEmptyChildren, type TypeSingleAutocompleteProps, type TypeSingleSelectMenuBaseProps, type TypeSingleSelectMenuProps, type TypeStyledChevronProps, type TypeSubmenuItemProps, type TypeSubmenuValidMenuComponentProps, checkIfItemSelected, defaultMenuContext, getChildrenFromMenuItems, getSelectedItemIds, mapMenuItems, useMenu, useMenuChildren, useMenuContentContext, useMenuToggleContext, useNestedMenuContext, useSelectStateReducer, useSelectStateReducerForMulti };
616
+ export { ActionMenu, Autocomplete, AutocompleteInput, AutocompleteSelect, AutocompleteTokenInput, CustomPopoutContent, INPUT_TYPES, type InputType, ListboxToggleButton, MenuContent, MenuContentContext, MenuContentProvider, MenuFooter, MenuGroup, MenuHeader, MenuItem, MenuItemAction, MenuItemActionLeft, MenuItemActionRight, MenuItemContainer, MenuItemRow, MenuItemText, MenuLabel, MenuPopout, MenuRoot, MenuSearchInput, MenuSearchTokenInput, MenuToggleButton, MenuToggleContext, MenuToggleProvider, MenuTokenInput, MultiSelectMenu, NestedMenu, NestedMenuContent, NestedMenuContext, NestedMenuHeader, NestedMenuItem, NestedMenuProvider, SingleSelectMenu, StyledListboxToggleButton, StyledMenuGroup, StyledMenuGroupUl, StyledMenuItem, StyledTitle, SubmenuItem, type TypeActionMenuBaseProps, type TypeActionMenuProps, type TypeAutocompleteInputProps, type TypeAutocompleteProps, type TypeAutocompleteTokenInputProps, type TypeBaseAutocompleteProps, type TypeChildrenOrItems, type TypeDownshiftComboboxProps, type TypeDownshiftComboboxReturnValue, type TypeDownshiftMergedInputProps, type TypeDownshiftMultiSelectProps, type TypeDownshiftMultiSelectReturnValue, type TypeDownshiftSelectProps, type TypeDownshiftSelectReturnValue, type TypeHigherOrderComponentProps, type TypeInternalItemProps, type TypeItemElement, type TypeListboxToggleButtonProps, type TypeMapMenuItemsProps, type TypeMenuChildren, type TypeMenuContentElement, type TypeMenuContentProps, type TypeMenuContext, type TypeMenuContextBaseProps, type TypeMenuContextProps, type TypeMenuGroupBaseProps, type TypeMenuGroupElement, type TypeMenuGroupProps, type TypeMenuGroupStyledProps, type TypeMenuHeaderProps, type TypeMenuItemProps, type TypeMenuItemStyledProps, type TypeMenuLabelProps, type TypeMenuPopoutProps, type TypeMenuProviderProps, type TypeMenuRootOwnProps, type TypeMenuRootProps, type TypeMenuSearchInputProps, type TypeMenuSearchTokenInputProps, type TypeMenuToggleButtonProps, type TypeMenuToggleContext, type TypeMenuToggleProviderProps, type TypeMenuTokenInputProps, type TypeMultiAutocompleteProps, type TypeMultiSelectMenuBaseProps, type TypeMultiSelectMenuProps, type TypeNestedMenuContext, type TypeNestedMenuHeaderProps, type TypeNestedMenuItemProps, type TypeNestedMenuMapProps, type TypeNestedMenuProps, type TypeNestedMenuProviderProps, type TypeNotEmptyChildren, type TypeSingleAutocompleteProps, type TypeSingleSelectMenuBaseProps, type TypeSingleSelectMenuProps, type TypeStyledChevronProps, type TypeSubmenuItemProps, type TypeSubmenuValidMenuComponentProps, checkIfItemSelected, defaultMenuContext, getChildrenFromMenuItems, getSelectedItemIds, mapMenuItems, useMenu, useMenuChildren, useMenuContentContext, useMenuToggleContext, useNestedMenuContext, useSelectStateReducer, useSelectStateReducerForMulti };