@sproutsocial/seeds-react-menu 1.17.0 → 1.18.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 (59) hide show
  1. package/.turbo/turbo-build.log +14 -22
  2. package/CHANGELOG.md +30 -0
  3. package/dist/esm/index.js +542 -229
  4. package/dist/esm/index.js.map +1 -1
  5. package/dist/esm/v3/index.js +793 -1038
  6. package/dist/esm/v3/index.js.map +1 -1
  7. package/dist/v3/index.d.mts +64 -38
  8. package/dist/v3/index.d.ts +64 -38
  9. package/dist/v3/index.js +813 -1058
  10. package/dist/v3/index.js.map +1 -1
  11. package/dist/v3/menu.css +947 -0
  12. package/package.json +20 -21
  13. package/src/v3/ActionMenuStyles.tsx +169 -149
  14. package/src/v3/Common/ComboboxStyles.tsx +396 -511
  15. package/src/v3/Common/SelectIcons.tsx +17 -8
  16. package/src/v3/Common/SelectItem.tsx +25 -38
  17. package/src/v3/Common/SelectStyles.tsx +146 -144
  18. package/src/v3/Common/cn.ts +38 -0
  19. package/src/v3/MenuButtonStyles.tsx +55 -34
  20. package/src/v3/MultiSearchableSelect.tsx +8 -8
  21. package/src/v3/MultiSelect.tsx +11 -16
  22. package/src/v3/SingleSelect.tsx +13 -13
  23. package/src/v3/menu.css +947 -0
  24. package/tsup.config.ts +0 -1
  25. package/dist/esm/chunk-ROQATIB7.js +0 -357
  26. package/dist/esm/chunk-ROQATIB7.js.map +0 -1
  27. package/dist/esm/v2/index.js +0 -2089
  28. package/dist/esm/v2/index.js.map +0 -1
  29. package/dist/v2/index.d.mts +0 -108
  30. package/dist/v2/index.d.ts +0 -108
  31. package/dist/v2/index.js +0 -2280
  32. package/dist/v2/index.js.map +0 -1
  33. package/src/v2/Autocomplete/Autocomplete.stories.tsx +0 -645
  34. package/src/v2/Autocomplete/MultiAutocomplete.tsx +0 -487
  35. package/src/v2/Autocomplete/SingleAutocomplete.tsx +0 -366
  36. package/src/v2/Autocomplete/index.ts +0 -2
  37. package/src/v2/Common-V2/ComboboxContent.tsx +0 -457
  38. package/src/v2/Common-V2/MenuGroup.tsx +0 -60
  39. package/src/v2/Common-V2/MenuGroupTypes.ts +0 -30
  40. package/src/v2/Common-V2/MenuHeading.tsx +0 -83
  41. package/src/v2/Common-V2/MenuItem.tsx +0 -138
  42. package/src/v2/Common-V2/Popout.tsx +0 -124
  43. package/src/v2/Common-V2/PopoutTypes.tsx +0 -109
  44. package/src/v2/Common-V2/SelectToggleButton.tsx +0 -99
  45. package/src/v2/Common-V2/index.ts +0 -11
  46. package/src/v2/Common-V2/props.ts +0 -84
  47. package/src/v2/Common-V2/styles.tsx +0 -41
  48. package/src/v2/Common-V2/types.ts +0 -16
  49. package/src/v2/Common-V2/useHighlightedIndex.ts +0 -62
  50. package/src/v2/Common-V2/utils.ts +0 -238
  51. package/src/v2/SearchableSelect/AutocompleteContent.tsx +0 -325
  52. package/src/v2/SearchableSelect/SearchableMultiSelect.tsx +0 -527
  53. package/src/v2/SearchableSelect/SearchableSelect.tsx +0 -395
  54. package/src/v2/SearchableSelect/index.ts +0 -12
  55. package/src/v2/Select/MultiSelect.tsx +0 -417
  56. package/src/v2/Select/Select.stories.tsx +0 -593
  57. package/src/v2/Select/SingleSelect.tsx +0 -285
  58. package/src/v2/Select/index.ts +0 -2
  59. package/src/v2/index.ts +0 -2
package/dist/esm/index.js CHANGED
@@ -1,47 +1,291 @@
1
+ // src/MenuContext.tsx
2
+ import React, { createContext, useMemo, useContext } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ var defaultMenuContext = {
5
+ items: [],
6
+ itemsMap: {},
7
+ isItemSelected: () => false,
8
+ getInputComponentProps: () => ({}),
9
+ hasVisibleItems: false,
10
+ isInitialized: false
11
+ };
12
+ var getSelectedItemIds = (selectedItems) => selectedItems?.reduce(
13
+ (selected, item) => ({ ...selected, [item.id]: true }),
14
+ {}
15
+ );
16
+ var checkIfItemSelected = ({
17
+ id,
18
+ selectedItem,
19
+ selectedItemIds
20
+ }) => selectedItemIds ? !!selectedItemIds[id] : selectedItem?.id === id;
21
+ var useMenu = ({
22
+ items = [],
23
+ isListbox = false,
24
+ isOpen = false,
25
+ itemsMap: itemsMapFromProps,
26
+ selectedItemIds: selectedItemIdsFromProps,
27
+ selectedItem,
28
+ selectedItems,
29
+ getInputProps,
30
+ contentRef: contentRefFromProps,
31
+ autoCloseOnEmpty,
32
+ hiddenItemsCount,
33
+ ...rest
34
+ } = {}) => {
35
+ const contentRef = contentRefFromProps || React.createRef();
36
+ const menuProps = useMemo(() => ({ ...rest }), [rest]);
37
+ const itemsMap = useMemo(
38
+ () => itemsMapFromProps || items.reduce((map, item) => {
39
+ map[`${item.id}`] = {
40
+ ...item
41
+ };
42
+ return map;
43
+ }, {}),
44
+ [items, itemsMapFromProps]
45
+ );
46
+ const selectedItemIds = useMemo(
47
+ () => selectedItemIdsFromProps || getSelectedItemIds(selectedItems),
48
+ [selectedItems, selectedItemIdsFromProps]
49
+ );
50
+ const isItemSelected = React.useCallback(
51
+ (id) => checkIfItemSelected({ id, selectedItem, selectedItemIds }),
52
+ [selectedItem?.id, selectedItemIds]
53
+ );
54
+ const getInputComponentProps = React.useCallback(
55
+ ({ inputProps, ...props }) => {
56
+ if (!getInputProps) return {};
57
+ const {
58
+ ["aria-activedescendant"]: activedescendant,
59
+ ["aria-autocomplete"]: autocomplete,
60
+ ["aria-controls"]: controls,
61
+ ["aria-expanded"]: expanded,
62
+ ["aria-labelledby"]: labelledby,
63
+ role,
64
+ autoComplete,
65
+ onClick,
66
+ value,
67
+ ...restProps
68
+ } = getInputProps(props);
69
+ return {
70
+ ...restProps,
71
+ inputProps: {
72
+ ["aria-activedescendant"]: activedescendant,
73
+ ["aria-autocomplete"]: autocomplete,
74
+ ["aria-controls"]: controls,
75
+ ["aria-expanded"]: expanded,
76
+ ["aria-labelledby"]: labelledby,
77
+ role,
78
+ autoComplete,
79
+ onClick,
80
+ value,
81
+ ...inputProps
82
+ }
83
+ };
84
+ },
85
+ [getInputProps]
86
+ );
87
+ const hasVisibleItems = useMemo(() => {
88
+ return (hiddenItemsCount ?? 0) < items.length;
89
+ }, [items, hiddenItemsCount]);
90
+ return {
91
+ isOpen,
92
+ isListbox,
93
+ items,
94
+ itemsMap,
95
+ selectedItem,
96
+ selectedItems,
97
+ selectedItemIds,
98
+ isItemSelected,
99
+ getInputProps,
100
+ getInputComponentProps,
101
+ contentRef,
102
+ hasVisibleItems,
103
+ autoCloseOnEmpty,
104
+ isInitialized: true,
105
+ ...menuProps
106
+ };
107
+ };
108
+ var MenuToggleContext = createContext(defaultMenuContext);
109
+ var MenuToggleProvider = ({
110
+ children,
111
+ menuContext
112
+ }) => {
113
+ return /* @__PURE__ */ jsx(MenuToggleContext.Provider, { value: { ...menuContext }, children });
114
+ };
115
+ var useMenuToggleContext = () => {
116
+ const menuContextValue = useContext(MenuToggleContext);
117
+ if (menuContextValue === null) {
118
+ throw new Error(
119
+ "useMenuToggleContext must be used within a <MenuToggleContext.Provider />"
120
+ );
121
+ }
122
+ return menuContextValue;
123
+ };
124
+ var MenuContentContext = createContext(defaultMenuContext);
125
+ var MenuContentProvider = ({
126
+ children,
127
+ menuContext
128
+ }) => {
129
+ return /* @__PURE__ */ jsx(MenuContentContext.Provider, { value: { ...menuContext }, children });
130
+ };
131
+ var useMenuContentContext = () => {
132
+ const menuContextValue = useContext(MenuContentContext);
133
+ if (menuContextValue === null) {
134
+ throw new Error(
135
+ "useMenuContentContext must be used within a <MenuContentContext.Provider />"
136
+ );
137
+ }
138
+ return menuContextValue;
139
+ };
140
+
141
+ // src/MenuItem/styles.tsx
142
+ import styled, { css } from "styled-components";
143
+ import { focusRing, disabled } from "@sproutsocial/seeds-react-mixins";
144
+ import { color, border, flexbox, grid, layout, space } from "styled-system";
1
145
  import {
2
- MenuContentContext,
3
- MenuContentProvider,
4
- MenuItemAction,
5
- MenuItemActionLeft,
6
- MenuItemActionRight,
7
- MenuItemContainer,
8
- MenuItemRow,
9
- MenuItemText,
10
- MenuToggleButton,
11
- MenuToggleContext,
12
- MenuToggleProvider,
13
- StyledMenuContent,
14
- StyledMenuItem,
15
- checkIfItemSelected,
16
- defaultMenuContext,
17
- getSelectedItemIds,
18
- useMenu,
19
- useMenuContentContext,
20
- useMenuToggleContext
21
- } from "./chunk-ROQATIB7.js";
146
+ CheckboxContainer,
147
+ InputWrapper,
148
+ PillInput,
149
+ checkboxContainerHoverStyles,
150
+ inputWrapperHoverStyles,
151
+ pillInputHoverStyles
152
+ } from "@sproutsocial/seeds-react-checkbox";
153
+ var highlightedStyles = css`
154
+ cursor: pointer;
155
+ border: 1px solid ${({ theme }) => theme.colors.listItem.border.base};
156
+ background-color: ${({ theme }) => theme.colors.listItem.background.hover};
157
+ color: ${({ theme }) => theme.colors.text.body};
158
+ text-decoration: none;
159
+ `;
160
+ var activeStyles = css`
161
+ border: 1px solid ${({ theme }) => theme.colors.listItem.border.base};
162
+ background-color: ${({ theme }) => theme.colors.menuItem.background.active};
163
+ color: ${({ theme }) => theme.colors.text.body};
164
+ text-decoration: none;
165
+ `;
166
+ var selectedStyles = css`
167
+ font-weight: ${({ theme }) => theme.fontWeights.semibold};
168
+ `;
169
+ var MenuItemContainer = styled.li`
170
+ box-sizing: border-box;
171
+ list-style-type: none;
172
+ margin-left: ${({ theme }) => theme.space[300]};
173
+ margin-right: ${({ theme }) => theme.space[300]};
174
+
175
+ &:first-child {
176
+ margin-top: ${({ theme }) => theme.space[300]};
177
+ }
178
+
179
+ &:last-child {
180
+ margin-bottom: ${({ theme }) => theme.space[300]};
181
+ }
182
+ `;
183
+ var StyledMenuItem = styled.button`
184
+ display: block;
185
+ box-sizing: border-box;
186
+ width: 100%;
187
+ border-radius: ${({ theme }) => theme.radii[500]};
188
+ background-color: ${({ theme }) => theme.colors.listItem.background.base};
189
+ border: 1px solid ${({ theme }) => theme.colors.listItem.background.base};
190
+ color: ${({ theme }) => theme.colors.text.body};
191
+ font-family: ${({ theme }) => theme.fontFamily};
192
+ font-weight: ${({ theme }) => theme.fontWeights.normal};
193
+ text-align: left;
194
+ text-decoration: none;
195
+ padding: ${({ theme }) => theme.space[300]};
196
+ outline: 0;
197
+ ${({ theme }) => theme.typography[200]};
198
+ transition: all ${({ theme }) => theme.duration["fast"]};
199
+
200
+ /* Highlighted */
201
+ ${({ $highlighted }) => $highlighted && highlightedStyles}
202
+
203
+ /* Hovered, but not focused */
204
+ &:hover {
205
+ ${highlightedStyles}
206
+ ${CheckboxContainer} {
207
+ ${checkboxContainerHoverStyles}
208
+ }
209
+ ${InputWrapper} {
210
+ ${inputWrapperHoverStyles}
211
+ }
212
+ ${PillInput} {
213
+ ${pillInputHoverStyles}
214
+ }
215
+ }
216
+
217
+ /* focused */
218
+ &:focus {
219
+ ${focusRing}
220
+ }
221
+
222
+ /* Active */
223
+ ${({ $active }) => $active && activeStyles}
224
+
225
+ /* Pressed state*/
226
+ &:active {
227
+ ${activeStyles}
228
+ }
229
+
230
+ &[aria-disabled="true"] {
231
+ cursor: not-allowed;
232
+ ${disabled}
233
+ }
234
+
235
+ ${({ $selected }) => $selected && selectedStyles}
236
+
237
+ ${border}
238
+ ${color}
239
+ ${flexbox}
240
+ ${grid}
241
+ ${layout}
242
+ ${space}
243
+ `;
244
+ var MenuItemRow = styled.div`
245
+ display: flex;
246
+ align-items: center;
247
+ pointer-events: none;
248
+ `;
249
+ var MenuItemAction = styled.div`
250
+ display: flex;
251
+ align-items: center;
252
+ justify-content: center;
253
+ flex-shrink: 0;
254
+ `;
255
+ var MenuItemActionLeft = styled(MenuItemAction)`
256
+ margin-right: ${({ theme }) => theme.space[300]};
257
+ `;
258
+ var MenuItemActionRight = styled(MenuItemAction)`
259
+ margin-left: ${({ theme }) => theme.space[300]};
260
+ `;
261
+ var MenuItemText = styled.div`
262
+ word-break: break-word;
263
+ flex-grow: 1;
264
+ min-width: 0;
265
+ `;
22
266
 
23
267
  // src/MenuItem/useOptionProps.tsx
24
- import { useMemo } from "react";
268
+ import { useMemo as useMemo2 } from "react";
25
269
  import { Icon } from "@sproutsocial/seeds-react-icon";
26
270
  import { Checkbox } from "@sproutsocial/seeds-react-checkbox";
27
271
  import { Switch } from "@sproutsocial/seeds-react-switch";
28
272
  import { Radio } from "@sproutsocial/seeds-react-radio";
29
273
  import { useTheme } from "styled-components";
30
274
  import { Box } from "@sproutsocial/seeds-react-box";
31
- import { jsx, jsxs } from "react/jsx-runtime";
275
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
32
276
  var SelectionIndicator = ({
33
277
  id,
34
278
  inputType = "icon",
35
279
  "aria-labelledby": labeledBy,
36
280
  selected
37
281
  }) => {
38
- const { space: space3 } = useTheme();
282
+ const { space: space5 } = useTheme();
39
283
  const inputStub = (e) => {
40
284
  e.stopPropagation();
41
285
  };
42
286
  switch (inputType) {
43
287
  case "checkbox":
44
- return /* @__PURE__ */ jsx(
288
+ return /* @__PURE__ */ jsx2(
45
289
  Checkbox,
46
290
  {
47
291
  tabIndex: -1,
@@ -53,7 +297,7 @@ var SelectionIndicator = ({
53
297
  }
54
298
  );
55
299
  case "switch":
56
- return /* @__PURE__ */ jsx(
300
+ return /* @__PURE__ */ jsx2(
57
301
  Switch,
58
302
  {
59
303
  tabIndex: -1,
@@ -64,7 +308,7 @@ var SelectionIndicator = ({
64
308
  }
65
309
  );
66
310
  case "radio":
67
- return /* @__PURE__ */ jsx(
311
+ return /* @__PURE__ */ jsx2(
68
312
  Radio,
69
313
  {
70
314
  tabIndex: -1,
@@ -76,9 +320,9 @@ var SelectionIndicator = ({
76
320
  );
77
321
  case "icon":
78
322
  if (selected) {
79
- return /* @__PURE__ */ jsx(Icon, { name: "check-solid", "aria-hidden": true, size: "small" });
323
+ return /* @__PURE__ */ jsx2(Icon, { name: "check-solid", "aria-hidden": true, size: "small" });
80
324
  } else {
81
- return /* @__PURE__ */ jsx(Box, { width: space3["400"] });
325
+ return /* @__PURE__ */ jsx2(Box, { width: space5["400"] });
82
326
  }
83
327
  default:
84
328
  return null;
@@ -92,7 +336,7 @@ var useOptionProps = ({
92
336
  ...props
93
337
  }) => {
94
338
  const { selectedItem, selectedItemIds, isListbox, isItemSelected } = useMenuContentContext();
95
- const selected = useMemo(
339
+ const selected = useMemo2(
96
340
  () => isItemSelected(id),
97
341
  [selectedItem?.id, selectedItemIds]
98
342
  );
@@ -101,7 +345,7 @@ var useOptionProps = ({
101
345
  active: selected,
102
346
  ["aria-selected"]: selected,
103
347
  children: /* @__PURE__ */ jsxs(MenuItemRow, { children: [
104
- /* @__PURE__ */ jsx(MenuItemActionLeft, { children: /* @__PURE__ */ jsx(
348
+ /* @__PURE__ */ jsx2(MenuItemActionLeft, { children: /* @__PURE__ */ jsx2(
105
349
  SelectionIndicator,
106
350
  {
107
351
  id,
@@ -110,24 +354,24 @@ var useOptionProps = ({
110
354
  selected: !!selected
111
355
  }
112
356
  ) }),
113
- /* @__PURE__ */ jsx(MenuItemText, { id: label, children })
357
+ /* @__PURE__ */ jsx2(MenuItemText, { id: label, children })
114
358
  ] }),
115
359
  ...props
116
360
  } : {};
117
361
  };
118
362
 
119
363
  // src/MenuItem/MenuItem.tsx
120
- import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
364
+ import { Fragment, jsx as jsx3 } from "react/jsx-runtime";
121
365
  var MenuItem = ({
122
366
  id,
123
367
  children,
124
368
  onClick,
125
369
  onKeyDown,
126
- disabled = false,
370
+ disabled: disabled2 = false,
127
371
  active,
128
372
  innerRef,
129
373
  href,
130
- color: color3,
374
+ color: color5,
131
375
  ...props
132
376
  }) => {
133
377
  const {
@@ -157,7 +401,7 @@ var MenuItem = ({
157
401
  if (!isListbox && "aria-selected" in downshiftItemProps) {
158
402
  delete downshiftItemProps["aria-selected"];
159
403
  }
160
- return hiddenItemsMap[item.id] ? /* @__PURE__ */ jsx2(Fragment, {}) : /* @__PURE__ */ jsx2(MenuItemContainer, { role: "none", children: /* @__PURE__ */ jsx2(
404
+ return hiddenItemsMap[item.id] ? /* @__PURE__ */ jsx3(Fragment, {}) : /* @__PURE__ */ jsx3(MenuItemContainer, { role: "none", children: /* @__PURE__ */ jsx3(
161
405
  StyledMenuItem,
162
406
  {
163
407
  id,
@@ -188,17 +432,17 @@ var INPUT_TYPES = {
188
432
  import "react";
189
433
 
190
434
  // src/MenuHeader/styles.tsx
191
- import styled from "styled-components";
435
+ import styled2 from "styled-components";
192
436
  import {
193
- border,
194
- color,
195
- flexbox,
196
- grid,
197
- layout,
437
+ border as border2,
438
+ color as color2,
439
+ flexbox as flexbox2,
440
+ grid as grid2,
441
+ layout as layout2,
198
442
  position,
199
- space
443
+ space as space2
200
444
  } from "styled-system";
201
- var MenuHeaderContainer = styled.div`
445
+ var MenuHeaderContainer = styled2.div`
202
446
  border-color: ${({ theme }) => theme.colors.container.border.base};
203
447
  border-bottom-width: 1px;
204
448
  border-bottom-style: solid;
@@ -209,15 +453,15 @@ var MenuHeaderContainer = styled.div`
209
453
  flex-direction: column;
210
454
  padding: ${({ theme }) => theme.space[350]} ${({ theme }) => theme.space[400]};
211
455
 
212
- ${border}
213
- ${color}
214
- ${flexbox}
215
- ${grid}
216
- ${layout}
217
- ${space}
456
+ ${border2}
457
+ ${color2}
458
+ ${flexbox2}
459
+ ${grid2}
460
+ ${layout2}
461
+ ${space2}
218
462
  ${position}
219
463
  `;
220
- var MenuTitleText = styled.h3`
464
+ var MenuTitleText = styled2.h3`
221
465
  color: ${({ theme }) => theme.colors.text.headline};
222
466
  font-weight: ${({ theme }) => theme.fontWeights.bold};
223
467
  margin: 0px;
@@ -229,7 +473,7 @@ var MenuTitleText = styled.h3`
229
473
  padding-left: ${theme.space[350]};
230
474
  `}
231
475
  `;
232
- var MenuChildrenContainer = styled.div`
476
+ var MenuChildrenContainer = styled2.div`
233
477
  grid-column: 1 / -1;
234
478
  margin-top: ${({ theme }) => theme.space[300]};
235
479
 
@@ -237,7 +481,7 @@ var MenuChildrenContainer = styled.div`
237
481
  margin-top: 0;
238
482
  }
239
483
  `;
240
- var MenuHeaderFeatures = styled.div`
484
+ var MenuHeaderFeatures = styled2.div`
241
485
  display: flex;
242
486
  align-items: center;
243
487
  justify-content: space-between;
@@ -261,7 +505,7 @@ var MenuHeaderFeatures = styled.div`
261
505
  `;
262
506
 
263
507
  // src/MenuHeader/MenuHeader.tsx
264
- import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
508
+ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
265
509
  var MenuHeader = ({
266
510
  children,
267
511
  title,
@@ -270,32 +514,62 @@ var MenuHeader = ({
270
514
  ...rest
271
515
  }) => {
272
516
  const showTopRow = title || leftAction || rightAction;
273
- return /* @__PURE__ */ jsx3(Fragment2, { children: /* @__PURE__ */ jsxs2(MenuHeaderContainer, { $leftAction: !!leftAction, ...rest, children: [
517
+ return /* @__PURE__ */ jsx4(Fragment2, { children: /* @__PURE__ */ jsxs2(MenuHeaderContainer, { $leftAction: !!leftAction, ...rest, children: [
274
518
  showTopRow && /* @__PURE__ */ jsxs2(MenuHeaderFeatures, { $leftAction: !!leftAction, children: [
275
519
  leftAction && leftAction,
276
- title && /* @__PURE__ */ jsx3(MenuTitleText, { $leftAction: !!leftAction, children: title }),
277
- rightAction && /* @__PURE__ */ jsx3("div", { className: "right-action", children: rightAction })
520
+ title && /* @__PURE__ */ jsx4(MenuTitleText, { $leftAction: !!leftAction, children: title }),
521
+ rightAction && /* @__PURE__ */ jsx4("div", { className: "right-action", children: rightAction })
278
522
  ] }),
279
- children && /* @__PURE__ */ jsx3(MenuChildrenContainer, { children })
523
+ children && /* @__PURE__ */ jsx4(MenuChildrenContainer, { children })
280
524
  ] }) });
281
525
  };
282
526
 
527
+ // src/MenuContent/styles.tsx
528
+ import styled3 from "styled-components";
529
+ import {
530
+ border as border3,
531
+ color as color3,
532
+ flexbox as flexbox3,
533
+ grid as grid3,
534
+ layout as layout3,
535
+ position as position2,
536
+ space as space3
537
+ } from "styled-system";
538
+ var StyledMenuContent = styled3.ul`
539
+ margin: 0;
540
+ padding: 0;
541
+ overflow: auto;
542
+
543
+ &:focus {
544
+ outline: none;
545
+ box-shadow: none;
546
+ }
547
+
548
+ ${border3}
549
+ ${color3}
550
+ ${flexbox3}
551
+ ${grid3}
552
+ ${layout3}
553
+ ${space3}
554
+ ${position2}
555
+ `;
556
+
283
557
  // src/hooks/useMenuChildren.tsx
284
- import React3, { useMemo as useMemo2 } from "react";
285
- import { Fragment as Fragment3, jsx as jsx4 } from "react/jsx-runtime";
558
+ import React4, { useMemo as useMemo3 } from "react";
559
+ import { Fragment as Fragment3, jsx as jsx5 } from "react/jsx-runtime";
286
560
  var walkAllChildren = (children, callback) => {
287
561
  const walk = (element, parents2) => {
288
562
  if (element === null || element === void 0) return;
289
563
  callback(element, parents2);
290
564
  const newParents = [...parents2, element];
291
- if (React3.isValidElement(element) && element.props?.children) {
292
- React3.Children.toArray(element.props.children).forEach((child) => {
565
+ if (React4.isValidElement(element) && element.props?.children) {
566
+ React4.Children.toArray(element.props.children).forEach((child) => {
293
567
  walk(child, newParents);
294
568
  });
295
569
  }
296
570
  };
297
571
  const parents = [];
298
- React3.Children.toArray(children).forEach((child) => {
572
+ React4.Children.toArray(children).forEach((child) => {
299
573
  walk(child, parents);
300
574
  });
301
575
  };
@@ -336,9 +610,9 @@ var addItemsFromGroup = ({
336
610
  });
337
611
  });
338
612
  } else if (menuGroup.props.children) {
339
- const children = React3.Children.toArray(menuGroup.props.children);
613
+ const children = React4.Children.toArray(menuGroup.props.children);
340
614
  children.forEach((menuItem) => {
341
- if (React3.isValidElement(menuItem)) {
615
+ if (React4.isValidElement(menuItem)) {
342
616
  addMenuItem({
343
617
  itemProps: {
344
618
  id: menuItem.props.id,
@@ -418,19 +692,19 @@ var mapMenuItems = ({
418
692
  menuItems,
419
693
  MenuItemComponent = MenuItem
420
694
  }) => {
421
- return /* @__PURE__ */ jsx4(Fragment3, { children: menuItems.map((menuItemProps) => /* @__PURE__ */ jsx4(MenuItemComponent, { ...menuItemProps }, menuItemProps.id)) });
695
+ return /* @__PURE__ */ jsx5(Fragment3, { children: menuItems.map((menuItemProps) => /* @__PURE__ */ jsx5(MenuItemComponent, { ...menuItemProps }, menuItemProps.id)) });
422
696
  };
423
697
  var getChildrenFromMenuItems = ({
424
698
  menuItems,
425
699
  MenuItemComponent
426
- }) => /* @__PURE__ */ jsx4(MenuContent, { menuItems, MenuItemComponent });
700
+ }) => /* @__PURE__ */ jsx5(MenuContent, { menuItems, MenuItemComponent });
427
701
  var useMenuChildren = ({
428
702
  children: childrenProp,
429
703
  menuItems,
430
704
  MenuItemComponent
431
705
  }) => {
432
- const { allMenuItems, menuItemsMap, children } = useMemo2(() => {
433
- let children2 = /* @__PURE__ */ jsx4(Fragment3, {});
706
+ const { allMenuItems, menuItemsMap, children } = useMemo3(() => {
707
+ let children2 = /* @__PURE__ */ jsx5(Fragment3, {});
434
708
  const menuItemsMap2 = {};
435
709
  const allMenuItems2 = [];
436
710
  if (menuItems && menuItems.length) {
@@ -455,10 +729,10 @@ var useMenuChildren = ({
455
729
  import { useCallback } from "react";
456
730
 
457
731
  // src/MenuContent/DefaultMenuEmptyState.tsx
458
- import styled2 from "styled-components";
732
+ import styled4 from "styled-components";
459
733
  import { Box as Box2 } from "@sproutsocial/seeds-react-box";
460
- import { jsx as jsx5 } from "react/jsx-runtime";
461
- var StyledEmptyState = styled2(Box2)`
734
+ import { jsx as jsx6 } from "react/jsx-runtime";
735
+ var StyledEmptyState = styled4(Box2)`
462
736
  padding: ${({ theme }) => theme.space[350]};
463
737
  text-align: center;
464
738
  font-size: ${({ theme }) => theme.typography[200].fontSize};
@@ -467,11 +741,11 @@ var DefaultMenuEmptyState = ({
467
741
  children = "No items found",
468
742
  ...props
469
743
  }) => {
470
- return /* @__PURE__ */ jsx5(StyledEmptyState, { ...props, children });
744
+ return /* @__PURE__ */ jsx6(StyledEmptyState, { ...props, children });
471
745
  };
472
746
 
473
747
  // src/MenuContent/MenuContent.tsx
474
- import { jsx as jsx6 } from "react/jsx-runtime";
748
+ import { jsx as jsx7 } from "react/jsx-runtime";
475
749
  var MenuContent = ({
476
750
  id = "menu_content",
477
751
  children: childrenProp,
@@ -493,7 +767,7 @@ var MenuContent = ({
493
767
  const toggleButtonProps = getToggleButtonProps?.();
494
768
  const children = childrenProp || !menuItems || !menuItems.length ? childrenProp : mapMenuItems({ menuItems, MenuItemComponent });
495
769
  if (isInitialized && !hasVisibleItems && !autoCloseOnEmpty) {
496
- return emptyStateElement ?? /* @__PURE__ */ jsx6(DefaultMenuEmptyState, {});
770
+ return emptyStateElement ?? /* @__PURE__ */ jsx7(DefaultMenuEmptyState, {});
497
771
  }
498
772
  if (!children) {
499
773
  return null;
@@ -505,7 +779,7 @@ var MenuContent = ({
505
779
  },
506
780
  [onKeyDown, toggleButtonProps?.["onKeyDown"]]
507
781
  );
508
- return /* @__PURE__ */ jsx6(
782
+ return /* @__PURE__ */ jsx7(
509
783
  StyledMenuContent,
510
784
  {
511
785
  autoFocus: true,
@@ -531,35 +805,35 @@ MenuContent.__MENU_PRIMITIVE_TYPE = "MenuContent";
531
805
  import "react";
532
806
 
533
807
  // src/MenuFooter/styles.tsx
534
- import styled3 from "styled-components";
808
+ import styled5 from "styled-components";
535
809
  import { Box as Box3 } from "@sproutsocial/seeds-react-box";
536
- var StyledMenuFooterBox = styled3(Box3)`
810
+ var StyledMenuFooterBox = styled5(Box3)`
537
811
  padding: ${({ theme }) => theme.space[350]} ${({ theme }) => theme.space[400]};
538
812
  border-top: 1px solid ${(p) => p.theme.colors.container.border.base};
539
813
  `;
540
814
 
541
815
  // src/MenuFooter/MenuFooter.tsx
542
- import { jsx as jsx7 } from "react/jsx-runtime";
816
+ import { jsx as jsx8 } from "react/jsx-runtime";
543
817
  var MenuFooter = ({ children, ...rest }) => {
544
- return /* @__PURE__ */ jsx7(StyledMenuFooterBox, { ...rest, children });
818
+ return /* @__PURE__ */ jsx8(StyledMenuFooterBox, { ...rest, children });
545
819
  };
546
820
 
547
821
  // src/MenuGroup/MenuGroup.tsx
548
822
  import "react";
549
823
 
550
824
  // src/MenuGroup/styles.tsx
551
- import styled4 from "styled-components";
825
+ import styled6 from "styled-components";
552
826
  import Text from "@sproutsocial/seeds-react-text";
553
827
  import {
554
- border as border2,
555
- layout as layout2,
556
- position as position2,
557
- flexbox as flexbox2,
558
- grid as grid2,
559
- color as color2,
560
- space as space2
828
+ border as border4,
829
+ layout as layout4,
830
+ position as position3,
831
+ flexbox as flexbox4,
832
+ grid as grid4,
833
+ color as color4,
834
+ space as space4
561
835
  } from "styled-system";
562
- var StyledMenuGroup = styled4.li`
836
+ var StyledMenuGroup = styled6.li`
563
837
  &:not(:last-child) {
564
838
  border-bottom: 1px solid
565
839
  ${({ theme }) => theme.colors.container.border.base};
@@ -567,31 +841,31 @@ var StyledMenuGroup = styled4.li`
567
841
  list-style: none;
568
842
  margin: 0;
569
843
 
570
- ${border2}
571
- ${position2}
572
- ${color2}
573
- ${flexbox2}
574
- ${grid2}
575
- ${layout2}
576
- ${space2}
844
+ ${border4}
845
+ ${position3}
846
+ ${color4}
847
+ ${flexbox4}
848
+ ${grid4}
849
+ ${layout4}
850
+ ${space4}
577
851
  `;
578
- var StyledTitle = styled4(Text.SmallSubHeadline)`
852
+ var StyledTitle = styled6(Text.SmallSubHeadline)`
579
853
  font-size: ${({ theme }) => theme.typography[100].fontSize};
580
854
  margin: ${({ theme }) => theme.space[400]} ${({ theme }) => theme.space[400]}
581
855
  0px ${({ theme }) => theme.space[400]};
582
856
  `;
583
- var StyledMenuGroupUl = styled4.ul`
857
+ var StyledMenuGroupUl = styled6.ul`
584
858
  margin: 0;
585
859
  padding: 0;
586
860
  `;
587
861
 
588
862
  // src/MenuGroup/MenuGroup.tsx
589
- import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
863
+ import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
590
864
  var MenuGroup = ({
591
865
  titleAs = "div",
592
866
  children: childrenProp,
593
867
  title,
594
- color: color3,
868
+ color: color5,
595
869
  isSingleSelect,
596
870
  id,
597
871
  menuItems,
@@ -619,11 +893,11 @@ var MenuGroup = ({
619
893
  role: "none",
620
894
  id,
621
895
  isSingleSelect,
622
- color: color3,
896
+ color: color5,
623
897
  ...rest,
624
898
  children: [
625
- title && /* @__PURE__ */ jsx8(StyledTitle, { as: titleAs, id: titleId, children: title }),
626
- /* @__PURE__ */ jsx8(
899
+ title && /* @__PURE__ */ jsx9(StyledTitle, { as: titleAs, id: titleId, children: title }),
900
+ /* @__PURE__ */ jsx9(
627
901
  StyledMenuGroupUl,
628
902
  {
629
903
  role: "group",
@@ -639,19 +913,19 @@ var MenuGroup = ({
639
913
  MenuGroup.__MENU_PRIMITIVE_TYPE = "MenuGroup";
640
914
 
641
915
  // src/MenuRoot/MenuRoot.tsx
642
- import React6, {
916
+ import React7, {
643
917
  useCallback as useCallback2,
644
918
  useEffect,
645
919
  useLayoutEffect
646
920
  } from "react";
647
- import styled5 from "styled-components";
921
+ import styled7 from "styled-components";
648
922
  import {
649
923
  Popout
650
924
  } from "@sproutsocial/seeds-react-popout";
651
925
  import { mergeRefs } from "@sproutsocial/seeds-react-utilities";
652
926
  import { MOTION_DURATION_FAST } from "@sproutsocial/seeds-motion/unitless";
653
- import { jsx as jsx9 } from "react/jsx-runtime";
654
- var CustomPopoutContent = styled5(Popout.Content)`
927
+ import { jsx as jsx10 } from "react/jsx-runtime";
928
+ var CustomPopoutContent = styled7(Popout.Content)`
655
929
  padding: 0;
656
930
  margin-left: 0;
657
931
  margin-right: 0;
@@ -717,12 +991,12 @@ var MenuPopout = ({
717
991
  },
718
992
  [openMenu, closeMenu]
719
993
  );
720
- return /* @__PURE__ */ jsx9(
994
+ return /* @__PURE__ */ jsx10(
721
995
  Popout,
722
996
  {
723
997
  isOpen: !!isOpen,
724
998
  setIsOpen,
725
- content: (props) => /* @__PURE__ */ jsx9(CustomPopoutContent, { width: popoutProps.fullWidth ? "initial" : width, children: typeof content === "function" ? content(props) : content }),
999
+ content: (props) => /* @__PURE__ */ jsx10(CustomPopoutContent, { width: popoutProps.fullWidth ? "initial" : width, children: typeof content === "function" ? content(props) : content }),
726
1000
  focusLockProps: {
727
1001
  // correct jerking motion when scrolling while the Popout is open
728
1002
  // returnFocus: false,
@@ -750,8 +1024,8 @@ var MenuRoot = ({
750
1024
  getMenuProps,
751
1025
  autoCloseOnEmpty = false
752
1026
  } = contextProps;
753
- const toggleElementRef = React6.useRef(null);
754
- const [finalWidth, setFinalWidth] = React6.useState();
1027
+ const toggleElementRef = React7.useRef(null);
1028
+ const [finalWidth, setFinalWidth] = React7.useState();
755
1029
  const min_width = 200;
756
1030
  useLayoutEffect(() => {
757
1031
  if (width) {
@@ -771,17 +1045,17 @@ var MenuRoot = ({
771
1045
  closeMenu?.();
772
1046
  }
773
1047
  }, [menuContext.hasVisibleItems, isOpen, inputValue, autoCloseOnEmpty]);
774
- return /* @__PURE__ */ jsx9(
1048
+ return /* @__PURE__ */ jsx10(
775
1049
  MenuPopout,
776
1050
  {
777
1051
  placement,
778
1052
  isOpen: !!isOpen,
779
1053
  openMenu,
780
1054
  closeMenu,
781
- content: /* @__PURE__ */ jsx9(MenuContentProvider, { menuContext, children }),
1055
+ content: /* @__PURE__ */ jsx10(MenuContentProvider, { menuContext, children }),
782
1056
  width: finalWidth,
783
1057
  ...popoutProps,
784
- children: (toggleProps) => /* @__PURE__ */ jsx9(
1058
+ children: (toggleProps) => /* @__PURE__ */ jsx10(
785
1059
  MenuToggleProvider,
786
1060
  {
787
1061
  menuContext: {
@@ -802,7 +1076,7 @@ var MenuRoot = ({
802
1076
  // src/MenuLabel.tsx
803
1077
  import "react";
804
1078
  import { Label } from "@sproutsocial/seeds-react-label";
805
- import { jsx as jsx10 } from "react/jsx-runtime";
1079
+ import { jsx as jsx11 } from "react/jsx-runtime";
806
1080
  var MenuLabel = ({
807
1081
  children,
808
1082
  required = false,
@@ -811,7 +1085,7 @@ var MenuLabel = ({
811
1085
  const { getLabelProps } = useMenuToggleContext();
812
1086
  return (
813
1087
  // This fallback id should never be used, but it is here to satisfy TypeScript since getLabelProps could be undefined.
814
- /* @__PURE__ */ jsx10(
1088
+ /* @__PURE__ */ jsx11(
815
1089
  Label,
816
1090
  {
817
1091
  htmlFor: "fallback_menu_label",
@@ -824,12 +1098,51 @@ var MenuLabel = ({
824
1098
  );
825
1099
  };
826
1100
 
1101
+ // src/MenuToggleButton/MenuToggleButton.tsx
1102
+ import { Button } from "@sproutsocial/seeds-react-button";
1103
+ import { jsx as jsx12 } from "react/jsx-runtime";
1104
+ var MenuToggleButton = (props) => {
1105
+ const { getToggleButtonProps, isListbox, getDropdownProps, ref, ariaProps } = useMenuToggleContext();
1106
+ const {
1107
+ onClick: userOnClick,
1108
+ onKeyDown: userOnKeyDown,
1109
+ onBlur: userOnBlur,
1110
+ ...restProps
1111
+ } = props;
1112
+ const defaultDropdownProps = {
1113
+ ref,
1114
+ onClick: userOnClick,
1115
+ onKeyDown: userOnKeyDown,
1116
+ onBlur: userOnBlur
1117
+ };
1118
+ const dropdownProps = getDropdownProps?.({
1119
+ ...defaultDropdownProps,
1120
+ preventKeyAction: true
1121
+ }) ?? defaultDropdownProps;
1122
+ const toggleButtonProps = getToggleButtonProps?.({
1123
+ ...dropdownProps,
1124
+ refKey: "innerRef",
1125
+ ...ariaProps,
1126
+ ...isListbox ? {} : { role: "button", "aria-haspopup": "menu" }
1127
+ });
1128
+ if (toggleButtonProps && toggleButtonProps["aria-activedescendant"] === "") {
1129
+ toggleButtonProps["aria-activedescendant"] = void 0;
1130
+ }
1131
+ if (toggleButtonProps && toggleButtonProps["aria-expanded"] === false) {
1132
+ toggleButtonProps["aria-controls"] = void 0;
1133
+ }
1134
+ if (toggleButtonProps) {
1135
+ toggleButtonProps["aria-labelledby"] = void 0;
1136
+ }
1137
+ return /* @__PURE__ */ jsx12(Button, { appearance: "secondary", ...toggleButtonProps, ...restProps });
1138
+ };
1139
+
827
1140
  // src/MenuSearchInput/MenuSearchInput.tsx
828
- import React9 from "react";
1141
+ import React10 from "react";
829
1142
  import { Input } from "@sproutsocial/seeds-react-input";
830
1143
 
831
1144
  // src/hooks/useItemFiltering.tsx
832
- import React8 from "react";
1145
+ import React9 from "react";
833
1146
 
834
1147
  // src/utils/downshiftDefaults.ts
835
1148
  var itemToString = (item) => {
@@ -849,8 +1162,8 @@ var useItemFiltering = ({
849
1162
  getShouldFilter = defaultGetShouldFilter,
850
1163
  setHiddenItemsMap: setHiddenItemsMapProp
851
1164
  }) => {
852
- const [hiddenItemsMap, setHiddenItemsMap] = React8.useState({});
853
- const updateFilteredItems = React8.useCallback(
1165
+ const [hiddenItemsMap, setHiddenItemsMap] = React9.useState({});
1166
+ const updateFilteredItems = React9.useCallback(
854
1167
  ({ inputValue }) => {
855
1168
  const newHiddenItems = getShouldFilter({ inputValue }) ? allMenuItems.reduce((map, item) => {
856
1169
  const isItemVisible = getIsItemVisible(item, inputValue);
@@ -868,7 +1181,7 @@ var useItemFiltering = ({
868
1181
  };
869
1182
 
870
1183
  // src/MenuSearchInput/MenuSearchInput.tsx
871
- import { jsx as jsx11 } from "react/jsx-runtime";
1184
+ import { jsx as jsx13 } from "react/jsx-runtime";
872
1185
  var MenuSearchInput = ({
873
1186
  getIsItemVisible,
874
1187
  inputProps,
@@ -889,18 +1202,18 @@ var MenuSearchInput = ({
889
1202
  getIsItemVisible,
890
1203
  setHiddenItemsMap
891
1204
  });
892
- React9.useEffect(() => {
1205
+ React10.useEffect(() => {
893
1206
  updateFilteredItems({ inputValue: restInputProps.value || "" });
894
1207
  }, [isOpen, restInputProps.value]);
895
1208
  const toggleButtonProps = getToggleButtonProps?.() || {};
896
- const handleKeyDown = React9.useCallback(
1209
+ const handleKeyDown = React10.useCallback(
897
1210
  (e) => {
898
1211
  if (e.key === " ") return;
899
1212
  toggleButtonProps.onKeyDown?.(e);
900
1213
  },
901
1214
  [toggleButtonProps.onKeyDown]
902
1215
  );
903
- return /* @__PURE__ */ jsx11(
1216
+ return /* @__PURE__ */ jsx13(
904
1217
  Input,
905
1218
  {
906
1219
  onChange: (e, value) => {
@@ -922,13 +1235,13 @@ var MenuSearchInput = ({
922
1235
  };
923
1236
 
924
1237
  // src/MenuTokenInput.tsx
925
- import React10 from "react";
926
- import styled6 from "styled-components";
1238
+ import React11 from "react";
1239
+ import styled8 from "styled-components";
927
1240
  import {
928
1241
  TokenInput
929
1242
  } from "@sproutsocial/seeds-react-token-input";
930
- import { jsx as jsx12 } from "react/jsx-runtime";
931
- var StyledTokenInputWrapper = styled6.div`
1243
+ import { jsx as jsx14 } from "react/jsx-runtime";
1244
+ var StyledTokenInputWrapper = styled8.div`
932
1245
  > div {
933
1246
  padding: 4px;
934
1247
  }
@@ -957,12 +1270,12 @@ var MenuTokenInput = ({
957
1270
  removeSelectedItem,
958
1271
  setActiveIndex,
959
1272
  selectedItems = []
960
- } = React10.useContext(MenuContext);
1273
+ } = React11.useContext(MenuContext);
961
1274
  const removeToken = (tokenId) => {
962
1275
  const tokenToRemove = selectedItems?.find((item) => item.id === tokenId);
963
1276
  tokenToRemove && removeSelectedItem?.(tokenToRemove);
964
1277
  };
965
- return /* @__PURE__ */ jsx12(StyledTokenInputWrapper, { children: /* @__PURE__ */ jsx12(
1278
+ return /* @__PURE__ */ jsx14(StyledTokenInputWrapper, { children: /* @__PURE__ */ jsx14(
966
1279
  TokenInput,
967
1280
  {
968
1281
  onKeyDown: (e, value) => {
@@ -1011,8 +1324,8 @@ var MenuTokenInput = ({
1011
1324
  };
1012
1325
 
1013
1326
  // src/MenuSearchTokenInput/MenuSearchTokenInput.tsx
1014
- import React11 from "react";
1015
- import { jsx as jsx13 } from "react/jsx-runtime";
1327
+ import React12 from "react";
1328
+ import { jsx as jsx15 } from "react/jsx-runtime";
1016
1329
  var MenuSearchTokenInput = ({
1017
1330
  getIsItemVisible,
1018
1331
  getTokenProps,
@@ -1035,10 +1348,10 @@ var MenuSearchTokenInput = ({
1035
1348
  setHiddenItemsMap
1036
1349
  });
1037
1350
  const controlledValue = value || inputPropsValue !== void 0 ? `${inputPropsValue}` : void 0;
1038
- const [internalValue, setInternalValue] = React11.useState(
1351
+ const [internalValue, setInternalValue] = React12.useState(
1039
1352
  controlledValue || ""
1040
1353
  );
1041
- const updateFilteredState = React11.useCallback(
1354
+ const updateFilteredState = React12.useCallback(
1042
1355
  // defaults to an empty string if no value is passed
1043
1356
  (value2 = "") => {
1044
1357
  setInternalValue(value2);
@@ -1046,21 +1359,21 @@ var MenuSearchTokenInput = ({
1046
1359
  },
1047
1360
  [updateFilteredItems]
1048
1361
  );
1049
- React11.useEffect(() => {
1362
+ React12.useEffect(() => {
1050
1363
  updateFilteredState(controlledValue);
1051
1364
  }, [controlledValue]);
1052
- React11.useEffect(() => {
1365
+ React12.useEffect(() => {
1053
1366
  updateFilteredState(controlledValue);
1054
1367
  }, [isOpen]);
1055
1368
  const toggleButtonProps = getToggleButtonProps?.() || {};
1056
- const handleKeyDown = React11.useCallback(
1369
+ const handleKeyDown = React12.useCallback(
1057
1370
  (e) => {
1058
1371
  if (e.key === " ") return;
1059
1372
  toggleButtonProps.onKeyDown?.(e);
1060
1373
  },
1061
1374
  [toggleButtonProps.onKeyDown]
1062
1375
  );
1063
- return /* @__PURE__ */ jsx13(
1376
+ return /* @__PURE__ */ jsx15(
1064
1377
  MenuTokenInput,
1065
1378
  {
1066
1379
  onChange: (e, value2) => {
@@ -1081,11 +1394,11 @@ var MenuSearchTokenInput = ({
1081
1394
  };
1082
1395
 
1083
1396
  // src/SubmenuItem/SubmenuItem.tsx
1084
- import React12 from "react";
1397
+ import React13 from "react";
1085
1398
  import { Icon as Icon2 } from "@sproutsocial/seeds-react-icon";
1086
1399
  import { Box as Box4 } from "@sproutsocial/seeds-react-box";
1087
1400
  import { mergeRefs as mergeRefs2 } from "@sproutsocial/seeds-react-utilities";
1088
- import { jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
1401
+ import { jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
1089
1402
  var SubmenuItemTrigger = ({
1090
1403
  id,
1091
1404
  children,
@@ -1094,7 +1407,7 @@ var SubmenuItemTrigger = ({
1094
1407
  }) => {
1095
1408
  const { getToggleButtonProps, getDropdownProps, ref, ariaProps } = useMenuToggleContext();
1096
1409
  const toggleRef = ref && innerRef ? mergeRefs2([ref, innerRef].filter(Boolean)) : ref || innerRef;
1097
- return /* @__PURE__ */ jsx14(
1410
+ return /* @__PURE__ */ jsx16(
1098
1411
  MenuItem,
1099
1412
  {
1100
1413
  ...rest,
@@ -1113,7 +1426,7 @@ var SubmenuItemTrigger = ({
1113
1426
  id,
1114
1427
  children: /* @__PURE__ */ jsxs4(Box4, { display: "flex", justifyContent: "space-between", children: [
1115
1428
  children,
1116
- /* @__PURE__ */ jsx14(MenuItemActionRight, { children: /* @__PURE__ */ jsx14(Icon2, { name: "chevron-right-outline" }) })
1429
+ /* @__PURE__ */ jsx16(MenuItemActionRight, { children: /* @__PURE__ */ jsx16(Icon2, { name: "chevron-right-outline" }) })
1117
1430
  ] })
1118
1431
  }
1119
1432
  );
@@ -1143,17 +1456,17 @@ var SubmenuItem = ({
1143
1456
  itemsMap,
1144
1457
  isOpen: parentIsOpen
1145
1458
  } = useMenuContentContext();
1146
- const [submenuIsFocused, setSubmenuIsFocused] = React12.useState(false);
1147
- const [submenuIsOpen, setSubmenuIsOpen] = React12.useState(false);
1148
- const [submenuIsActive, setSubmenuIsActive] = React12.useState(false);
1149
- const submenuItemRef = React12.useRef(null);
1150
- const submenuRef = React12.useRef(null);
1459
+ const [submenuIsFocused, setSubmenuIsFocused] = React13.useState(false);
1460
+ const [submenuIsOpen, setSubmenuIsOpen] = React13.useState(false);
1461
+ const [submenuIsActive, setSubmenuIsActive] = React13.useState(false);
1462
+ const submenuItemRef = React13.useRef(null);
1463
+ const submenuRef = React13.useRef(null);
1151
1464
  const menuContent = menuItems ? getChildrenFromMenuItems({ menuItems, MenuItemComponent }) : menuChildren;
1152
1465
  const item = itemsMap[id] || {
1153
1466
  index: 0,
1154
1467
  id
1155
1468
  };
1156
- React12.useEffect(() => {
1469
+ React13.useEffect(() => {
1157
1470
  if (highlightedIndex === item.index) {
1158
1471
  !submenuIsOpen && setSubmenuIsOpen(true);
1159
1472
  } else if (submenuIsOpen && highlightedIndex !== -1) {
@@ -1161,7 +1474,7 @@ var SubmenuItem = ({
1161
1474
  setSubmenuIsActive(false);
1162
1475
  }
1163
1476
  }, [highlightedIndex, item.index, submenuIsOpen, setSubmenuIsOpen]);
1164
- const onSubmenuStateChange = React12.useCallback(
1477
+ const onSubmenuStateChange = React13.useCallback(
1165
1478
  (state) => {
1166
1479
  if (state.isOpen !== void 0) {
1167
1480
  setSubmenuIsOpen(state.isOpen);
@@ -1205,7 +1518,7 @@ var SubmenuItem = ({
1205
1518
  onMenuItemClick();
1206
1519
  }
1207
1520
  };
1208
- React12.useEffect(() => {
1521
+ React13.useEffect(() => {
1209
1522
  if (document && document.body) {
1210
1523
  document.body.addEventListener("click", onBodyClick, {
1211
1524
  capture: true
@@ -1223,7 +1536,7 @@ var SubmenuItem = ({
1223
1536
  };
1224
1537
  }
1225
1538
  }, [document, onSubmenuKeydown]);
1226
- const subMenuContent = /* @__PURE__ */ jsx14(
1539
+ const subMenuContent = /* @__PURE__ */ jsx16(
1227
1540
  "div",
1228
1541
  {
1229
1542
  ref: submenuRef,
@@ -1234,13 +1547,13 @@ var SubmenuItem = ({
1234
1547
  children: menuContent
1235
1548
  }
1236
1549
  );
1237
- return /* @__PURE__ */ jsx14(
1550
+ return /* @__PURE__ */ jsx16(
1238
1551
  MenuComponent,
1239
1552
  {
1240
1553
  ...{
1241
1554
  ...menuProps,
1242
1555
  children: subMenuContent,
1243
- menuToggleElement: /* @__PURE__ */ jsx14(
1556
+ menuToggleElement: /* @__PURE__ */ jsx16(
1244
1557
  SubmenuItemTrigger,
1245
1558
  {
1246
1559
  innerRef: submenuItemRef,
@@ -1272,10 +1585,10 @@ var SubmenuItem = ({
1272
1585
  SubmenuItem.__MENU_PRIMITIVE_TYPE = "MenuItem";
1273
1586
 
1274
1587
  // src/ListboxToggleButton.tsx
1275
- import styled7, { css } from "styled-components";
1588
+ import styled9, { css as css2 } from "styled-components";
1276
1589
  import { Icon as Icon3 } from "@sproutsocial/seeds-react-icon";
1277
- import { jsx as jsx15, jsxs as jsxs5 } from "react/jsx-runtime";
1278
- var StyledListboxToggleButton = styled7(
1590
+ import { jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
1591
+ var StyledListboxToggleButton = styled9(
1279
1592
  MenuToggleButton
1280
1593
  )`
1281
1594
  background-color: ${(props) => props.theme.colors.form.background.base};
@@ -1312,22 +1625,22 @@ var StyledListboxToggleButton = styled7(
1312
1625
  }
1313
1626
  }};
1314
1627
 
1315
- ${(props) => props.invalid && css`
1628
+ ${(props) => props.invalid && css2`
1316
1629
  border-color: ${(props2) => props2.theme.colors.form.border.error};
1317
1630
  `}
1318
1631
  `;
1319
- var StyledChevron = styled7.div`
1632
+ var StyledChevron = styled9.div`
1320
1633
  margin-left: ${({ theme }) => theme.space[300]};
1321
1634
  ${({ $isOpen }) => $isOpen && `
1322
1635
  transform: rotate(-180deg);
1323
1636
  `}
1324
1637
  transition: transform 0.15s;
1325
1638
 
1326
- ${({ invalid }) => invalid && css`
1639
+ ${({ invalid }) => invalid && css2`
1327
1640
  color: ${(props) => props.theme.colors.icon.error};
1328
1641
  `}
1329
1642
  `;
1330
- var StyledInnerButton = styled7.div`
1643
+ var StyledInnerButton = styled9.div`
1331
1644
  display: flex;
1332
1645
  justify-content: space-between;
1333
1646
  `;
@@ -1337,7 +1650,7 @@ var ListboxToggleButton = ({
1337
1650
  ...buttonProps
1338
1651
  }) => {
1339
1652
  const { isOpen } = useMenuToggleContext();
1340
- return /* @__PURE__ */ jsx15(
1653
+ return /* @__PURE__ */ jsx17(
1341
1654
  StyledListboxToggleButton,
1342
1655
  {
1343
1656
  appearance: "unstyled",
@@ -1345,20 +1658,20 @@ var ListboxToggleButton = ({
1345
1658
  ...buttonProps,
1346
1659
  children: /* @__PURE__ */ jsxs5(StyledInnerButton, { children: [
1347
1660
  children,
1348
- /* @__PURE__ */ jsx15(StyledChevron, { $isOpen: isOpen, invalid: buttonProps.invalid, children: /* @__PURE__ */ jsx15(Icon3, { name: "chevron-down-outline", fixedWidth: true, "aria-hidden": true }) })
1661
+ /* @__PURE__ */ jsx17(StyledChevron, { $isOpen: isOpen, invalid: buttonProps.invalid, children: /* @__PURE__ */ jsx17(Icon3, { name: "chevron-down-outline", fixedWidth: true, "aria-hidden": true }) })
1349
1662
  ] })
1350
1663
  }
1351
1664
  );
1352
1665
  };
1353
1666
 
1354
1667
  // src/ActionMenu/ActionMenu.tsx
1355
- import React14, { useEffect as useEffect2 } from "react";
1668
+ import React15, { useEffect as useEffect2 } from "react";
1356
1669
  import {
1357
1670
  useSelect as useSelect2
1358
1671
  } from "downshift";
1359
1672
 
1360
1673
  // src/hooks/useDownshiftDefaults.tsx
1361
- import React13 from "react";
1674
+ import React14 from "react";
1362
1675
 
1363
1676
  // src/reducers/useComboboxStateReducer.tsx
1364
1677
  import { useCombobox } from "downshift";
@@ -1482,12 +1795,12 @@ var useDownshiftDefaults = ({
1482
1795
  isMulti = false,
1483
1796
  multiSelectProps = {}
1484
1797
  } = {}) => {
1485
- const [hiddenItemsMap, setHiddenItemsMap] = React13.useState({});
1486
- const hiddenItemsCount = React13.useMemo(
1798
+ const [hiddenItemsMap, setHiddenItemsMap] = React14.useState({});
1799
+ const hiddenItemsCount = React14.useMemo(
1487
1800
  () => Object.keys(hiddenItemsMap).filter(Boolean).length,
1488
1801
  [hiddenItemsMap]
1489
1802
  );
1490
- const isItemDisabled = React13.useCallback(
1803
+ const isItemDisabled = React14.useCallback(
1491
1804
  (item) => Boolean(item.disabled || hiddenItemsMap[item.id]),
1492
1805
  [hiddenItemsMap]
1493
1806
  );
@@ -1518,7 +1831,7 @@ var useDownshiftDefaults = ({
1518
1831
  };
1519
1832
 
1520
1833
  // src/ActionMenu/ActionMenu.tsx
1521
- import { jsx as jsx16 } from "react/jsx-runtime";
1834
+ import { jsx as jsx18 } from "react/jsx-runtime";
1522
1835
  var handleStateChange = (changes, currentSelectedItem) => {
1523
1836
  if (!(changes.type === useSelect2.stateChangeTypes.ToggleButtonKeyDownEnter || changes.type === useSelect2.stateChangeTypes.ToggleButtonKeyDownSpaceButton)) {
1524
1837
  return;
@@ -1566,7 +1879,7 @@ var ActionMenu = ({
1566
1879
  const { defaultDownshiftProps, ...restDefaults } = useDownshiftDefaults({
1567
1880
  isCombobox: false
1568
1881
  });
1569
- const [currentSelectedItem, setCurrentSelectedItem] = React14.useState(null);
1882
+ const [currentSelectedItem, setCurrentSelectedItem] = React15.useState(null);
1570
1883
  const { isOpen, ...useSelectReturnProps } = useSelect2({
1571
1884
  ...defaultDownshiftProps.select,
1572
1885
  items: allMenuItems,
@@ -1581,7 +1894,7 @@ var ActionMenu = ({
1581
1894
  useEffect2(() => {
1582
1895
  setCurrentSelectedItem(useSelectReturnProps.selectedItem);
1583
1896
  }, [useSelectReturnProps.selectedItem]);
1584
- return /* @__PURE__ */ jsx16(
1897
+ return /* @__PURE__ */ jsx18(
1585
1898
  MenuRootComponent,
1586
1899
  {
1587
1900
  ...{
@@ -1602,7 +1915,7 @@ var ActionMenu = ({
1602
1915
  // src/SingleSelectMenu/SingleSelectMenu.tsx
1603
1916
  import "react";
1604
1917
  import { useSelect as useSelect3 } from "downshift";
1605
- import { jsx as jsx17 } from "react/jsx-runtime";
1918
+ import { jsx as jsx19 } from "react/jsx-runtime";
1606
1919
  var SingleSelectMenu = ({
1607
1920
  children: childrenProp,
1608
1921
  stateReducer: externalStateReducer,
@@ -1629,7 +1942,7 @@ var SingleSelectMenu = ({
1629
1942
  ),
1630
1943
  ...useSelectProps
1631
1944
  });
1632
- return /* @__PURE__ */ jsx17(
1945
+ return /* @__PURE__ */ jsx19(
1633
1946
  MenuRootComponent,
1634
1947
  {
1635
1948
  ...{
@@ -1650,7 +1963,7 @@ var SingleSelectMenu = ({
1650
1963
  // src/MultiSelectMenu/MultiSelectMenu.tsx
1651
1964
  import "react";
1652
1965
  import { useSelect as useSelect4, useMultipleSelection } from "downshift";
1653
- import { jsx as jsx18 } from "react/jsx-runtime";
1966
+ import { jsx as jsx20 } from "react/jsx-runtime";
1654
1967
  var MultiSelectMenu = ({
1655
1968
  children: childrenProp,
1656
1969
  menuItems,
@@ -1723,7 +2036,7 @@ var MultiSelectMenu = ({
1723
2036
  },
1724
2037
  ...useSelectProps
1725
2038
  });
1726
- return /* @__PURE__ */ jsx18(
2039
+ return /* @__PURE__ */ jsx20(
1727
2040
  MenuRootComponent,
1728
2041
  {
1729
2042
  ...{
@@ -1756,7 +2069,7 @@ import "react";
1756
2069
  // src/Autocomplete/SingleAutocomplete.tsx
1757
2070
  import "react";
1758
2071
  import { useCombobox as useCombobox2 } from "downshift";
1759
- import { jsx as jsx19 } from "react/jsx-runtime";
2072
+ import { jsx as jsx21 } from "react/jsx-runtime";
1760
2073
  var SingleAutocomplete = ({
1761
2074
  children: childrenProp,
1762
2075
  stateReducer: externalStateReducer,
@@ -1794,7 +2107,7 @@ var SingleAutocomplete = ({
1794
2107
  });
1795
2108
  const { isOpen, closeMenu, inputValue } = useComboboxReturnProps;
1796
2109
  const { popoutProps: userPopoutProps } = useComboboxProps;
1797
- return /* @__PURE__ */ jsx19(
2110
+ return /* @__PURE__ */ jsx21(
1798
2111
  MenuRootComponent,
1799
2112
  {
1800
2113
  ...{
@@ -1816,9 +2129,9 @@ var SingleAutocomplete = ({
1816
2129
  };
1817
2130
 
1818
2131
  // src/Autocomplete/MultiAutocomplete.tsx
1819
- import React18 from "react";
2132
+ import React19 from "react";
1820
2133
  import { useCombobox as useCombobox3, useMultipleSelection as useMultipleSelection2 } from "downshift";
1821
- import { jsx as jsx20 } from "react/jsx-runtime";
2134
+ import { jsx as jsx22 } from "react/jsx-runtime";
1822
2135
  var MultiAutocomplete = ({
1823
2136
  children: childrenProp,
1824
2137
  stateReducer: externalStateReducer,
@@ -1844,22 +2157,22 @@ var MultiAutocomplete = ({
1844
2157
  menuItems,
1845
2158
  MenuItemComponent
1846
2159
  });
1847
- const [selectedItemsState, setSelectedItemsState] = React18.useState(initialSelectedItems);
1848
- const selectedItems = React18.useMemo(
2160
+ const [selectedItemsState, setSelectedItemsState] = React19.useState(initialSelectedItems);
2161
+ const selectedItems = React19.useMemo(
1849
2162
  () => selectedItemsProp || selectedItemsState,
1850
2163
  [selectedItemsProp, selectedItemsState]
1851
2164
  );
1852
- const selectedItemIds = React18.useMemo(
2165
+ const selectedItemIds = React19.useMemo(
1853
2166
  () => getSelectedItemIds(selectedItems),
1854
2167
  [selectedItems]
1855
2168
  );
1856
- const getIsItemVisibleMulti = React18.useCallback(
2169
+ const getIsItemVisibleMulti = React19.useCallback(
1857
2170
  (item, inputValue) => {
1858
2171
  return (showSelectedItemsInDropdown || !selectedItemIds[item.id]) && getIsItemVisible(item, inputValue);
1859
2172
  },
1860
2173
  [selectedItemIds, showSelectedItemsInDropdown, getIsItemVisible]
1861
2174
  );
1862
- const getShouldFilterMulti = React18.useCallback(
2175
+ const getShouldFilterMulti = React19.useCallback(
1863
2176
  (args) => {
1864
2177
  return !showSelectedItemsInDropdown && Object.keys(selectedItemIds).length > 0 || defaultGetShouldFilter(args);
1865
2178
  },
@@ -1884,7 +2197,7 @@ var MultiAutocomplete = ({
1884
2197
  getShouldFilter: getShouldFilterMulti,
1885
2198
  setHiddenItemsMap
1886
2199
  });
1887
- React18.useEffect(() => {
2200
+ React19.useEffect(() => {
1888
2201
  updateFilteredItems({ inputValue: "" });
1889
2202
  }, [selectedItemIds]);
1890
2203
  const useMultipleSelectionReturnProps = useMultipleSelection2({
@@ -1929,7 +2242,7 @@ var MultiAutocomplete = ({
1929
2242
  ...useComboboxProps
1930
2243
  });
1931
2244
  const { popoutProps: userPopoutProps } = useComboboxProps;
1932
- return /* @__PURE__ */ jsx20(
2245
+ return /* @__PURE__ */ jsx22(
1933
2246
  MenuRootComponent,
1934
2247
  {
1935
2248
  ...{
@@ -1958,21 +2271,21 @@ var MultiAutocomplete = ({
1958
2271
  };
1959
2272
 
1960
2273
  // src/Autocomplete/Autocomplete.tsx
1961
- import { jsx as jsx21 } from "react/jsx-runtime";
2274
+ import { jsx as jsx23 } from "react/jsx-runtime";
1962
2275
  var Autocomplete = ({
1963
2276
  multiSelect = false,
1964
2277
  ...rest
1965
2278
  }) => {
1966
2279
  if (multiSelect) {
1967
- return /* @__PURE__ */ jsx21(MultiAutocomplete, { ...rest });
2280
+ return /* @__PURE__ */ jsx23(MultiAutocomplete, { ...rest });
1968
2281
  }
1969
- return /* @__PURE__ */ jsx21(SingleAutocomplete, { ...rest });
2282
+ return /* @__PURE__ */ jsx23(SingleAutocomplete, { ...rest });
1970
2283
  };
1971
2284
 
1972
2285
  // src/Autocomplete/AutocompleteInput.tsx
1973
2286
  import "react";
1974
2287
  import { Input as Input2 } from "@sproutsocial/seeds-react-input";
1975
- import { jsx as jsx22 } from "react/jsx-runtime";
2288
+ import { jsx as jsx24 } from "react/jsx-runtime";
1976
2289
  var AutocompleteInput = ({
1977
2290
  onKeyDown,
1978
2291
  onChange,
@@ -1983,7 +2296,7 @@ var AutocompleteInput = ({
1983
2296
  ...rest
1984
2297
  }) => {
1985
2298
  const { getInputComponentProps, inputValue, ref, ariaProps } = useMenuToggleContext();
1986
- return /* @__PURE__ */ jsx22(
2299
+ return /* @__PURE__ */ jsx24(
1987
2300
  Input2,
1988
2301
  {
1989
2302
  id: "autocomplete_input",
@@ -2009,7 +2322,7 @@ var AutocompleteInput = ({
2009
2322
 
2010
2323
  // src/Autocomplete/AutocompleteTokenInput.tsx
2011
2324
  import "react";
2012
- import { jsx as jsx23 } from "react/jsx-runtime";
2325
+ import { jsx as jsx25 } from "react/jsx-runtime";
2013
2326
  var AutocompleteTokenInput = ({
2014
2327
  onKeyDown,
2015
2328
  onChange,
@@ -2028,7 +2341,7 @@ var AutocompleteTokenInput = ({
2028
2341
  ref,
2029
2342
  ariaProps
2030
2343
  } = useMenuToggleContext();
2031
- return /* @__PURE__ */ jsx23(
2344
+ return /* @__PURE__ */ jsx25(
2032
2345
  MenuTokenInput,
2033
2346
  {
2034
2347
  id: "autocomplete_input",
@@ -2053,19 +2366,19 @@ var AutocompleteTokenInput = ({
2053
2366
  // src/Autocomplete/AutocompleteSelect.tsx
2054
2367
  import Icon4 from "@sproutsocial/seeds-react-icon";
2055
2368
  import "react";
2056
- import styled8 from "styled-components";
2369
+ import styled10 from "styled-components";
2057
2370
  import { Accessory } from "@sproutsocial/seeds-react-input";
2058
- import { jsx as jsx24 } from "react/jsx-runtime";
2059
- var StyledAutocompleteInput = styled8(AutocompleteInput)`
2371
+ import { jsx as jsx26 } from "react/jsx-runtime";
2372
+ var StyledAutocompleteInput = styled10(AutocompleteInput)`
2060
2373
  ${Accessory} {
2061
2374
  pointer-events: none;
2062
2375
  }
2063
2376
  `;
2064
2377
  var AutocompleteSelect = (props) => {
2065
- return /* @__PURE__ */ jsx24(
2378
+ return /* @__PURE__ */ jsx26(
2066
2379
  StyledAutocompleteInput,
2067
2380
  {
2068
- elemAfter: /* @__PURE__ */ jsx24(Icon4, { name: "chevron-down" }),
2381
+ elemAfter: /* @__PURE__ */ jsx26(Icon4, { name: "chevron-down" }),
2069
2382
  ...props
2070
2383
  }
2071
2384
  );
@@ -2102,9 +2415,9 @@ var nestedMenuStateReducer = (_state, actionAndChanges) => {
2102
2415
  };
2103
2416
 
2104
2417
  // src/NestedMenu/NestedMenuContext.tsx
2105
- import { createContext, useContext as useContext4 } from "react";
2418
+ import { createContext as createContext2, useContext as useContext5 } from "react";
2106
2419
  import { MOTION_DURATION_FAST as MOTION_DURATION_FAST2 } from "@sproutsocial/seeds-motion/unitless";
2107
- import { jsx as jsx25 } from "react/jsx-runtime";
2420
+ import { jsx as jsx27 } from "react/jsx-runtime";
2108
2421
  var defaultNestedMenuContext = {
2109
2422
  selectedMenuPath: [],
2110
2423
  setSelectedMenuId: () => {
@@ -2121,17 +2434,17 @@ var defaultNestedMenuContext = {
2121
2434
  },
2122
2435
  animationSpeed: MOTION_DURATION_FAST2
2123
2436
  };
2124
- var NestedMenuContext = createContext(
2437
+ var NestedMenuContext = createContext2(
2125
2438
  defaultNestedMenuContext
2126
2439
  );
2127
2440
  var NestedMenuProvider = ({
2128
2441
  children,
2129
2442
  ...nestedMenuProps
2130
2443
  }) => {
2131
- return /* @__PURE__ */ jsx25(NestedMenuContext.Provider, { value: nestedMenuProps, children });
2444
+ return /* @__PURE__ */ jsx27(NestedMenuContext.Provider, { value: nestedMenuProps, children });
2132
2445
  };
2133
2446
  var useNestedMenuContext = () => {
2134
- const nestedMenuContextValue = useContext4(NestedMenuContext);
2447
+ const nestedMenuContextValue = useContext5(NestedMenuContext);
2135
2448
  if (nestedMenuContextValue === null) {
2136
2449
  throw new Error(
2137
2450
  "useNestedMenuContext must be used within a <NestedMenuContext.Provider />"
@@ -2147,7 +2460,7 @@ import { mergeRefs as mergeRefs3 } from "@sproutsocial/seeds-react-utilities";
2147
2460
  // src/NestedMenu/NestedMenuItem.tsx
2148
2461
  import { Icon as Icon5 } from "@sproutsocial/seeds-react-icon";
2149
2462
  import { Box as Box5 } from "@sproutsocial/seeds-react-box";
2150
- import { jsx as jsx26, jsxs as jsxs6 } from "react/jsx-runtime";
2463
+ import { jsx as jsx28, jsxs as jsxs6 } from "react/jsx-runtime";
2151
2464
  var NestedMenuItem = ({
2152
2465
  children,
2153
2466
  childMenuId,
@@ -2163,15 +2476,15 @@ var NestedMenuItem = ({
2163
2476
  }
2164
2477
  }
2165
2478
  } : {};
2166
- return /* @__PURE__ */ jsx26(MenuItem, { ...onClickProps, ...rest, children: /* @__PURE__ */ jsxs6(Box5, { display: "flex", justifyContent: "space-between", children: [
2479
+ return /* @__PURE__ */ jsx28(MenuItem, { ...onClickProps, ...rest, children: /* @__PURE__ */ jsxs6(Box5, { display: "flex", justifyContent: "space-between", children: [
2167
2480
  children,
2168
- childMenuId && /* @__PURE__ */ jsx26(MenuItemActionRight, { children: /* @__PURE__ */ jsx26(Icon5, { name: "arrow-right-outline" }) })
2481
+ childMenuId && /* @__PURE__ */ jsx28(MenuItemActionRight, { children: /* @__PURE__ */ jsx28(Icon5, { name: "arrow-right-outline" }) })
2169
2482
  ] }) });
2170
2483
  };
2171
2484
  NestedMenuItem.__MENU_PRIMITIVE_TYPE = "MenuItem";
2172
2485
 
2173
2486
  // src/NestedMenu/NestedMenuContent.tsx
2174
- import { jsx as jsx27 } from "react/jsx-runtime";
2487
+ import { jsx as jsx29 } from "react/jsx-runtime";
2175
2488
  var NestedMenuContent = ({
2176
2489
  innerRef: innerRefProp = null,
2177
2490
  onKeyDown: onKeyDownProp,
@@ -2208,7 +2521,7 @@ var NestedMenuContent = ({
2208
2521
  break;
2209
2522
  }
2210
2523
  };
2211
- return /* @__PURE__ */ jsx27(
2524
+ return /* @__PURE__ */ jsx29(
2212
2525
  MenuContent,
2213
2526
  {
2214
2527
  onKeyDown,
@@ -2221,20 +2534,20 @@ var NestedMenuContent = ({
2221
2534
  NestedMenuContent.__MENU_PRIMITIVE_TYPE = "MenuContent";
2222
2535
 
2223
2536
  // src/NestedMenu/NestedMenuHeader.tsx
2224
- import { Button } from "@sproutsocial/seeds-react-button";
2537
+ import { Button as Button2 } from "@sproutsocial/seeds-react-button";
2225
2538
  import { Icon as Icon6 } from "@sproutsocial/seeds-react-icon";
2226
2539
  import { AnimatePresence, motion } from "motion/react";
2227
- import { jsx as jsx28 } from "react/jsx-runtime";
2540
+ import { jsx as jsx30 } from "react/jsx-runtime";
2228
2541
  var NestedMenuHeader = ({
2229
2542
  backArrowLabel,
2230
2543
  ...props
2231
2544
  }) => {
2232
2545
  const { goBack, selectedMenuPath, animationSpeed } = useNestedMenuContext();
2233
2546
  const showBackArrow = selectedMenuPath.length > 1;
2234
- return /* @__PURE__ */ jsx28(
2547
+ return /* @__PURE__ */ jsx30(
2235
2548
  MenuHeader,
2236
2549
  {
2237
- leftAction: /* @__PURE__ */ jsx28(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx28(
2550
+ leftAction: /* @__PURE__ */ jsx30(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx30(
2238
2551
  motion.div,
2239
2552
  {
2240
2553
  initial: { opacity: 0 },
@@ -2243,7 +2556,7 @@ var NestedMenuHeader = ({
2243
2556
  opacity: 0,
2244
2557
  transition: { duration: animationSpeed }
2245
2558
  },
2246
- children: showBackArrow ? /* @__PURE__ */ jsx28(Button, { onClick: goBack, ariaLabel: backArrowLabel, children: /* @__PURE__ */ jsx28(Icon6, { name: "arrow-left" }) }) : void 0
2559
+ children: showBackArrow ? /* @__PURE__ */ jsx30(Button2, { onClick: goBack, ariaLabel: backArrowLabel, children: /* @__PURE__ */ jsx30(Icon6, { name: "arrow-left" }) }) : void 0
2247
2560
  },
2248
2561
  `${selectedMenuPath}-header--button`
2249
2562
  ) }),
@@ -2256,8 +2569,8 @@ var NestedMenuHeader = ({
2256
2569
  import { MOTION_DURATION_FAST as MOTION_DURATION_FAST3 } from "@sproutsocial/seeds-motion/unitless";
2257
2570
 
2258
2571
  // src/NestedMenu/NestedMenuRoot.tsx
2259
- import React23 from "react";
2260
- import { jsx as jsx29 } from "react/jsx-runtime";
2572
+ import React24 from "react";
2573
+ import { jsx as jsx31 } from "react/jsx-runtime";
2261
2574
  var NestedMenuRoot = ({
2262
2575
  children,
2263
2576
  menuToggleElement,
@@ -2265,23 +2578,23 @@ var NestedMenuRoot = ({
2265
2578
  }) => {
2266
2579
  const menuContext = useMenu(contextProps);
2267
2580
  const { setActiveMenuContext, selectedMenuPath } = useNestedMenuContext();
2268
- React23.useEffect(() => {
2581
+ React24.useEffect(() => {
2269
2582
  setActiveMenuContext(menuContext);
2270
2583
  }, [
2271
2584
  selectedMenuPath[selectedMenuPath.length - 1],
2272
2585
  menuContext.selectedItem,
2273
2586
  menuContext.selectedItems?.length
2274
2587
  ]);
2275
- return /* @__PURE__ */ jsx29(MenuContentProvider, { menuContext, children });
2588
+ return /* @__PURE__ */ jsx31(MenuContentProvider, { menuContext, children });
2276
2589
  };
2277
2590
 
2278
2591
  // src/NestedMenu/NestedMenuPopout.tsx
2279
2592
  import "react";
2280
2593
  import { motion as motion2 } from "motion/react";
2281
- import styled9 from "styled-components";
2594
+ import styled11 from "styled-components";
2282
2595
  import { mergeRefs as mergeRefs4 } from "@sproutsocial/seeds-react-utilities";
2283
- import { jsx as jsx30 } from "react/jsx-runtime";
2284
- var StyledDiv = styled9(motion2.div)`
2596
+ import { jsx as jsx32 } from "react/jsx-runtime";
2597
+ var StyledDiv = styled11(motion2.div)`
2285
2598
  overflow: hidden;
2286
2599
  `;
2287
2600
  var NestedMenuPopout = ({
@@ -2294,7 +2607,7 @@ var NestedMenuPopout = ({
2294
2607
  ...popoutProps
2295
2608
  }) => {
2296
2609
  const { activeMenuContext, rootMenuContextProps, resetSelectedMenuPath } = useNestedMenuContext();
2297
- return /* @__PURE__ */ jsx30(
2610
+ return /* @__PURE__ */ jsx32(
2298
2611
  MenuPopout,
2299
2612
  {
2300
2613
  lockPlacement: true,
@@ -2309,13 +2622,13 @@ var NestedMenuPopout = ({
2309
2622
  openMenu: rootMenuContextProps.openMenu,
2310
2623
  closeMenu: rootMenuContextProps.closeMenu,
2311
2624
  width,
2312
- content: (props) => /* @__PURE__ */ jsx30(StyledDiv, { layout: "position", children: typeof content === "function" ? content(props) : content }),
2625
+ content: (props) => /* @__PURE__ */ jsx32(StyledDiv, { layout: "position", children: typeof content === "function" ? content(props) : content }),
2313
2626
  focusLockProps: {
2314
2627
  crossFrame: false,
2315
2628
  ...focusLockProps
2316
2629
  },
2317
2630
  ...popoutProps,
2318
- children: (toggleProps) => /* @__PURE__ */ jsx30(
2631
+ children: (toggleProps) => /* @__PURE__ */ jsx32(
2319
2632
  MenuToggleProvider,
2320
2633
  {
2321
2634
  menuContext: {
@@ -2335,7 +2648,7 @@ var NestedMenuPopout = ({
2335
2648
  };
2336
2649
 
2337
2650
  // src/NestedMenu/NestedMenu.tsx
2338
- import { jsx as jsx31, jsxs as jsxs7 } from "react/jsx-runtime";
2651
+ import { jsx as jsx33, jsxs as jsxs7 } from "react/jsx-runtime";
2339
2652
  var useId = () => {
2340
2653
  const [id, setId] = useState();
2341
2654
  useEffect4(() => {
@@ -2502,7 +2815,7 @@ var NestedMenu = ({
2502
2815
  initialIsOpen: true,
2503
2816
  children: (
2504
2817
  // Handles the smooth animating of the content
2505
- /* @__PURE__ */ jsx31(AnimatePresence2, { mode: "wait", children: /* @__PURE__ */ jsxs7(
2818
+ /* @__PURE__ */ jsx33(AnimatePresence2, { mode: "wait", children: /* @__PURE__ */ jsxs7(
2506
2819
  motion3.div,
2507
2820
  {
2508
2821
  variants: contentVariants,
@@ -2511,7 +2824,7 @@ var NestedMenu = ({
2511
2824
  exit: "leave",
2512
2825
  custom: { isAdding, hasLoadedOnce },
2513
2826
  children: [
2514
- MenuHeaderComponent && /* @__PURE__ */ jsx31(
2827
+ MenuHeaderComponent && /* @__PURE__ */ jsx33(
2515
2828
  MenuHeaderComponent,
2516
2829
  {
2517
2830
  backArrowLabel,
@@ -2519,7 +2832,7 @@ var NestedMenu = ({
2519
2832
  }
2520
2833
  ),
2521
2834
  children && children,
2522
- menuItems && !children && /* @__PURE__ */ jsx31(
2835
+ menuItems && !children && /* @__PURE__ */ jsx33(
2523
2836
  NestedMenuContent,
2524
2837
  {
2525
2838
  menuItems,
@@ -2536,7 +2849,7 @@ var NestedMenu = ({
2536
2849
  useEffect4(() => {
2537
2850
  popoutUpdateRef.current?.();
2538
2851
  }, [nestedMenuProps.children]);
2539
- return /* @__PURE__ */ jsx31(
2852
+ return /* @__PURE__ */ jsx33(
2540
2853
  NestedMenuProvider,
2541
2854
  {
2542
2855
  ...{
@@ -2550,11 +2863,11 @@ var NestedMenu = ({
2550
2863
  setActiveMenuContext,
2551
2864
  animationSpeed
2552
2865
  },
2553
- children: /* @__PURE__ */ jsx31(
2866
+ children: /* @__PURE__ */ jsx33(
2554
2867
  NestedMenuPopout,
2555
2868
  {
2556
2869
  content: MenuComponent && // Handles the rerender of the component
2557
- /* @__PURE__ */ jsx31(AnimatePresence2, { mode: "wait", children: /* @__PURE__ */ jsx31(
2870
+ /* @__PURE__ */ jsx33(AnimatePresence2, { mode: "wait", children: /* @__PURE__ */ jsx33(
2558
2871
  motion3.div,
2559
2872
  {
2560
2873
  variants: menuVariants,
@@ -2562,7 +2875,7 @@ var NestedMenu = ({
2562
2875
  animate: "enter",
2563
2876
  exit: "leave",
2564
2877
  custom: { isAdding, hasLoadedOnce },
2565
- children: /* @__PURE__ */ jsx31(MenuComponent, { ...nestedMenuProps })
2878
+ children: /* @__PURE__ */ jsx33(MenuComponent, { ...nestedMenuProps })
2566
2879
  },
2567
2880
  `${currentMenuId}-content`
2568
2881
  ) }),