@patternfly/react-core 6.5.0-prerelease.61 → 6.5.0-prerelease.63

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 (261) hide show
  1. package/CHANGELOG.md +12 -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/Compass/package.json +1 -1
  23. package/dist/dynamic/components/Content/package.json +1 -1
  24. package/dist/dynamic/components/DataList/package.json +1 -1
  25. package/dist/dynamic/components/DatePicker/package.json +1 -1
  26. package/dist/dynamic/components/DescriptionList/package.json +1 -1
  27. package/dist/dynamic/components/Divider/package.json +1 -1
  28. package/dist/dynamic/components/Drawer/package.json +1 -1
  29. package/dist/dynamic/components/Dropdown/package.json +1 -1
  30. package/dist/dynamic/components/DualListSelector/package.json +1 -1
  31. package/dist/dynamic/components/EmptyState/package.json +1 -1
  32. package/dist/dynamic/components/ExpandableSection/package.json +1 -1
  33. package/dist/dynamic/components/FileUpload/package.json +1 -1
  34. package/dist/dynamic/components/Form/package.json +1 -1
  35. package/dist/dynamic/components/FormSelect/package.json +1 -1
  36. package/dist/dynamic/components/HelperText/package.json +1 -1
  37. package/dist/dynamic/components/Hero/package.json +1 -1
  38. package/dist/dynamic/components/Hint/package.json +1 -1
  39. package/dist/dynamic/components/Icon/package.json +1 -1
  40. package/dist/dynamic/components/InputGroup/package.json +1 -1
  41. package/dist/dynamic/components/JumpLinks/package.json +1 -1
  42. package/dist/dynamic/components/Label/package.json +1 -1
  43. package/dist/dynamic/components/List/package.json +1 -1
  44. package/dist/dynamic/components/LoginPage/package.json +1 -1
  45. package/dist/dynamic/components/Masthead/package.json +1 -1
  46. package/dist/dynamic/components/Menu/package.json +1 -1
  47. package/dist/dynamic/components/MenuToggle/package.json +1 -1
  48. package/dist/dynamic/components/Modal/package.json +1 -1
  49. package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
  50. package/dist/dynamic/components/Nav/package.json +1 -1
  51. package/dist/dynamic/components/NotificationBadge/package.json +1 -1
  52. package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
  53. package/dist/dynamic/components/NumberInput/package.json +1 -1
  54. package/dist/dynamic/components/OverflowMenu/package.json +1 -1
  55. package/dist/dynamic/components/Page/package.json +1 -1
  56. package/dist/dynamic/components/Pagination/package.json +1 -1
  57. package/dist/dynamic/components/Panel/package.json +1 -1
  58. package/dist/dynamic/components/Popover/package.json +1 -1
  59. package/dist/dynamic/components/Progress/package.json +1 -1
  60. package/dist/dynamic/components/ProgressStepper/package.json +1 -1
  61. package/dist/dynamic/components/Radio/package.json +1 -1
  62. package/dist/dynamic/components/SearchInput/package.json +1 -1
  63. package/dist/dynamic/components/Select/package.json +1 -1
  64. package/dist/dynamic/components/Sidebar/package.json +1 -1
  65. package/dist/dynamic/components/SimpleList/package.json +1 -1
  66. package/dist/dynamic/components/Skeleton/package.json +1 -1
  67. package/dist/dynamic/components/SkipToContent/package.json +1 -1
  68. package/dist/dynamic/components/Slider/package.json +1 -1
  69. package/dist/dynamic/components/Spinner/package.json +1 -1
  70. package/dist/dynamic/components/Switch/package.json +1 -1
  71. package/dist/dynamic/components/Tabs/package.json +1 -1
  72. package/dist/dynamic/components/TextArea/package.json +1 -1
  73. package/dist/dynamic/components/TextInput/package.json +1 -1
  74. package/dist/dynamic/components/TextInputGroup/package.json +1 -1
  75. package/dist/dynamic/components/TimePicker/package.json +1 -1
  76. package/dist/dynamic/components/Timestamp/package.json +1 -1
  77. package/dist/dynamic/components/Title/package.json +1 -1
  78. package/dist/dynamic/components/ToggleGroup/package.json +1 -1
  79. package/dist/dynamic/components/Toolbar/package.json +1 -1
  80. package/dist/dynamic/components/Tooltip/package.json +1 -1
  81. package/dist/dynamic/components/TreeView/package.json +1 -1
  82. package/dist/dynamic/components/Truncate/package.json +1 -1
  83. package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
  84. package/dist/dynamic/components/Wizard/package.json +1 -1
  85. package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
  86. package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
  87. package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
  88. package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
  89. package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
  90. package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
  91. package/dist/dynamic/deprecated/components/package.json +1 -1
  92. package/dist/dynamic/helpers/AnimationsProvider/AnimationsProvider/package.json +1 -1
  93. package/dist/dynamic/helpers/AnimationsProvider/package.json +1 -1
  94. package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
  95. package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
  96. package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
  97. package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
  98. package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
  99. package/dist/dynamic/helpers/SSRSafeIds/SSRSafeIds/package.json +1 -1
  100. package/dist/dynamic/helpers/constants/package.json +1 -1
  101. package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
  102. package/dist/dynamic/helpers/fileUtils/package.json +1 -1
  103. package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
  104. package/dist/dynamic/helpers/package.json +1 -1
  105. package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
  106. package/dist/dynamic/helpers/typeUtils/package.json +1 -1
  107. package/dist/dynamic/helpers/useInterval/package.json +1 -1
  108. package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
  109. package/dist/dynamic/helpers/useSSRSafeId/package.json +1 -1
  110. package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
  111. package/dist/dynamic/helpers/util/package.json +1 -1
  112. package/dist/dynamic/layouts/Bullseye/package.json +1 -1
  113. package/dist/dynamic/layouts/Flex/package.json +1 -1
  114. package/dist/dynamic/layouts/Gallery/package.json +1 -1
  115. package/dist/dynamic/layouts/Grid/package.json +1 -1
  116. package/dist/dynamic/layouts/Level/package.json +1 -1
  117. package/dist/dynamic/layouts/Split/package.json +1 -1
  118. package/dist/dynamic/layouts/Stack/package.json +1 -1
  119. package/dist/dynamic/styles/package.json +1 -1
  120. package/dist/dynamic-modules.json +2 -0
  121. package/dist/esm/components/Button/Button.js +3 -3
  122. package/dist/esm/components/Button/Button.js.map +1 -1
  123. package/dist/esm/components/Compass/Compass.d.ts +9 -1
  124. package/dist/esm/components/Compass/Compass.d.ts.map +1 -1
  125. package/dist/esm/components/Compass/Compass.js +2 -2
  126. package/dist/esm/components/Compass/Compass.js.map +1 -1
  127. package/dist/esm/components/Compass/CompassDockMain.d.ts +9 -0
  128. package/dist/esm/components/Compass/CompassDockMain.d.ts.map +1 -0
  129. package/dist/esm/components/Compass/CompassDockMain.js +10 -0
  130. package/dist/esm/components/Compass/CompassDockMain.js.map +1 -0
  131. package/dist/esm/components/Compass/index.d.ts +1 -0
  132. package/dist/esm/components/Compass/index.d.ts.map +1 -1
  133. package/dist/esm/components/Compass/index.js +1 -0
  134. package/dist/esm/components/Compass/index.js.map +1 -1
  135. package/dist/esm/components/OverflowMenu/OverflowMenu.d.ts +7 -1
  136. package/dist/esm/components/OverflowMenu/OverflowMenu.d.ts.map +1 -1
  137. package/dist/esm/components/OverflowMenu/OverflowMenu.js +33 -3
  138. package/dist/esm/components/OverflowMenu/OverflowMenu.js.map +1 -1
  139. package/dist/esm/components/Page/Page.d.ts +3 -3
  140. package/dist/esm/components/Page/Page.d.ts.map +1 -1
  141. package/dist/esm/components/Toolbar/Toolbar.d.ts +5 -1
  142. package/dist/esm/components/Toolbar/Toolbar.d.ts.map +1 -1
  143. package/dist/esm/components/Toolbar/Toolbar.js +2 -2
  144. package/dist/esm/components/Toolbar/Toolbar.js.map +1 -1
  145. package/dist/esm/components/Toolbar/ToolbarContent.d.ts +9 -1
  146. package/dist/esm/components/Toolbar/ToolbarContent.d.ts.map +1 -1
  147. package/dist/esm/components/Toolbar/ToolbarContent.js +2 -2
  148. package/dist/esm/components/Toolbar/ToolbarContent.js.map +1 -1
  149. package/dist/esm/components/Toolbar/ToolbarGroup.d.ts +9 -1
  150. package/dist/esm/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
  151. package/dist/esm/components/Toolbar/ToolbarGroup.js +3 -3
  152. package/dist/esm/components/Toolbar/ToolbarGroup.js.map +1 -1
  153. package/dist/esm/components/Toolbar/ToolbarItem.d.ts +9 -1
  154. package/dist/esm/components/Toolbar/ToolbarItem.d.ts.map +1 -1
  155. package/dist/esm/components/Toolbar/ToolbarItem.js +2 -2
  156. package/dist/esm/components/Toolbar/ToolbarItem.js.map +1 -1
  157. package/dist/esm/demos/DashboardHeader.js +2 -2
  158. package/dist/esm/demos/DashboardHeader.js.map +1 -1
  159. package/dist/js/components/Button/Button.js +3 -3
  160. package/dist/js/components/Button/Button.js.map +1 -1
  161. package/dist/js/components/Compass/Compass.d.ts +9 -1
  162. package/dist/js/components/Compass/Compass.d.ts.map +1 -1
  163. package/dist/js/components/Compass/Compass.js +2 -2
  164. package/dist/js/components/Compass/Compass.js.map +1 -1
  165. package/dist/js/components/Compass/CompassDockMain.d.ts +9 -0
  166. package/dist/js/components/Compass/CompassDockMain.d.ts.map +1 -0
  167. package/dist/js/components/Compass/CompassDockMain.js +14 -0
  168. package/dist/js/components/Compass/CompassDockMain.js.map +1 -0
  169. package/dist/js/components/Compass/index.d.ts +1 -0
  170. package/dist/js/components/Compass/index.d.ts.map +1 -1
  171. package/dist/js/components/Compass/index.js +1 -0
  172. package/dist/js/components/Compass/index.js.map +1 -1
  173. package/dist/js/components/OverflowMenu/OverflowMenu.d.ts +7 -1
  174. package/dist/js/components/OverflowMenu/OverflowMenu.d.ts.map +1 -1
  175. package/dist/js/components/OverflowMenu/OverflowMenu.js +32 -2
  176. package/dist/js/components/OverflowMenu/OverflowMenu.js.map +1 -1
  177. package/dist/js/components/Page/Page.d.ts +3 -3
  178. package/dist/js/components/Page/Page.d.ts.map +1 -1
  179. package/dist/js/components/Toolbar/Toolbar.d.ts +5 -1
  180. package/dist/js/components/Toolbar/Toolbar.d.ts.map +1 -1
  181. package/dist/js/components/Toolbar/Toolbar.js +2 -2
  182. package/dist/js/components/Toolbar/Toolbar.js.map +1 -1
  183. package/dist/js/components/Toolbar/ToolbarContent.d.ts +9 -1
  184. package/dist/js/components/Toolbar/ToolbarContent.d.ts.map +1 -1
  185. package/dist/js/components/Toolbar/ToolbarContent.js +2 -2
  186. package/dist/js/components/Toolbar/ToolbarContent.js.map +1 -1
  187. package/dist/js/components/Toolbar/ToolbarGroup.d.ts +9 -1
  188. package/dist/js/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
  189. package/dist/js/components/Toolbar/ToolbarGroup.js +3 -3
  190. package/dist/js/components/Toolbar/ToolbarGroup.js.map +1 -1
  191. package/dist/js/components/Toolbar/ToolbarItem.d.ts +9 -1
  192. package/dist/js/components/Toolbar/ToolbarItem.d.ts.map +1 -1
  193. package/dist/js/components/Toolbar/ToolbarItem.js +2 -2
  194. package/dist/js/components/Toolbar/ToolbarItem.js.map +1 -1
  195. package/dist/js/demos/DashboardHeader.js +2 -2
  196. package/dist/js/demos/DashboardHeader.js.map +1 -1
  197. package/dist/umd/assets/{output-BFFKwYEy.css → output-CRZSV91U.css} +21320 -21111
  198. package/dist/umd/react-core.min.js +1 -1
  199. package/helpers/package.json +1 -1
  200. package/layouts/package.json +1 -1
  201. package/next/package.json +1 -1
  202. package/package.json +6 -6
  203. package/src/components/Button/Button.tsx +4 -4
  204. package/src/components/Button/examples/Button.md +2 -2
  205. package/src/components/Button/examples/ButtonPlainHasNoPadding.tsx +2 -2
  206. package/src/components/Button/examples/ButtonVariations.tsx +2 -2
  207. package/src/components/Compass/Compass.tsx +24 -2
  208. package/src/components/Compass/CompassDockMain.tsx +21 -0
  209. package/src/components/Compass/__tests__/Compass.test.tsx +30 -0
  210. package/src/components/Compass/__tests__/CompassDockMain.test.tsx +41 -0
  211. package/src/components/Compass/__tests__/__snapshots__/CompassDockMain.test.tsx.snap +13 -0
  212. package/src/components/Compass/examples/Compass.md +1 -1
  213. package/src/components/Compass/index.ts +1 -0
  214. package/src/components/EmptyState/__tests__/EmptyState.test.tsx +2 -2
  215. package/src/components/EmptyState/__tests__/__snapshots__/EmptyState.test.tsx.snap +2 -2
  216. package/src/components/InputGroup/examples/InputGroup.md +1 -1
  217. package/src/components/InputGroup/examples/InputGroupWithPopover.tsx +3 -3
  218. package/src/components/OverflowMenu/OverflowMenu.tsx +42 -4
  219. package/src/components/OverflowMenu/__tests__/OverflowMenu.test.tsx +18 -0
  220. package/src/components/OverflowMenu/examples/OverflowMenu.md +17 -1
  221. package/src/components/OverflowMenu/examples/OverflowMenuBreakpointOnContainerHeight.tsx +109 -0
  222. package/src/components/OverflowMenu/examples/OverflowMenuSimpleVertical.tsx +76 -0
  223. package/src/components/Page/Page.tsx +3 -3
  224. package/src/components/SearchInput/__tests__/SearchInput.test.tsx +2 -2
  225. package/src/components/SearchInput/__tests__/__snapshots__/SearchInput.test.tsx.snap +2 -2
  226. package/src/components/SearchInput/examples/SearchInput.md +1 -1
  227. package/src/components/SearchInput/examples/SearchInputAdvanced.tsx +2 -2
  228. package/src/components/Toolbar/Toolbar.tsx +9 -1
  229. package/src/components/Toolbar/ToolbarContent.tsx +12 -2
  230. package/src/components/Toolbar/ToolbarGroup.tsx +12 -2
  231. package/src/components/Toolbar/ToolbarItem.tsx +12 -2
  232. package/src/components/Toolbar/__tests__/Toolbar.test.tsx +63 -2
  233. package/src/components/Toolbar/__tests__/ToolbarGroup.test.tsx +26 -0
  234. package/src/components/Toolbar/__tests__/ToolbarItem.test.tsx +26 -0
  235. package/src/components/Toolbar/examples/Toolbar.md +19 -1
  236. package/src/components/Toolbar/examples/ToolbarDynamicSticky.tsx +75 -0
  237. package/src/components/Toolbar/examples/ToolbarVertical.tsx +22 -0
  238. package/src/components/Tooltip/examples/Tooltip.md +1 -1
  239. package/src/demos/Compass/Compass.md +6 -3
  240. package/src/demos/Compass/examples/CompassDemo.tsx +2 -2
  241. package/src/demos/Compass/examples/CompassDockDemo.tsx +312 -131
  242. package/src/demos/DashboardHeader.tsx +2 -2
  243. package/src/demos/Masthead.md +1 -1
  244. package/src/demos/Nav.md +3 -2
  245. package/src/demos/NotificationDrawer/NotificationDrawer.md +1 -1
  246. package/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +6 -2
  247. package/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +6 -2
  248. package/src/demos/Page.md +1 -1
  249. package/src/demos/RTL/RTL.md +1 -1
  250. package/src/demos/RTL/examples/PaginatedTable.tsx +2 -2
  251. package/src/demos/examples/Masthead/MastheadWithHorizontalNav.tsx +2 -2
  252. package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +2 -2
  253. package/src/demos/examples/Nav/NavDockedNav.tsx +47 -13
  254. package/src/demos/examples/Nav/NavFlyout.tsx +2 -2
  255. package/src/demos/examples/Nav/NavHorizontal.tsx +2 -2
  256. package/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx +2 -2
  257. package/src/demos/examples/Nav/NavManual.tsx +2 -2
  258. package/src/demos/examples/Page/PageContextSelector.tsx +2 -2
  259. package/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +2 -2
  260. package/src/demos/examples/Page/PageStickySectionGroup.tsx +2 -2
  261. package/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +2 -2
@@ -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.5.0-prerelease.60","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.5.0-prerelease.62","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.5.0-prerelease.60","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.5.0-prerelease.62","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.5.0-prerelease.60","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.5.0-prerelease.62","private":true}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "6.5.0-prerelease.61",
3
+ "version": "6.5.0-prerelease.63",
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.5.0-prerelease.26",
50
- "@patternfly/react-styles": "^6.5.0-prerelease.20",
51
- "@patternfly/react-tokens": "^6.5.0-prerelease.19",
49
+ "@patternfly/react-icons": "^6.5.0-prerelease.28",
50
+ "@patternfly/react-styles": "^6.5.0-prerelease.21",
51
+ "@patternfly/react-tokens": "^6.5.0-prerelease.20",
52
52
  "focus-trap": "7.6.6",
53
53
  "react-dropzone": "^14.3.5",
54
54
  "tslib": "^2.8.1"
55
55
  },
56
56
  "devDependencies": {
57
- "@patternfly/patternfly": "6.5.0-prerelease.75",
57
+ "@patternfly/patternfly": "6.5.0-prerelease.78",
58
58
  "case-anything": "^3.1.2",
59
59
  "css": "^3.0.0",
60
60
  "fs-extra": "^11.3.3"
@@ -63,5 +63,5 @@
63
63
  "react": "^17 || ^18 || ^19",
64
64
  "react-dom": "^17 || ^18 || ^19"
65
65
  },
66
- "gitHead": "69b6225ca40cfbb583516375a59b95c9590a2592"
66
+ "gitHead": "b1d4b8d38afd6c84f6d381b610b4af13586dacfe"
67
67
  }
@@ -4,8 +4,8 @@ import { css } from '@patternfly/react-styles';
4
4
  import { Spinner, spinnerSize } from '../Spinner';
5
5
  import { useOUIAProps, OUIAProps } from '../../helpers/OUIA/ouia';
6
6
  import { Badge } from '../Badge';
7
- import StarIcon from '@patternfly/react-icons/dist/esm/icons/star-icon';
8
- import OutlinedStarIcon from '@patternfly/react-icons/dist/esm/icons/outlined-star-icon';
7
+ import RhUiStarFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-star-fill-icon';
8
+ import RhUiStarIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-star-icon';
9
9
  import RhUiSettingsFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-settings-fill-icon';
10
10
  import { hamburgerIcon } from './hamburgerIcon';
11
11
 
@@ -211,10 +211,10 @@ const ButtonBase: React.FunctionComponent<ButtonProps> = ({
211
211
  iconContent = (
212
212
  <>
213
213
  <span className={css('pf-v6-c-button__icon-favorite')}>
214
- <OutlinedStarIcon />
214
+ <RhUiStarIcon />
215
215
  </span>
216
216
  <span className={css('pf-v6-c-button__icon-favorited')}>
217
- <StarIcon />
217
+ <RhUiStarFillIcon />
218
218
  </span>
219
219
  </>
220
220
  );
@@ -9,12 +9,12 @@ ouia: true
9
9
  import { Fragment, useState } from 'react';
10
10
  import RhMicronsCloseIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-close-icon';
11
11
  import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
12
- import ExternalLinkSquareAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-square-alt-icon';
12
+ import RhUiExternalLinkFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-external-link-fill-icon';
13
13
  import CopyIcon from '@patternfly/react-icons/dist/esm/icons/copy-icon';
14
14
  import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon';
15
15
  import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon';
16
16
  import RhUiNotificationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-notification-fill-icon';
17
- import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
17
+ import RhUiQuestionMarkCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-question-mark-circle-fill-icon';
18
18
 
19
19
  ## Examples
20
20
 
@@ -1,10 +1,10 @@
1
1
  import { Button } from '@patternfly/react-core';
2
- import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
2
+ import RhUiQuestionMarkCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-question-mark-circle-fill-icon';
3
3
 
4
4
  export const ButtonPlainHasNoPadding: React.FunctionComponent = () => (
5
5
  <p>
6
6
  This is an example of a button
7
- <Button variant="plain" hasNoPadding aria-label="More info" icon={<QuestionCircleIcon />} />
7
+ <Button variant="plain" hasNoPadding aria-label="More info" icon={<RhUiQuestionMarkCircleFillIcon />} />
8
8
  which is placed inline with text
9
9
  </p>
10
10
  );
@@ -1,7 +1,7 @@
1
1
  import { Button, Flex } from '@patternfly/react-core';
2
2
  import RhMicronsCloseIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-close-icon';
3
3
  import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
4
- import ExternalLinkSquareAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-square-alt-icon';
4
+ import RhUiExternalLinkFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-external-link-fill-icon';
5
5
  import CopyIcon from '@patternfly/react-icons/dist/esm/icons/copy-icon';
6
6
  import RhUiNotificationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-notification-fill-icon';
7
7
 
@@ -32,7 +32,7 @@ export const ButtonVariations: React.FunctionComponent = () => (
32
32
  <Button variant="link" icon={<PlusCircleIcon />}>
33
33
  Link
34
34
  </Button>
35
- <Button variant="link" icon={<ExternalLinkSquareAltIcon />} iconPosition="end">
35
+ <Button variant="link" icon={<RhUiExternalLinkFillIcon />} iconPosition="end">
36
36
  Link
37
37
  </Button>
38
38
  <Button variant="link" isInline>
@@ -8,9 +8,17 @@ import compassBackgroundImageDark from '@patternfly/react-tokens/dist/esm/c_comp
8
8
  export interface CompassProps extends React.HTMLProps<HTMLDivElement> {
9
9
  /** Additional classes added to the Compass. */
10
10
  className?: string;
11
+ /** The horizontal masthead content (e.g. <Masthead />). This masthead will only render when dock content is passed and only at mobile viewports. */
12
+ masthead?: React.ReactNode;
11
13
  /** Content of the docked navigation area of the layout */
12
14
  dock?: React.ReactNode;
13
- /** Content placed at the top of the layout */
15
+ /** @beta Flag indicating the docked nav is expanded on mobile. Only applies when dock content is passed. */
16
+ isDockExpanded?: boolean;
17
+ /** @beta Flag indicating the docked nav should display text on desktop. Only applies when dock content is passed, and
18
+ * will handle toggling the visibility of the text in individual isDocked components.
19
+ */
20
+ isDockTextExpanded?: boolean;
21
+ /** Content placed at the top of the compass layout */
14
22
  header?: React.ReactNode;
15
23
  /** Flag indicating if the header is expanded */
16
24
  isHeaderExpanded?: boolean;
@@ -40,7 +48,10 @@ export interface CompassProps extends React.HTMLProps<HTMLDivElement> {
40
48
 
41
49
  export const Compass: React.FunctionComponent<CompassProps> = ({
42
50
  className,
51
+ masthead,
43
52
  dock,
53
+ isDockExpanded,
54
+ isDockTextExpanded,
44
55
  header,
45
56
  isHeaderExpanded = true,
46
57
  sidebarStart,
@@ -72,7 +83,18 @@ export const Compass: React.FunctionComponent<CompassProps> = ({
72
83
  {...props}
73
84
  style={{ ...props.style, ...backgroundImageStyles }}
74
85
  >
75
- {dock && <div className={css(`${styles.compass}__dock`)}>{dock}</div>}
86
+ {dock && masthead}
87
+ {dock && (
88
+ <div
89
+ className={css(
90
+ `${styles.compass}__dock`,
91
+ isDockExpanded && styles.modifiers.expanded,
92
+ isDockTextExpanded && styles.modifiers.textExpanded
93
+ )}
94
+ >
95
+ {dock}
96
+ </div>
97
+ )}
76
98
  {header && (
77
99
  <div
78
100
  className={css(styles.compassHeader, isHeaderExpanded && 'pf-m-expanded')}
@@ -0,0 +1,21 @@
1
+ import styles from '@patternfly/react-styles/css/components/Compass/compass';
2
+ import { css } from '@patternfly/react-styles';
3
+
4
+ export interface CompassDockMainProps extends React.HTMLProps<HTMLDivElement> {
5
+ /** Additional classes added to the compass dock main container. */
6
+ className?: string;
7
+ /** Content of the compass dock main container. */
8
+ children?: React.ReactNode;
9
+ }
10
+
11
+ export const CompassDockMain: React.FunctionComponent<CompassDockMainProps> = ({
12
+ className,
13
+ children,
14
+ ...props
15
+ }: CompassDockMainProps) => (
16
+ <div className={css(styles.compassDockMain, className)} {...props}>
17
+ {children}
18
+ </div>
19
+ );
20
+
21
+ CompassDockMain.displayName = 'CompassDockMain';
@@ -180,3 +180,33 @@ test(`Does not render with ${styles.modifiers.docked} class when dock is not pas
180
180
  render(<Compass data-testid="compass" />);
181
181
  expect(screen.getByTestId('compass')).not.toHaveClass(styles.modifiers.docked);
182
182
  });
183
+
184
+ test('Does not render masthead content when dock is not passed', () => {
185
+ render(<Compass masthead="Masthead content" />);
186
+ expect(screen.queryByText('Masthead content')).not.toBeInTheDocument();
187
+ });
188
+
189
+ test('Renders masthead content when dock is passed', () => {
190
+ render(<Compass masthead={<div>Masthead content</div>} dock={<div>Dock content</div>} />);
191
+ expect(screen.getByText('Masthead content')).toBeVisible();
192
+ });
193
+
194
+ test(`Renders dock with ${styles.modifiers.expanded} class when isDockExpanded is true`, () => {
195
+ render(<Compass dock="Dock content" isDockExpanded />);
196
+ expect(screen.getByText('Dock content')).toHaveClass(styles.modifiers.expanded);
197
+ });
198
+
199
+ test(`Renders dock without ${styles.modifiers.expanded} class when isDockExpanded is false`, () => {
200
+ render(<Compass dock="Dock content" isDockExpanded={false} />);
201
+ expect(screen.getByText('Dock content')).not.toHaveClass(styles.modifiers.expanded);
202
+ });
203
+
204
+ test(`Renders dock with ${styles.modifiers.textExpanded} class when isDockTextExpanded is true`, () => {
205
+ render(<Compass dock="Dock content" isDockTextExpanded />);
206
+ expect(screen.getByText('Dock content')).toHaveClass(styles.modifiers.textExpanded);
207
+ });
208
+
209
+ test(`Renders dock without ${styles.modifiers.textExpanded} class when isDockTextExpanded is false`, () => {
210
+ render(<Compass dock="Dock content" isDockTextExpanded={false} />);
211
+ expect(screen.getByText('Dock content')).not.toHaveClass(styles.modifiers.textExpanded);
212
+ });
@@ -0,0 +1,41 @@
1
+ import { render, screen } from '@testing-library/react';
2
+ import { CompassDockMain } from '../CompassDockMain';
3
+ import styles from '@patternfly/react-styles/css/components/Compass/compass';
4
+
5
+ test('Renders without children', () => {
6
+ render(
7
+ <div data-testid="test-compass-dock-main">
8
+ <CompassDockMain />
9
+ </div>
10
+ );
11
+ expect(screen.getByTestId('test-compass-dock-main').firstChild).toBeVisible();
12
+ });
13
+
14
+ test('Renders with children', () => {
15
+ render(<CompassDockMain>Test content</CompassDockMain>);
16
+ expect(screen.getByText('Test content')).toBeVisible();
17
+ });
18
+
19
+ test('Renders with custom class name when className prop is provided', () => {
20
+ render(<CompassDockMain className="custom-class">Test</CompassDockMain>);
21
+ expect(screen.getByText('Test')).toHaveClass('custom-class');
22
+ });
23
+
24
+ test(`Renders with default ${styles.compassDockMain} class`, () => {
25
+ render(<CompassDockMain>Test</CompassDockMain>);
26
+ expect(screen.getByText('Test')).toHaveClass(styles.compassDockMain, { exact: true });
27
+ });
28
+
29
+ test('Renders with additional props spread to the component', () => {
30
+ render(<CompassDockMain id="custom-id">Test</CompassDockMain>);
31
+ expect(screen.getByText('Test')).toHaveAttribute('id', 'custom-id');
32
+ });
33
+
34
+ test('Matches the snapshot', () => {
35
+ const { asFragment } = render(
36
+ <CompassDockMain>
37
+ <div>Test content</div>
38
+ </CompassDockMain>
39
+ );
40
+ expect(asFragment()).toMatchSnapshot();
41
+ });
@@ -0,0 +1,13 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Matches the snapshot 1`] = `
4
+ <DocumentFragment>
5
+ <div
6
+ class="pf-v6-c-compass__dock-main"
7
+ >
8
+ <div>
9
+ Test content
10
+ </div>
11
+ </div>
12
+ </DocumentFragment>
13
+ `;
@@ -20,7 +20,7 @@ import { useRef, useState, useEffect } from 'react';
20
20
  import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon';
21
21
  import OutlinedPlusSquare from '@patternfly/react-icons/dist/esm/icons/outlined-plus-square-icon';
22
22
  import OutlinedCopy from '@patternfly/react-icons/dist/esm/icons/outlined-copy-icon';
23
- import OutlinedQuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/outlined-question-circle-icon';
23
+ import RhUiQuestionMarkCircleIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-question-mark-circle-icon';
24
24
 
25
25
  import './compass.css';
26
26
 
@@ -1,5 +1,6 @@
1
1
  export * from './Compass';
2
2
  export * from './CompassContent';
3
+ export * from './CompassDockMain';
3
4
  export * from './CompassHeader';
4
5
  export * from './CompassHero';
5
6
  export * from './CompassMainHeader';
@@ -1,6 +1,6 @@
1
1
  import { render, screen } from '@testing-library/react';
2
2
 
3
- import AddressBookIcon from '@patternfly/react-icons/dist/esm/icons/address-book-icon';
3
+ import RhUiDocumentIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-document-icon';
4
4
 
5
5
  import { EmptyState, EmptyStateVariant } from '../EmptyState';
6
6
  import { EmptyStateBody } from '../EmptyStateBody';
@@ -71,7 +71,7 @@ describe('EmptyState', () => {
71
71
  });
72
72
 
73
73
  test('Header with icon', () => {
74
- const { asFragment } = render(<EmptyStateHeader titleText="Empty state" icon={AddressBookIcon} />);
74
+ const { asFragment } = render(<EmptyStateHeader titleText="Empty state" icon={RhUiDocumentIcon} />);
75
75
  expect(asFragment()).toMatchSnapshot();
76
76
  });
77
77
 
@@ -40,11 +40,11 @@ exports[`EmptyState Header with icon 1`] = `
40
40
  fill="currentColor"
41
41
  height="1em"
42
42
  role="img"
43
- viewBox="0 0 448 512"
43
+ viewBox="0 0 32 32"
44
44
  width="1em"
45
45
  >
46
46
  <path
47
- d="M436 160c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h320c26.5 0 48-21.5 48-48v-48h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20zm-228-32c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm112 236.8c0 10.6-10 19.2-22.4 19.2H118.4C106 384 96 375.4 96 364.8v-19.2c0-31.8 30.1-57.6 67.2-57.6h5c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h5c37.1 0 67.2 25.8 67.2 57.6v19.2z"
47
+ d="M26.5 1H12a1.001 1.001 0 0 0-.708.294L4.294 8.292A1.001 1.001 0 0 0 4 9v20.5c0 .827.673 1.5 1.5 1.5h21c.827 0 1.5-.673 1.5-1.5v-27c0-.827-.673-1.5-1.5-1.5ZM11 4.414V8H7.414L11 4.414ZM26 29H6V10h5.5c.827 0 1.5-.673 1.5-1.5V3h13v26Z"
48
48
  />
49
49
  </svg>
50
50
  </div>
@@ -9,7 +9,7 @@ import { Fragment, useRef, useState } from 'react';
9
9
  import AtIcon from '@patternfly/react-icons/dist/esm/icons/at-icon';
10
10
  import DollarSignIcon from '@patternfly/react-icons/dist/esm/icons/dollar-sign-icon';
11
11
  import CalendarAltIcon from '@patternfly/react-icons/dist/esm/icons/calendar-alt-icon';
12
- import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
12
+ import RhUiQuestionMarkCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-question-mark-circle-fill-icon';
13
13
 
14
14
  ## Examples
15
15
 
@@ -1,5 +1,5 @@
1
1
  import { Fragment, useRef } from 'react';
2
- import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
2
+ import RhUiQuestionMarkCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-question-mark-circle-fill-icon';
3
3
  import { Button, InputGroup, InputGroupItem, TextInput, Popover, PopoverPosition } from '@patternfly/react-core';
4
4
 
5
5
  export const InputGroupWithPopover: React.FunctionComponent = () => {
@@ -23,7 +23,7 @@ export const InputGroupWithPopover: React.FunctionComponent = () => {
23
23
  bodyContent="This field is an example of an input group with a popover."
24
24
  appendTo={() => inputGroupRef1.current}
25
25
  >
26
- <Button variant="control" aria-label="popover for input" icon={<QuestionCircleIcon />} />
26
+ <Button variant="control" aria-label="popover for input" icon={<RhUiQuestionMarkCircleFillIcon />} />
27
27
  </Popover>
28
28
  </InputGroupItem>
29
29
  </InputGroup>
@@ -44,7 +44,7 @@ export const InputGroupWithPopover: React.FunctionComponent = () => {
44
44
  bodyContent="This field is an example of an input group with a popover."
45
45
  appendTo={() => inputGroupRef2.current}
46
46
  >
47
- <Button variant="plain" aria-label="Popover for input" icon={<QuestionCircleIcon />} />
47
+ <Button variant="plain" aria-label="Popover for input" icon={<RhUiQuestionMarkCircleFillIcon />} />
48
48
  </Popover>
49
49
  </InputGroupItem>
50
50
  </InputGroup>
@@ -3,18 +3,21 @@ import styles from '@patternfly/react-styles/css/components/OverflowMenu/overflo
3
3
  import { css } from '@patternfly/react-styles';
4
4
  import { OverflowMenuContext } from './OverflowMenuContext';
5
5
  import { debounce } from '../../helpers/util';
6
- import { globalWidthBreakpoints } from '../../helpers/constants';
6
+ import { globalWidthBreakpoints, globalHeightBreakpoints } from '../../helpers/constants';
7
7
  import { getResizeObserver } from '../../helpers/resizeObserver';
8
+ import { PickOptional } from '../../helpers/typeUtils';
8
9
 
9
10
  export interface OverflowMenuProps extends React.HTMLProps<HTMLDivElement> {
10
11
  /** Any elements that can be rendered in the menu */
11
12
  children?: any;
12
13
  /** Additional classes added to the OverflowMenu. */
13
14
  className?: string;
14
- /** Indicates breakpoint at which to switch between horizontal menu and vertical dropdown */
15
+ /** Indicates breakpoint at which to switch between expanded and collapsed states. The "sm" breakpoint does not apply to vertical overflow menus. */
15
16
  breakpoint: 'sm' | 'md' | 'lg' | 'xl' | '2xl';
16
17
  /** A container reference to base the specified breakpoint on instead of the viewport width. */
17
18
  breakpointReference?: HTMLElement | (() => HTMLElement) | React.RefObject<any>;
19
+ /** Indicates the overflow menu orientation is vertical and should respond to height changes instead of width. */
20
+ isVertical?: boolean;
18
21
  }
19
22
 
20
23
  export interface OverflowMenuState extends React.HTMLProps<HTMLDivElement> {
@@ -24,6 +27,11 @@ export interface OverflowMenuState extends React.HTMLProps<HTMLDivElement> {
24
27
 
25
28
  class OverflowMenu extends Component<OverflowMenuProps, OverflowMenuState> {
26
29
  static displayName = 'OverflowMenu';
30
+
31
+ static defaultProps: PickOptional<OverflowMenuProps> = {
32
+ isVertical: false
33
+ };
34
+
27
35
  constructor(props: OverflowMenuProps) {
28
36
  super(props);
29
37
  this.state = {
@@ -69,6 +77,15 @@ class OverflowMenu extends Component<OverflowMenuProps, OverflowMenuState> {
69
77
  }
70
78
 
71
79
  handleResize = () => {
80
+ const { isVertical } = this.props;
81
+ if (isVertical) {
82
+ this.handleResizeHeight();
83
+ } else {
84
+ this.handleResizeWidth();
85
+ }
86
+ };
87
+
88
+ handleResizeWidth = () => {
72
89
  const breakpointWidth = globalWidthBreakpoints[this.props.breakpoint];
73
90
  if (!breakpointWidth) {
74
91
  // eslint-disable-next-line no-console
@@ -83,14 +100,35 @@ class OverflowMenu extends Component<OverflowMenuProps, OverflowMenuState> {
83
100
  }
84
101
  };
85
102
 
103
+ handleResizeHeight = () => {
104
+ const breakpointHeight = globalHeightBreakpoints[this.props.breakpoint];
105
+ if (breakpointHeight === 0) {
106
+ // eslint-disable-next-line no-console
107
+ console.warn('The "sm" breakpoint does not apply to vertical overflow menus.');
108
+ return;
109
+ }
110
+
111
+ if (!breakpointHeight) {
112
+ // eslint-disable-next-line no-console
113
+ console.error('OverflowMenu will not be visible without a valid breakpoint.');
114
+ return;
115
+ }
116
+
117
+ const relativeHeight = this.state.breakpointRef ? this.state.breakpointRef.clientHeight : window.innerHeight;
118
+ const isBelowBreakpoint = relativeHeight < breakpointHeight;
119
+ if (this.state.isBelowBreakpoint !== isBelowBreakpoint) {
120
+ this.setState({ isBelowBreakpoint });
121
+ }
122
+ };
123
+
86
124
  handleResizeWithDelay = debounce(this.handleResize, 250);
87
125
 
88
126
  render() {
89
127
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
90
- const { className, breakpoint, children, breakpointReference, ...props } = this.props;
128
+ const { className, breakpoint, children, breakpointReference, isVertical, ...props } = this.props;
91
129
 
92
130
  return (
93
- <div {...props} className={css(styles.overflowMenu, className)}>
131
+ <div {...props} className={css(styles.overflowMenu, isVertical && styles.modifiers.vertical, className)}>
94
132
  <OverflowMenuContext.Provider value={{ isBelowBreakpoint: this.state.isBelowBreakpoint }}>
95
133
  {children}
96
134
  </OverflowMenuContext.Provider>
@@ -79,4 +79,22 @@ describe('OverflowMenu', () => {
79
79
 
80
80
  expect(resizeObserver).toHaveBeenCalledWith(containerRef.current, expect.any(Function));
81
81
  });
82
+
83
+ test(`applies ${styles.modifiers.vertical} when isVertical is passed`, () => {
84
+ render(<OverflowMenu breakpoint="md" isVertical data-testid="test-id" />);
85
+ expect(screen.getByTestId('test-id')).toHaveClass(styles.modifiers.vertical);
86
+ });
87
+
88
+ test('warns when using "sm" breakpoint and isVertical is passed', () => {
89
+ const warnMock = jest.fn() as any;
90
+ const originalConsole = global.console;
91
+ global.console = { ...originalConsole, warn: warnMock } as any;
92
+
93
+ try {
94
+ render(<OverflowMenu breakpoint="sm" isVertical />);
95
+ expect(warnMock).toHaveBeenCalledWith('The "sm" breakpoint does not apply to vertical overflow menus.');
96
+ } finally {
97
+ global.console = originalConsole;
98
+ }
99
+ });
82
100
  });
@@ -27,6 +27,14 @@ import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-ico
27
27
 
28
28
  ```
29
29
 
30
+ ### Vertical
31
+
32
+ Passing `isVertical` to `OverflowMenu` will change its behavior to respond to breakpoints based on window height instead of width.
33
+
34
+ ```ts file="./OverflowMenuSimpleVertical.tsx"
35
+
36
+ ```
37
+
30
38
  ### Group types
31
39
 
32
40
  ```ts file="./OverflowMenuGroupTypes.tsx"
@@ -45,7 +53,7 @@ import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-ico
45
53
 
46
54
  ```
47
55
 
48
- ### Breakpoint on container
56
+ ### Breakpoint on container width
49
57
 
50
58
  By passing in the `breakpointReference` property, the overflow menu's breakpoint will be relative to the width of the reference container rather than the viewport width.
51
59
 
@@ -54,3 +62,11 @@ You can change the container width in this example by adjusting the slider. As t
54
62
  ```ts file="./OverflowMenuBreakpointOnContainer.tsx"
55
63
 
56
64
  ```
65
+
66
+ ### Breakpoint on container height
67
+
68
+ By passing in the `breakpointReference` and `isVertical` properties, the overflow menu's breakpoint will be determined relative to the height of the reference container rather than the window height.
69
+
70
+ ```ts isFullscreen file="./OverflowMenuBreakpointOnContainerHeight.tsx"
71
+
72
+ ```
@@ -0,0 +1,109 @@
1
+ import { useRef, useState } from 'react';
2
+ import {
3
+ OverflowMenu,
4
+ OverflowMenuControl,
5
+ OverflowMenuContent,
6
+ OverflowMenuGroup,
7
+ OverflowMenuItem,
8
+ OverflowMenuDropdownItem,
9
+ MenuToggle,
10
+ Slider,
11
+ SliderOnChangeEvent,
12
+ Dropdown,
13
+ DropdownList
14
+ } from '@patternfly/react-core';
15
+ import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
16
+
17
+ export const OverflowMenuBreakpointOnContainerHeight: React.FunctionComponent = () => {
18
+ const [isOpen, setIsOpen] = useState(false);
19
+ const [containerHeight, setContainerHeight] = useState(100);
20
+ const containerRef = useRef<HTMLDivElement>(null);
21
+
22
+ const onToggle = () => {
23
+ setIsOpen(!isOpen);
24
+ };
25
+
26
+ const onSelect = () => {
27
+ setIsOpen(!isOpen);
28
+ };
29
+
30
+ const onChange = (_event: SliderOnChangeEvent, value: number) => {
31
+ setContainerHeight(value);
32
+ };
33
+
34
+ const containerStyles = {
35
+ height: `${containerHeight}%`,
36
+ padding: '1rem',
37
+ borderWidth: '2px',
38
+ borderStyle: 'dashed'
39
+ };
40
+
41
+ const dropdownItems = [
42
+ <OverflowMenuDropdownItem itemId={0} key="item1" isShared>
43
+ Item 1
44
+ </OverflowMenuDropdownItem>,
45
+ <OverflowMenuDropdownItem itemId={1} key="item2" isShared>
46
+ Item 2
47
+ </OverflowMenuDropdownItem>,
48
+ <OverflowMenuDropdownItem itemId={2} key="item3" isShared>
49
+ Item 3
50
+ </OverflowMenuDropdownItem>,
51
+ <OverflowMenuDropdownItem itemId={3} key="item4" isShared>
52
+ Item 4
53
+ </OverflowMenuDropdownItem>,
54
+ <OverflowMenuDropdownItem itemId={4} key="item5" isShared>
55
+ Item 5
56
+ </OverflowMenuDropdownItem>
57
+ ];
58
+
59
+ return (
60
+ <>
61
+ <span id="overflowMenu-hasBreakpointOnContainer-height-slider-label">Current container height</span>:{' '}
62
+ {containerHeight}%
63
+ <Slider
64
+ value={containerHeight}
65
+ onChange={onChange}
66
+ max={100}
67
+ min={20}
68
+ step={20}
69
+ showTicks
70
+ showBoundaries={false}
71
+ aria-labelledby="overflowMenu-hasBreakpointOnContainer-height-slider-label"
72
+ />
73
+ <div style={{ height: '100%' }}>
74
+ <div ref={containerRef} id="height-breakpoint-reference-container" style={containerStyles}>
75
+ <OverflowMenu breakpointReference={containerRef} breakpoint="md" isVertical>
76
+ <OverflowMenuContent>
77
+ <OverflowMenuItem>Item 1</OverflowMenuItem>
78
+ <OverflowMenuItem>Item 2</OverflowMenuItem>
79
+ <OverflowMenuGroup>
80
+ <OverflowMenuItem>Item 3</OverflowMenuItem>
81
+ <OverflowMenuItem>Item 4</OverflowMenuItem>
82
+ <OverflowMenuItem>Item 5</OverflowMenuItem>
83
+ </OverflowMenuGroup>
84
+ </OverflowMenuContent>
85
+ <OverflowMenuControl>
86
+ <Dropdown
87
+ onSelect={onSelect}
88
+ toggle={(toggleRef) => (
89
+ <MenuToggle
90
+ ref={toggleRef}
91
+ aria-label="Height breakpoint on container example overflow menu"
92
+ variant="plain"
93
+ onClick={onToggle}
94
+ isExpanded={isOpen}
95
+ icon={<EllipsisVIcon />}
96
+ />
97
+ )}
98
+ isOpen={isOpen}
99
+ onOpenChange={(isOpen) => setIsOpen(isOpen)}
100
+ >
101
+ <DropdownList>{dropdownItems}</DropdownList>
102
+ </Dropdown>
103
+ </OverflowMenuControl>
104
+ </OverflowMenu>
105
+ </div>
106
+ </div>
107
+ </>
108
+ );
109
+ };