@patternfly/react-core 6.3.1-prerelease.9 → 6.4.0-prerelease.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/components/package.json +1 -1
  3. package/deprecated/package.json +1 -1
  4. package/dist/dynamic/components/AboutModal/package.json +1 -1
  5. package/dist/dynamic/components/Accordion/package.json +1 -1
  6. package/dist/dynamic/components/ActionList/package.json +1 -1
  7. package/dist/dynamic/components/Alert/package.json +1 -1
  8. package/dist/dynamic/components/Avatar/package.json +1 -1
  9. package/dist/dynamic/components/BackToTop/package.json +1 -1
  10. package/dist/dynamic/components/Backdrop/package.json +1 -1
  11. package/dist/dynamic/components/BackgroundImage/package.json +1 -1
  12. package/dist/dynamic/components/Badge/package.json +1 -1
  13. package/dist/dynamic/components/Banner/package.json +1 -1
  14. package/dist/dynamic/components/Brand/package.json +1 -1
  15. package/dist/dynamic/components/Breadcrumb/package.json +1 -1
  16. package/dist/dynamic/components/Button/package.json +1 -1
  17. package/dist/dynamic/components/CalendarMonth/package.json +1 -1
  18. package/dist/dynamic/components/Card/package.json +1 -1
  19. package/dist/dynamic/components/Checkbox/package.json +1 -1
  20. package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
  21. package/dist/dynamic/components/CodeBlock/package.json +1 -1
  22. package/dist/dynamic/components/Content/package.json +1 -1
  23. package/dist/dynamic/components/DataList/package.json +1 -1
  24. package/dist/dynamic/components/DatePicker/package.json +1 -1
  25. package/dist/dynamic/components/DescriptionList/package.json +1 -1
  26. package/dist/dynamic/components/Divider/package.json +1 -1
  27. package/dist/dynamic/components/Drawer/package.json +1 -1
  28. package/dist/dynamic/components/Dropdown/package.json +1 -1
  29. package/dist/dynamic/components/DualListSelector/package.json +1 -1
  30. package/dist/dynamic/components/EmptyState/package.json +1 -1
  31. package/dist/dynamic/components/ExpandableSection/package.json +1 -1
  32. package/dist/dynamic/components/FileUpload/package.json +1 -1
  33. package/dist/dynamic/components/Form/package.json +1 -1
  34. package/dist/dynamic/components/FormSelect/package.json +1 -1
  35. package/dist/dynamic/components/HelperText/package.json +1 -1
  36. package/dist/dynamic/components/Hint/package.json +1 -1
  37. package/dist/dynamic/components/Icon/package.json +1 -1
  38. package/dist/dynamic/components/InputGroup/package.json +1 -1
  39. package/dist/dynamic/components/JumpLinks/package.json +1 -1
  40. package/dist/dynamic/components/Label/package.json +1 -1
  41. package/dist/dynamic/components/List/package.json +1 -1
  42. package/dist/dynamic/components/LoginPage/package.json +1 -1
  43. package/dist/dynamic/components/Masthead/package.json +1 -1
  44. package/dist/dynamic/components/Menu/package.json +1 -1
  45. package/dist/dynamic/components/MenuToggle/package.json +1 -1
  46. package/dist/dynamic/components/Modal/package.json +1 -1
  47. package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
  48. package/dist/dynamic/components/Nav/package.json +1 -1
  49. package/dist/dynamic/components/NotificationBadge/package.json +1 -1
  50. package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
  51. package/dist/dynamic/components/NumberInput/package.json +1 -1
  52. package/dist/dynamic/components/OverflowMenu/package.json +1 -1
  53. package/dist/dynamic/components/Page/package.json +1 -1
  54. package/dist/dynamic/components/Pagination/package.json +1 -1
  55. package/dist/dynamic/components/Panel/package.json +1 -1
  56. package/dist/dynamic/components/Popover/package.json +1 -1
  57. package/dist/dynamic/components/Progress/package.json +1 -1
  58. package/dist/dynamic/components/ProgressStepper/package.json +1 -1
  59. package/dist/dynamic/components/Radio/package.json +1 -1
  60. package/dist/dynamic/components/SearchInput/package.json +1 -1
  61. package/dist/dynamic/components/Select/package.json +1 -1
  62. package/dist/dynamic/components/Sidebar/package.json +1 -1
  63. package/dist/dynamic/components/SimpleList/package.json +1 -1
  64. package/dist/dynamic/components/Skeleton/package.json +1 -1
  65. package/dist/dynamic/components/SkipToContent/package.json +1 -1
  66. package/dist/dynamic/components/Slider/package.json +1 -1
  67. package/dist/dynamic/components/Spinner/package.json +1 -1
  68. package/dist/dynamic/components/Switch/package.json +1 -1
  69. package/dist/dynamic/components/Tabs/package.json +1 -1
  70. package/dist/dynamic/components/TextArea/package.json +1 -1
  71. package/dist/dynamic/components/TextInput/package.json +1 -1
  72. package/dist/dynamic/components/TextInputGroup/package.json +1 -1
  73. package/dist/dynamic/components/TimePicker/package.json +1 -1
  74. package/dist/dynamic/components/Timestamp/package.json +1 -1
  75. package/dist/dynamic/components/Title/package.json +1 -1
  76. package/dist/dynamic/components/ToggleGroup/package.json +1 -1
  77. package/dist/dynamic/components/Toolbar/package.json +1 -1
  78. package/dist/dynamic/components/Tooltip/package.json +1 -1
  79. package/dist/dynamic/components/TreeView/package.json +1 -1
  80. package/dist/dynamic/components/Truncate/package.json +1 -1
  81. package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
  82. package/dist/dynamic/components/Wizard/package.json +1 -1
  83. package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
  84. package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
  85. package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
  86. package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
  87. package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
  88. package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
  89. package/dist/dynamic/deprecated/components/package.json +1 -1
  90. package/dist/dynamic/helpers/AnimationsProvider/AnimationsProvider/package.json +1 -0
  91. package/dist/dynamic/helpers/AnimationsProvider/package.json +1 -0
  92. package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
  93. package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
  94. package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
  95. package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
  96. package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
  97. package/dist/dynamic/helpers/constants/package.json +1 -1
  98. package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
  99. package/dist/dynamic/helpers/fileUtils/package.json +1 -1
  100. package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
  101. package/dist/dynamic/helpers/package.json +1 -1
  102. package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
  103. package/dist/dynamic/helpers/typeUtils/package.json +1 -1
  104. package/dist/dynamic/helpers/useInterval/package.json +1 -1
  105. package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
  106. package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
  107. package/dist/dynamic/helpers/util/package.json +1 -1
  108. package/dist/dynamic/layouts/Bullseye/package.json +1 -1
  109. package/dist/dynamic/layouts/Flex/package.json +1 -1
  110. package/dist/dynamic/layouts/Gallery/package.json +1 -1
  111. package/dist/dynamic/layouts/Grid/package.json +1 -1
  112. package/dist/dynamic/layouts/Level/package.json +1 -1
  113. package/dist/dynamic/layouts/Split/package.json +1 -1
  114. package/dist/dynamic/layouts/Stack/package.json +1 -1
  115. package/dist/dynamic/styles/package.json +1 -1
  116. package/dist/dynamic-modules.json +6 -0
  117. package/dist/esm/components/Alert/AlertGroup.d.ts +2 -13
  118. package/dist/esm/components/Alert/AlertGroup.d.ts.map +1 -1
  119. package/dist/esm/components/Alert/AlertGroup.js +33 -38
  120. package/dist/esm/components/Alert/AlertGroup.js.map +1 -1
  121. package/dist/esm/components/Alert/AlertGroupInline.d.ts.map +1 -1
  122. package/dist/esm/components/Alert/AlertGroupInline.js +3 -1
  123. package/dist/esm/components/Alert/AlertGroupInline.js.map +1 -1
  124. package/dist/esm/components/DataList/DataListItem.d.ts.map +1 -1
  125. package/dist/esm/components/DataList/DataListItem.js +8 -0
  126. package/dist/esm/components/DataList/DataListItem.js.map +1 -1
  127. package/dist/esm/components/Dropdown/Dropdown.d.ts +6 -20
  128. package/dist/esm/components/Dropdown/Dropdown.d.ts.map +1 -1
  129. package/dist/esm/components/Dropdown/Dropdown.js.map +1 -1
  130. package/dist/esm/components/DualListSelector/DualListSelector.d.ts +2 -9
  131. package/dist/esm/components/DualListSelector/DualListSelector.d.ts.map +1 -1
  132. package/dist/esm/components/DualListSelector/DualListSelector.js +6 -16
  133. package/dist/esm/components/DualListSelector/DualListSelector.js.map +1 -1
  134. package/dist/esm/components/DualListSelector/DualListSelectorTreeItem.d.ts.map +1 -1
  135. package/dist/esm/components/DualListSelector/DualListSelectorTreeItem.js +3 -1
  136. package/dist/esm/components/DualListSelector/DualListSelectorTreeItem.js.map +1 -1
  137. package/dist/esm/components/Form/FormFieldGroupExpandable.d.ts.map +1 -1
  138. package/dist/esm/components/Form/FormFieldGroupExpandable.js +3 -1
  139. package/dist/esm/components/Form/FormFieldGroupExpandable.js.map +1 -1
  140. package/dist/esm/components/Form/InternalFormFieldGroup.d.ts.map +1 -1
  141. package/dist/esm/components/Form/InternalFormFieldGroup.js +3 -1
  142. package/dist/esm/components/Form/InternalFormFieldGroup.js.map +1 -1
  143. package/dist/esm/components/Menu/Menu.d.ts +2 -1
  144. package/dist/esm/components/Menu/Menu.d.ts.map +1 -1
  145. package/dist/esm/components/Menu/Menu.js +0 -1
  146. package/dist/esm/components/Menu/Menu.js.map +1 -1
  147. package/dist/esm/components/Menu/MenuContainer.d.ts +4 -17
  148. package/dist/esm/components/Menu/MenuContainer.d.ts.map +1 -1
  149. package/dist/esm/components/Menu/MenuContainer.js.map +1 -1
  150. package/dist/esm/components/Menu/MenuGroup.d.ts.map +1 -1
  151. package/dist/esm/components/Menu/MenuGroup.js +3 -2
  152. package/dist/esm/components/Menu/MenuGroup.js.map +1 -1
  153. package/dist/esm/components/Menu/MenuItem.js +3 -2
  154. package/dist/esm/components/Menu/MenuItem.js.map +1 -1
  155. package/dist/esm/components/Menu/MenuItemAction.d.ts.map +1 -1
  156. package/dist/esm/components/Menu/MenuItemAction.js +1 -2
  157. package/dist/esm/components/Menu/MenuItemAction.js.map +1 -1
  158. package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts +2 -0
  159. package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts.map +1 -1
  160. package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.js +2 -2
  161. package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.js.map +1 -1
  162. package/dist/esm/components/Progress/Progress.d.ts +2 -0
  163. package/dist/esm/components/Progress/Progress.d.ts.map +1 -1
  164. package/dist/esm/components/Progress/Progress.js +6 -2
  165. package/dist/esm/components/Progress/Progress.js.map +1 -1
  166. package/dist/esm/components/Progress/ProgressBar.d.ts +1 -0
  167. package/dist/esm/components/Progress/ProgressBar.d.ts.map +1 -1
  168. package/dist/esm/components/Progress/ProgressBar.js +1 -1
  169. package/dist/esm/components/Progress/ProgressBar.js.map +1 -1
  170. package/dist/esm/components/Progress/ProgressContainer.js +1 -1
  171. package/dist/esm/components/Progress/ProgressContainer.js.map +1 -1
  172. package/dist/esm/components/SearchInput/SearchInput.d.ts.map +1 -1
  173. package/dist/esm/components/SearchInput/SearchInput.js +3 -1
  174. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  175. package/dist/esm/components/Select/Select.d.ts +6 -26
  176. package/dist/esm/components/Select/Select.d.ts.map +1 -1
  177. package/dist/esm/components/Select/Select.js.map +1 -1
  178. package/dist/esm/components/Tabs/OverflowTab.d.ts +4 -25
  179. package/dist/esm/components/Tabs/OverflowTab.d.ts.map +1 -1
  180. package/dist/esm/components/Tabs/OverflowTab.js.map +1 -1
  181. package/dist/esm/components/Tabs/Tabs.d.ts +2 -2
  182. package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
  183. package/dist/esm/components/Tabs/Tabs.js +1 -1
  184. package/dist/esm/components/Tabs/Tabs.js.map +1 -1
  185. package/dist/esm/components/TreeView/TreeView.d.ts.map +1 -1
  186. package/dist/esm/components/TreeView/TreeView.js +3 -1
  187. package/dist/esm/components/TreeView/TreeView.js.map +1 -1
  188. package/dist/esm/components/TreeView/TreeViewListItem.d.ts.map +1 -1
  189. package/dist/esm/components/TreeView/TreeViewListItem.js +3 -1
  190. package/dist/esm/components/TreeView/TreeViewListItem.js.map +1 -1
  191. package/dist/esm/components/Truncate/Truncate.d.ts.map +1 -1
  192. package/dist/esm/components/Truncate/Truncate.js +3 -2
  193. package/dist/esm/components/Truncate/Truncate.js.map +1 -1
  194. package/dist/esm/helpers/AnimationsProvider/AnimationsProvider.d.ts +76 -0
  195. package/dist/esm/helpers/AnimationsProvider/AnimationsProvider.d.ts.map +1 -0
  196. package/dist/esm/helpers/AnimationsProvider/AnimationsProvider.js +83 -0
  197. package/dist/esm/helpers/AnimationsProvider/AnimationsProvider.js.map +1 -0
  198. package/dist/esm/helpers/AnimationsProvider/index.d.ts +2 -0
  199. package/dist/esm/helpers/AnimationsProvider/index.d.ts.map +1 -0
  200. package/dist/esm/helpers/AnimationsProvider/index.js +2 -0
  201. package/dist/esm/helpers/AnimationsProvider/index.js.map +1 -0
  202. package/dist/esm/helpers/Popper/Popper.d.ts +28 -21
  203. package/dist/esm/helpers/Popper/Popper.d.ts.map +1 -1
  204. package/dist/esm/helpers/Popper/Popper.js +2 -2
  205. package/dist/esm/helpers/Popper/Popper.js.map +1 -1
  206. package/dist/esm/helpers/index.d.ts +1 -0
  207. package/dist/esm/helpers/index.d.ts.map +1 -1
  208. package/dist/esm/helpers/index.js +1 -0
  209. package/dist/esm/helpers/index.js.map +1 -1
  210. package/dist/js/components/Alert/AlertGroup.d.ts +2 -13
  211. package/dist/js/components/Alert/AlertGroup.d.ts.map +1 -1
  212. package/dist/js/components/Alert/AlertGroup.js +33 -37
  213. package/dist/js/components/Alert/AlertGroup.js.map +1 -1
  214. package/dist/js/components/Alert/AlertGroupInline.d.ts.map +1 -1
  215. package/dist/js/components/Alert/AlertGroupInline.js +3 -1
  216. package/dist/js/components/Alert/AlertGroupInline.js.map +1 -1
  217. package/dist/js/components/DataList/DataListItem.d.ts.map +1 -1
  218. package/dist/js/components/DataList/DataListItem.js +8 -0
  219. package/dist/js/components/DataList/DataListItem.js.map +1 -1
  220. package/dist/js/components/Dropdown/Dropdown.d.ts +6 -20
  221. package/dist/js/components/Dropdown/Dropdown.d.ts.map +1 -1
  222. package/dist/js/components/Dropdown/Dropdown.js.map +1 -1
  223. package/dist/js/components/DualListSelector/DualListSelector.d.ts +2 -9
  224. package/dist/js/components/DualListSelector/DualListSelector.d.ts.map +1 -1
  225. package/dist/js/components/DualListSelector/DualListSelector.js +7 -16
  226. package/dist/js/components/DualListSelector/DualListSelector.js.map +1 -1
  227. package/dist/js/components/DualListSelector/DualListSelectorTreeItem.d.ts.map +1 -1
  228. package/dist/js/components/DualListSelector/DualListSelectorTreeItem.js +3 -1
  229. package/dist/js/components/DualListSelector/DualListSelectorTreeItem.js.map +1 -1
  230. package/dist/js/components/Form/FormFieldGroupExpandable.d.ts.map +1 -1
  231. package/dist/js/components/Form/FormFieldGroupExpandable.js +3 -1
  232. package/dist/js/components/Form/FormFieldGroupExpandable.js.map +1 -1
  233. package/dist/js/components/Form/InternalFormFieldGroup.d.ts.map +1 -1
  234. package/dist/js/components/Form/InternalFormFieldGroup.js +3 -1
  235. package/dist/js/components/Form/InternalFormFieldGroup.js.map +1 -1
  236. package/dist/js/components/Menu/Menu.d.ts +2 -1
  237. package/dist/js/components/Menu/Menu.d.ts.map +1 -1
  238. package/dist/js/components/Menu/Menu.js +0 -1
  239. package/dist/js/components/Menu/Menu.js.map +1 -1
  240. package/dist/js/components/Menu/MenuContainer.d.ts +4 -17
  241. package/dist/js/components/Menu/MenuContainer.d.ts.map +1 -1
  242. package/dist/js/components/Menu/MenuContainer.js.map +1 -1
  243. package/dist/js/components/Menu/MenuGroup.d.ts.map +1 -1
  244. package/dist/js/components/Menu/MenuGroup.js +3 -2
  245. package/dist/js/components/Menu/MenuGroup.js.map +1 -1
  246. package/dist/js/components/Menu/MenuItem.js +3 -2
  247. package/dist/js/components/Menu/MenuItem.js.map +1 -1
  248. package/dist/js/components/Menu/MenuItemAction.d.ts.map +1 -1
  249. package/dist/js/components/Menu/MenuItemAction.js +1 -2
  250. package/dist/js/components/Menu/MenuItemAction.js.map +1 -1
  251. package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts +2 -0
  252. package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts.map +1 -1
  253. package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.js +2 -2
  254. package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.js.map +1 -1
  255. package/dist/js/components/Progress/Progress.d.ts +2 -0
  256. package/dist/js/components/Progress/Progress.d.ts.map +1 -1
  257. package/dist/js/components/Progress/Progress.js +6 -2
  258. package/dist/js/components/Progress/Progress.js.map +1 -1
  259. package/dist/js/components/Progress/ProgressBar.d.ts +1 -0
  260. package/dist/js/components/Progress/ProgressBar.d.ts.map +1 -1
  261. package/dist/js/components/Progress/ProgressBar.js +1 -1
  262. package/dist/js/components/Progress/ProgressBar.js.map +1 -1
  263. package/dist/js/components/Progress/ProgressContainer.js +1 -1
  264. package/dist/js/components/Progress/ProgressContainer.js.map +1 -1
  265. package/dist/js/components/SearchInput/SearchInput.d.ts.map +1 -1
  266. package/dist/js/components/SearchInput/SearchInput.js +3 -1
  267. package/dist/js/components/SearchInput/SearchInput.js.map +1 -1
  268. package/dist/js/components/Select/Select.d.ts +6 -26
  269. package/dist/js/components/Select/Select.d.ts.map +1 -1
  270. package/dist/js/components/Select/Select.js.map +1 -1
  271. package/dist/js/components/Tabs/OverflowTab.d.ts +4 -25
  272. package/dist/js/components/Tabs/OverflowTab.d.ts.map +1 -1
  273. package/dist/js/components/Tabs/OverflowTab.js.map +1 -1
  274. package/dist/js/components/Tabs/Tabs.d.ts +2 -2
  275. package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
  276. package/dist/js/components/Tabs/Tabs.js +1 -1
  277. package/dist/js/components/Tabs/Tabs.js.map +1 -1
  278. package/dist/js/components/TreeView/TreeView.d.ts.map +1 -1
  279. package/dist/js/components/TreeView/TreeView.js +3 -1
  280. package/dist/js/components/TreeView/TreeView.js.map +1 -1
  281. package/dist/js/components/TreeView/TreeViewListItem.d.ts.map +1 -1
  282. package/dist/js/components/TreeView/TreeViewListItem.js +3 -1
  283. package/dist/js/components/TreeView/TreeViewListItem.js.map +1 -1
  284. package/dist/js/components/Truncate/Truncate.d.ts.map +1 -1
  285. package/dist/js/components/Truncate/Truncate.js +2 -1
  286. package/dist/js/components/Truncate/Truncate.js.map +1 -1
  287. package/dist/js/helpers/AnimationsProvider/AnimationsProvider.d.ts +76 -0
  288. package/dist/js/helpers/AnimationsProvider/AnimationsProvider.d.ts.map +1 -0
  289. package/dist/js/helpers/AnimationsProvider/AnimationsProvider.js +89 -0
  290. package/dist/js/helpers/AnimationsProvider/AnimationsProvider.js.map +1 -0
  291. package/dist/js/helpers/AnimationsProvider/index.d.ts +2 -0
  292. package/dist/js/helpers/AnimationsProvider/index.d.ts.map +1 -0
  293. package/dist/js/helpers/AnimationsProvider/index.js +5 -0
  294. package/dist/js/helpers/AnimationsProvider/index.js.map +1 -0
  295. package/dist/js/helpers/Popper/Popper.d.ts +28 -21
  296. package/dist/js/helpers/Popper/Popper.d.ts.map +1 -1
  297. package/dist/js/helpers/Popper/Popper.js +2 -2
  298. package/dist/js/helpers/Popper/Popper.js.map +1 -1
  299. package/dist/js/helpers/index.d.ts +1 -0
  300. package/dist/js/helpers/index.d.ts.map +1 -1
  301. package/dist/js/helpers/index.js +1 -0
  302. package/dist/js/helpers/index.js.map +1 -1
  303. package/dist/styles/base-no-reset.css +8 -45
  304. package/dist/styles/base.css +8 -45
  305. package/dist/umd/assets/{output-D8x_lwPB.css → output-NiN4FQqb.css} +20230 -20103
  306. package/dist/umd/react-core.min.js +3 -3
  307. package/helpers/package.json +1 -1
  308. package/layouts/package.json +1 -1
  309. package/next/package.json +1 -1
  310. package/package.json +6 -6
  311. package/src/components/Alert/AlertGroup.tsx +59 -63
  312. package/src/components/Alert/AlertGroupInline.tsx +3 -1
  313. package/src/components/Alert/__tests__/AlertGroup.test.tsx +55 -4
  314. package/src/components/DataList/DataListItem.tsx +12 -0
  315. package/src/components/Dropdown/Dropdown.tsx +6 -21
  316. package/src/components/Dropdown/examples/Dropdown.md +2 -2
  317. package/src/components/DualListSelector/DualListSelector.tsx +32 -39
  318. package/src/components/DualListSelector/DualListSelectorTreeItem.tsx +3 -1
  319. package/src/components/DualListSelector/__tests__/DualListSelector.test.tsx +28 -0
  320. package/src/components/Form/FormFieldGroupExpandable.tsx +3 -1
  321. package/src/components/Form/InternalFormFieldGroup.tsx +3 -1
  322. package/src/components/Form/__tests__/FormFieldGroupExpandable.test.tsx +30 -0
  323. package/src/components/Menu/Menu.tsx +2 -2
  324. package/src/components/Menu/MenuContainer.tsx +4 -17
  325. package/src/components/Menu/MenuGroup.tsx +13 -7
  326. package/src/components/Menu/MenuItem.tsx +2 -2
  327. package/src/components/Menu/MenuItemAction.tsx +3 -2
  328. package/src/components/Menu/__tests__/Menu.test.tsx +39 -1
  329. package/src/components/Menu/examples/Menu.md +3 -3
  330. package/src/components/MultipleFileUpload/MultipleFileUploadStatusItem.tsx +4 -0
  331. package/src/components/MultipleFileUpload/examples/MultipleFileUploadBasic.tsx +5 -4
  332. package/src/components/Progress/Progress.tsx +9 -1
  333. package/src/components/Progress/ProgressBar.tsx +2 -1
  334. package/src/components/Progress/ProgressContainer.tsx +1 -1
  335. package/src/components/Progress/__tests__/Generated/__snapshots__/ProgressBar.test.tsx.snap +1 -0
  336. package/src/components/Progress/__tests__/ProgressBar.test.tsx +19 -0
  337. package/src/components/Progress/examples/Progress.md +67 -23
  338. package/src/components/Progress/examples/ProgressHelperText.tsx +8 -2
  339. package/src/components/SearchInput/SearchInput.tsx +3 -1
  340. package/src/components/SearchInput/__tests__/SearchInput.test.tsx +52 -0
  341. package/src/components/Select/Select.tsx +6 -27
  342. package/src/components/Select/examples/Select.md +1 -1
  343. package/src/components/Tabs/OverflowTab.tsx +4 -26
  344. package/src/components/Tabs/Tabs.tsx +7 -3
  345. package/src/components/Tabs/__tests__/Tabs.test.tsx +12 -0
  346. package/src/components/Tabs/examples/Tabs.md +27 -27
  347. package/src/components/TreeView/TreeView.tsx +3 -1
  348. package/src/components/TreeView/TreeViewListItem.tsx +3 -1
  349. package/src/components/TreeView/__tests__/TreeView.test.tsx +28 -0
  350. package/src/components/TreeView/__tests__/__snapshots__/TreeView.test.tsx.snap +1 -1
  351. package/src/components/Truncate/Truncate.tsx +3 -1
  352. package/src/components/Truncate/examples/TruncateExamples.css +2 -2
  353. package/src/helpers/AnimationsProvider/AnimationsProvider.tsx +104 -0
  354. package/src/helpers/AnimationsProvider/__tests__/AnimationsProvider.test.tsx +157 -0
  355. package/src/helpers/AnimationsProvider/index.ts +1 -0
  356. package/src/helpers/Popper/Popper.tsx +31 -22
  357. package/src/helpers/index.ts +1 -0
@@ -4,7 +4,7 @@ section: components
4
4
  subsection: menus
5
5
  cssPrefix: pf-v6-c-select
6
6
  propComponents:
7
- ['Select', 'SelectOption', 'SelectGroup', 'SelectList', 'MenuToggle', 'SelectToggleProps', 'SelectPopperProps']
7
+ ['Select', 'SelectOption', 'SelectGroup', 'SelectList', 'MenuToggle', 'SelectToggleProps', 'PopperOptions']
8
8
  ouia: true
9
9
  ---
10
10
 
@@ -2,36 +2,14 @@ import { Fragment, useContext, useEffect, useRef, useState } from 'react';
2
2
  import styles from '@patternfly/react-styles/css/components/Tabs/tabs';
3
3
  import { css } from '@patternfly/react-styles';
4
4
  import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon';
5
- import { Popper } from '../../helpers';
5
+ import { Popper, PopperOptions } from '../../helpers';
6
6
  import { Menu, MenuContent, MenuList, MenuItem } from '../Menu';
7
7
  import { TabsContext } from './TabsContext';
8
8
  import { TabProps } from './Tab';
9
9
  import { TabTitleText } from './TabTitleText';
10
10
 
11
- export interface HorizontalOverflowPopperProps {
12
- /** Vertical direction of the popper. If enableFlip is set to true, this will set the initial direction before the popper flips. */
13
- direction?: 'up' | 'down';
14
- /** Horizontal position of the popper */
15
- position?: 'right' | 'left' | 'center' | 'start' | 'end';
16
- /** Custom width of the popper. If the value is "trigger", it will set the width to the select toggle's width */
17
- width?: string | 'trigger';
18
- /** Minimum width of the popper. If the value is "trigger", it will set the min width to the select toggle's width */
19
- minWidth?: string | 'trigger';
20
- /** Maximum width of the popper. If the value is "trigger", it will set the max width to the select toggle's width */
21
- maxWidth?: string | 'trigger';
22
- /** Enable to flip the popper when it reaches the boundary */
23
- enableFlip?: boolean;
24
- /** The container to append the select to. Defaults to document.body.
25
- * If your select is being cut off you can append it to an element higher up the DOM tree.
26
- * Some examples:
27
- * appendTo="inline"
28
- * appendTo={() => document.body}
29
- * appendTo={document.getElementById('target')}
30
- */
31
- appendTo?: HTMLElement | (() => HTMLElement) | 'inline';
32
- /** Flag to prevent the popper from overflowing its container and becoming partially obscured. */
33
- preventOverflow?: boolean;
34
- }
11
+ /** @deprecated Use PopperOptions instead */
12
+ export type HorizontalOverflowPopperProps = PopperOptions;
35
13
 
36
14
  export interface OverflowTabProps extends React.HTMLProps<HTMLLIElement> {
37
15
  /** Additional classes added to the overflow tab */
@@ -51,7 +29,7 @@ export interface OverflowTabProps extends React.HTMLProps<HTMLLIElement> {
51
29
  /** Time in ms to wait before firing the toggles' focus event. Defaults to 0 */
52
30
  focusTimeoutDelay?: number;
53
31
  /** Additional props to spread to the popper menu. */
54
- popperProps?: HorizontalOverflowPopperProps;
32
+ popperProps?: PopperOptions;
55
33
  }
56
34
 
57
35
  export const OverflowTab: React.FunctionComponent<OverflowTabProps> = ({
@@ -54,9 +54,9 @@ export interface TabsProps
54
54
  /** The index of the default active tab. Set this for uncontrolled Tabs */
55
55
  defaultActiveKey?: number | string;
56
56
  /** Callback to handle tab selection */
57
- onSelect?: (event: React.MouseEvent<HTMLElement, MouseEvent>, eventKey: number | string) => void;
57
+ onSelect?: (event: React.MouseEvent<HTMLElement, MouseEvent>, eventKey: TabProps['eventKey']) => void;
58
58
  /** Callback to handle tab closing and adds a basic close button to all tabs. This is overridden by the tab actions property. */
59
- onClose?: (event: React.MouseEvent<HTMLElement, MouseEvent>, eventKey: number | string) => void;
59
+ onClose?: (event: React.MouseEvent<HTMLElement, MouseEvent>, eventKey: TabProps['eventKey']) => void;
60
60
  /** Callback for the add button. Passing this property inserts the add button */
61
61
  onAdd?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
62
62
  /** Aria-label for the add button */
@@ -576,8 +576,12 @@ class Tabs extends Component<TabsProps, TabsState> {
576
576
  )}
577
577
  {...getOUIAProps(Tabs.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe)}
578
578
  id={id && id}
579
- style={{ [linkAccentLength.name]: currentLinkAccentLength, [linkAccentStart.name]: currentLinkAccentStart }}
580
579
  {...props}
580
+ style={{
581
+ [linkAccentLength.name]: currentLinkAccentLength,
582
+ [linkAccentStart.name]: currentLinkAccentStart,
583
+ ...props.style
584
+ }}
581
585
  >
582
586
  {expandable && isVertical && (
583
587
  <GenerateId>
@@ -562,3 +562,15 @@ test('should render an enabled add button', () => {
562
562
  const addButton = screen.getByLabelText('add-label');
563
563
  expect(addButton).not.toBeDisabled();
564
564
  });
565
+
566
+ test(`should render with custom inline style and accent position inline style`, () => {
567
+ render(
568
+ <Tabs role="region" style="background-color: #12345;">
569
+ <Tab title="Test title" eventKey={0}>
570
+ Tab Content
571
+ </Tab>
572
+ </Tabs>
573
+ );
574
+
575
+ expect(screen.getByRole('region')).toHaveStyle(`background-color: #12345;--pf-v6-c-tabs--link-accent--start: 0px;`);
576
+ });
@@ -2,7 +2,7 @@
2
2
  id: Tabs
3
3
  section: components
4
4
  cssPrefix: pf-v6-c-tabs
5
- propComponents: ['Tabs', 'Tab', 'TabContent', 'TabContentBody', 'TabTitleText', 'TabTitleIcon', 'HorizontalOverflowObject', 'HorizontalOverflowPopperProps', 'TabAction']
5
+ propComponents: ['Tabs', 'Tab', 'TabContent', 'TabContentBody', 'TabTitleText', 'TabTitleIcon', 'HorizontalOverflowObject', 'TabAction', 'PopperOptions']
6
6
  ouia: true
7
7
  ---
8
8
 
@@ -22,16 +22,16 @@ import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
22
22
 
23
23
  A `<Tabs>` component contains multiple `<Tab>` components that may be used to navigate between sets of content within a page.
24
24
 
25
- You can adjust a tab in the following ways:
25
+ You can adjust a tab in the following ways:
26
26
 
27
27
  - To label a tab with text, pass a `<TabTitleText>` component into the `title` property of a `<Tab>`.
28
- - To disable a tab, use the `isDisabled` property. Tabs using `isDisabled` are not perceivable or operable by users navigating via assistive technologies.
28
+ - To disable a tab, use the `isDisabled` property. Tabs using `isDisabled` are not perceivable or operable by users navigating via assistive technologies.
29
29
  - To disable a tab, but keep it perceivable to assistive technology users, use the `isAriaDisabled` property. If a disabled tab has a tooltip, use this property instead of `isDisabled`.
30
- - To add a tooltip to an aria-disabled tab, use the `tooltip` property.
30
+ - To add a tooltip to an aria-disabled tab, use the `tooltip` property.
31
31
 
32
- Tabs can be styled as 'default' or 'boxed':
32
+ Tabs can be styled as 'default' or 'boxed':
33
33
 
34
- - Default tabs do not have any borders and use a bottom line to distinguish between a selected tab, a hovered tab, and an inactive tab.
34
+ - Default tabs do not have any borders and use a bottom line to distinguish between a selected tab, a hovered tab, and an inactive tab.
35
35
  - Boxed tabs are outlined to emphasize the area that a tab spans. To preview boxed tabs in the following examples, select the 'isBox' checkbox, which sets the `isBox` property to true.
36
36
 
37
37
  ```ts file="./TabsDefault.tsx"
@@ -39,7 +39,7 @@ Tabs can be styled as 'default' or 'boxed':
39
39
 
40
40
  ### Boxed secondary tabs
41
41
 
42
- To change the background color of boxed tabs or the tab content, use the `variant` property.
42
+ To change the background color of boxed tabs or the tab content, use the `variant` property.
43
43
 
44
44
  Toggle the tab color by selecting the 'Tabs secondary variant' checkbox in the following example.
45
45
 
@@ -50,14 +50,14 @@ Toggle the tab color by selecting the 'Tabs secondary variant' checkbox in the f
50
50
 
51
51
  Vertical tabs are placed on the left-hand side of a page or container and may appear in both 'default' and 'boxed' tab variations.
52
52
 
53
- To style tabs vertically, use the `isVertical` property.
53
+ To style tabs vertically, use the `isVertical` property.
54
54
 
55
55
  ```ts file="./TabsVertical.tsx"
56
56
  ```
57
57
 
58
58
  ### Vertical expandable tabs
59
59
 
60
- Vertical tabs can be made expandable to save space. Users can select the caret to expand a menu and switch between tabs.
60
+ Vertical tabs can be made expandable to save space. Users can select the caret to expand a menu and switch between tabs.
61
61
 
62
62
  Expandable tabs can be enabled at different breakpoints. The following example passes `expandable={{ default: 'expandable', md: 'nonExpandable', lg: 'expandable' }}` into the `<Tabs>` component.
63
63
 
@@ -75,14 +75,14 @@ To flag the default expanded state for uncontrolled tabs, use the `defaultIsExpa
75
75
 
76
76
  ### Default overflow tabs
77
77
 
78
- By default, overflow is applied when there are too many tabs for the width of the container they are in. This overflow can be navigated by side-scrolling within the tabs section, or by selecting the left and right arrows.
78
+ By default, overflow is applied when there are too many tabs for the width of the container they are in. This overflow can be navigated by side-scrolling within the tabs section, or by selecting the left and right arrows.
79
79
 
80
80
  ```ts file="./TabsDefaultOverflow.tsx"
81
81
  ```
82
82
 
83
83
  ### Horizontal overflow tabs
84
84
 
85
- Horizontal overflow can be used instead of the default application. To navigate horizontal overflow tabs users can select the last tab, labeled “more”, to see the overflowed content.
85
+ Horizontal overflow can be used instead of the default application. To navigate horizontal overflow tabs users can select the last tab, labeled “more”, to see the overflowed content.
86
86
 
87
87
  To enable horizontal overflow, use the `isOverflowHorizontal` property.
88
88
 
@@ -102,7 +102,7 @@ The tooltip should also have the `id` property passed in. The value of `id` shou
102
102
 
103
103
  ### Uncontrolled tabs
104
104
 
105
- To allow the `<Tabs>` component to manage setting the active tab and displaying correct content itself, use uncontrolled tabs, as shown in the following example.
105
+ To allow the `<Tabs>` component to manage setting the active tab and displaying correct content itself, use uncontrolled tabs, as shown in the following example.
106
106
 
107
107
 
108
108
  ```ts file="./TabsUncontrolled.tsx"
@@ -124,7 +124,7 @@ To adjust the left padding of tabs, use the `usePageInsets` property. This prope
124
124
 
125
125
  ### With icons and text
126
126
 
127
- You can render different content in the `title` property of a tab to add icons and text.
127
+ You can render different content in the `title` property of a tab to add icons and text.
128
128
 
129
129
  To add an icon to a tab, pass a `<TabTitleIcon>` component that contains the icon of your choice into the `title`. To use an icon alongside styled text, keep the text in the `<TabTitleText>` component.
130
130
 
@@ -133,53 +133,53 @@ To add an icon to a tab, pass a `<TabTitleIcon>` component that contains the ico
133
133
 
134
134
  ### Subtabs
135
135
 
136
- Use subtabs within other components, like modals. Subtabs have less visually prominent styling.
136
+ Use subtabs within other components, like modals. Subtabs have less visually prominent styling.
137
137
 
138
- To apply subtab styling to tabs, use the `isSubtab` property.
138
+ To apply subtab styling to tabs, use the `isSubtab` property.
139
139
 
140
140
  ```ts file="./TabsSubtabs.tsx"
141
141
  ```
142
142
 
143
143
  ### Filled tabs with icons
144
144
 
145
- To allow tabs to fill the available width of the page section, use the `isFilled` property.
145
+ To allow tabs to fill the available width of the page section, use the `isFilled` property.
146
146
 
147
147
  ```ts file="./TabsFilledWithIcons.tsx"
148
148
  ```
149
149
 
150
150
  ### Tabs linked to nav elements
151
151
 
152
- To let tabs link to nav elements, pass `{TabsComponent.nav}` into the `component` property.
152
+ To let tabs link to nav elements, pass `{TabsComponent.nav}` into the `component` property.
153
153
 
154
- Nav tabs should use the `href` property to link the tab to the URL of another page or page section. A tab with an `href` will render as an `<a>` instead of a `<button>`.
154
+ Nav tabs should use the `href` property to link the tab to the URL of another page or page section. A tab with an `href` will render as an `<a>` instead of a `<button>`.
155
155
 
156
156
  ```ts file="./TabsNav.tsx"
157
157
  ```
158
158
 
159
159
  ### Subtabs linked to nav elements
160
160
 
161
- Subtabs can also link to nav elements.
161
+ Subtabs can also link to nav elements.
162
162
 
163
163
  ```ts file="./TabsNavSubtab.tsx"
164
164
  ```
165
165
 
166
166
  ### With separate content
167
167
 
168
- If a `<TabContent>` component is defined outside of a `<Tabs>` component, use the `tabContentRef` and `tabContentId` properties
168
+ If a `<TabContent>` component is defined outside of a `<Tabs>` component, use the `tabContentRef` and `tabContentId` properties
169
169
 
170
170
  ```ts file="./TabsSeparateContent.tsx"
171
171
  ```
172
172
 
173
173
  ### With tab content with body and padding
174
174
 
175
- To add a content body to a `<TabContent>` component, pass a `<TabContentBody>`. To add padding to the body section, use the `hasPadding` property.
175
+ To add a content body to a `<TabContent>` component, pass a `<TabContentBody>`. To add padding to the body section, use the `hasPadding` property.
176
176
 
177
177
  ```ts file="./TabsContentWithBodyPadding.tsx"
178
178
  ```
179
179
 
180
180
  ### Children mounting on click
181
181
 
182
- To mount tab children (add to the DOM) when a tab is clicked, use the `mountOnEnter` property.
182
+ To mount tab children (add to the DOM) when a tab is clicked, use the `mountOnEnter` property.
183
183
 
184
184
  Note that this property does not create the tab children until the tab is clicked, so they are not preloaded into the DOM.
185
185
 
@@ -197,30 +197,30 @@ To unmount tab children (remove from the DOM) when they are no longer visible, u
197
197
 
198
198
  You may control tabs from outside of the tabs component. For example, select the "Hide tab 2" button below to make "Tab item 2" invisible.
199
199
 
200
- The tab its content should only be mounted when the tab is visible.
200
+ The tab its content should only be mounted when the tab is visible.
201
201
 
202
202
  ```ts file="./TabsToggledSeparateContent.tsx"
203
203
  ```
204
204
 
205
205
  ### Dynamic tabs
206
206
 
207
- To enable closeable tabs, pass the `onClose` property to the `<Tabs>` component. To enable a button that adds new tabs, pass the `onAdd` property to `<Tabs>`.
207
+ To enable closeable tabs, pass the `onClose` property to the `<Tabs>` component. To enable a button that adds new tabs, pass the `onAdd` property to `<Tabs>`.
208
208
 
209
209
  ```ts file="./TabsDynamic.tsx"
210
210
  ```
211
211
 
212
212
  ### With help action popover
213
213
 
214
- You may add a help action to a tab to provide users with additional context in a popover.
214
+ You may add a help action to a tab to provide users with additional context in a popover.
215
215
 
216
- To render an action beside the tab content, use the `actions` property of a `<Tab>`. Pass a popover and a `<TabsAction>` component into the `actions` property.
216
+ To render an action beside the tab content, use the `actions` property of a `<Tab>`. Pass a popover and a `<TabsAction>` component into the `actions` property.
217
217
 
218
218
  ```ts file="./TabsHelp.tsx"
219
219
  ```
220
220
 
221
221
  ### With help and close actions
222
222
 
223
- To add multiple actions to a tab, create a `<TabAction>` component for each action.
223
+ To add multiple actions to a tab, create a `<TabAction>` component for each action.
224
224
 
225
225
  The following example passes in both help popover and close actions.
226
226
 
@@ -1,6 +1,7 @@
1
1
  import { TreeViewList } from './TreeViewList';
2
2
  import { TreeViewCheckProps, TreeViewListItem } from './TreeViewListItem';
3
3
  import { TreeViewRoot } from './TreeViewRoot';
4
+ import { useHasAnimations } from '../../helpers';
4
5
 
5
6
  /** Properties that make up a tree view data item. These properties should be passed in as an
6
7
  * object to one of the various tree view component properties which accept TreeViewDataItem as
@@ -135,9 +136,10 @@ export const TreeView: React.FunctionComponent<TreeViewProps> = ({
135
136
  useMemo,
136
137
  'aria-label': ariaLabel,
137
138
  'aria-labelledby': ariaLabelledby,
138
- hasAnimations,
139
+ hasAnimations: hasAnimationsProp,
139
140
  ...props
140
141
  }: TreeViewProps) => {
142
+ const hasAnimations = useHasAnimations(hasAnimationsProp);
141
143
  const treeViewList = (
142
144
  <TreeViewList
143
145
  isNested={isNested}
@@ -5,6 +5,7 @@ import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-i
5
5
  import { TreeViewDataItem } from './TreeView';
6
6
  import { Badge } from '../Badge';
7
7
  import { GenerateId } from '../../helpers/GenerateId/GenerateId';
8
+ import { useHasAnimations } from '../../helpers';
8
9
 
9
10
  export interface TreeViewCheckProps extends Omit<Partial<React.InputHTMLAttributes<HTMLInputElement>>, 'checked'> {
10
11
  checked?: boolean | null;
@@ -102,10 +103,11 @@ const TreeViewListItemBase: React.FunctionComponent<TreeViewListItemProps> = ({
102
103
  expandedIcon,
103
104
  action,
104
105
  compareItems,
105
- hasAnimations,
106
+ hasAnimations: hasAnimationsProp,
106
107
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
107
108
  useMemo
108
109
  }: TreeViewListItemProps) => {
110
+ const hasAnimations = useHasAnimations(hasAnimationsProp);
109
111
  const [internalIsExpanded, setIsExpanded] = useState(defaultExpanded);
110
112
  useEffect(() => {
111
113
  if (isExpanded !== undefined && isExpanded !== null) {
@@ -1,6 +1,7 @@
1
1
  import { render, screen } from '@testing-library/react';
2
2
  import userEvent from '@testing-library/user-event';
3
3
  import { TreeView } from '../TreeView';
4
+ import { AnimationsProvider } from '../../../helpers/AnimationsProvider';
4
5
 
5
6
  jest.mock('../TreeViewList', () => ({
6
7
  TreeViewList: ({
@@ -293,6 +294,33 @@ test('Passes hasAnimations to TreeViewListItem', () => {
293
294
 
294
295
  expect(screen.getByText('TreeViewListItem hasAnimations: true')).toBeVisible();
295
296
  });
297
+
298
+ // Animation context tests
299
+ test('respects AnimationsProvider context when no local hasAnimations prop', () => {
300
+ render(
301
+ <AnimationsProvider config={{ hasAnimations: true }}>
302
+ <TreeView data={[basicData]} />
303
+ </AnimationsProvider>
304
+ );
305
+
306
+ expect(screen.getByText('TreeViewListItem hasAnimations: true')).toBeVisible();
307
+ });
308
+
309
+ test('local hasAnimations prop takes precedence over context', () => {
310
+ render(
311
+ <AnimationsProvider config={{ hasAnimations: true }}>
312
+ <TreeView data={[basicData]} hasAnimations={false} />
313
+ </AnimationsProvider>
314
+ );
315
+
316
+ expect(screen.getByText('TreeViewListItem hasAnimations: false')).toBeVisible();
317
+ });
318
+
319
+ test('works without AnimationsProvider (backward compatibility)', () => {
320
+ render(<TreeView data={[basicData]} />);
321
+
322
+ expect(screen.getByText('TreeViewListItem hasAnimations: false')).toBeVisible();
323
+ });
296
324
  test('Passes data.children to TreeViewListItem', () => {
297
325
  render(<TreeView data={[{ ...basicData, children: [{ name: 'Child 1' }] }]} />);
298
326
 
@@ -105,7 +105,7 @@ exports[`Matches snapshot 1`] = `
105
105
  TreeViewListItem useMemo: undefined
106
106
  </p>
107
107
  <p>
108
- TreeViewListItem hasAnimations: undefined
108
+ TreeViewListItem hasAnimations: false
109
109
  </p>
110
110
  <button>
111
111
  compareItems clicker
@@ -1,4 +1,4 @@
1
- import { Fragment, useEffect, useRef, useState, forwardRef } from 'react';
1
+ import { Fragment, useEffect, useRef, useState, forwardRef, useImperativeHandle } from 'react';
2
2
  import styles from '@patternfly/react-styles/css/components/Truncate/truncate';
3
3
  import { css } from '@patternfly/react-styles';
4
4
  import { Tooltip, TooltipPosition, TooltipProps } from '../Tooltip';
@@ -75,6 +75,7 @@ const TruncateBase: React.FunctionComponent<TruncateProps> = ({
75
75
  maxCharsDisplayed,
76
76
  omissionContent = '\u2026',
77
77
  content,
78
+ innerRef,
78
79
  ...props
79
80
  }: TruncateProps) => {
80
81
  const [isTruncated, setIsTruncated] = useState(true);
@@ -83,6 +84,7 @@ const TruncateBase: React.FunctionComponent<TruncateProps> = ({
83
84
  const [shouldRenderByMaxChars, setShouldRenderByMaxChars] = useState(maxCharsDisplayed > 0);
84
85
 
85
86
  const textRef = useRef<HTMLElement>(null);
87
+ useImperativeHandle(innerRef, () => textRef.current!);
86
88
  const defaultSubParentRef = useRef<any>(null);
87
89
  const subParentRef = tooltipProps?.triggerRef || defaultSubParentRef;
88
90
  const observer = useRef(null);
@@ -4,6 +4,6 @@
4
4
  overflow: auto;
5
5
  min-width: 161px;
6
6
  max-width: 100%;
7
- padding: var(--pf-v6-global--spacer--md);
8
- border: var(--pf-v6-global--BorderWidth--sm) solid var(--pf-v6-global--BorderColor--100);
7
+ padding: var(--pf-t--global--spacer--sm);
8
+ border: var(--pf-t--global--border--width--box--default) solid var(--pf-t--global--border--color--default);
9
9
  }
@@ -0,0 +1,104 @@
1
+ import { createContext, useContext, FunctionComponent, ReactNode } from 'react';
2
+
3
+ /** Configuration for animations throughout PatternFly components */
4
+ export interface AnimationsConfig {
5
+ /** Whether animations are enabled globally */
6
+ hasAnimations?: boolean;
7
+ }
8
+
9
+ /** Props for the AnimationsProvider component */
10
+ export interface AnimationsProviderProps {
11
+ /** Animation configuration settings */
12
+ config: AnimationsConfig;
13
+ /** Child components that will have access to the animations context */
14
+ children: ReactNode;
15
+ }
16
+
17
+ /** Context to provide animations configuration to child components */
18
+ const AnimationsContext = createContext<AnimationsConfig>({
19
+ hasAnimations: false
20
+ });
21
+
22
+ /**
23
+ * AnimationsProvider is an application-level provider that provides uniform
24
+ * animation configuration for all PatternFly React components via the React context API.
25
+ *
26
+ * **Usage**: Place this provider at the root of your application to enable global
27
+ * animation control without requiring manual prop drilling throughout your component tree.
28
+ *
29
+ * **Benefits**:
30
+ * - Centralized animation control for the entire application
31
+ * - Respects user accessibility preferences (reduced motion)
32
+ * - Components can still override the global setting when needed
33
+ * - Works with all PatternFly components that support animations
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * // App.tsx - Place at your application root
38
+ * import { AnimationsProvider } from '@patternfly/react-core';
39
+ *
40
+ * const App = () => (
41
+ * <AnimationsProvider config={{ hasAnimations: true }}>
42
+ * <MyApplication />
43
+ * </AnimationsProvider>
44
+ * );
45
+ * ```
46
+ */
47
+ export const AnimationsProvider: FunctionComponent<AnimationsProviderProps> = ({ config, children }) => (
48
+ <AnimationsContext.Provider value={config}>{children}</AnimationsContext.Provider>
49
+ );
50
+
51
+ /**
52
+ * Hook to access the animations configuration from the nearest AnimationsProvider.
53
+ *
54
+ * This hook allows components to check if animations are enabled and override
55
+ * their local hasAnimations prop accordingly.
56
+ *
57
+ * @returns The animations configuration object
58
+ *
59
+ * @example
60
+ * ```tsx
61
+ * const MyComponent = ({ hasAnimations: hasAnimationsProp, ...props }) => {
62
+ * const { hasAnimations: contextHasAnimations } = useAnimationsConfig();
63
+ * const hasAnimations = hasAnimationsProp ?? contextHasAnimations;
64
+ *
65
+ * return <div className={hasAnimations ? 'with-animations' : ''} {...props} />;
66
+ * };
67
+ * ```
68
+ */
69
+ export const useAnimationsConfig = (): AnimationsConfig => {
70
+ const context = useContext(AnimationsContext);
71
+
72
+ if (context === undefined) {
73
+ // Return default config if no provider is found
74
+ return { hasAnimations: false };
75
+ }
76
+
77
+ return context;
78
+ };
79
+
80
+ /**
81
+ * Utility hook that combines local hasAnimations prop with context configuration.
82
+ * The local prop takes precedence when explicitly set, otherwise falls back to context.
83
+ *
84
+ * @param hasAnimationsProp - The hasAnimations prop passed directly to the component
85
+ * @returns The resolved hasAnimations value
86
+ *
87
+ * @example
88
+ * ```tsx
89
+ * const MyComponent = ({ hasAnimations: hasAnimationsProp, ...props }) => {
90
+ * const hasAnimations = useHasAnimations(hasAnimationsProp);
91
+ *
92
+ * return <div className={hasAnimations ? 'animated' : 'static'} {...props} />;
93
+ * };
94
+ * ```
95
+ */
96
+ export const useHasAnimations = (hasAnimationsProp?: boolean): boolean => {
97
+ const { hasAnimations: contextHasAnimations } = useAnimationsConfig();
98
+
99
+ // Local prop takes precedence when explicitly set (including false)
100
+ // If local prop is undefined, fall back to context
101
+ return hasAnimationsProp ?? contextHasAnimations ?? false;
102
+ };
103
+
104
+ AnimationsProvider.displayName = 'AnimationsProvider';