@procore/core-react 12.46.1 → 12.47.1

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 (209) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/AnchorNavigation/AnchorNavigation.styles.js +4 -4
  3. package/dist/Avatar/Avatar.styles.js +5 -5
  4. package/dist/AvatarStack/AvatarStack.styles.js +7 -7
  5. package/dist/Badge/Badge.styles.js +2 -2
  6. package/dist/BadgePill/BadgePill.styles.js +4 -4
  7. package/dist/Banner/Banner.styles.js +10 -10
  8. package/dist/Box/Box.styles.js +1 -1
  9. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  10. package/dist/Button/Button.styles.js +5 -5
  11. package/dist/Calendar/Calendar.styles.js +10 -10
  12. package/dist/Calendar/Calendar.styles.js.map +1 -1
  13. package/dist/Card/Card.styles.js +1 -1
  14. package/dist/Checkbox/Checkbox.styles.js +6 -6
  15. package/dist/ContactItem/ContactItem.styles.js +5 -5
  16. package/dist/Content/Content.styles.js +2 -2
  17. package/dist/DateInput/DateInput.styles.js +6 -6
  18. package/dist/DetailPage/DetailPage.styles.js +7 -7
  19. package/dist/Dropdown/Dropdown.styles.js +3 -3
  20. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  21. package/dist/Dropzone/Dropzone.js +1 -1
  22. package/dist/Dropzone/Dropzone.styles.js +9 -9
  23. package/dist/EmptyState/EmptyState.styles.js +6 -6
  24. package/dist/Field/Field.styles.js +3 -3
  25. package/dist/FileList/FileList.styles.js +3 -3
  26. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  27. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  28. package/dist/FileSelect/FileSelect.styles.js +2 -2
  29. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  30. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  31. package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
  32. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  33. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  34. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  35. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  36. package/dist/FileToken/FileToken.styles.js +6 -6
  37. package/dist/FilterToken/FilterToken.styles.js +5 -5
  38. package/dist/FlexList/FlexList.styles.js +1 -1
  39. package/dist/Form/Form.styles.js +13 -13
  40. package/dist/Form/StyledFormikForm.styles.js +2 -2
  41. package/dist/GhostPlaceholder/GhostPlaceholder.styles.js +2 -2
  42. package/dist/Grid/Grid.styles.js +2 -2
  43. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  44. package/dist/Input/Input.styles.js +1 -1
  45. package/dist/Link/Link.styles.js +1 -1
  46. package/dist/ListPage/ListPage.styles.js +8 -8
  47. package/dist/Loader/Loader.styles.js +2 -2
  48. package/dist/Menu/Menu.js +2 -2
  49. package/dist/Menu/Menu.js.map +1 -1
  50. package/dist/MenuImperative/MenuImperative.styles.js +11 -11
  51. package/dist/Modal/Modal.styles.js +13 -13
  52. package/dist/MultiSelect/MultiSelect.styles.js +8 -8
  53. package/dist/NextMenu/NextMenu.styles.js +3 -3
  54. package/dist/Notation/Notation.js +1 -1
  55. package/dist/NumberInput/NumberInput.styles.js +7 -7
  56. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  57. package/dist/PageLayout/PageLayout.styles.js +16 -16
  58. package/dist/PageTemplate/PageFooterTemplate/PageFooterTemplate.styles.js +1 -1
  59. package/dist/PageTemplate/PageHeaderTemplate/PageHeaderTemplate.styles.js +3 -3
  60. package/dist/PageTemplate/PagePaneTemplate/PagePaneTemplate.styles.js +2 -2
  61. package/dist/PageTemplate/PageTemplate/PageTemplate.styles.js +3 -3
  62. package/dist/Pagination/Pagination.styles.js +5 -5
  63. package/dist/Panel/Panel.styles.js +11 -11
  64. package/dist/Pill/Pill.styles.js +3 -3
  65. package/dist/PillSelect/PillSelect.styles.js +4 -4
  66. package/dist/Popover/Popover.styles.js +2 -2
  67. package/dist/Portal/Portal.styles.js +1 -1
  68. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  69. package/dist/RadioButton/RadioButton.styles.js +3 -3
  70. package/dist/Required/Required.styles.js +3 -3
  71. package/dist/Search/Search.styles.js +5 -5
  72. package/dist/Section/Section.styles.js +7 -7
  73. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  74. package/dist/Select/Select.styles.js +8 -8
  75. package/dist/Semantic/Semantic.styles.js +9 -9
  76. package/dist/Slider/Slider.styles.js +5 -5
  77. package/dist/Spinner/Spinner.styles.js +7 -7
  78. package/dist/SplitViewCard/SplitViewCard.styles.js +8 -8
  79. package/dist/SuperSelect/SuperSelect.components.d.ts +1 -0
  80. package/dist/SuperSelect/SuperSelect.components.js +14 -9
  81. package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
  82. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  83. package/dist/SuperSelect/SuperSelect.styles.d.ts +6 -0
  84. package/dist/SuperSelect/SuperSelect.styles.js +66 -62
  85. package/dist/SuperSelect/SuperSelect.styles.js.map +1 -1
  86. package/dist/SuperSelect/presets/filterPreset.js +1 -1
  87. package/dist/SuperSelect/presets/filterPreset.js.map +1 -1
  88. package/dist/SuperSelect/useSuperSelect.js +81 -19
  89. package/dist/SuperSelect/useSuperSelect.js.map +1 -1
  90. package/dist/Switch/Switch.styles.js +4 -4
  91. package/dist/Table/Table.styles.js +30 -30
  92. package/dist/Table/Table.styles.js.map +1 -1
  93. package/dist/TableShelf/TableShelf.styles.js +5 -5
  94. package/dist/Tabs/Tabs.styles.js +16 -16
  95. package/dist/Tearsheet/Tearsheet.styles.js +5 -5
  96. package/dist/TextArea/TextArea.styles.js +1 -1
  97. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  98. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  99. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  100. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  101. package/dist/Tile/Tile.styles.js +8 -8
  102. package/dist/Title/Title.styles.js +7 -7
  103. package/dist/Toast/Toast.styles.js +3 -3
  104. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  105. package/dist/Token/Token.styles.js +5 -5
  106. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  107. package/dist/ToolLandingPage/ToolLandingPage.styles.js +3 -3
  108. package/dist/Tooltip/Tooltip.styles.js +3 -3
  109. package/dist/Tree/Tree.js +1 -1
  110. package/dist/Tree/Tree.styles.js +10 -10
  111. package/dist/Typeahead/Typeahead.styles.js +3 -3
  112. package/dist/Typography/Typography.styles.js +1 -1
  113. package/dist/Typography/Typography.table.story.js +2 -2
  114. package/dist/_locales/de-DE.json +1 -1
  115. package/dist/_locales/fr-CA.json +1 -1
  116. package/dist/_locales/fr-FR.json +1 -1
  117. package/dist/_locales/is-IS.json +1 -1
  118. package/dist/_locales/it-IT.json +1 -1
  119. package/dist/_locales/ja-JP.json +1 -1
  120. package/dist/_locales/nb-NO.json +207 -207
  121. package/dist/_locales/pl-PL.json +1 -1
  122. package/dist/_locales/pt-BR.json +1 -1
  123. package/dist/_locales/pt-PT.json +6 -6
  124. package/dist/_locales/th-TH.json +1 -1
  125. package/dist/_locales/zh-SG.json +1 -1
  126. package/dist/_locales/zh-TW.json +2 -2
  127. package/dist/_storyHelpers_/components/Deprecation.styles.js +1 -1
  128. package/dist/_storyHelpers_/components/StoryGrid.js +3 -3
  129. package/dist/_typedoc/AnchorNavigation/AnchorNavigation.types.json +4 -4
  130. package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
  131. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +25 -25
  132. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  133. package/dist/_typedoc/Banner/Banner.types.json +15 -15
  134. package/dist/_typedoc/Box/Box.types.json +68 -68
  135. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  136. package/dist/_typedoc/Button/Button.types.json +14 -14
  137. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  138. package/dist/_typedoc/Card/Card.types.json +6 -6
  139. package/dist/_typedoc/Checkbox/Checkbox.types.json +8 -8
  140. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  141. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  142. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  143. package/dist/_typedoc/DetailPage/DetailPage.types.json +5 -5
  144. package/dist/_typedoc/Dropdown/Dropdown.types.json +38 -38
  145. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +31 -31
  146. package/dist/_typedoc/Dropzone/Dropzone.types.json +44 -44
  147. package/dist/_typedoc/EmptyState/EmptyState.types.json +18 -18
  148. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  149. package/dist/_typedoc/FileSelect/FileSelect.types.json +27 -27
  150. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  151. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  152. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
  153. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  154. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  155. package/dist/_typedoc/Form/Form.types.json +760 -760
  156. package/dist/_typedoc/GhostPlaceholder/GhostPlaceholder.types.json +12 -12
  157. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  158. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +54 -54
  159. package/dist/_typedoc/Input/Input.types.json +2 -2
  160. package/dist/_typedoc/Link/Link.types.json +1 -1
  161. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  162. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  163. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +84 -84
  164. package/dist/_typedoc/Modal/Modal.types.json +48 -48
  165. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +33 -33
  166. package/dist/_typedoc/NextTile/NextTile.types.json +32 -32
  167. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  168. package/dist/_typedoc/NumberInput/NumberInput.types.json +48 -48
  169. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +33 -33
  170. package/dist/_typedoc/PageLayout/PageLayout.types.json +28 -28
  171. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  172. package/dist/_typedoc/Panel/Panel.types.json +28 -28
  173. package/dist/_typedoc/Pill/Pill.types.json +2 -2
  174. package/dist/_typedoc/PillSelect/PillSelect.types.json +49 -49
  175. package/dist/_typedoc/Popover/Popover.types.json +15 -15
  176. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +7 -7
  177. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  178. package/dist/_typedoc/Required/Required.types.json +5 -5
  179. package/dist/_typedoc/Search/Search.types.json +18 -18
  180. package/dist/_typedoc/Section/Section.types.json +15 -15
  181. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +21 -21
  182. package/dist/_typedoc/Select/Select.types.json +67 -67
  183. package/dist/_typedoc/SettingsPage/SettingsPage.types.json +10 -10
  184. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  185. package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
  186. package/dist/_typedoc/SplitViewCard/SplitViewCard.types.json +14 -14
  187. package/dist/_typedoc/Table/Table.types.json +104 -104
  188. package/dist/_typedoc/Tabs/Tabs.types.json +21 -21
  189. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +17 -17
  190. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  191. package/dist/_typedoc/TextEditor/TextEditor.types.json +11 -11
  192. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  193. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
  194. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +43 -43
  195. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +29 -29
  196. package/dist/_typedoc/Tile/Tile.types.json +8 -8
  197. package/dist/_typedoc/Title/Title.types.json +1 -1
  198. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  199. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +4 -4
  200. package/dist/_typedoc/Token/Token.types.json +7 -7
  201. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  202. package/dist/_typedoc/ToolLandingPage/ToolLandingPage.types.json +8 -8
  203. package/dist/_typedoc/Tooltip/Tooltip.types.json +15 -15
  204. package/dist/_typedoc/Tree/Tree.types.json +88 -88
  205. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  206. package/dist/_typedoc/Typography/Typography.types.json +9 -9
  207. package/dist/_typedoc/_utils/types.json +3 -3
  208. package/dist/_typedoc/a11y-tips.json +1 -0
  209. package/package.json +2 -2
@@ -878,7 +878,15 @@ export function useSuperSelect(_ref3) {
878
878
  keyboardHandlers: false
879
879
  }), useDismiss(floating.context, {
880
880
  enabled: !disabled
881
- }), useListNavigation(floating.context, {
881
+ }), {
882
+ reference: {
883
+ onKeyDown: function onKeyDown(e) {
884
+ if (e.key === 'ArrowUp') {
885
+ e.preventDefault();
886
+ }
887
+ }
888
+ }
889
+ }, useListNavigation(floating.context, {
882
890
  activeIndex: activeMenuIndex,
883
891
  disabledIndices: groupIndices,
884
892
  enabled: !disabled,
@@ -910,12 +918,12 @@ export function useSuperSelect(_ref3) {
910
918
  $placeholder: !selectedLabel,
911
919
  'aria-activedescendant': multiple ? undefined : activeDescendantId
912
920
  }, !multiple && _objectSpread(_objectSpread({
913
- 'aria-controls': open ? overlayId : undefined,
921
+ 'aria-controls': open ? listId : undefined,
914
922
  'aria-describedby': selectedValueId,
915
923
  'aria-expanded': open,
916
924
  'aria-haspopup': 'listbox'
917
925
  }, getAriaLabelProps()), {}, {
918
- role: 'button',
926
+ role: 'combobox',
919
927
  tabIndex: disabled ? -1 : tabIndex
920
928
  })), {}, {
921
929
  onKeyDown: function onKeyDown() {
@@ -925,10 +933,20 @@ export function useSuperSelect(_ref3) {
925
933
  }),
926
934
  // TODO fix type
927
935
  floating: {
928
- role: search ? 'listbox' : 'none',
936
+ role: 'group',
937
+ 'aria-orientation': undefined,
929
938
  id: overlayId,
930
- onKeyDown: function onKeyDown() {
939
+ onKeyDown: function onKeyDown(e) {
931
940
  setPointer(false);
941
+ if (e.key === 'ArrowLeft' && multiple && searchValue === '' && Array.isArray(value) && value.length > 0) {
942
+ e.preventDefault();
943
+ e.stopPropagation();
944
+ setOpen(false);
945
+ requestAnimationFrame(function () {
946
+ var _tokenRemoveRefs$curr2;
947
+ (_tokenRemoveRefs$curr2 = tokenRemoveRefs.current[value.length - 1]) === null || _tokenRemoveRefs$curr2 === void 0 ? void 0 : _tokenRemoveRefs$curr2.focus();
948
+ });
949
+ }
932
950
  },
933
951
  onPointerMove: function onPointerMove() {
934
952
  setPointer(true);
@@ -956,7 +974,7 @@ export function useSuperSelect(_ref3) {
956
974
  var showPlaceholder = isEmpty();
957
975
  return _objectSpread(_objectSpread({
958
976
  'aria-activedescendant': activeDescendantId,
959
- 'aria-controls': open ? overlayId : undefined,
977
+ 'aria-controls': open ? listId : undefined,
960
978
  'aria-expanded': open,
961
979
  'aria-haspopup': 'listbox'
962
980
  }, getAriaLabelProps()), {}, {
@@ -966,6 +984,11 @@ export function useSuperSelect(_ref3) {
966
984
  placeholder: showPlaceholder ? placeholder : '',
967
985
  disabled: disabled,
968
986
  onKeyDown: function onKeyDown(e) {
987
+ if (e.key === 'ArrowUp') {
988
+ e.preventDefault();
989
+ e.stopPropagation();
990
+ return;
991
+ }
969
992
  if (e.key === 'Tab') {
970
993
  if (open) {
971
994
  var _floating$refs$floati;
@@ -974,6 +997,15 @@ export function useSuperSelect(_ref3) {
974
997
  (_floating$refs$floati = floating.refs.floating.current) === null || _floating$refs$floati === void 0 ? void 0 : _floating$refs$floati.focus();
975
998
  }
976
999
  }
1000
+ if (e.key === 'ArrowLeft' && searchValue === '' && Array.isArray(value) && value.length > 0) {
1001
+ e.preventDefault();
1002
+ e.stopPropagation();
1003
+ setOpen(false);
1004
+ requestAnimationFrame(function () {
1005
+ var _tokenRemoveRefs$curr3;
1006
+ (_tokenRemoveRefs$curr3 = tokenRemoveRefs.current[value.length - 1]) === null || _tokenRemoveRefs$curr3 === void 0 ? void 0 : _tokenRemoveRefs$curr3.focus();
1007
+ });
1008
+ }
977
1009
  }
978
1010
  });
979
1011
  }
@@ -989,11 +1021,11 @@ export function useSuperSelect(_ref3) {
989
1021
  var _searchRef$current2;
990
1022
  (_searchRef$current2 = searchRef.current) === null || _searchRef$current2 === void 0 ? void 0 : _searchRef$current2.focus();
991
1023
  } else if (index >= nextVal.length) {
992
- var _tokenRemoveRefs$curr2;
993
- (_tokenRemoveRefs$curr2 = tokenRemoveRefs.current[nextVal.length - 1]) === null || _tokenRemoveRefs$curr2 === void 0 ? void 0 : _tokenRemoveRefs$curr2.focus();
1024
+ var _tokenRemoveRefs$curr4;
1025
+ (_tokenRemoveRefs$curr4 = tokenRemoveRefs.current[nextVal.length - 1]) === null || _tokenRemoveRefs$curr4 === void 0 ? void 0 : _tokenRemoveRefs$curr4.focus();
994
1026
  } else {
995
- var _tokenRemoveRefs$curr3;
996
- (_tokenRemoveRefs$curr3 = tokenRemoveRefs.current[index]) === null || _tokenRemoveRefs$curr3 === void 0 ? void 0 : _tokenRemoveRefs$curr3.focus();
1027
+ var _tokenRemoveRefs$curr5;
1028
+ (_tokenRemoveRefs$curr5 = tokenRemoveRefs.current[index]) === null || _tokenRemoveRefs$curr5 === void 0 ? void 0 : _tokenRemoveRefs$curr5.focus();
997
1029
  }
998
1030
  });
999
1031
  }
@@ -1014,19 +1046,28 @@ export function useSuperSelect(_ref3) {
1014
1046
  e.preventDefault();
1015
1047
  e.stopPropagation();
1016
1048
  if (index > 0) {
1017
- var _tokenRemoveRefs$curr4;
1018
- (_tokenRemoveRefs$curr4 = tokenRemoveRefs.current[index - 1]) === null || _tokenRemoveRefs$curr4 === void 0 ? void 0 : _tokenRemoveRefs$curr4.focus();
1049
+ var _tokenRemoveRefs$curr6;
1050
+ (_tokenRemoveRefs$curr6 = tokenRemoveRefs.current[index - 1]) === null || _tokenRemoveRefs$curr6 === void 0 ? void 0 : _tokenRemoveRefs$curr6.focus();
1019
1051
  }
1020
1052
  } else if (e.key === 'ArrowRight') {
1021
1053
  e.preventDefault();
1022
1054
  e.stopPropagation();
1023
1055
  if (isMultiple(multiple, value) && index < value.length - 1) {
1024
- var _tokenRemoveRefs$curr5;
1025
- (_tokenRemoveRefs$curr5 = tokenRemoveRefs.current[index + 1]) === null || _tokenRemoveRefs$curr5 === void 0 ? void 0 : _tokenRemoveRefs$curr5.focus();
1056
+ var _tokenRemoveRefs$curr7;
1057
+ (_tokenRemoveRefs$curr7 = tokenRemoveRefs.current[index + 1]) === null || _tokenRemoveRefs$curr7 === void 0 ? void 0 : _tokenRemoveRefs$curr7.focus();
1026
1058
  } else {
1027
1059
  var _searchRef$current3;
1028
1060
  (_searchRef$current3 = searchRef.current) === null || _searchRef$current3 === void 0 ? void 0 : _searchRef$current3.focus();
1029
1061
  }
1062
+ } else if (e.key === 'ArrowDown') {
1063
+ var _searchRef$current4;
1064
+ e.preventDefault();
1065
+ e.stopPropagation();
1066
+ setOpen(true);
1067
+ (_searchRef$current4 = searchRef.current) === null || _searchRef$current4 === void 0 ? void 0 : _searchRef$current4.focus();
1068
+ } else if (e.key === 'ArrowUp') {
1069
+ e.preventDefault();
1070
+ e.stopPropagation();
1030
1071
  }
1031
1072
  }
1032
1073
  };
@@ -1077,14 +1118,34 @@ export function useSuperSelect(_ref3) {
1077
1118
  }
1078
1119
  function getClearProps() {
1079
1120
  return {
1080
- 'aria-hidden': true,
1081
1121
  'aria-label': i18n.t('core.select.clear'),
1082
- tabIndex: -1,
1122
+ tabIndex: 0,
1123
+ onMouseDown: function onMouseDown(e) {
1124
+ e.preventDefault();
1125
+ },
1083
1126
  onClick: function onClick(e) {
1084
1127
  // prevent the menu from closing
1085
1128
  e.stopPropagation();
1086
1129
  setValue(multiple ? [] : null);
1087
1130
  setOpen(true);
1131
+ },
1132
+ onKeyDown: function onKeyDown(e) {
1133
+ if (e.key === 'Enter' || e.key === ' ') {
1134
+ e.preventDefault();
1135
+ e.stopPropagation();
1136
+ setValue(multiple ? [] : null);
1137
+ if (multiple) {
1138
+ var _searchRef$current5;
1139
+ (_searchRef$current5 = searchRef.current) === null || _searchRef$current5 === void 0 ? void 0 : _searchRef$current5.focus();
1140
+ } else {
1141
+ var _floating$refs$domRef;
1142
+ ;
1143
+ (_floating$refs$domRef = floating.refs.domReference.current) === null || _floating$refs$domRef === void 0 ? void 0 : _floating$refs$domRef.focus();
1144
+ }
1145
+ }
1146
+ if (e.key === 'ArrowUp' || e.key === 'ArrowLeft' || e.key === 'ArrowRight') {
1147
+ e.stopPropagation();
1148
+ }
1088
1149
  }
1089
1150
  };
1090
1151
  }
@@ -1102,9 +1163,10 @@ export function useSuperSelect(_ref3) {
1102
1163
  onScrollBottom();
1103
1164
  }
1104
1165
  };
1105
- return {
1166
+ return _objectSpread(_objectSpread({
1106
1167
  role: 'listbox',
1107
- id: listId,
1168
+ id: listId
1169
+ }, getAriaLabelProps()), {}, {
1108
1170
  data: draggable ? queriedDraggableOptions : options,
1109
1171
  components: {
1110
1172
  Item: components === null || components === void 0 ? void 0 : components.Item // TODO fix type
@@ -1117,7 +1179,7 @@ export function useSuperSelect(_ref3) {
1117
1179
  tabIndex: -1,
1118
1180
  totalListHeightChanged: setListHeight,
1119
1181
  atBottomStateChange: atBottomStateChange
1120
- };
1182
+ });
1121
1183
  }
1122
1184
  var onDragEnd = React.useCallback(function (result) {
1123
1185
  if (!result.destination) {