@patternfly/react-core 6.2.2 → 6.3.0-prerelease.10

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 (375) hide show
  1. package/CHANGELOG.md +73 -9
  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/esm/components/Divider/Divider.d.ts +2 -0
  115. package/dist/esm/components/Divider/Divider.d.ts.map +1 -1
  116. package/dist/esm/components/Divider/Divider.js +2 -2
  117. package/dist/esm/components/Divider/Divider.js.map +1 -1
  118. package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts +1 -1
  119. package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
  120. package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts +1 -1
  121. package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
  122. package/dist/esm/components/Form/FormFieldGroup.d.ts +1 -1
  123. package/dist/esm/components/Form/FormFieldGroup.d.ts.map +1 -1
  124. package/dist/esm/components/Form/FormFieldGroupExpandable.d.ts +1 -1
  125. package/dist/esm/components/Form/FormFieldGroupExpandable.d.ts.map +1 -1
  126. package/dist/esm/components/Form/FormGroupLabelHelp.js +2 -2
  127. package/dist/esm/components/Form/FormGroupLabelHelp.js.map +1 -1
  128. package/dist/esm/components/Form/InternalFormFieldGroup.d.ts +1 -1
  129. package/dist/esm/components/Form/InternalFormFieldGroup.d.ts.map +1 -1
  130. package/dist/esm/components/List/List.d.ts.map +1 -1
  131. package/dist/esm/components/List/List.js +2 -2
  132. package/dist/esm/components/List/List.js.map +1 -1
  133. package/dist/esm/components/List/ListItem.d.ts +4 -2
  134. package/dist/esm/components/List/ListItem.d.ts.map +1 -1
  135. package/dist/esm/components/List/ListItem.js +2 -2
  136. package/dist/esm/components/List/ListItem.js.map +1 -1
  137. package/dist/esm/components/Nav/Nav.d.ts +1 -1
  138. package/dist/esm/components/Nav/Nav.d.ts.map +1 -1
  139. package/dist/esm/components/Nav/NavExpandable.d.ts.map +1 -1
  140. package/dist/esm/components/Nav/NavExpandable.js +1 -1
  141. package/dist/esm/components/Nav/NavExpandable.js.map +1 -1
  142. package/dist/esm/components/Nav/NavItemSeparator.d.ts.map +1 -1
  143. package/dist/esm/components/Nav/NavItemSeparator.js +2 -2
  144. package/dist/esm/components/Nav/NavItemSeparator.js.map +1 -1
  145. package/dist/esm/components/Progress/ProgressContainer.d.ts.map +1 -1
  146. package/dist/esm/components/Progress/ProgressContainer.js +12 -6
  147. package/dist/esm/components/Progress/ProgressContainer.js.map +1 -1
  148. package/dist/esm/components/Tabs/Tabs.d.ts +1 -1
  149. package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
  150. package/dist/esm/components/Tabs/Tabs.js.map +1 -1
  151. package/dist/esm/components/Toolbar/ToolbarGroup.d.ts +1 -1
  152. package/dist/esm/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
  153. package/dist/esm/components/Toolbar/ToolbarItem.d.ts.map +1 -1
  154. package/dist/esm/components/Toolbar/ToolbarItem.js +4 -3
  155. package/dist/esm/components/Toolbar/ToolbarItem.js.map +1 -1
  156. package/dist/esm/components/TreeView/TreeViewListItem.d.ts +2 -2
  157. package/dist/esm/components/TreeView/TreeViewListItem.d.ts.map +1 -1
  158. package/dist/esm/components/Truncate/Truncate.d.ts +11 -1
  159. package/dist/esm/components/Truncate/Truncate.d.ts.map +1 -1
  160. package/dist/esm/components/Truncate/Truncate.js +49 -10
  161. package/dist/esm/components/Truncate/Truncate.js.map +1 -1
  162. package/dist/esm/components/Wizard/WizardNavInternal.js.map +1 -1
  163. package/dist/js/components/Divider/Divider.d.ts +2 -0
  164. package/dist/js/components/Divider/Divider.d.ts.map +1 -1
  165. package/dist/js/components/Divider/Divider.js +2 -2
  166. package/dist/js/components/Divider/Divider.js.map +1 -1
  167. package/dist/js/components/ExpandableSection/ExpandableSection.d.ts +1 -1
  168. package/dist/js/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
  169. package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts +1 -1
  170. package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
  171. package/dist/js/components/Form/FormFieldGroup.d.ts +1 -1
  172. package/dist/js/components/Form/FormFieldGroup.d.ts.map +1 -1
  173. package/dist/js/components/Form/FormFieldGroupExpandable.d.ts +1 -1
  174. package/dist/js/components/Form/FormFieldGroupExpandable.d.ts.map +1 -1
  175. package/dist/js/components/Form/FormGroupLabelHelp.js +2 -2
  176. package/dist/js/components/Form/FormGroupLabelHelp.js.map +1 -1
  177. package/dist/js/components/Form/InternalFormFieldGroup.d.ts +1 -1
  178. package/dist/js/components/Form/InternalFormFieldGroup.d.ts.map +1 -1
  179. package/dist/js/components/List/List.d.ts.map +1 -1
  180. package/dist/js/components/List/List.js +2 -2
  181. package/dist/js/components/List/List.js.map +1 -1
  182. package/dist/js/components/List/ListItem.d.ts +4 -2
  183. package/dist/js/components/List/ListItem.d.ts.map +1 -1
  184. package/dist/js/components/List/ListItem.js +2 -2
  185. package/dist/js/components/List/ListItem.js.map +1 -1
  186. package/dist/js/components/Nav/Nav.d.ts +1 -1
  187. package/dist/js/components/Nav/Nav.d.ts.map +1 -1
  188. package/dist/js/components/Nav/NavExpandable.d.ts.map +1 -1
  189. package/dist/js/components/Nav/NavExpandable.js +1 -1
  190. package/dist/js/components/Nav/NavExpandable.js.map +1 -1
  191. package/dist/js/components/Nav/NavItemSeparator.d.ts.map +1 -1
  192. package/dist/js/components/Nav/NavItemSeparator.js +2 -2
  193. package/dist/js/components/Nav/NavItemSeparator.js.map +1 -1
  194. package/dist/js/components/Progress/ProgressContainer.d.ts.map +1 -1
  195. package/dist/js/components/Progress/ProgressContainer.js +10 -4
  196. package/dist/js/components/Progress/ProgressContainer.js.map +1 -1
  197. package/dist/js/components/Tabs/Tabs.d.ts +1 -1
  198. package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
  199. package/dist/js/components/Tabs/Tabs.js.map +1 -1
  200. package/dist/js/components/Toolbar/ToolbarGroup.d.ts +1 -1
  201. package/dist/js/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
  202. package/dist/js/components/Toolbar/ToolbarItem.d.ts.map +1 -1
  203. package/dist/js/components/Toolbar/ToolbarItem.js +4 -3
  204. package/dist/js/components/Toolbar/ToolbarItem.js.map +1 -1
  205. package/dist/js/components/TreeView/TreeViewListItem.d.ts +2 -2
  206. package/dist/js/components/TreeView/TreeViewListItem.d.ts.map +1 -1
  207. package/dist/js/components/Truncate/Truncate.d.ts +11 -1
  208. package/dist/js/components/Truncate/Truncate.d.ts.map +1 -1
  209. package/dist/js/components/Truncate/Truncate.js +48 -9
  210. package/dist/js/components/Truncate/Truncate.js.map +1 -1
  211. package/dist/js/components/Wizard/WizardNavInternal.js.map +1 -1
  212. package/dist/umd/assets/{output-AyA9e2xy.css → output-CuGIDyMV.css} +19664 -19577
  213. package/dist/umd/react-core.min.js +3 -3
  214. package/helpers/package.json +1 -1
  215. package/layouts/package.json +1 -1
  216. package/next/package.json +1 -1
  217. package/package.json +8 -8
  218. package/src/components/Alert/examples/Alert.md +0 -3
  219. package/src/components/Card/examples/Card.md +4 -0
  220. package/src/components/Card/examples/CardHeaderWraps.tsx +26 -0
  221. package/src/components/CodeBlock/examples/CodeBlockBasic.tsx +1 -1
  222. package/src/components/CodeBlock/examples/CodeBlockExpandable.tsx +10 -3
  223. package/src/components/DescriptionList/examples/DescriptionListAutoFitBasic.tsx +1 -1
  224. package/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthModified.tsx +5 -1
  225. package/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthResponsive.tsx +5 -1
  226. package/src/components/DescriptionList/examples/DescriptionListBasic.tsx +1 -1
  227. package/src/components/DescriptionList/examples/DescriptionListColumnFill.tsx +1 -1
  228. package/src/components/DescriptionList/examples/DescriptionListCompact.tsx +1 -1
  229. package/src/components/DescriptionList/examples/DescriptionListCompactHorizontal.tsx +1 -1
  230. package/src/components/DescriptionList/examples/DescriptionListDefaultAutoColumn.tsx +1 -1
  231. package/src/components/DescriptionList/examples/DescriptionListDefaultInlineGrid.tsx +1 -1
  232. package/src/components/DescriptionList/examples/DescriptionListDefaultResponsiveColumns.tsx +1 -1
  233. package/src/components/DescriptionList/examples/DescriptionListDefaultThreeColLg.tsx +1 -1
  234. package/src/components/DescriptionList/examples/DescriptionListDefaultTwoCol.tsx +1 -0
  235. package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardHorizontalTermWidth.tsx +7 -1
  236. package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardThreeColumn.tsx +5 -1
  237. package/src/components/DescriptionList/examples/DescriptionListFluidHorizontal.tsx +1 -1
  238. package/src/components/DescriptionList/examples/DescriptionListHorizontal.tsx +1 -1
  239. package/src/components/DescriptionList/examples/DescriptionListHorizontalAutoColumn.tsx +6 -1
  240. package/src/components/DescriptionList/examples/DescriptionListHorizontalCustomTermWidth.tsx +1 -0
  241. package/src/components/DescriptionList/examples/DescriptionListHorizontalResponsiveColumns.tsx +1 -1
  242. package/src/components/DescriptionList/examples/DescriptionListHorizontalThreeColLg.tsx +1 -1
  243. package/src/components/DescriptionList/examples/DescriptionListHorizontalTwoCol.tsx +1 -1
  244. package/src/components/DescriptionList/examples/DescriptionListIconsOnTerms.tsx +1 -1
  245. package/src/components/DescriptionList/examples/DescriptionListResponsiveHoriVertGroup.tsx +1 -0
  246. package/src/components/DescriptionList/examples/DescriptionListWithCard.tsx +1 -1
  247. package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySize.tsx +1 -1
  248. package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySizeAndCard.tsx +5 -1
  249. package/src/components/DescriptionList/examples/DescriptionListWithTermHelpText.tsx +1 -1
  250. package/src/components/Divider/Divider.tsx +4 -1
  251. package/src/components/Divider/__tests__/Divider.test.tsx +10 -0
  252. package/src/components/DualListSelector/examples/DualListSelectorBasicSearch.tsx +1 -0
  253. package/src/components/DualListSelector/examples/DualListSelectorComplexOptionsActions.tsx +1 -0
  254. package/src/components/DualListSelector/examples/DualListSelectorTree.tsx +1 -0
  255. package/src/components/ExpandableSection/ExpandableSection.tsx +1 -1
  256. package/src/components/ExpandableSection/ExpandableSectionToggle.tsx +1 -1
  257. package/src/components/Form/FormFieldGroup.tsx +1 -1
  258. package/src/components/Form/FormFieldGroupExpandable.tsx +1 -1
  259. package/src/components/Form/FormGroupLabelHelp.tsx +2 -2
  260. package/src/components/Form/InternalFormFieldGroup.tsx +1 -1
  261. package/src/components/List/List.tsx +3 -0
  262. package/src/components/List/ListItem.tsx +7 -4
  263. package/src/components/List/__tests__/List.test.tsx +97 -101
  264. package/src/components/List/__tests__/ListItem.test.tsx +51 -0
  265. package/src/components/List/__tests__/__snapshots__/List.test.tsx.snap +4 -261
  266. package/src/components/List/__tests__/__snapshots__/ListItem.test.tsx.snap +34 -0
  267. package/src/components/LoginPage/examples/LoginPageBasic.tsx +1 -1
  268. package/src/components/LoginPage/examples/LoginPageLanguageSelect.tsx +1 -1
  269. package/src/components/LoginPage/examples/LoginPageShowHidePassword.tsx +1 -1
  270. package/src/components/Nav/Nav.tsx +1 -1
  271. package/src/components/Nav/NavExpandable.tsx +6 -1
  272. package/src/components/Nav/NavItemSeparator.tsx +2 -1
  273. package/src/components/Nav/__tests__/Generated/__snapshots__/NavExpandable.test.tsx.snap +1 -0
  274. package/src/components/Nav/__tests__/NavExpandable.test.tsx +15 -0
  275. package/src/components/Nav/__tests__/__snapshots__/Nav.test.tsx.snap +3 -0
  276. package/src/components/Page/examples/Page.md +1 -1
  277. package/src/components/Page/examples/PageCenteredSection.tsx +3 -4
  278. package/src/components/Page/examples/PageGroupSection.tsx +9 -3
  279. package/src/components/Page/examples/PageHorizontalNav.tsx +9 -3
  280. package/src/components/Page/examples/PageMainSectionPadding.tsx +12 -4
  281. package/src/components/Page/examples/PageMainSectionVariations.tsx +6 -6
  282. package/src/components/Page/examples/PageMultipleSidebarBody.tsx +9 -3
  283. package/src/components/Page/examples/PageUncontrolledNav.tsx +9 -3
  284. package/src/components/Page/examples/PageVerticalNav.tsx +9 -3
  285. package/src/components/Page/examples/PageWithOrWithoutFill.tsx +8 -4
  286. package/src/components/Progress/ProgressContainer.tsx +23 -16
  287. package/src/components/Progress/examples/ProgressTitleOutsideOfProgressBar.tsx +1 -1
  288. package/src/components/SearchInput/examples/SearchInputAdvanced.tsx +1 -0
  289. package/src/components/SearchInput/examples/SearchInputBasic.tsx +1 -0
  290. package/src/components/SearchInput/examples/SearchInputFocusSearch.tsx +7 -1
  291. package/src/components/SearchInput/examples/SearchInputWithExpandable.tsx +1 -0
  292. package/src/components/SearchInput/examples/SearchInputWithNavigableOptions.tsx +1 -0
  293. package/src/components/SearchInput/examples/SearchInputWithResultCount.tsx +1 -0
  294. package/src/components/SearchInput/examples/SearchInputWithSubmitButton.tsx +1 -0
  295. package/src/components/Select/examples/Select.md +3 -26
  296. package/src/components/Skeleton/examples/SkeletonText.tsx +0 -1
  297. package/src/components/Tabs/Tabs.tsx +3 -1
  298. package/src/components/Toolbar/ToolbarGroup.tsx +1 -1
  299. package/src/components/Toolbar/ToolbarItem.tsx +11 -1
  300. package/src/components/TreeView/TreeViewListItem.tsx +2 -2
  301. package/src/components/TreeView/__tests__/TreeView.test.tsx +26 -1
  302. package/src/components/TreeView/__tests__/TreeViewList.test.tsx +46 -0
  303. package/src/components/TreeView/__tests__/TreeViewListItem.test.tsx +278 -156
  304. package/src/components/TreeView/__tests__/TreeViewSearch.test.tsx +12 -1
  305. package/src/components/TreeView/__tests__/__snapshots__/TreeView.test.tsx.snap +9 -0
  306. package/src/components/Truncate/Truncate.tsx +123 -32
  307. package/src/components/Truncate/__tests__/Truncate.test.tsx +75 -5
  308. package/src/components/Truncate/__tests__/__snapshots__/Truncate.test.tsx.snap +55 -15
  309. package/src/components/Truncate/examples/Truncate.md +32 -36
  310. package/src/components/Truncate/examples/TruncateCustomTooltipPosition.tsx +10 -0
  311. package/src/components/Truncate/examples/TruncateDefault.tsx +7 -0
  312. package/src/components/Truncate/examples/TruncateMaxChars.tsx +27 -0
  313. package/src/components/Truncate/examples/TruncateMiddle.tsx +11 -0
  314. package/src/components/Truncate/examples/TruncateStart.tsx +7 -0
  315. package/src/components/Wizard/WizardNavInternal.tsx +1 -1
  316. package/src/components/Wizard/examples/WizardGetCurrentStep.tsx +1 -1
  317. package/src/demos/Banner.md +6 -6
  318. package/src/demos/CardDemos.md +1 -1
  319. package/src/demos/CardView/examples/CardView.tsx +9 -4
  320. package/src/demos/DataList/examples/DataListActionable.tsx +5 -3
  321. package/src/demos/DataList/examples/DataListBasic.tsx +2 -2
  322. package/src/demos/DataList/examples/DataListExpandableControlInToolbar.tsx +2 -2
  323. package/src/demos/DataList/examples/DataListStaticBottomPagination.tsx +4 -2
  324. package/src/demos/DescriptionList/examples/DescriptionListBasic.tsx +5 -5
  325. package/src/demos/DescriptionList/examples/DescriptionListInDrawer.tsx +6 -4
  326. package/src/demos/JumpLinks.md +5 -5
  327. package/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +3 -3
  328. package/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +3 -3
  329. package/src/demos/PasswordGenerator.md +1 -1
  330. package/src/demos/RTL/examples/PaginatedTable.jsx +2 -2
  331. package/src/demos/RTL/examples/PaginatedTable.tsx +2 -2
  332. package/src/demos/SearchInput/SearchInput.md +2 -0
  333. package/src/demos/Tabs.md +6 -6
  334. package/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx +6 -6
  335. package/src/demos/examples/BackToTop/BackToTopNameDemo.tsx +2 -2
  336. package/src/demos/examples/Card/CardAggregateStatus.tsx +2 -6
  337. package/src/demos/examples/Card/CardDetails.tsx +4 -5
  338. package/src/demos/examples/Card/CardEventsView.tsx +3 -4
  339. package/src/demos/examples/Card/CardLogView.tsx +3 -4
  340. package/src/demos/examples/Card/CardStatus.tsx +0 -1
  341. package/src/demos/examples/Card/CardStatusTabbed.tsx +3 -3
  342. package/src/demos/examples/Card/CardUtilizationDemo3.tsx +0 -1
  343. package/src/demos/examples/Masthead/MastheadWithHorizontalNav.tsx +5 -3
  344. package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +3 -3
  345. package/src/demos/examples/Nav/NavDefault.tsx +3 -3
  346. package/src/demos/examples/Nav/NavDrilldown.tsx +1 -1
  347. package/src/demos/examples/Nav/NavExpandable.tsx +3 -3
  348. package/src/demos/examples/Nav/NavFlyout.tsx +9 -3
  349. package/src/demos/examples/Nav/NavGrouped.tsx +14 -6
  350. package/src/demos/examples/Nav/NavHorizontal.tsx +3 -3
  351. package/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx +5 -5
  352. package/src/demos/examples/Nav/NavManual.tsx +3 -3
  353. package/src/demos/examples/Nav/NavWithSubnav.tsx +5 -5
  354. package/src/demos/examples/Page/PageContextSelector.tsx +5 -3
  355. package/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +3 -3
  356. package/src/demos/examples/Page/PageStickySectionGroup.tsx +3 -3
  357. package/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +3 -3
  358. package/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx +5 -4
  359. package/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx +3 -3
  360. package/src/demos/examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx +3 -3
  361. package/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx +3 -3
  362. package/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx +3 -3
  363. package/src/demos/examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx +3 -3
  364. package/src/demos/examples/Skeleton/SkeletonCard.tsx +5 -3
  365. package/src/demos/examples/Tabs/ModalTabs.tsx +3 -3
  366. package/src/demos/examples/Tabs/NestedTabs.tsx +2 -2
  367. package/src/demos/examples/Tabs/NestedUnindentedTabs.tsx +2 -2
  368. package/src/demos/examples/Tabs/TabsAndTable.tsx +3 -3
  369. package/src/demos/examples/Toolbar/ConsoleLogViewerToolbar.tsx +1 -1
  370. package/src/demos/examples/Wizard/InModal.tsx +1 -1
  371. package/src/demos/examples/Wizard/InPage.tsx +1 -1
  372. package/src/demos/examples/Wizard/InPageWithDrawer.tsx +3 -3
  373. package/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx +3 -3
  374. package/src/components/List/__tests__/Generated/ListItem.test.tsx +0 -12
  375. package/src/components/List/__tests__/Generated/__snapshots__/ListItem.test.tsx.snap +0 -13
@@ -0,0 +1,15 @@
1
+ import { render, screen } from '@testing-library/react';
2
+ import '@testing-library/jest-dom';
3
+ import { NavExpandable } from '../NavExpandable';
4
+
5
+ test('Renders with the inert attribute by default', () => {
6
+ render(<NavExpandable id="grp-1" title="NavExpandable"></NavExpandable>);
7
+
8
+ expect(screen.getByLabelText('NavExpandable')).toHaveAttribute('inert', '');
9
+ });
10
+
11
+ test('Does not render with the inert attribute when isExpanded is true', () => {
12
+ render(<NavExpandable id="grp-1" title="NavExpandable" isExpanded={true}></NavExpandable>);
13
+
14
+ expect(screen.getByLabelText('NavExpandable')).not.toHaveAttribute('inert', '');
15
+ });
@@ -223,6 +223,7 @@ exports[`Nav Expandable Nav List - Trigger toggle 1`] = `
223
223
  aria-labelledby="grp-1"
224
224
  class="pf-v6-c-nav__subnav"
225
225
  hidden=""
226
+ inert=""
226
227
  >
227
228
  <ul
228
229
  class="pf-v6-c-nav__list"
@@ -355,6 +356,7 @@ exports[`Nav Expandable Nav List 1`] = `
355
356
  aria-labelledby="grp-1"
356
357
  class="pf-v6-c-nav__subnav"
357
358
  hidden=""
359
+ inert=""
358
360
  >
359
361
  <ul
360
362
  class="pf-v6-c-nav__list"
@@ -486,6 +488,7 @@ exports[`Nav Expandable Nav List with aria label 1`] = `
486
488
  aria-labelledby="grp-1"
487
489
  class="pf-v6-c-nav__subnav"
488
490
  hidden=""
491
+ inert=""
489
492
  >
490
493
  <h2
491
494
  class="pf-v6-screen-reader"
@@ -8,7 +8,7 @@ propComponents:
8
8
 
9
9
  import { useState } from 'react';
10
10
  import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
11
- import c_page_section_m_limit_width_MaxWidth from '@patternfly/react-tokens/dist/esm/c_page_section_m_limit_width_MaxWidth';
11
+ import pageSectionWidthLimitMaxWidth from '@patternfly/react-tokens/dist/esm/c_page_section_m_limit_width_MaxWidth';
12
12
 
13
13
  ## Examples
14
14
 
@@ -18,8 +18,7 @@ import {
18
18
  CardBody
19
19
  } from '@patternfly/react-core';
20
20
  import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
21
- /* eslint-disable camelcase */
22
- import c_page_section_m_limit_width_MaxWidth from '@patternfly/react-tokens/dist/esm/c_page_section_m_limit_width_MaxWidth';
21
+ import pageSectionWidthLimitMaxWidth from '@patternfly/react-tokens/dist/esm/c_page_section_m_limit_width_MaxWidth';
23
22
 
24
23
  export const PageCenteredSection: React.FunctionComponent = () => {
25
24
  const [isSidebarOpen, setIsSidebarOpen] = useState(true);
@@ -68,11 +67,11 @@ export const PageCenteredSection: React.FunctionComponent = () => {
68
67
 
69
68
  return (
70
69
  <Page masthead={masthead} sidebar={sidebar}>
71
- <PageSection isWidthLimited isCenterAligned>
70
+ <PageSection isWidthLimited isCenterAligned aria-label="width limited page section">
72
71
  <Card>
73
72
  <CardBody>
74
73
  When a width limited page section is wider than the value of
75
- <code>{c_page_section_m_limit_width_MaxWidth.name}</code>, the section will be centered in the main section.
74
+ <code>{pageSectionWidthLimitMaxWidth.name}</code>, the section will be centered in the main section.
76
75
  <br />
77
76
  <br />
78
77
  The content in this example is placed in a card to better illustrate how the section behaves when it is
@@ -101,10 +101,16 @@ export const PageGroupSection: React.FunctionComponent = () => {
101
101
  </BreadcrumbItem>
102
102
  </Breadcrumb>
103
103
  </PageBreadcrumb>
104
- <PageSection>Grouped section</PageSection>
104
+ <PageSection aria-labelledby="grouped-section">
105
+ <h2 id="grouped-section">Grouped section</h2>
106
+ </PageSection>
105
107
  </PageGroup>
106
- <PageSection>Section 1</PageSection>
107
- <PageSection>Section 2</PageSection>
108
+ <PageSection aria-labelledby="section-1">
109
+ <h2 id="section-1">Grouped example section 1</h2>
110
+ </PageSection>
111
+ <PageSection aria-labelledby="section-2">
112
+ <h2 id="section-2">Grouped example section 2</h2>
113
+ </PageSection>
108
114
  </Page>
109
115
  );
110
116
  };
@@ -36,9 +36,15 @@ export const PageHorizontalNav: React.FunctionComponent = () => {
36
36
 
37
37
  return (
38
38
  <Page masthead={masthead}>
39
- <PageSection>Section 1</PageSection>
40
- <PageSection variant="secondary">Section 2 with secondary variant styling</PageSection>
41
- <PageSection>Section 3</PageSection>
39
+ <PageSection aria-labelledby="section-1">
40
+ <h2 id="section-1">Horizontal nav example section 1</h2>
41
+ </PageSection>
42
+ <PageSection variant="secondary" aria-labelledby="section-2">
43
+ <h2 id="section-2">Horizontal nav example section 2 with secondary variant styling</h2>
44
+ </PageSection>
45
+ <PageSection aria-labelledby="section-3">
46
+ <h2 id="section-3">Horizontal nav example section 3</h2>
47
+ </PageSection>
42
48
  </Page>
43
49
  );
44
50
  };
@@ -64,10 +64,18 @@ export const PageMainSectionPadding: React.FunctionComponent = () => {
64
64
 
65
65
  return (
66
66
  <Page masthead={masthead} sidebar={sidebar}>
67
- <PageSection>Section with default padding</PageSection>
68
- <PageSection padding={{ default: 'noPadding' }}>Section with no padding</PageSection>
69
- <PageSection padding={{ default: 'noPadding', md: 'padding' }}>Section with padding on medium</PageSection>
70
- <PageSection padding={{ md: 'noPadding' }}>Section with no padding on medium</PageSection>
67
+ <PageSection aria-labelledby="section-1">
68
+ <h2 id="section-1">Section with default padding</h2>
69
+ </PageSection>
70
+ <PageSection padding={{ default: 'noPadding' }} aria-labelledby="section-2">
71
+ <h2 id="section-2">Section with no padding</h2>
72
+ </PageSection>
73
+ <PageSection padding={{ default: 'noPadding', md: 'padding' }} aria-labelledby="section-3">
74
+ <h2 id="section-3">Section with padding on medium</h2>
75
+ </PageSection>
76
+ <PageSection padding={{ md: 'noPadding' }} aria-labelledby="section-4">
77
+ <h2 id="section-4">Section with no padding on medium</h2>
78
+ </PageSection>
71
79
  </Page>
72
80
  );
73
81
  };
@@ -64,22 +64,22 @@ export const PageMainSectionPadding: React.FunctionComponent = () => {
64
64
 
65
65
  return (
66
66
  <Page header={header} sidebar={sidebar}>
67
- <PageSection type="subnav">
67
+ <PageSection type="subnav" aria-label="With subnav type">
68
68
  Section with <code>type="subnav"</code> for horizontal subnav navigation
69
69
  </PageSection>
70
- <PageSection type="nav">
70
+ <PageSection type="nav" aria-label="With nav type">
71
71
  Section with <code>type="nav"</code> for tertiary navigation
72
72
  </PageSection>
73
- <PageSection type="tabs">
73
+ <PageSection type="tabs" aria-label="With tabs type">
74
74
  Section with <code>type="tabs"</code> for tabs
75
75
  </PageSection>
76
- <PageSection type="breadcrumb">
76
+ <PageSection type="breadcrumb" aria-label="With breadcrumb type">
77
77
  Section with <code>type="breadcrumb"</code> for breadcrumbs
78
78
  </PageSection>
79
- <PageSection>
79
+ <PageSection aria-label="With default type">
80
80
  Section without <code>type</code> prop or <code>type="default"</code> for main sections
81
81
  </PageSection>
82
- <PageSection type="wizard">
82
+ <PageSection type="wizard" aria-label="With wizard type">
83
83
  Section with <code>type="wizard"</code> for wizards
84
84
  </PageSection>
85
85
  </Page>
@@ -71,9 +71,15 @@ export const PageMultipleSidebarBody: React.FunctionComponent = () => {
71
71
 
72
72
  return (
73
73
  <Page masthead={masthead} sidebar={sidebar}>
74
- <PageSection>Section 1</PageSection>
75
- <PageSection>Section 2</PageSection>
76
- <PageSection>Section 3</PageSection>
74
+ <PageSection aria-labelledby="section-1">
75
+ <h2 id="section-1">Multiple sidebar body example section 1</h2>
76
+ </PageSection>
77
+ <PageSection aria-labelledby="section-2">
78
+ <h2 id="section-2">Multiple sidebar body example section 2</h2>
79
+ </PageSection>
80
+ <PageSection aria-labelledby="section-3">
81
+ <h2 id="section-3">Multiple sidebar body example section 3</h2>
82
+ </PageSection>
77
83
  </Page>
78
84
  );
79
85
  };
@@ -51,9 +51,15 @@ export const PageUncontrolledNav: React.FunctionComponent = () => {
51
51
 
52
52
  return (
53
53
  <Page isManagedSidebar masthead={masthead} sidebar={sidebar}>
54
- <PageSection>Section 1</PageSection>
55
- <PageSection>Section 2</PageSection>
56
- <PageSection>Section 3</PageSection>
54
+ <PageSection aria-labelledby="section-1">
55
+ <h2 id="section-1">Uncontrolled nav example section 1</h2>
56
+ </PageSection>
57
+ <PageSection aria-labelledby="section-2">
58
+ <h2 id="section-2">Uncontrolled nav example section 2</h2>
59
+ </PageSection>
60
+ <PageSection aria-labelledby="section-3">
61
+ <h2 id="section-3">Uncontrolled nav example section 3</h2>
62
+ </PageSection>
57
63
  </Page>
58
64
  );
59
65
  };
@@ -64,9 +64,15 @@ export const PageVerticalNav: React.FunctionComponent = () => {
64
64
 
65
65
  return (
66
66
  <Page masthead={masthead} sidebar={sidebar}>
67
- <PageSection>Section 1</PageSection>
68
- <PageSection variant="secondary">Section 2 with secondary variant styling</PageSection>
69
- <PageSection>Section 3</PageSection>
67
+ <PageSection aria-labelledby="section-1">
68
+ <h2 id="section-1">Vertical nav example section 1</h2>
69
+ </PageSection>
70
+ <PageSection variant="secondary" aria-labelledby="section-2">
71
+ <h2 id="section-2">Vertical nav example section 2 with secondary variant styling</h2>
72
+ </PageSection>
73
+ <PageSection aria-labelledby="section-3">
74
+ <h2 id="section-3">Vertical nav example section 3</h2>
75
+ </PageSection>
70
76
  </Page>
71
77
  );
72
78
  };
@@ -64,11 +64,15 @@ export const PageWithOrWithoutFill: React.FunctionComponent = () => {
64
64
 
65
65
  return (
66
66
  <Page isContentFilled masthead={masthead} sidebar={sidebar}>
67
- <PageSection>A default page section</PageSection>
68
- <PageSection isFilled={true} variant="secondary">
69
- This section fills the available space.
67
+ <PageSection aria-labelledby="section-1">
68
+ <h2 id="section-1">Section without fill</h2>
69
+ </PageSection>
70
+ <PageSection isFilled={true} variant="secondary" aria-labelledby="section-2">
71
+ <h2 id="section-2">Section with fill</h2>
72
+ </PageSection>
73
+ <PageSection aria-labelledby="section-3">
74
+ <h2 id="section-3">Another section without fill</h2>
70
75
  </PageSection>
71
- <PageSection>A default page section</PageSection>
72
76
  </Page>
73
77
  );
74
78
  };
@@ -1,4 +1,4 @@
1
- import { Fragment, useState } from 'react';
1
+ import { Fragment, useState, useRef, useEffect } from 'react';
2
2
  import progressStyle from '@patternfly/react-styles/css/components/Progress/progress';
3
3
  import { css } from '@patternfly/react-styles';
4
4
  import { Tooltip, TooltipPosition } from '../Tooltip';
@@ -80,22 +80,31 @@ export const ProgressContainer: React.FunctionComponent<ProgressContainerProps>
80
80
  }: ProgressContainerProps) => {
81
81
  const StatusIcon = variantToIcon.hasOwnProperty(variant) && variantToIcon[variant];
82
82
  const [tooltip, setTooltip] = useState('');
83
- const onMouseEnter = (event: any) => {
83
+ const titleRef = useRef(null);
84
+ const updateTooltip = (event: any) => {
84
85
  if (event.target.offsetWidth < event.target.scrollWidth) {
85
86
  setTooltip(title || event.target.innerHTML);
86
87
  } else {
87
88
  setTooltip('');
88
89
  }
89
90
  };
91
+
92
+ useEffect(() => {
93
+ if (tooltip !== '') {
94
+ titleRef.current.focus();
95
+ }
96
+ }, [tooltip]);
97
+
98
+ const _isTruncatedAndString = isTitleTruncated && typeof title === 'string';
90
99
  const Title = (
91
100
  <div
92
- className={css(
93
- progressStyle.progressDescription,
94
- isTitleTruncated && typeof title === 'string' && progressStyle.modifiers.truncate
95
- )}
101
+ className={css(progressStyle.progressDescription, _isTruncatedAndString && progressStyle.modifiers.truncate)}
96
102
  id={`${parentId}-description`}
97
- aria-hidden="true"
98
- onMouseEnter={isTitleTruncated && typeof title === 'string' ? onMouseEnter : null}
103
+ aria-hidden={_isTruncatedAndString ? null : 'true'}
104
+ onMouseEnter={_isTruncatedAndString ? updateTooltip : null}
105
+ onFocus={_isTruncatedAndString ? updateTooltip : null}
106
+ {...(_isTruncatedAndString && { tabIndex: 0 })}
107
+ ref={titleRef}
99
108
  >
100
109
  {title}
101
110
  </div>
@@ -103,14 +112,12 @@ export const ProgressContainer: React.FunctionComponent<ProgressContainerProps>
103
112
 
104
113
  return (
105
114
  <Fragment>
106
- {title &&
107
- (tooltip ? (
108
- <Tooltip position={tooltipPosition} content={tooltip} isVisible>
109
- {Title}
110
- </Tooltip>
111
- ) : (
112
- Title
113
- ))}
115
+ {title && (
116
+ <>
117
+ {tooltip && <Tooltip position={tooltipPosition} content={tooltip} isVisible triggerRef={titleRef} />}
118
+ {Title}
119
+ </>
120
+ )}
114
121
  {(measureLocation !== ProgressMeasureLocation.none || StatusIcon) && (
115
122
  <div className={css(progressStyle.progressStatus)} aria-hidden="true">
116
123
  {(measureLocation === ProgressMeasureLocation.top || measureLocation === ProgressMeasureLocation.outside) && (
@@ -8,7 +8,7 @@ import {
8
8
  } from '@patternfly/react-core';
9
9
 
10
10
  export const ProgressTitleOutsideOfProgressBar: React.FunctionComponent = () => (
11
- <DescriptionList>
11
+ <DescriptionList aria-label="Progress Title outside of progress bar">
12
12
  <DescriptionListGroup>
13
13
  <DescriptionListTerm id="title-outside-progress-example-label">Title outside of progress bar</DescriptionListTerm>
14
14
  <DescriptionListDescription>
@@ -32,6 +32,7 @@ export const SearchInputAdvanced: React.FunctionComponent = () => {
32
32
  />
33
33
  <br />
34
34
  <SearchInput
35
+ aria-label="Advanced search"
35
36
  attributes={[
36
37
  { attr: 'username', display: 'Username' },
37
38
  { attr: 'firstname', display: 'First name' }
@@ -10,6 +10,7 @@ export const SearchInputBasic: React.FunctionComponent = () => {
10
10
 
11
11
  return (
12
12
  <SearchInput
13
+ aria-label="Search basic example"
13
14
  placeholder="Find by name"
14
15
  value={value}
15
16
  onChange={(_event, value) => onChange(value)}
@@ -7,7 +7,13 @@ export const SearchInputFocusSearch: React.FunctionComponent = () => {
7
7
 
8
8
  return (
9
9
  <>
10
- <SearchInput ref={ref} value={value} onChange={(_event, value) => setValue(value)} onClear={() => setValue('')} />
10
+ <SearchInput
11
+ ref={ref}
12
+ value={value}
13
+ onChange={(_event, value) => setValue(value)}
14
+ onClear={() => setValue('')}
15
+ aria-label="Search focus using ref example"
16
+ />
11
17
  <Button onClick={() => ref.current && ref.current.focus()}>Focus on the search input</Button>
12
18
  </>
13
19
  );
@@ -15,6 +15,7 @@ export const SearchInputWithExpandable: React.FunctionComponent = () => {
15
15
 
16
16
  return (
17
17
  <SearchInput
18
+ aria-label="Search with expandable button example"
18
19
  placeholder="Find by name"
19
20
  value={value}
20
21
  onChange={(_event, value) => onChange(value)}
@@ -29,6 +29,7 @@ export const SearchInputWithNavigableOptions: React.FunctionComponent = () => {
29
29
 
30
30
  return (
31
31
  <SearchInput
32
+ aria-label="Search match with navigable options example"
32
33
  placeholder="Find by name"
33
34
  value={value}
34
35
  onChange={(_event, value) => onChange(value)}
@@ -17,6 +17,7 @@ export const SearchInputWithResultCount: React.FunctionComponent = () => {
17
17
 
18
18
  return (
19
19
  <SearchInput
20
+ aria-label="Match with result count"
20
21
  placeholder="Find by name"
21
22
  value={value}
22
23
  onChange={(_event, value) => onChange(value)}
@@ -6,6 +6,7 @@ export const SearchInputWithSubmitButton: React.FunctionComponent = () => {
6
6
 
7
7
  return (
8
8
  <SearchInput
9
+ aria-label="Search with submit button example"
9
10
  placeholder="Find by name"
10
11
  value={value}
11
12
  onChange={(_event, value) => setValue(value)}
@@ -78,11 +78,6 @@ By default, the menu toggle will display a badge to indicate the number of items
78
78
  ```
79
79
 
80
80
  ### Typeahead
81
- Typeahead is a select variant that replaces the typical button toggle for opening the select menu with a text input and button toggle combo. As a user enters characters into the text input, the menu options will be filtered to match.
82
-
83
- Typeahead is a select variant that replaces the typical button toggle for opening the select menu with a text input and button toggle combo. As a user enters characters into the text input, the menu options will be filtered to match.
84
-
85
- To make a typeahead, pass `variant=typeahead` into the `<MenuToggle>` component and link an `onClick` function to the `<TextInputGroupMain>` component.
86
81
 
87
82
  Typeahead is a select variant that replaces the typical button toggle for opening the select menu with a text input and button toggle combo. As a user enters characters into the text input, the menu options will be filtered to match.
88
83
 
@@ -93,13 +88,6 @@ To make a typeahead, pass `variant=typeahead` into the `<MenuToggle>` component
93
88
  ```
94
89
 
95
90
  ### Typeahead with create option
96
- If a user enters a value into a typeahead select menu that does not exist, you can allow them to create an option of that value.
97
-
98
- If a user enters a value into a typeahead select menu that does not exist, you can allow them to create an option of that value.
99
-
100
- To enable the creation ability, pass a predetermined `value` into a `<SelectOption>` component. You can use the `placeholder` property to change the default text shown in the text input.
101
-
102
- The following example outlines the code implementation required to create a working typeahead menu that allows for creation.
103
91
 
104
92
  If a user enters a value into a typeahead select menu that does not exist, you can allow them to create an option of that value.
105
93
 
@@ -111,14 +99,9 @@ The following example outlines the code implementation required to create a work
111
99
 
112
100
  ```
113
101
 
114
- ### Multiple typeahead with chips
115
- A multiple typeahead can be used to allow users to select multiple options from a list. Additionally, you can render a chip group to be placed in the select toggle.
116
-
117
- A multiple typeahead can be used to allow users to select multiple options from a list. Additionally, you can render a chip group to be placed in the select toggle.
118
-
119
- When more items than the allowed limit are selected, overflowing items will be hidden under a "more" button. The following example hides items after more than 3 are selected. To show hidden items, select the “more” button. Select "show less" to hide extra items again.
102
+ ### Multiple typeahead with labels
120
103
 
121
- A multiple typeahead can be used to allow users to select multiple options from a list. Additionally, you can render a chip group to be placed in the select toggle.
104
+ A multiple typeahead can be used to allow users to select multiple options from a list. Additionally, you can render a label group to be placed in the select toggle.
122
105
 
123
106
  When more items than the allowed limit are selected, overflowing items will be hidden under a "more" button. The following example hides items after more than 3 are selected. To show hidden items, select the “more” button. Select "show less" to hide extra items again.
124
107
 
@@ -127,20 +110,14 @@ When more items than the allowed limit are selected, overflowing items will be h
127
110
  ```
128
111
 
129
112
  ### Multiple typeahead with create option
130
- If the text that is entered into a typeahead doesn't match a menu item, users can choose to create a new option that matches the text input. You can also combine this create functionality with a chip group to display created items as chips."
131
113
 
132
- If the text that is entered into a typeahead doesn't match a menu item, users can choose to create a new option that matches the text input. You can also combine this create functionality with a chip group to display created items as chips."
133
-
134
- If the text that is entered into a typeahead doesn't match a menu item, users can choose to create a new option that matches the text input. You can also combine this create functionality with a chip group to display created items as chips."
114
+ If the text that is entered into a typeahead doesn't match a menu item, users can choose to create a new option that matches the text input. You can also combine this create functionality with a label group to display created items as labels.
135
115
 
136
116
  ```ts file="./SelectMultiTypeaheadCreatable.tsx"
137
117
 
138
118
  ```
139
119
 
140
120
  ### Multiple typeahead with checkboxes
141
- By default, a multiple typeahead select allows you to select multiple menu items, placing a checkmark beside selected items. Like basic checkbox select menus, you can add checkboxes to your menu items. This approach may be more accurate and comprehensive for more complex menu scenarios like filtering.
142
-
143
- By default, a multiple typeahead select allows you to select multiple menu items, placing a checkmark beside selected items. Like basic checkbox select menus, you can add checkboxes to your menu items. This approach may be more accurate and comprehensive for more complex menu scenarios like filtering.
144
121
 
145
122
  By default, a multiple typeahead select allows you to select multiple menu items, placing a checkmark beside selected items. Like basic checkbox select menus, you can add checkboxes to your menu items. This approach may be more accurate and comprehensive for more complex menu scenarios like filtering.
146
123
 
@@ -1,6 +1,5 @@
1
1
  import { Fragment } from 'react';
2
2
  import { Skeleton } from '@patternfly/react-core';
3
- /* eslint-disable camelcase */
4
3
  import t_global_font_size_4xl from '@patternfly/react-tokens/dist/esm/t_global_font_size_4xl';
5
4
  import t_global_font_size_3xl from '@patternfly/react-tokens/dist/esm/t_global_font_size_3xl';
6
5
  import t_global_font_size_2xl from '@patternfly/react-tokens/dist/esm/t_global_font_size_2xl';
@@ -31,7 +31,9 @@ export interface HorizontalOverflowObject {
31
31
  type TabElement = React.ReactElement<TabProps, React.JSXElementConstructor<TabProps>>;
32
32
  type TabsChild = TabElement | boolean | null | undefined;
33
33
 
34
- export interface TabsProps extends Omit<React.HTMLProps<HTMLElement | HTMLDivElement>, 'onSelect'>, OUIAProps {
34
+ export interface TabsProps
35
+ extends Omit<React.HTMLProps<HTMLElement | HTMLDivElement>, 'onSelect' | 'onToggle'>,
36
+ OUIAProps {
35
37
  /** Content rendered inside the tabs component. Only `Tab` components or expressions resulting in a falsy value are allowed here. */
36
38
  children: TabsChild | TabsChild[];
37
39
  /** Additional classes added to the tabs */
@@ -12,7 +12,7 @@ export enum ToolbarGroupVariant {
12
12
  'label-group' = 'label-group'
13
13
  }
14
14
 
15
- export interface ToolbarGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'ref'> {
15
+ export interface ToolbarGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'ref' | 'onToggle'> {
16
16
  /** Classes applied to root element of the data toolbar group */
17
17
  className?: string;
18
18
  /** A type modifier which modifies spacing specifically depending on the type of group */
@@ -185,10 +185,19 @@ export const ToolbarItem: React.FunctionComponent<ToolbarItemProps> = ({
185
185
  children,
186
186
  isAllExpanded,
187
187
  isOverflowContainer,
188
+ role,
188
189
  ...props
189
190
  }: ToolbarItemProps) => {
190
191
  if (variant === ToolbarItemVariant.separator) {
191
- return <Divider className={css(className)} orientation={{ default: 'vertical' }} {...props} />;
192
+ const isDividerRoleValid = role === 'separator' || role === 'presentation';
193
+ return (
194
+ <Divider
195
+ className={css(className)}
196
+ orientation={{ default: 'vertical' }}
197
+ {...props}
198
+ {...(isDividerRoleValid && { role: role as 'separator' | 'presentation' })}
199
+ />
200
+ );
192
201
  }
193
202
 
194
203
  return (
@@ -217,6 +226,7 @@ export const ToolbarItem: React.FunctionComponent<ToolbarItemProps> = ({
217
226
  )}
218
227
  {...(variant === 'label' && { 'aria-hidden': true })}
219
228
  id={id}
229
+ role={role}
220
230
  {...props}
221
231
  >
222
232
  {children}
@@ -50,11 +50,11 @@ export interface TreeViewListItemProps {
50
50
  /** Internal content of a tree view item. */
51
51
  name: React.ReactNode;
52
52
  /** Callback for item checkbox selection. */
53
- onCheck?: (event: React.ChangeEvent<HTMLInputElement>, item: TreeViewDataItem, parent: TreeViewDataItem) => void;
53
+ onCheck?: (event: React.ChangeEvent<HTMLInputElement>, item: TreeViewDataItem, parentItem: TreeViewDataItem) => void;
54
54
  /** Callback for item selection. Note: calling event.preventDefault() will prevent the node
55
55
  * from toggling.
56
56
  */
57
- onSelect?: (event: React.MouseEvent, item: TreeViewDataItem, parent: TreeViewDataItem) => void;
57
+ onSelect?: (event: React.MouseEvent, item: TreeViewDataItem, parentItem: TreeViewDataItem) => void;
58
58
  /** Callback for expanding a node with children. */
59
59
  onExpand?: (event: React.MouseEvent, item: TreeViewDataItem, parentItem: TreeViewDataItem) => void;
60
60
  /** Callback for collapsing a node with children. */
@@ -3,10 +3,20 @@ import userEvent from '@testing-library/user-event';
3
3
  import { TreeView } from '../TreeView';
4
4
 
5
5
  jest.mock('../TreeViewList', () => ({
6
- TreeViewList: ({ children, isNested, toolbar }) => (
6
+ TreeViewList: ({
7
+ children,
8
+ isNested,
9
+ toolbar,
10
+ 'aria-label': ariaLabel,
11
+ 'aria-labelledby': ariaLabelledBy,
12
+ isMultiSelectable
13
+ }) => (
7
14
  <div data-testid="TreeViewList-mock">
8
15
  <p>{`TreeViewList isNested: ${isNested}`}</p>
9
16
  <p>{`TreeViewList toolbar: ${toolbar}`}</p>
17
+ <p>{`TreeViewList aria-label: ${ariaLabel}`}</p>
18
+ <p>{`TreeViewList aria-labelledBy: ${ariaLabelledBy}`}</p>
19
+ <p>{`TreeViewList isMultiSelectable: ${isMultiSelectable}`}</p>
10
20
  <div data-testid="TreeViewList-children">{children}</div>
11
21
  </div>
12
22
  )
@@ -131,6 +141,21 @@ test('Passes toolbar to TreeViewList', () => {
131
141
 
132
142
  expect(screen.getByText('TreeViewList toolbar: Toolbar content')).toBeVisible();
133
143
  });
144
+ test('Passes aria-label to TreeViewList', () => {
145
+ render(<TreeView aria-label="Test aria-label" data={[basicData]} />);
146
+
147
+ expect(screen.getByText('TreeViewList aria-label: Test aria-label')).toBeVisible();
148
+ });
149
+ test('Passes aria-labelledby to TreeViewList', () => {
150
+ render(<TreeView aria-labelledby="test-aria-labelledby" data={[basicData]} />);
151
+
152
+ expect(screen.getByText('TreeViewList aria-labelledBy: test-aria-labelledby')).toBeVisible();
153
+ });
154
+ test('Passes isMultiSelectable to TreeViewList', () => {
155
+ render(<TreeView isMultiSelectable={true} data={[basicData]} />);
156
+
157
+ expect(screen.getByText('TreeViewList isMultiSelectable: true')).toBeVisible();
158
+ });
134
159
  test('Passes data as children TreeViewList', () => {
135
160
  render(<TreeView data={[basicData]} />);
136
161