@sproutsocial/seeds-react-menu 1.7.14 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/seeds-react-menu",
3
- "version": "1.7.14",
3
+ "version": "1.8.0",
4
4
  "description": "Seeds React Menu",
5
5
  "author": "Sprout Social, Inc.",
6
6
  "license": "MIT",
@@ -32,17 +32,17 @@
32
32
  "dependencies": {
33
33
  "@radix-ui/react-popover": "^1.1.2",
34
34
  "@sproutsocial/seeds-react-box": "^1.1.12",
35
- "@sproutsocial/seeds-react-button": "^1.3.14",
36
- "@sproutsocial/seeds-react-checkbox": "^1.3.18",
37
- "@sproutsocial/seeds-react-icon": "^2.2.0",
38
- "@sproutsocial/seeds-react-input": "^1.5.0",
35
+ "@sproutsocial/seeds-react-button": "^1.3.15",
36
+ "@sproutsocial/seeds-react-checkbox": "^1.3.19",
37
+ "@sproutsocial/seeds-react-icon": "^2.2.1",
38
+ "@sproutsocial/seeds-react-input": "^1.5.1",
39
39
  "@sproutsocial/seeds-react-label": "^1.0.12",
40
- "@sproutsocial/seeds-react-popout": "^2.4.20",
40
+ "@sproutsocial/seeds-react-popout": "^2.4.21",
41
41
  "@sproutsocial/seeds-react-radio": "^1.3.11",
42
- "@sproutsocial/seeds-react-switch": "^1.2.17",
42
+ "@sproutsocial/seeds-react-switch": "^1.2.18",
43
43
  "@sproutsocial/seeds-react-system-props": "^3.0.2",
44
44
  "@sproutsocial/seeds-react-theme": "^3.5.0",
45
- "@sproutsocial/seeds-react-token-input": "^1.4.21",
45
+ "@sproutsocial/seeds-react-token-input": "^1.4.22",
46
46
  "@sproutsocial/seeds-react-utilities": "^4.3.0",
47
47
  "@tanstack/react-virtual": "^3.13.12",
48
48
  "downshift": "9.0.4",
@@ -51,7 +51,7 @@
51
51
  "styled-system": "^5.1.5"
52
52
  },
53
53
  "devDependencies": {
54
- "@sproutsocial/seeds-react-tooltip": "^1.1.2",
54
+ "@sproutsocial/seeds-react-tooltip": "^1.1.3",
55
55
  "@sproutsocial/eslint-config-seeds": "*",
56
56
  "@sproutsocial/seeds-react-testing-library": "*",
57
57
  "@sproutsocial/seeds-testing": "*",
@@ -35,12 +35,10 @@ function defaultReducer(state, actionAndChanges) {
35
35
  };
36
36
  case useCombobox.stateChangeTypes.InputKeyDownEnter:
37
37
  case useCombobox.stateChangeTypes.ItemClick:
38
- // If the item is already selected, don't set highlighted index to 0
39
- // We don't have access to selectedItems in the reducer
40
38
  return {
41
39
  ...changes,
42
40
  isOpen: true, // keep the menu open after selection.
43
- highlightedIndex: 0, // with the first option highlighted.
41
+ highlightedIndex: state.highlightedIndex, // preserve the current position so the list doesn't jump.
44
42
  };
45
43
  default:
46
44
  return changes;
@@ -233,7 +231,7 @@ export function MultiAutocomplete<T extends DataWithId>({
233
231
  inputId: id,
234
232
  items: itemsForCombobox,
235
233
  itemToString: itemToStringForDownshift,
236
- defaultHighlightedIndex: 0, // after selection, highlight the first item.
234
+ defaultHighlightedIndex: -1,
237
235
  selectedItem: null,
238
236
  inputValue,
239
237
  isOpen,