@patternfly/react-core 6.1.0-prerelease.8 → 6.1.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 (230) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/components/package.json +1 -1
  3. package/deprecated/package.json +1 -1
  4. package/dist/dynamic/components/AboutModal/package.json +1 -1
  5. package/dist/dynamic/components/Accordion/package.json +1 -1
  6. package/dist/dynamic/components/ActionList/package.json +1 -1
  7. package/dist/dynamic/components/Alert/package.json +1 -1
  8. package/dist/dynamic/components/Avatar/package.json +1 -1
  9. package/dist/dynamic/components/BackToTop/package.json +1 -1
  10. package/dist/dynamic/components/Backdrop/package.json +1 -1
  11. package/dist/dynamic/components/BackgroundImage/package.json +1 -1
  12. package/dist/dynamic/components/Badge/package.json +1 -1
  13. package/dist/dynamic/components/Banner/package.json +1 -1
  14. package/dist/dynamic/components/Brand/package.json +1 -1
  15. package/dist/dynamic/components/Breadcrumb/package.json +1 -1
  16. package/dist/dynamic/components/Button/package.json +1 -1
  17. package/dist/dynamic/components/CalendarMonth/package.json +1 -1
  18. package/dist/dynamic/components/Card/package.json +1 -1
  19. package/dist/dynamic/components/Checkbox/package.json +1 -1
  20. package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
  21. package/dist/dynamic/components/CodeBlock/package.json +1 -1
  22. package/dist/dynamic/components/Content/package.json +1 -1
  23. package/dist/dynamic/components/DataList/package.json +1 -1
  24. package/dist/dynamic/components/DatePicker/package.json +1 -1
  25. package/dist/dynamic/components/DescriptionList/package.json +1 -1
  26. package/dist/dynamic/components/Divider/package.json +1 -1
  27. package/dist/dynamic/components/Drawer/package.json +1 -1
  28. package/dist/dynamic/components/Dropdown/package.json +1 -1
  29. package/dist/dynamic/components/DualListSelector/package.json +1 -1
  30. package/dist/dynamic/components/EmptyState/package.json +1 -1
  31. package/dist/dynamic/components/ExpandableSection/package.json +1 -1
  32. package/dist/dynamic/components/FileUpload/package.json +1 -1
  33. package/dist/dynamic/components/Form/package.json +1 -1
  34. package/dist/dynamic/components/FormSelect/package.json +1 -1
  35. package/dist/dynamic/components/HelperText/package.json +1 -1
  36. package/dist/dynamic/components/Hint/package.json +1 -1
  37. package/dist/dynamic/components/Icon/package.json +1 -1
  38. package/dist/dynamic/components/InputGroup/package.json +1 -1
  39. package/dist/dynamic/components/JumpLinks/package.json +1 -1
  40. package/dist/dynamic/components/Label/package.json +1 -1
  41. package/dist/dynamic/components/List/package.json +1 -1
  42. package/dist/dynamic/components/LoginPage/package.json +1 -1
  43. package/dist/dynamic/components/Masthead/package.json +1 -1
  44. package/dist/dynamic/components/Menu/package.json +1 -1
  45. package/dist/dynamic/components/MenuToggle/package.json +1 -1
  46. package/dist/dynamic/components/Modal/package.json +1 -1
  47. package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
  48. package/dist/dynamic/components/Nav/package.json +1 -1
  49. package/dist/dynamic/components/NotificationBadge/package.json +1 -1
  50. package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
  51. package/dist/dynamic/components/NumberInput/package.json +1 -1
  52. package/dist/dynamic/components/OverflowMenu/package.json +1 -1
  53. package/dist/dynamic/components/Page/package.json +1 -1
  54. package/dist/dynamic/components/Pagination/package.json +1 -1
  55. package/dist/dynamic/components/Panel/package.json +1 -1
  56. package/dist/dynamic/components/Popover/package.json +1 -1
  57. package/dist/dynamic/components/Progress/package.json +1 -1
  58. package/dist/dynamic/components/ProgressStepper/package.json +1 -1
  59. package/dist/dynamic/components/Radio/package.json +1 -1
  60. package/dist/dynamic/components/SearchInput/package.json +1 -1
  61. package/dist/dynamic/components/Select/package.json +1 -1
  62. package/dist/dynamic/components/Sidebar/package.json +1 -1
  63. package/dist/dynamic/components/SimpleList/package.json +1 -1
  64. package/dist/dynamic/components/Skeleton/package.json +1 -1
  65. package/dist/dynamic/components/SkipToContent/package.json +1 -1
  66. package/dist/dynamic/components/Slider/package.json +1 -1
  67. package/dist/dynamic/components/Spinner/package.json +1 -1
  68. package/dist/dynamic/components/Switch/package.json +1 -1
  69. package/dist/dynamic/components/Tabs/package.json +1 -1
  70. package/dist/dynamic/components/TextArea/package.json +1 -1
  71. package/dist/dynamic/components/TextInput/package.json +1 -1
  72. package/dist/dynamic/components/TextInputGroup/package.json +1 -1
  73. package/dist/dynamic/components/TimePicker/package.json +1 -1
  74. package/dist/dynamic/components/Timestamp/package.json +1 -1
  75. package/dist/dynamic/components/Title/package.json +1 -1
  76. package/dist/dynamic/components/ToggleGroup/package.json +1 -1
  77. package/dist/dynamic/components/Toolbar/package.json +1 -1
  78. package/dist/dynamic/components/Tooltip/package.json +1 -1
  79. package/dist/dynamic/components/TreeView/package.json +1 -1
  80. package/dist/dynamic/components/Truncate/package.json +1 -1
  81. package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
  82. package/dist/dynamic/components/Wizard/package.json +1 -1
  83. package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
  84. package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
  85. package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
  86. package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
  87. package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
  88. package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
  89. package/dist/dynamic/deprecated/components/package.json +1 -1
  90. package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
  91. package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
  92. package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
  93. package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
  94. package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
  95. package/dist/dynamic/helpers/constants/package.json +1 -1
  96. package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
  97. package/dist/dynamic/helpers/fileUtils/package.json +1 -1
  98. package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
  99. package/dist/dynamic/helpers/package.json +1 -1
  100. package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
  101. package/dist/dynamic/helpers/typeUtils/package.json +1 -1
  102. package/dist/dynamic/helpers/useInterval/package.json +1 -1
  103. package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
  104. package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
  105. package/dist/dynamic/helpers/util/package.json +1 -1
  106. package/dist/dynamic/layouts/Bullseye/package.json +1 -1
  107. package/dist/dynamic/layouts/Flex/package.json +1 -1
  108. package/dist/dynamic/layouts/Gallery/package.json +1 -1
  109. package/dist/dynamic/layouts/Grid/package.json +1 -1
  110. package/dist/dynamic/layouts/Level/package.json +1 -1
  111. package/dist/dynamic/layouts/Split/package.json +1 -1
  112. package/dist/dynamic/layouts/Stack/package.json +1 -1
  113. package/dist/dynamic/styles/package.json +1 -1
  114. package/dist/dynamic-modules.json +2 -0
  115. package/dist/esm/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
  116. package/dist/esm/components/CalendarMonth/CalendarMonth.js +7 -11
  117. package/dist/esm/components/CalendarMonth/CalendarMonth.js.map +1 -1
  118. package/dist/esm/components/Dropdown/Dropdown.d.ts +2 -0
  119. package/dist/esm/components/Dropdown/Dropdown.d.ts.map +1 -1
  120. package/dist/esm/components/Dropdown/Dropdown.js +12 -3
  121. package/dist/esm/components/Dropdown/Dropdown.js.map +1 -1
  122. package/dist/esm/components/FileUpload/FileUpload.d.ts +2 -1
  123. package/dist/esm/components/FileUpload/FileUpload.d.ts.map +1 -1
  124. package/dist/esm/components/FileUpload/FileUpload.js +2 -1
  125. package/dist/esm/components/FileUpload/FileUpload.js.map +1 -1
  126. package/dist/esm/components/Menu/MenuContainer.d.ts +2 -0
  127. package/dist/esm/components/Menu/MenuContainer.d.ts.map +1 -1
  128. package/dist/esm/components/Menu/MenuContainer.js +21 -4
  129. package/dist/esm/components/Menu/MenuContainer.js.map +1 -1
  130. package/dist/esm/components/Select/Select.d.ts +4 -0
  131. package/dist/esm/components/Select/Select.d.ts.map +1 -1
  132. package/dist/esm/components/Select/Select.js +12 -3
  133. package/dist/esm/components/Select/Select.js.map +1 -1
  134. package/dist/esm/components/Toolbar/ToolbarFilter.d.ts.map +1 -1
  135. package/dist/esm/components/Toolbar/ToolbarFilter.js +4 -2
  136. package/dist/esm/components/Toolbar/ToolbarFilter.js.map +1 -1
  137. package/dist/esm/demos/DashboardWrapper.d.ts.map +1 -1
  138. package/dist/esm/demos/DashboardWrapper.js +10 -2
  139. package/dist/esm/demos/DashboardWrapper.js.map +1 -1
  140. package/dist/esm/helpers/KeyboardHandler.d.ts +7 -0
  141. package/dist/esm/helpers/KeyboardHandler.d.ts.map +1 -1
  142. package/dist/esm/helpers/KeyboardHandler.js +25 -0
  143. package/dist/esm/helpers/KeyboardHandler.js.map +1 -1
  144. package/dist/js/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
  145. package/dist/js/components/CalendarMonth/CalendarMonth.js +7 -11
  146. package/dist/js/components/CalendarMonth/CalendarMonth.js.map +1 -1
  147. package/dist/js/components/Dropdown/Dropdown.d.ts +2 -0
  148. package/dist/js/components/Dropdown/Dropdown.d.ts.map +1 -1
  149. package/dist/js/components/Dropdown/Dropdown.js +11 -2
  150. package/dist/js/components/Dropdown/Dropdown.js.map +1 -1
  151. package/dist/js/components/FileUpload/FileUpload.d.ts +2 -1
  152. package/dist/js/components/FileUpload/FileUpload.d.ts.map +1 -1
  153. package/dist/js/components/FileUpload/FileUpload.js +2 -1
  154. package/dist/js/components/FileUpload/FileUpload.js.map +1 -1
  155. package/dist/js/components/Menu/MenuContainer.d.ts +2 -0
  156. package/dist/js/components/Menu/MenuContainer.d.ts.map +1 -1
  157. package/dist/js/components/Menu/MenuContainer.js +22 -5
  158. package/dist/js/components/Menu/MenuContainer.js.map +1 -1
  159. package/dist/js/components/Select/Select.d.ts +4 -0
  160. package/dist/js/components/Select/Select.d.ts.map +1 -1
  161. package/dist/js/components/Select/Select.js +11 -2
  162. package/dist/js/components/Select/Select.js.map +1 -1
  163. package/dist/js/components/Toolbar/ToolbarFilter.d.ts.map +1 -1
  164. package/dist/js/components/Toolbar/ToolbarFilter.js +4 -2
  165. package/dist/js/components/Toolbar/ToolbarFilter.js.map +1 -1
  166. package/dist/js/demos/DashboardWrapper.d.ts.map +1 -1
  167. package/dist/js/demos/DashboardWrapper.js +10 -2
  168. package/dist/js/demos/DashboardWrapper.js.map +1 -1
  169. package/dist/js/helpers/KeyboardHandler.d.ts +7 -0
  170. package/dist/js/helpers/KeyboardHandler.d.ts.map +1 -1
  171. package/dist/js/helpers/KeyboardHandler.js +27 -1
  172. package/dist/js/helpers/KeyboardHandler.js.map +1 -1
  173. package/dist/umd/assets/{output-Df7FMwYL.css → output-ByZdJvYx.css} +10342 -10295
  174. package/dist/umd/react-core.min.js +3 -3
  175. package/helpers/package.json +1 -1
  176. package/layouts/package.json +1 -1
  177. package/next/package.json +1 -1
  178. package/package.json +7 -7
  179. package/src/components/CalendarMonth/CalendarMonth.tsx +7 -10
  180. package/src/components/DataList/examples/DataList.md +16 -4
  181. package/src/components/Dropdown/Dropdown.tsx +13 -1
  182. package/src/components/DualListSelector/examples/DualListSelector.md +16 -14
  183. package/src/components/FileUpload/FileUpload.tsx +3 -1
  184. package/src/components/FileUpload/__tests__/__snapshots__/FileUpload.test.tsx.snap +1 -1
  185. package/src/components/FileUpload/examples/FileUpload.md +1 -1
  186. package/src/components/FileUpload/examples/FileUploadTextWithRestrictions.tsx +24 -7
  187. package/src/components/LoginPage/examples/LoginPage.md +1 -1
  188. package/src/components/LoginPage/examples/LoginPageBasic.tsx +2 -2
  189. package/src/components/LoginPage/examples/LoginPageLanguageSelect.tsx +2 -2
  190. package/src/components/LoginPage/examples/LoginPageShowHidePassword.tsx +2 -2
  191. package/src/components/Menu/MenuContainer.tsx +24 -3
  192. package/src/components/Modal/examples/Modal.md +1 -1
  193. package/src/components/MultipleFileUpload/__tests__/__snapshots__/MultipleFileUpload.test.tsx.snap +3 -3
  194. package/src/components/Select/Select.tsx +16 -1
  195. package/src/components/Select/examples/SelectMultiTypeahead.tsx +1 -1
  196. package/src/components/Select/examples/SelectMultiTypeaheadCheckbox.tsx +1 -1
  197. package/src/components/Select/examples/SelectMultiTypeaheadCreatable.tsx +1 -1
  198. package/src/components/Select/examples/SelectTypeahead.tsx +1 -1
  199. package/src/components/Select/examples/SelectTypeaheadCreatable.tsx +1 -1
  200. package/src/components/SkipToContent/examples/SkipToContentBasic.tsx +144 -126
  201. package/src/components/Toolbar/ToolbarFilter.tsx +2 -1
  202. package/src/components/Wizard/examples/Wizard.md +2 -1
  203. package/src/components/Wizard/examples/WizardWithinModal.tsx +5 -8
  204. package/src/demos/CustomMenus/ApplicationLauncher.md +1 -1
  205. package/src/demos/CustomMenus/CustomMenus.md +1 -1
  206. package/src/demos/CustomMenus/examples/ApplicationLauncherDemo.tsx +2 -2
  207. package/src/demos/CustomMenus/examples/DrilldownMenuDemo.tsx +1 -1
  208. package/src/demos/DashboardWrapper.tsx +13 -2
  209. package/src/demos/ExpandableSection/examples/ExpandableTextDemo.tsx +1 -7
  210. package/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +15 -1
  211. package/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +15 -1
  212. package/src/demos/assets/PF-IconLogo.svg +17 -0
  213. package/src/demos/examples/Masthead/MastheadWithHorizontalNav.tsx +14 -1
  214. package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +14 -1
  215. package/src/demos/examples/Nav/NavDefault.tsx +15 -1
  216. package/src/demos/examples/Nav/NavExpandable.tsx +15 -1
  217. package/src/demos/examples/Nav/NavFlyout.tsx +15 -1
  218. package/src/demos/examples/Nav/NavGrouped.tsx +15 -1
  219. package/src/demos/examples/Nav/NavHorizontal.tsx +15 -1
  220. package/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx +15 -1
  221. package/src/demos/examples/Nav/NavManual.tsx +15 -1
  222. package/src/demos/examples/Nav/NavWithSubnav.tsx +15 -1
  223. package/src/demos/examples/Page/PageContextSelector.tsx +14 -1
  224. package/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +14 -1
  225. package/src/demos/examples/Page/PageStickySectionGroup.tsx +14 -1
  226. package/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +14 -1
  227. package/src/demos/examples/Wizard/InPageWithDrawer.tsx +15 -1
  228. package/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx +14 -1
  229. package/src/helpers/KeyboardHandler.tsx +27 -0
  230. package/src/demos/examples/DashboardWrapper.js +0 -126
@@ -1 +1 @@
1
- {"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.1.0-prerelease.7","private":true}
1
+ {"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.1.0-prerelease.16","private":true}
@@ -1 +1 @@
1
- {"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.1.0-prerelease.7","private":true}
1
+ {"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.1.0-prerelease.16","private":true}
package/next/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.1.0-prerelease.7","private":true}
1
+ {"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.1.0-prerelease.16","private":true}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "6.1.0-prerelease.8",
3
+ "version": "6.1.0",
4
4
  "description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -46,15 +46,15 @@
46
46
  "subpaths": "node ../../scripts/exportSubpaths.mjs --config subpaths.config.json"
47
47
  },
48
48
  "dependencies": {
49
- "@patternfly/react-icons": "^6.1.0-prerelease.4",
50
- "@patternfly/react-styles": "^6.1.0-prerelease.3",
51
- "@patternfly/react-tokens": "^6.1.0-prerelease.3",
49
+ "@patternfly/react-icons": "^6.1.0",
50
+ "@patternfly/react-styles": "^6.1.0",
51
+ "@patternfly/react-tokens": "^6.1.0",
52
52
  "focus-trap": "7.6.2",
53
- "react-dropzone": "^14.2.3",
53
+ "react-dropzone": "^14.3.5",
54
54
  "tslib": "^2.8.1"
55
55
  },
56
56
  "devDependencies": {
57
- "@patternfly/patternfly": "6.1.0-prerelease.5",
57
+ "@patternfly/patternfly": "6.1.0-prerelease.11",
58
58
  "case-anything": "^2.1.13",
59
59
  "css": "^3.0.0",
60
60
  "fs-extra": "^11.2.0"
@@ -63,5 +63,5 @@
63
63
  "react": "^17 || ^18",
64
64
  "react-dom": "^17 || ^18"
65
65
  },
66
- "gitHead": "0f9245023fb9bdf860c9eee91b6fe160b6c261c5"
66
+ "gitHead": "fc70165f6d07de6a24f6943c826c1432ea6d44cf"
67
67
  }
@@ -319,18 +319,15 @@ export const CalendarMonth = ({
319
319
  onSelectToggle(isOpen);
320
320
  }}
321
321
  onSelect={(ev, monthNum) => {
322
- // When we put CalendarMonth in a Popover we want the Popover's onDocumentClick
323
- // to see the SelectOption as a child so it doesn't close the Popover.
324
- setTimeout(() => {
325
- setIsSelectOpen(false);
326
- onSelectToggle(false);
327
- const newDate = changeMonth(Number(monthNum as string));
328
- setFocusedDate(newDate);
329
- setShouldFocus(false);
330
- onMonthChange(ev, newDate);
331
- }, 0);
322
+ setIsSelectOpen(false);
323
+ onSelectToggle(false);
324
+ const newDate = changeMonth(Number(monthNum as string));
325
+ setFocusedDate(newDate);
326
+ setShouldFocus(false);
327
+ onMonthChange(ev, newDate);
332
328
  }}
333
329
  selected={monthFormatted}
330
+ popperProps={{ appendTo: 'inline' }}
334
331
  >
335
332
  <SelectList>
336
333
  {longMonths.map((longMonth, index) => (
@@ -23,7 +23,7 @@ import AngleDownIcon from '@patternfly/react-icons/dist/esm/icons/angle-down-ico
23
23
  import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon';
24
24
  import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
25
25
  import { css } from '@patternfly/react-styles';
26
- import { DragDrop, Draggable, Droppable } from '@patternfly/react-core/deprecated';
26
+ import { DragDropSort, DragDropContainer, Droppable as NewDroppable } from '@patternfly/react-drag-drop';
27
27
 
28
28
  ## Examples
29
29
 
@@ -83,11 +83,23 @@ import { DragDrop, Draggable, Droppable } from '@patternfly/react-core/deprecate
83
83
 
84
84
  ### Draggable
85
85
 
86
- Note: There is a new recommended drag and drop implementation with full keyboard functionality, which replaces this implementation. To adhere to our new recommendations, refer to the [drag and drop demos](/components/drag-and-drop/react-demos).
86
+ To enable drag and drop, wrap the `<DataList>` component with `<DragDropSort>`, define the `variant` property as "DataList", and pass both the sortable items and `onDrop` callback to `<DragDropSort>`. `<DragDropSort>` will create the component's usual children internally based on the items property, so children should not be passed to the wrapped component.
87
87
 
88
- Previously, draggable data lists had their own API for the [drag and drop component](/components/drag-and-drop), which wasn't flexible enough to allow custom styling for items as they are dragged. To address this disparity, `<DragDrop>`, `<Draggable>`, and `<Droppable>` components were added to replace our now deprecated HTML5-based API. Keyboard and screen reader accessibility for the `<DragDrop>` component is still in development.
88
+ Full drag and drop details can be found on the [drag and drop](/components/drag-and-drop) component page.
89
89
 
90
- ```ts isDeprecated file="./DataListDraggable.tsx"
90
+ ```ts file="../../../../../react-drag-drop/src/components/DragDrop/examples/DataListDraggable.tsx"
91
+
92
+ ```
93
+
94
+ ### Draggable with multiple drop zones
95
+
96
+ To enable multiple drop zones, and create the desired amount of `<Droppable>` components within a `<DragDropContainer>`.
97
+
98
+ Each `<Droppable>` should define the `wrapper` property as the component that acts as the drop zone, `<DataList>`, and the `items` property of their respective draggable items as an array of `<DraggableObject>` data. `<DragDropContainer>` should be passed the `onDrop`, `onContainerMove`, and `onCancel` callbacks to handle items being dropped, items moving between droppable containers, and what happens if the drag is cancelled respectively. `<DragDropContainer>` should also be given a `Record` representing all sortable drop zones' items. Both components should define the `variant` property as "DataList".
99
+
100
+ Full drag and drop details can be found on the [drag and drop](/components/drag-and-drop) component page.
101
+
102
+ ```ts file="../../../../../react-drag-drop/src/components/DragDrop/examples/DragDropContainerDataList.tsx"
91
103
 
92
104
  ```
93
105
 
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { css } from '@patternfly/react-styles';
3
3
  import { Menu, MenuContent, MenuProps } from '../Menu';
4
4
  import { Popper } from '../../helpers/Popper/Popper';
5
- import { useOUIAProps, OUIAProps } from '../../helpers';
5
+ import { useOUIAProps, OUIAProps, onToggleArrowKeydownDefault } from '../../helpers';
6
6
 
7
7
  export interface DropdownPopperProps {
8
8
  /** Vertical direction of the popper. If enableFlip is set to true, this will set the initial direction before the popper flips. */
@@ -51,6 +51,8 @@ export interface DropdownProps extends MenuProps, OUIAProps {
51
51
  onOpenChange?: (isOpen: boolean) => void;
52
52
  /** Keys that trigger onOpenChange, defaults to tab and escape. It is highly recommended to include Escape in the array, while Tab may be omitted if the menu contains non-menu items that are focusable. */
53
53
  onOpenChangeKeys?: string[];
54
+ /** Callback to override the toggle keydown behavior. By default, when the toggle has focus and the menu is open, pressing the up/down arrow keys will focus a valid non-disabled menu item - the first item for the down arrow key and last item for the up arrow key. */
55
+ onToggleKeydown?: (event: KeyboardEvent) => void;
54
56
  /** Indicates if the menu should be without the outer box-shadow. */
55
57
  isPlain?: boolean;
56
58
  /** Indicates if the menu should be scrollable. */
@@ -85,6 +87,7 @@ const DropdownBase: React.FunctionComponent<DropdownProps> = ({
85
87
  toggle,
86
88
  shouldFocusToggleOnSelect = false,
87
89
  onOpenChange,
90
+ onToggleKeydown,
88
91
  isPlain,
89
92
  isScrollable,
90
93
  innerRef,
@@ -139,6 +142,14 @@ const DropdownBase: React.FunctionComponent<DropdownProps> = ({
139
142
  toggleRef.current?.focus();
140
143
  }
141
144
  }
145
+
146
+ if (toggleRef.current?.contains(event.target as Node)) {
147
+ if (onToggleKeydown) {
148
+ onToggleKeydown(event);
149
+ } else if (isOpen) {
150
+ onToggleArrowKeydownDefault(event, menuRef);
151
+ }
152
+ }
142
153
  };
143
154
 
144
155
  const handleClick = (event: MouseEvent) => {
@@ -163,6 +174,7 @@ const DropdownBase: React.FunctionComponent<DropdownProps> = ({
163
174
  toggleRef,
164
175
  onOpenChange,
165
176
  onOpenChangeKeys,
177
+ onToggleKeydown,
166
178
  shouldPreventScrollOnItemFocus,
167
179
  shouldFocusFirstItemOnOpen,
168
180
  focusTimeoutDelay
@@ -22,7 +22,7 @@ import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-i
22
22
  import PficonSortCommonAscIcon from '@patternfly/react-icons/dist/esm/icons/pficon-sort-common-asc-icon';
23
23
  import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
24
24
  import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
25
- import { DragDrop, Draggable, Droppable } from '@patternfly/react-core/deprecated';
25
+ import { DragDropSort, DragDropContainer, Droppable as NewDroppable } from '@patternfly/react-drag-drop';
26
26
 
27
27
  ## Examples
28
28
 
@@ -78,22 +78,24 @@ The dual list selector is built in a composable manner to make customization eas
78
78
 
79
79
  ```
80
80
 
81
- ### Drag and drop
81
+ ### Draggable
82
82
 
83
- This example only allows reordering the contents of the "chosen" pane with drag and drop. To make a pane able to be reordered:
83
+ To enable drag and drop, wrap the `<DualListSelectorList>` component with `<DragDropSort>`, define the `variant` property as "DualListSelectorList", and pass both the sortable items and `onDrop` callback to `<DragDropSort>`. `<DragDropSort>` will create the component's usual children internally based on the items property, so children inside the `<DualListSelectorList>` should not be passed to the wrapped component.
84
84
 
85
- - wrap the `DualListSelectorPane` in a `DragDrop` component
86
- - wrap the `DualListSelectorList` in a `Droppable` component
87
- - wrap the `DualListSelectorListItem` components in a `Draggable` component
88
- - define an `onDrop` callback which reorders the sortable options.
89
- - The `onDrop` function provides the starting location and destination location for a dragged item. It should return
90
- true to enable the 'drop' animation in the new location and false to enable the 'drop' animation back to the item's
91
- old position.
92
- - define an `onDrag` callback which ensures that the drag event will not cross hairs with the `onOptionSelect` click
93
- event set on the option. Note: the `ignoreNextOptionSelect` state value is used to prevent selection while dragging.
85
+ Full drag and drop details can be found on the [drag and drop](/components/drag-and-drop) component page.
94
86
 
95
- Note: Keyboard accessibility and screen reader accessibility for the `DragDrop` component are still in development.
87
+ ```ts file="../../../../../react-drag-drop/src/components/DragDrop/examples/DualListSelectorDraggable.tsx"
96
88
 
97
- ```ts file="DualListSelectorDragDrop.tsx"
89
+ ```
90
+
91
+ ### Draggable with multiple drop zones
92
+
93
+ To enable multiple drop zones, wrap the `<DualListSelector>` component with `<DragDropContainer>`, and create the desired amount of `<Droppable>` components within `<DragDropContainer>`. `<Droppable>` components should be located where `<DualListSelectorList>` usually would go for each pane to be made draggable.
94
+
95
+ Each `<Droppable>` should define the `wrapper` property as the component that acts as the drop zone, `<DualListSelectorList>`, and the `items` property of their respective draggable items as an array of `<DraggableObject>` data. `<DragDropContainer>` should be passed the `onDrop`, `onContainerMove`, and `onCancel` callbacks to handle items being dropped, items moving between droppable containers, and what happens if the drag is cancelled respectively. `<DragDropContainer>` should also be given a `Record` representing all sortable drop zones' items. Both components should define the `variant` property as "DualListSelectorList".
96
+
97
+ Full drag and drop details can be found on the [drag and drop](/components/drag-and-drop) component page.
98
+
99
+ ```ts file="../../../../../react-drag-drop/src/components/DragDrop/examples/DragDropContainerDualListSelector.tsx"
98
100
 
99
101
  ```
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { DropzoneInputProps, DropzoneOptions, FileRejection, useDropzone } from 'react-dropzone';
2
+ import { DropzoneInputProps, DropzoneOptions, FileRejection, useDropzone, ErrorCode } from 'react-dropzone';
3
3
  import { FileUploadField, FileUploadFieldProps } from './FileUploadField';
4
4
  import { readFile, fileReaderType } from '../../helpers/fileUtils';
5
5
  import { DropEvent } from '../../helpers/typeUtils';
@@ -84,6 +84,8 @@ export interface FileUploadProps
84
84
  onTextChange?: (event: React.ChangeEvent<HTMLTextAreaElement>, text: string) => void;
85
85
  }
86
86
 
87
+ export { ErrorCode as DropzoneErrorCode }; // FileInvalidType, FileTooLarge, FileTooSmall, TooManyFiles
88
+
87
89
  export const FileUpload: React.FunctionComponent<FileUploadProps> = ({
88
90
  id,
89
91
  type,
@@ -87,7 +87,7 @@ exports[`simple fileupload 1`] = `
87
87
  </span>
88
88
  </div>
89
89
  <input
90
- style="display: none;"
90
+ style="border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: 0px -1px -1px 0px; overflow: hidden; padding: 0px; position: absolute; width: 1px; white-space: nowrap;"
91
91
  tabindex="-1"
92
92
  type="file"
93
93
  />
@@ -40,7 +40,7 @@ Typing/pasting text in the box will call `onTextChange` with a string, and a str
40
40
 
41
41
  ### Restricting file size and type
42
42
 
43
- Any [props accepted by `react-dropzone`'s `Dropzone` component](https://react-dropzone.js.org/#!/Dropzone) can be passed as a `dropzoneProps` object in order to customize the behavior of the Dropzone, such as restricting the size and type of files allowed. The following example will only accept CSV files smaller than 1 KB. Note that file type determination is not reliable across platforms (see the note on react-dropzone's docs about the `accept` prop), so be sure to test the behavior of your file upload restriction on all browsers and operating systems targeted by your application.
43
+ Any [props accepted by `react-dropzone`'s `Dropzone` component](https://react-dropzone.js.org/#!/Dropzone) can be passed as a `dropzoneProps` object in order to customize the behavior of the Dropzone, such as restricting the size and type of files allowed. You can also capture and act upon native `react-dropzone` errors using the exposed `DropzoneErrorCode` enum. The following example will only accept CSV files smaller than 1 KB. Note that file type determination is not reliable across platforms (see the note on react-dropzone's docs about the `accept` prop), so be sure to test the behavior of your file upload restriction on all browsers and operating systems targeted by your application.
44
44
 
45
45
  #### IMPORTANT: A note about security
46
46
 
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import {
3
3
  FileUpload,
4
+ DropzoneErrorCode,
4
5
  FileUploadHelperText,
5
6
  Form,
6
7
  FormGroup,
@@ -9,13 +10,13 @@ import {
9
10
  DropEvent,
10
11
  Icon
11
12
  } from '@patternfly/react-core';
12
- import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
13
13
 
14
14
  export const TextFileUploadWithRestrictions: React.FunctionComponent = () => {
15
15
  const [value, setValue] = React.useState('');
16
16
  const [filename, setFilename] = React.useState('');
17
17
  const [isLoading, setIsLoading] = React.useState(false);
18
18
  const [isRejected, setIsRejected] = React.useState(false);
19
+ const [message, setMessage] = React.useState('Must be a CSV file no larger than 1 KB');
19
20
 
20
21
  const handleFileInputChange = (_, file: File) => {
21
22
  setFilename(file.name);
@@ -29,16 +30,25 @@ export const TextFileUploadWithRestrictions: React.FunctionComponent = () => {
29
30
  setValue(value);
30
31
  };
31
32
 
32
- const handleClear = (_event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
33
+ const reset = () => {
33
34
  setFilename('');
34
35
  setValue('');
36
+ };
37
+
38
+ const handleClear = (_event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
39
+ reset();
35
40
  setIsRejected(false);
36
41
  };
37
42
 
38
43
  const handleFileRejected = () => {
44
+ reset();
39
45
  setIsRejected(true);
40
46
  };
41
47
 
48
+ const handleFileAccepted = () => {
49
+ setIsRejected(false);
50
+ };
51
+
42
52
  const handleFileReadStarted = (_event: DropEvent, _fileHandle: File) => {
43
53
  setIsLoading(true);
44
54
  };
@@ -66,7 +76,16 @@ export const TextFileUploadWithRestrictions: React.FunctionComponent = () => {
66
76
  dropzoneProps={{
67
77
  accept: { 'text/csv': ['.csv'] },
68
78
  maxSize: 1024,
69
- onDropRejected: handleFileRejected
79
+ onDropRejected: (rejections) => {
80
+ const error = rejections[0].errors[0];
81
+ if (error.code === DropzoneErrorCode.FileTooLarge) {
82
+ setMessage('File is too big');
83
+ } else if (error.code === DropzoneErrorCode.FileInvalidType) {
84
+ setMessage('File is not a CSV file');
85
+ }
86
+ handleFileRejected();
87
+ },
88
+ onDropAccepted: handleFileAccepted
70
89
  }}
71
90
  validated={isRejected ? 'error' : 'default'}
72
91
  browseButtonText="Upload"
@@ -77,10 +96,8 @@ export const TextFileUploadWithRestrictions: React.FunctionComponent = () => {
77
96
  <HelperTextItem id="restricted-file-example-helpText" variant={isRejected ? 'error' : 'default'}>
78
97
  {isRejected ? (
79
98
  <>
80
- <Icon status="danger">
81
- <ExclamationCircleIcon />
82
- </Icon>
83
- Must be a CSV file no larger than 1 KB
99
+ <Icon status="danger" />
100
+ {message}
84
101
  </>
85
102
  ) : (
86
103
  'Upload a CSV file'
@@ -18,7 +18,7 @@ propComponents:
18
18
  ]
19
19
  ---
20
20
 
21
- import brandImg2 from '../../assets/brandImgColor2.svg';
21
+ import brandImg from '../../assets/PF-IconLogo.svg';
22
22
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
23
23
  import GoogleIcon from '@patternfly/react-icons/dist/esm/icons/google-icon';
24
24
  import GithubIcon from '@patternfly/react-icons/dist/esm/icons/github-icon';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import brandImg2 from '../../assets/brandImgColor2.svg';
2
+ import brandImg from '../../assets/PF-IconLogo.svg';
3
3
  import {
4
4
  LoginFooterItem,
5
5
  LoginForm,
@@ -114,7 +114,7 @@ export const SimpleLoginPage: React.FunctionComponent = () => {
114
114
  return (
115
115
  <LoginPage
116
116
  footerListVariants={ListVariant.inline}
117
- brandImgSrc={brandImg2}
117
+ brandImgSrc={brandImg}
118
118
  brandImgAlt="PatternFly logo"
119
119
  backgroundImgSrc="/assets/images/pfbg-icon.svg"
120
120
  footerListItems={listItem}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import brandImg2 from '../../assets/brandImgColor2.svg';
2
+ import brandImg from '../../assets/PF-IconLogo.svg';
3
3
  import {
4
4
  LoginFooterItem,
5
5
  LoginForm,
@@ -187,7 +187,7 @@ export const LoginPageLanguageSelect: React.FunctionComponent = () => {
187
187
  return (
188
188
  <LoginPage
189
189
  footerListVariants={ListVariant.inline}
190
- brandImgSrc={brandImg2}
190
+ brandImgSrc={brandImg}
191
191
  brandImgAlt="PatternFly logo"
192
192
  backgroundImgSrc="/assets/images/pfbg-icon.svg"
193
193
  footerListItems={listItem}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import brandImg2 from '../../assets/brandImgColor2.svg';
2
+ import brandImg from '../../assets/PF-IconLogo.svg';
3
3
  import {
4
4
  LoginFooterItem,
5
5
  LoginForm,
@@ -115,7 +115,7 @@ export const LoginPageHideShowPassword: React.FunctionComponent = () => {
115
115
  return (
116
116
  <LoginPage
117
117
  footerListVariants={ListVariant.inline}
118
- brandImgSrc={brandImg2}
118
+ brandImgSrc={brandImg}
119
119
  brandImgAlt="PatternFly logo"
120
120
  backgroundImgSrc="/assets/images/pfbg-icon.svg"
121
121
  footerListItems={listItem}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Popper } from '../../helpers/Popper/Popper';
2
+ import { onToggleArrowKeydownDefault, Popper } from '../../helpers';
3
3
 
4
4
  export interface MenuPopperProps {
5
5
  /** Vertical direction of the popper. If enableFlip is set to true, this will set the initial direction before the popper flips. */
@@ -17,6 +17,7 @@ export interface MenuPopperProps {
17
17
  /** Flag to prevent the popper from overflowing its container and becoming partially obscured. */
18
18
  preventOverflow?: boolean;
19
19
  }
20
+
20
21
  export interface MenuContainerProps {
21
22
  /** Menu to be rendered */
22
23
  menu: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -33,6 +34,8 @@ export interface MenuContainerProps {
33
34
  onOpenChange?: (isOpen: boolean) => void;
34
35
  /** Keys that trigger onOpenChange, defaults to tab and escape. It is highly recommended to include Escape in the array, while Tab may be omitted if the menu contains non-menu items that are focusable. */
35
36
  onOpenChangeKeys?: string[];
37
+ /** Callback to override the toggle keydown behavior. By default, when the toggle has focus and the menu is open, pressing the up/down arrow keys will focus a valid non-disabled menu item - the first item for the down arrow key and last item for the up arrow key. */
38
+ onToggleKeydown?: (event: KeyboardEvent) => void;
36
39
  /** z-index of the dropdown menu */
37
40
  zIndex?: number;
38
41
  /** Additional properties to pass to the Popper */
@@ -55,10 +58,11 @@ export const MenuContainer: React.FunctionComponent<MenuContainerProps> = ({
55
58
  toggle,
56
59
  toggleRef,
57
60
  onOpenChange,
61
+ onToggleKeydown,
58
62
  zIndex = 9999,
59
63
  popperProps,
60
64
  onOpenChangeKeys = ['Escape', 'Tab'],
61
- shouldFocusFirstItemOnOpen = true,
65
+ shouldFocusFirstItemOnOpen = false,
62
66
  shouldPreventScrollOnItemFocus = true,
63
67
  focusTimeoutDelay = 0
64
68
  }: MenuContainerProps) => {
@@ -90,6 +94,14 @@ export const MenuContainer: React.FunctionComponent<MenuContainerProps> = ({
90
94
  toggleRef.current?.focus();
91
95
  }
92
96
  }
97
+
98
+ if (toggleRef.current?.contains(event.target as Node)) {
99
+ if (onToggleKeydown) {
100
+ onToggleKeydown(event);
101
+ } else if (isOpen) {
102
+ onToggleArrowKeydownDefault(event, menuRef);
103
+ }
104
+ }
93
105
  };
94
106
 
95
107
  const handleClick = (event: MouseEvent) => {
@@ -108,7 +120,16 @@ export const MenuContainer: React.FunctionComponent<MenuContainerProps> = ({
108
120
  window.removeEventListener('keydown', handleMenuKeys);
109
121
  window.removeEventListener('click', handleClick);
110
122
  };
111
- }, [focusTimeoutDelay, isOpen, menuRef, onOpenChange, onOpenChangeKeys, shouldPreventScrollOnItemFocus, toggleRef]);
123
+ }, [
124
+ focusTimeoutDelay,
125
+ isOpen,
126
+ menuRef,
127
+ onOpenChange,
128
+ onOpenChangeKeys,
129
+ onToggleKeydown,
130
+ shouldPreventScrollOnItemFocus,
131
+ toggleRef
132
+ ]);
112
133
 
113
134
  return (
114
135
  <Popper
@@ -20,7 +20,7 @@ Basic modals give users the option to either confirm or cancel an action.
20
20
 
21
21
  To flag an open modal, use the `isOpen` property. To execute a callback when a modal is closed, use the `onClose` property.
22
22
 
23
- A modal must have a `<ModalBody>`, containing the main content of the modal. The `<ModalHeader>` and `<ModalFooter>` components are not required, but are typically used to display the modal title and any button actions, respectively.
23
+ The `<ModalBody>`, `<ModalHeader>`, and `<ModalFooter>` components are not required, but are typically used to display the main content of the modal, modal title, and any button actions, respectively.
24
24
 
25
25
  ```ts file="./ModalBasic.tsx"
26
26
 
@@ -9,7 +9,7 @@ exports[`MultipleFileUpload renders custom class names 1`] = `
9
9
  >
10
10
  <input
11
11
  multiple=""
12
- style="display: none;"
12
+ style="border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: 0px -1px -1px 0px; overflow: hidden; padding: 0px; position: absolute; width: 1px; white-space: nowrap;"
13
13
  tabindex="-1"
14
14
  type="file"
15
15
  />
@@ -27,7 +27,7 @@ exports[`MultipleFileUpload renders with expected class names when horizontal 1`
27
27
  >
28
28
  <input
29
29
  multiple=""
30
- style="display: none;"
30
+ style="border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: 0px -1px -1px 0px; overflow: hidden; padding: 0px; position: absolute; width: 1px; white-space: nowrap;"
31
31
  tabindex="-1"
32
32
  type="file"
33
33
  />
@@ -45,7 +45,7 @@ exports[`MultipleFileUpload renders with expected class names when not horizonta
45
45
  >
46
46
  <input
47
47
  multiple=""
48
- style="display: none;"
48
+ style="border: 0px; clip: rect(0px, 0px, 0px, 0px); clip-path: inset(50%); height: 1px; margin: 0px -1px -1px 0px; overflow: hidden; padding: 0px; position: absolute; width: 1px; white-space: nowrap;"
49
49
  tabindex="-1"
50
50
  type="file"
51
51
  />
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { css } from '@patternfly/react-styles';
3
3
  import { Menu, MenuContent, MenuProps } from '../Menu';
4
4
  import { Popper } from '../../helpers/Popper/Popper';
5
- import { getOUIAProps, OUIAProps, getDefaultOUIAId } from '../../helpers';
5
+ import { getOUIAProps, OUIAProps, getDefaultOUIAId, onToggleArrowKeydownDefault } from '../../helpers';
6
6
 
7
7
  export interface SelectPopperProps {
8
8
  /** Vertical direction of the popper. If enableFlip is set to true, this will set the initial direction before the popper flips. */
@@ -62,6 +62,10 @@ export interface SelectProps extends MenuProps, OUIAProps {
62
62
  onOpenChange?: (isOpen: boolean) => void;
63
63
  /** Keys that trigger onOpenChange, defaults to tab and escape. It is highly recommended to include Escape in the array, while Tab may be omitted if the menu contains non-menu items that are focusable. */
64
64
  onOpenChangeKeys?: string[];
65
+ /** Callback to override the toggle keydown behavior. By default, when the toggle has focus and the menu is open, pressing the up/down arrow keys will focus a valid non-disabled menu item - the first item for the down arrow key and last item for the up arrow key. */
66
+ onToggleKeydown?: (event: KeyboardEvent) => void;
67
+ /** Select variant. For typeahead variant focus won't shift to menu items when pressing up/down arrows. */
68
+ variant?: 'default' | 'typeahead';
65
69
  /** Indicates if the select should be without the outer box-shadow */
66
70
  isPlain?: boolean;
67
71
  /** @hide Forwarded ref */
@@ -95,6 +99,8 @@ const SelectBase: React.FunctionComponent<SelectProps & OUIAProps> = ({
95
99
  shouldFocusFirstItemOnOpen = false,
96
100
  onOpenChange,
97
101
  onOpenChangeKeys = ['Escape', 'Tab'],
102
+ onToggleKeydown,
103
+ variant,
98
104
  isPlain,
99
105
  innerRef,
100
106
  zIndex = 9999,
@@ -144,6 +150,14 @@ const SelectBase: React.FunctionComponent<SelectProps & OUIAProps> = ({
144
150
  toggleRef.current?.focus();
145
151
  }
146
152
  }
153
+
154
+ if (toggleRef.current?.contains(event.target as Node)) {
155
+ if (onToggleKeydown) {
156
+ onToggleKeydown(event);
157
+ } else if (isOpen && variant !== 'typeahead') {
158
+ onToggleArrowKeydownDefault(event, menuRef);
159
+ }
160
+ }
147
161
  };
148
162
 
149
163
  const handleClick = (event: MouseEvent) => {
@@ -168,6 +182,7 @@ const SelectBase: React.FunctionComponent<SelectProps & OUIAProps> = ({
168
182
  toggleRef,
169
183
  onOpenChange,
170
184
  onOpenChangeKeys,
185
+ onToggleKeydown,
171
186
  shouldPreventScrollOnItemFocus,
172
187
  shouldFocusFirstItemOnOpen,
173
188
  focusTimeoutDelay
@@ -247,7 +247,7 @@ export const SelectMultiTypeahead: React.FunctionComponent = () => {
247
247
  !isOpen && closeMenu();
248
248
  }}
249
249
  toggle={toggle}
250
- shouldFocusFirstItemOnOpen={false}
250
+ variant="typeahead"
251
251
  >
252
252
  <SelectList isAriaMultiselectable id="select-multi-typeahead-listbox">
253
253
  {selectOptions.map((option, index) => (
@@ -241,7 +241,7 @@ export const SelectMultiTypeaheadCheckbox: React.FunctionComponent = () => {
241
241
  !isOpen && closeMenu();
242
242
  }}
243
243
  toggle={toggle}
244
- shouldFocusFirstItemOnOpen={false}
244
+ variant="typeahead"
245
245
  >
246
246
  <SelectList isAriaMultiselectable id="select-multi-typeahead-checkbox-listbox">
247
247
  {selectOptions.map((option, index) => (
@@ -260,7 +260,7 @@ export const SelectMultiTypeaheadCreatable: React.FunctionComponent = () => {
260
260
  !isOpen && closeMenu();
261
261
  }}
262
262
  toggle={toggle}
263
- shouldFocusFirstItemOnOpen={false}
263
+ variant="typeahead"
264
264
  >
265
265
  <SelectList isAriaMultiselectable id="select-multi-create-typeahead-listbox">
266
266
  {selectOptions.map((option, index) => (
@@ -244,7 +244,7 @@ export const SelectTypeahead: React.FunctionComponent = () => {
244
244
  !isOpen && closeMenu();
245
245
  }}
246
246
  toggle={toggle}
247
- shouldFocusFirstItemOnOpen={false}
247
+ variant="typeahead"
248
248
  >
249
249
  <SelectList id="select-typeahead-listbox">
250
250
  {selectOptions.map((option, index) => (
@@ -251,7 +251,7 @@ export const SelectTypeaheadCreatable: React.FunctionComponent = () => {
251
251
  !isOpen && closeMenu();
252
252
  }}
253
253
  toggle={toggle}
254
- shouldFocusFirstItemOnOpen={false}
254
+ variant="typeahead"
255
255
  >
256
256
  <SelectList id="select-create-typeahead-listbox">
257
257
  {selectOptions.map((option, index) => (