@sproutsocial/seeds-react-menu 0.1.0 → 0.2.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.
Files changed (54) hide show
  1. package/.turbo/turbo-build.log +10 -10
  2. package/CHANGELOG.md +17 -1
  3. package/dist/esm/index.js +209 -198
  4. package/dist/esm/index.js.map +1 -1
  5. package/dist/index.d.mts +103 -37
  6. package/dist/index.d.ts +103 -37
  7. package/dist/index.js +239 -229
  8. package/dist/index.js.map +1 -1
  9. package/package.json +6 -5
  10. package/src/ActionMenu/ActionMenu.feature +9 -3
  11. package/src/ActionMenu/ActionMenu.tsx +75 -42
  12. package/src/ActionMenu/__tests__/ActionMenu.test.tsx +36 -42
  13. package/src/ActionMenu/__tests__/ActionMenu.typetest.tsx +13 -13
  14. package/src/MenuContent/MenuContent.tsx +31 -1
  15. package/src/MenuContent/MenuContentTypes.ts +2 -2
  16. package/src/MenuContent/styles.tsx +10 -6
  17. package/src/MenuFooter/MenuFooter.feature +1 -1
  18. package/src/MenuFooter/MenuFooter.tsx +8 -0
  19. package/src/MenuFooter/__tests__/MenuFooter.test.tsx +53 -26
  20. package/src/MenuFooter/styles.tsx +1 -1
  21. package/src/MenuGroup/MenuGroup.feature +14 -26
  22. package/src/MenuGroup/MenuGroup.tsx +21 -1
  23. package/src/MenuGroup/__tests__/MenuGroup.test.tsx +40 -6
  24. package/src/MenuGroup/styles.tsx +4 -3
  25. package/src/MenuHeader/MenuHeader.tsx +16 -5
  26. package/src/MenuHeader/__tests__/MenuHeader.test.tsx +50 -6
  27. package/src/MenuHeader/styles.tsx +21 -22
  28. package/src/MenuItem/MenuItem.feature +66 -26
  29. package/src/MenuItem/MenuItem.tsx +35 -20
  30. package/src/MenuItem/MenuItemTypes.ts +13 -1
  31. package/src/MenuItem/__tests__/MenuItem.test.tsx +431 -154
  32. package/src/MenuItem/__tests__/MenuItem.typetest.tsx +57 -38
  33. package/src/MenuItem/styles.tsx +42 -3
  34. package/src/{MenuItemSelectable/MenuItemSelectable.tsx → MenuItem/useOptionProps.tsx} +31 -54
  35. package/src/MenuRoot/MenuRoot.tsx +12 -17
  36. package/src/MenuRoot/__tests__/MenuRoot.test.tsx +3 -3
  37. package/src/MenuRoot/__tests__/MenuRoot.typetest.tsx +10 -10
  38. package/src/MultiSelectMenu/MultiSelectMenu.tsx +8 -1
  39. package/src/MultiSelectMenu/__tests__/MultiSelectMenu.test.tsx +19 -19
  40. package/src/MultiSelectMenu/__tests__/MultiSelectMenu.typetest.tsx +10 -10
  41. package/src/SingleSelectMenu/SingleSelectMenu.feature +11 -0
  42. package/src/SingleSelectMenu/SingleSelectMenu.tsx +9 -0
  43. package/src/SingleSelectMenu/__tests__/SingleSelectMenu.test.tsx +11 -14
  44. package/src/SingleSelectMenu/__tests__/SingleSelectMenu.typetest.tsx +14 -14
  45. package/src/__tests__/Menu.test.tsx +20 -16
  46. package/src/hooks/useItemsFromChildren.tsx +1 -4
  47. package/src/index.ts +0 -1
  48. package/src/menuTestingUtils.tsx +7 -4
  49. package/src/MenuItemSelectable/MenuItemSelectable.feature +0 -99
  50. package/src/MenuItemSelectable/MenuItemSelectableTypes.ts +0 -15
  51. package/src/MenuItemSelectable/__tests__/MenuItemSelectable.test.tsx +0 -303
  52. package/src/MenuItemSelectable/__tests__/MenuItemSelectable.typetest.tsx +0 -56
  53. package/src/MenuItemSelectable/index.ts +0 -5
  54. package/src/MenuItemSelectable/styles.tsx +0 -21
package/dist/index.d.mts CHANGED
@@ -5,6 +5,7 @@ import { TypeBorderSystemProps, TypeColorSystemProps, TypeFlexboxSystemProps, Ty
5
5
  import * as styled_components from 'styled-components';
6
6
  import * as React$1 from 'react';
7
7
  import React__default, { ReactNode } from 'react';
8
+ import { HTMLMotionProps } from 'motion/react';
8
9
  import { TypeBoxProps } from '@sproutsocial/seeds-react-box';
9
10
  export { TypeBoxProps as TypeMenuFooterProps } from '@sproutsocial/seeds-react-box';
10
11
  import * as _sproutsocial_seeds_react_text from '@sproutsocial/seeds-react-text';
@@ -34,20 +35,6 @@ type TypeNotEmptyChildren = React.ReactChild | React.ReactFragment | React.React
34
35
 
35
36
  interface TypeMenuItemStyledProps extends TypeBorderSystemProps, TypeColorSystemProps, TypeFlexboxSystemProps, TypeGridSystemProps, TypeLayoutSystemProps, TypePositionSystemProps, TypeSpaceSystemProps, TypeTypographySystemProps {
36
37
  }
37
- interface TypeMenuItemProps extends TypeMenuItemStyledProps, Omit<GetItemPropsOptions<TypeDefaultItemProps>, "as" | "item" | keyof TypeMenuItemStyledProps | keyof TypeDefaultItemProps>, Omit<TypeDefaultItemProps, "index"> {
38
- label?: string;
39
- children: React.ReactNode;
40
- disabled?: boolean;
41
- role?: TypeMenuItemRoles;
42
- $highlighted?: boolean;
43
- }
44
-
45
- declare const MenuItem: ({ id, children, role, label, onClick, onKeyDown, disabled, ref, color, ...props }: TypeMenuItemProps) => react_jsx_runtime.JSX.Element;
46
-
47
- declare const MenuItemContainer: styled_components.StyledComponent<"li", styled_components.DefaultTheme, {
48
- $highlighted: boolean;
49
- }, never>;
50
-
51
38
  declare const INPUT_TYPES: {
52
39
  readonly CHECKBOX: "checkbox";
53
40
  readonly RADIO: "radio";
@@ -55,30 +42,25 @@ declare const INPUT_TYPES: {
55
42
  readonly ICON: "icon";
56
43
  };
57
44
  type InputType = (typeof INPUT_TYPES)[keyof typeof INPUT_TYPES];
58
- interface TypeMenuItemSelectableProps extends TypeMenuItemProps {
45
+ interface TypeMenuItemProps extends TypeMenuItemStyledProps, Omit<GetItemPropsOptions<TypeDefaultItemProps>, "as" | "item" | keyof TypeMenuItemStyledProps | keyof TypeDefaultItemProps>, Omit<TypeDefaultItemProps, "index"> {
46
+ children: React.ReactNode;
47
+ disabled?: boolean;
48
+ role?: TypeMenuItemRoles;
49
+ $highlighted?: boolean;
59
50
  active?: boolean;
60
51
  inputType?: InputType;
61
- inputLabel?: string;
52
+ inputLabelId?: string;
62
53
  }
63
54
 
64
- /**
65
- * SelectionIndicator - handles logic for appropriate rendering of inputs
66
- * @returns Checkbox | Icon | Radio | Switch
67
- */
68
- declare const SelectionIndicator: ({ id, inputType, "aria-labelledby": labeledBy, selected, }: {
69
- id: string;
70
- "aria-labelledby": string;
71
- selected: boolean;
72
- inputType: InputType;
73
- }) => react_jsx_runtime.JSX.Element | null;
74
- /**
75
- * MenuItemSelectable - primitive with controlled input states
76
- */
77
- declare const MenuItemSelectable: ({ id, children, inputType, inputLabel, ...props }: TypeMenuItemSelectableProps) => react_jsx_runtime.JSX.Element;
55
+ declare const MenuItem: ({ id, children, onClick, onKeyDown, disabled, ref, href, color, ...props }: TypeMenuItemProps) => react_jsx_runtime.JSX.Element;
78
56
 
79
- declare const MenuItemSelectableRow: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
80
- declare const MenuItemSelectableAction: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
81
- declare const MenuItemSelectableText: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
57
+ declare const MenuItemContainer: styled_components.StyledComponent<"li", styled_components.DefaultTheme, {}, never>;
58
+ declare const StyledMenuItem: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
59
+ $highlighted: boolean;
60
+ }, never>;
61
+ declare const MenuItemRow: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
62
+ declare const MenuItemAction: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
63
+ declare const MenuItemText: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
82
64
 
83
65
  interface TypeMenuHeaderProps extends Omit<React$1.ComponentPropsWithoutRef<"div">, "color">, TypeStyledComponentsCommonProps, TypeBorderSystemProps, TypeColorSystemProps, TypeFlexboxSystemProps, TypeGridSystemProps, TypeLayoutSystemProps, TypeSpaceSystemProps, TypePositionSystemProps {
84
66
  title?: string;
@@ -86,14 +68,50 @@ interface TypeMenuHeaderProps extends Omit<React$1.ComponentPropsWithoutRef<"div
86
68
  rightAction?: React$1.ReactNode;
87
69
  }
88
70
 
71
+ /**
72
+ * @link https://seeds.sproutsocial.com/components/menu-header/
73
+ *
74
+ * @description MenuHeader is a container used to hold header content within a Menu.
75
+ *
76
+ * @see {@link https://seeds.sproutsocial.com/components/menu-footer/ | MenuFooter}
77
+ */
89
78
  declare const MenuHeader: ({ children, title, leftAction, rightAction, ...rest }: TypeMenuHeaderProps) => react_jsx_runtime.JSX.Element;
90
79
 
91
- interface TypeMenuContentProps extends React__default.ButtonHTMLAttributes<HTMLUListElement> {
80
+ interface TypeMenuContentProps extends HTMLMotionProps<"ul"> {
92
81
  children: ReactNode;
93
82
  }
94
83
 
84
+ /**
85
+ * @link https://seeds.sproutsocial.com/components/menu-content/
86
+ *
87
+ * @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}.
88
+ *
89
+ * @example
90
+ * <ActionMenu>
91
+ * <MenuHeader>Header</MenuHeader>
92
+ * <MenuContent>
93
+ * <MenuGroup>
94
+ * <MenuItem>Item 1</MenuItem>
95
+ * </MenuGroup>
96
+ * <MenuGroup>
97
+ * <MenuItem>Item 2</MenuItem>
98
+ * </MenuGroup>
99
+ * </MenuContent>
100
+ * <MenuFooter>Footer</MenuFooter>
101
+ * </ActionMenu>
102
+ *
103
+ * @see {@link https://seeds.sproutsocial.com/components/menu-item/ | MenuItem}
104
+ * @see {@link https://seeds.sproutsocial.com/components/menu-group/ | MenuGroup}
105
+ */
95
106
  declare const MenuContent: ({ id, children, ...rest }: TypeMenuContentProps) => react_jsx_runtime.JSX.Element;
96
107
 
108
+ /**
109
+ * @link https://seeds.sproutsocial.com/components/menu-footer/
110
+ *
111
+ * @description MenuFooter is a container used to hold footer content within a Menu.
112
+ *
113
+ * @see {@link https://seeds.sproutsocial.com/components/menu-header/ | MenuHeader}
114
+ */
97
115
  declare const MenuFooter: ({ children, ...rest }: TypeBoxProps) => react_jsx_runtime.JSX.Element;
98
116
 
99
117
  interface TypeMenuGroupStyledProps extends TypeBorderSystemProps, TypeColorSystemProps, TypeFlexboxSystemProps, TypeGridSystemProps, TypeLayoutSystemProps, TypePositionSystemProps, TypeSpaceSystemProps, TypeTypographySystemProps {
@@ -104,6 +122,25 @@ interface TypeMenuGroupProps extends TypeMenuGroupStyledProps, Omit<React.Compon
104
122
  titleAs?: string | React.ComponentType<any>;
105
123
  }
106
124
 
125
+ /**
126
+ * @link https://seeds.sproutsocial.com/components/menu-group/
127
+ *
128
+ * @description MenuGroup is used to group lists of {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/MenuItem | MenuItems}.
129
+ *
130
+ * @example
131
+ * <ActionMenu>
132
+ * <MenuContent>
133
+ * <MenuGroup title="Group 1">
134
+ * <MenuItem>Item 1</MenuItem>
135
+ * </MenuGroup>
136
+ * <MenuGroup title="Group 1">
137
+ * <MenuItem>Item 2</MenuItem>
138
+ * </MenuGroup>
139
+ * </MenuContent>
140
+ * </ActionMenu>
141
+ *
142
+ * @see {@link https://seeds.sproutsocial.com/components/menu-item/ | MenuItem}
143
+ */
107
144
  declare const MenuGroup: ({ titleAs, children, title, color, ...rest }: TypeMenuGroupProps) => react_jsx_runtime.JSX.Element;
108
145
 
109
146
  declare const StyledMenuGroup: styled_components.StyledComponent<"li", styled_components.DefaultTheme, TypeMenuGroupProps, never>;
@@ -145,13 +182,18 @@ declare const MenuProvider: ({ children, ...overrides }: TypeMenuProviderProps)
145
182
  declare const useMenuContext: () => TypeMenuContext;
146
183
 
147
184
  interface TypeMenuRootOwnProps {
148
- triggerElement: React__default.ReactElement<any>;
185
+ menuToggleElement: React__default.ReactElement<any>;
149
186
  popoutProps?: Partial<Omit<TypePopoutProps, "isOpen" | "setIsOpen" | "content" | "children">>;
150
187
  width?: TypePopoutProps["width"];
151
188
  }
152
189
  interface TypeMenuRootProps extends Partial<TypeMenuProviderProps>, TypeMenuRootOwnProps {
153
190
  }
154
- declare const MenuRoot: ({ children, triggerElement, popoutProps, width, ...contextProps }: TypeMenuRootProps) => react_jsx_runtime.JSX.Element;
191
+ /**
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.
195
+ */
196
+ declare const MenuRoot: ({ children, menuToggleElement, popoutProps, width, ...contextProps }: TypeMenuRootProps) => react_jsx_runtime.JSX.Element;
155
197
 
156
198
  declare const MenuLabel: ({ children, ...rest }: TypeTextProps) => react_jsx_runtime.JSX.Element;
157
199
 
@@ -164,18 +206,42 @@ type TypeInvalidMenuProps = "initialSelectedItem" | "defaultSelectedItem" | "sel
164
206
  interface TypeActionMenuProps extends TypeMenuRootOwnProps, Partial<Omit<UseSelectProps<TypeDefaultItemProps>, TypeInvalidMenuProps>> {
165
207
  children: TypeMenuRootProps["children"];
166
208
  }
209
+ /**
210
+ * @link https://seeds.sproutsocial.com/components/action-menu/
211
+ *
212
+ * @description An ActionMenu contains a list of clickable items like buttons or links. ActionMenus do not hold a selection.
213
+ *
214
+ * **To select menu items:**
215
+ * @see {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/SingleSelectMenu | SingleSelectMenu}
216
+ * @see {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/MultiSelectMenu | MultiSelectMenu}
217
+ */
167
218
  declare const ActionMenu: ({ children, stateReducer: externalStateReducer, ...useSelectProps }: TypeActionMenuProps) => react_jsx_runtime.JSX.Element;
168
219
 
169
220
  interface TypeSingleSelectMenuProps extends TypeMenuRootOwnProps, Partial<UseSelectProps<TypeDefaultItemProps>> {
170
221
  children: TypeMenuRootProps["children"];
171
222
  }
172
223
 
224
+ /**
225
+ * @link https://seeds.sproutsocial.com/components/singleselect-menu/
226
+ *
227
+ * @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.
228
+ *
229
+ * **To trigger actions from a menu:**
230
+ * @see {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/ActionMenu | ActionMenu}
231
+ */
173
232
  declare const SingleSelectMenu: ({ children, stateReducer: externalStateReducer, ...useSelectProps }: TypeSingleSelectMenuProps) => react_jsx_runtime.JSX.Element;
174
233
 
175
234
  interface TypeMultiSelectMenuProps extends TypeMenuRootOwnProps, TypeDownshiftMultiSelectProps {
176
235
  children: TypeMenuRootProps["children"];
177
236
  }
178
237
 
238
+ /**
239
+ * @link https://seeds.sproutsocial.com/components/multiselect-menu/
240
+ *
241
+ * @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.
242
+ *
243
+ * @see {@link https://seeds.sproutsocial.com/components/menu-group/ | MenuGroup}
244
+ */
179
245
  declare const MultiSelectMenu: ({ children, stateReducer: externalStateReducer, getA11yMultiStatusMessage, onMultiSelectStateChange, multiSelectStateReducer, ...useSelectProps }: TypeMultiSelectMenuProps) => react_jsx_runtime.JSX.Element;
180
246
 
181
247
  interface TypeUseItemsFromChildrenProps {
@@ -194,4 +260,4 @@ declare const defaultUseSelectProps: {
194
260
  isItemDisabled: (item: any) => boolean;
195
261
  };
196
262
 
197
- export { ActionMenu, INPUT_TYPES, type InputType, MenuContent, MenuContext, MenuFooter, MenuGroup, MenuHeader, MenuItem, MenuItemContainer, MenuItemSelectable, MenuItemSelectableAction, MenuItemSelectableRow, MenuItemSelectableText, MenuLabel, MenuProvider, MenuRoot, MenuToggleButton, MultiSelectMenu, SelectionIndicator, SingleSelectMenu, StyledMenuGroup, StyledMenuGroupUl, StyledTitle, type TypeActionMenuProps, type TypeDownshiftMultiSelectProps, type TypeMenuContentProps, type TypeMenuContext, type TypeMenuContextProps, type TypeMenuGroupProps, type TypeMenuGroupStyledProps, type TypeMenuHeaderProps, type TypeMenuItemProps, type TypeMenuItemSelectableProps, type TypeMenuItemStyledProps, type TypeMenuProviderProps, type TypeMenuRootOwnProps, type TypeMenuRootProps, type TypeMenuToggleButtonProps, type TypeSingleSelectMenuProps, type TypeUseItemsFromChildrenProps, defaultUseSelectProps, useItemsFromChildren, useMenu, useMenuContext, useSelectStateReducer };
263
+ export { ActionMenu, INPUT_TYPES, type InputType, MenuContent, MenuContext, MenuFooter, MenuGroup, MenuHeader, MenuItem, MenuItemAction, MenuItemContainer, MenuItemRow, MenuItemText, MenuLabel, MenuProvider, MenuRoot, MenuToggleButton, MultiSelectMenu, SingleSelectMenu, StyledMenuGroup, StyledMenuGroupUl, StyledMenuItem, StyledTitle, type TypeActionMenuProps, type TypeDownshiftMultiSelectProps, type TypeMenuContentProps, type TypeMenuContext, type TypeMenuContextProps, type TypeMenuGroupProps, type TypeMenuGroupStyledProps, type TypeMenuHeaderProps, type TypeMenuItemProps, type TypeMenuItemStyledProps, type TypeMenuProviderProps, type TypeMenuRootOwnProps, type TypeMenuRootProps, type TypeMenuToggleButtonProps, type TypeSingleSelectMenuProps, type TypeUseItemsFromChildrenProps, defaultUseSelectProps, useItemsFromChildren, useMenu, useMenuContext, useSelectStateReducer };
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import { TypeBorderSystemProps, TypeColorSystemProps, TypeFlexboxSystemProps, Ty
5
5
  import * as styled_components from 'styled-components';
6
6
  import * as React$1 from 'react';
7
7
  import React__default, { ReactNode } from 'react';
8
+ import { HTMLMotionProps } from 'motion/react';
8
9
  import { TypeBoxProps } from '@sproutsocial/seeds-react-box';
9
10
  export { TypeBoxProps as TypeMenuFooterProps } from '@sproutsocial/seeds-react-box';
10
11
  import * as _sproutsocial_seeds_react_text from '@sproutsocial/seeds-react-text';
@@ -34,20 +35,6 @@ type TypeNotEmptyChildren = React.ReactChild | React.ReactFragment | React.React
34
35
 
35
36
  interface TypeMenuItemStyledProps extends TypeBorderSystemProps, TypeColorSystemProps, TypeFlexboxSystemProps, TypeGridSystemProps, TypeLayoutSystemProps, TypePositionSystemProps, TypeSpaceSystemProps, TypeTypographySystemProps {
36
37
  }
37
- interface TypeMenuItemProps extends TypeMenuItemStyledProps, Omit<GetItemPropsOptions<TypeDefaultItemProps>, "as" | "item" | keyof TypeMenuItemStyledProps | keyof TypeDefaultItemProps>, Omit<TypeDefaultItemProps, "index"> {
38
- label?: string;
39
- children: React.ReactNode;
40
- disabled?: boolean;
41
- role?: TypeMenuItemRoles;
42
- $highlighted?: boolean;
43
- }
44
-
45
- declare const MenuItem: ({ id, children, role, label, onClick, onKeyDown, disabled, ref, color, ...props }: TypeMenuItemProps) => react_jsx_runtime.JSX.Element;
46
-
47
- declare const MenuItemContainer: styled_components.StyledComponent<"li", styled_components.DefaultTheme, {
48
- $highlighted: boolean;
49
- }, never>;
50
-
51
38
  declare const INPUT_TYPES: {
52
39
  readonly CHECKBOX: "checkbox";
53
40
  readonly RADIO: "radio";
@@ -55,30 +42,25 @@ declare const INPUT_TYPES: {
55
42
  readonly ICON: "icon";
56
43
  };
57
44
  type InputType = (typeof INPUT_TYPES)[keyof typeof INPUT_TYPES];
58
- interface TypeMenuItemSelectableProps extends TypeMenuItemProps {
45
+ interface TypeMenuItemProps extends TypeMenuItemStyledProps, Omit<GetItemPropsOptions<TypeDefaultItemProps>, "as" | "item" | keyof TypeMenuItemStyledProps | keyof TypeDefaultItemProps>, Omit<TypeDefaultItemProps, "index"> {
46
+ children: React.ReactNode;
47
+ disabled?: boolean;
48
+ role?: TypeMenuItemRoles;
49
+ $highlighted?: boolean;
59
50
  active?: boolean;
60
51
  inputType?: InputType;
61
- inputLabel?: string;
52
+ inputLabelId?: string;
62
53
  }
63
54
 
64
- /**
65
- * SelectionIndicator - handles logic for appropriate rendering of inputs
66
- * @returns Checkbox | Icon | Radio | Switch
67
- */
68
- declare const SelectionIndicator: ({ id, inputType, "aria-labelledby": labeledBy, selected, }: {
69
- id: string;
70
- "aria-labelledby": string;
71
- selected: boolean;
72
- inputType: InputType;
73
- }) => react_jsx_runtime.JSX.Element | null;
74
- /**
75
- * MenuItemSelectable - primitive with controlled input states
76
- */
77
- declare const MenuItemSelectable: ({ id, children, inputType, inputLabel, ...props }: TypeMenuItemSelectableProps) => react_jsx_runtime.JSX.Element;
55
+ declare const MenuItem: ({ id, children, onClick, onKeyDown, disabled, ref, href, color, ...props }: TypeMenuItemProps) => react_jsx_runtime.JSX.Element;
78
56
 
79
- declare const MenuItemSelectableRow: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
80
- declare const MenuItemSelectableAction: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
81
- declare const MenuItemSelectableText: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
57
+ declare const MenuItemContainer: styled_components.StyledComponent<"li", styled_components.DefaultTheme, {}, never>;
58
+ declare const StyledMenuItem: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
59
+ $highlighted: boolean;
60
+ }, never>;
61
+ declare const MenuItemRow: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
62
+ declare const MenuItemAction: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
63
+ declare const MenuItemText: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
82
64
 
83
65
  interface TypeMenuHeaderProps extends Omit<React$1.ComponentPropsWithoutRef<"div">, "color">, TypeStyledComponentsCommonProps, TypeBorderSystemProps, TypeColorSystemProps, TypeFlexboxSystemProps, TypeGridSystemProps, TypeLayoutSystemProps, TypeSpaceSystemProps, TypePositionSystemProps {
84
66
  title?: string;
@@ -86,14 +68,50 @@ interface TypeMenuHeaderProps extends Omit<React$1.ComponentPropsWithoutRef<"div
86
68
  rightAction?: React$1.ReactNode;
87
69
  }
88
70
 
71
+ /**
72
+ * @link https://seeds.sproutsocial.com/components/menu-header/
73
+ *
74
+ * @description MenuHeader is a container used to hold header content within a Menu.
75
+ *
76
+ * @see {@link https://seeds.sproutsocial.com/components/menu-footer/ | MenuFooter}
77
+ */
89
78
  declare const MenuHeader: ({ children, title, leftAction, rightAction, ...rest }: TypeMenuHeaderProps) => react_jsx_runtime.JSX.Element;
90
79
 
91
- interface TypeMenuContentProps extends React__default.ButtonHTMLAttributes<HTMLUListElement> {
80
+ interface TypeMenuContentProps extends HTMLMotionProps<"ul"> {
92
81
  children: ReactNode;
93
82
  }
94
83
 
84
+ /**
85
+ * @link https://seeds.sproutsocial.com/components/menu-content/
86
+ *
87
+ * @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}.
88
+ *
89
+ * @example
90
+ * <ActionMenu>
91
+ * <MenuHeader>Header</MenuHeader>
92
+ * <MenuContent>
93
+ * <MenuGroup>
94
+ * <MenuItem>Item 1</MenuItem>
95
+ * </MenuGroup>
96
+ * <MenuGroup>
97
+ * <MenuItem>Item 2</MenuItem>
98
+ * </MenuGroup>
99
+ * </MenuContent>
100
+ * <MenuFooter>Footer</MenuFooter>
101
+ * </ActionMenu>
102
+ *
103
+ * @see {@link https://seeds.sproutsocial.com/components/menu-item/ | MenuItem}
104
+ * @see {@link https://seeds.sproutsocial.com/components/menu-group/ | MenuGroup}
105
+ */
95
106
  declare const MenuContent: ({ id, children, ...rest }: TypeMenuContentProps) => react_jsx_runtime.JSX.Element;
96
107
 
108
+ /**
109
+ * @link https://seeds.sproutsocial.com/components/menu-footer/
110
+ *
111
+ * @description MenuFooter is a container used to hold footer content within a Menu.
112
+ *
113
+ * @see {@link https://seeds.sproutsocial.com/components/menu-header/ | MenuHeader}
114
+ */
97
115
  declare const MenuFooter: ({ children, ...rest }: TypeBoxProps) => react_jsx_runtime.JSX.Element;
98
116
 
99
117
  interface TypeMenuGroupStyledProps extends TypeBorderSystemProps, TypeColorSystemProps, TypeFlexboxSystemProps, TypeGridSystemProps, TypeLayoutSystemProps, TypePositionSystemProps, TypeSpaceSystemProps, TypeTypographySystemProps {
@@ -104,6 +122,25 @@ interface TypeMenuGroupProps extends TypeMenuGroupStyledProps, Omit<React.Compon
104
122
  titleAs?: string | React.ComponentType<any>;
105
123
  }
106
124
 
125
+ /**
126
+ * @link https://seeds.sproutsocial.com/components/menu-group/
127
+ *
128
+ * @description MenuGroup is used to group lists of {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/MenuItem | MenuItems}.
129
+ *
130
+ * @example
131
+ * <ActionMenu>
132
+ * <MenuContent>
133
+ * <MenuGroup title="Group 1">
134
+ * <MenuItem>Item 1</MenuItem>
135
+ * </MenuGroup>
136
+ * <MenuGroup title="Group 1">
137
+ * <MenuItem>Item 2</MenuItem>
138
+ * </MenuGroup>
139
+ * </MenuContent>
140
+ * </ActionMenu>
141
+ *
142
+ * @see {@link https://seeds.sproutsocial.com/components/menu-item/ | MenuItem}
143
+ */
107
144
  declare const MenuGroup: ({ titleAs, children, title, color, ...rest }: TypeMenuGroupProps) => react_jsx_runtime.JSX.Element;
108
145
 
109
146
  declare const StyledMenuGroup: styled_components.StyledComponent<"li", styled_components.DefaultTheme, TypeMenuGroupProps, never>;
@@ -145,13 +182,18 @@ declare const MenuProvider: ({ children, ...overrides }: TypeMenuProviderProps)
145
182
  declare const useMenuContext: () => TypeMenuContext;
146
183
 
147
184
  interface TypeMenuRootOwnProps {
148
- triggerElement: React__default.ReactElement<any>;
185
+ menuToggleElement: React__default.ReactElement<any>;
149
186
  popoutProps?: Partial<Omit<TypePopoutProps, "isOpen" | "setIsOpen" | "content" | "children">>;
150
187
  width?: TypePopoutProps["width"];
151
188
  }
152
189
  interface TypeMenuRootProps extends Partial<TypeMenuProviderProps>, TypeMenuRootOwnProps {
153
190
  }
154
- declare const MenuRoot: ({ children, triggerElement, popoutProps, width, ...contextProps }: TypeMenuRootProps) => react_jsx_runtime.JSX.Element;
191
+ /**
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.
195
+ */
196
+ declare const MenuRoot: ({ children, menuToggleElement, popoutProps, width, ...contextProps }: TypeMenuRootProps) => react_jsx_runtime.JSX.Element;
155
197
 
156
198
  declare const MenuLabel: ({ children, ...rest }: TypeTextProps) => react_jsx_runtime.JSX.Element;
157
199
 
@@ -164,18 +206,42 @@ type TypeInvalidMenuProps = "initialSelectedItem" | "defaultSelectedItem" | "sel
164
206
  interface TypeActionMenuProps extends TypeMenuRootOwnProps, Partial<Omit<UseSelectProps<TypeDefaultItemProps>, TypeInvalidMenuProps>> {
165
207
  children: TypeMenuRootProps["children"];
166
208
  }
209
+ /**
210
+ * @link https://seeds.sproutsocial.com/components/action-menu/
211
+ *
212
+ * @description An ActionMenu contains a list of clickable items like buttons or links. ActionMenus do not hold a selection.
213
+ *
214
+ * **To select menu items:**
215
+ * @see {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/SingleSelectMenu | SingleSelectMenu}
216
+ * @see {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/MultiSelectMenu | MultiSelectMenu}
217
+ */
167
218
  declare const ActionMenu: ({ children, stateReducer: externalStateReducer, ...useSelectProps }: TypeActionMenuProps) => react_jsx_runtime.JSX.Element;
168
219
 
169
220
  interface TypeSingleSelectMenuProps extends TypeMenuRootOwnProps, Partial<UseSelectProps<TypeDefaultItemProps>> {
170
221
  children: TypeMenuRootProps["children"];
171
222
  }
172
223
 
224
+ /**
225
+ * @link https://seeds.sproutsocial.com/components/singleselect-menu/
226
+ *
227
+ * @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.
228
+ *
229
+ * **To trigger actions from a menu:**
230
+ * @see {@link https://github.com/sproutsocial/seeds/tree/dev/seeds-react/seeds-react-menu/src/ActionMenu | ActionMenu}
231
+ */
173
232
  declare const SingleSelectMenu: ({ children, stateReducer: externalStateReducer, ...useSelectProps }: TypeSingleSelectMenuProps) => react_jsx_runtime.JSX.Element;
174
233
 
175
234
  interface TypeMultiSelectMenuProps extends TypeMenuRootOwnProps, TypeDownshiftMultiSelectProps {
176
235
  children: TypeMenuRootProps["children"];
177
236
  }
178
237
 
238
+ /**
239
+ * @link https://seeds.sproutsocial.com/components/multiselect-menu/
240
+ *
241
+ * @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.
242
+ *
243
+ * @see {@link https://seeds.sproutsocial.com/components/menu-group/ | MenuGroup}
244
+ */
179
245
  declare const MultiSelectMenu: ({ children, stateReducer: externalStateReducer, getA11yMultiStatusMessage, onMultiSelectStateChange, multiSelectStateReducer, ...useSelectProps }: TypeMultiSelectMenuProps) => react_jsx_runtime.JSX.Element;
180
246
 
181
247
  interface TypeUseItemsFromChildrenProps {
@@ -194,4 +260,4 @@ declare const defaultUseSelectProps: {
194
260
  isItemDisabled: (item: any) => boolean;
195
261
  };
196
262
 
197
- export { ActionMenu, INPUT_TYPES, type InputType, MenuContent, MenuContext, MenuFooter, MenuGroup, MenuHeader, MenuItem, MenuItemContainer, MenuItemSelectable, MenuItemSelectableAction, MenuItemSelectableRow, MenuItemSelectableText, MenuLabel, MenuProvider, MenuRoot, MenuToggleButton, MultiSelectMenu, SelectionIndicator, SingleSelectMenu, StyledMenuGroup, StyledMenuGroupUl, StyledTitle, type TypeActionMenuProps, type TypeDownshiftMultiSelectProps, type TypeMenuContentProps, type TypeMenuContext, type TypeMenuContextProps, type TypeMenuGroupProps, type TypeMenuGroupStyledProps, type TypeMenuHeaderProps, type TypeMenuItemProps, type TypeMenuItemSelectableProps, type TypeMenuItemStyledProps, type TypeMenuProviderProps, type TypeMenuRootOwnProps, type TypeMenuRootProps, type TypeMenuToggleButtonProps, type TypeSingleSelectMenuProps, type TypeUseItemsFromChildrenProps, defaultUseSelectProps, useItemsFromChildren, useMenu, useMenuContext, useSelectStateReducer };
263
+ export { ActionMenu, INPUT_TYPES, type InputType, MenuContent, MenuContext, MenuFooter, MenuGroup, MenuHeader, MenuItem, MenuItemAction, MenuItemContainer, MenuItemRow, MenuItemText, MenuLabel, MenuProvider, MenuRoot, MenuToggleButton, MultiSelectMenu, SingleSelectMenu, StyledMenuGroup, StyledMenuGroupUl, StyledMenuItem, StyledTitle, type TypeActionMenuProps, type TypeDownshiftMultiSelectProps, type TypeMenuContentProps, type TypeMenuContext, type TypeMenuContextProps, type TypeMenuGroupProps, type TypeMenuGroupStyledProps, type TypeMenuHeaderProps, type TypeMenuItemProps, type TypeMenuItemStyledProps, type TypeMenuProviderProps, type TypeMenuRootOwnProps, type TypeMenuRootProps, type TypeMenuToggleButtonProps, type TypeSingleSelectMenuProps, type TypeUseItemsFromChildrenProps, defaultUseSelectProps, useItemsFromChildren, useMenu, useMenuContext, useSelectStateReducer };