@patternfly/react-core 4.243.1 → 4.244.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 (275) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/esm/components/Alert/Alert.d.ts +41 -34
  3. package/dist/esm/components/Alert/Alert.d.ts.map +1 -1
  4. package/dist/esm/components/Alert/Alert.js.map +1 -1
  5. package/dist/esm/components/Alert/AlertActionCloseButton.d.ts +8 -5
  6. package/dist/esm/components/Alert/AlertActionCloseButton.d.ts.map +1 -1
  7. package/dist/esm/components/Alert/AlertActionCloseButton.js.map +1 -1
  8. package/dist/esm/components/Alert/AlertActionLink.d.ts +5 -2
  9. package/dist/esm/components/Alert/AlertActionLink.d.ts.map +1 -1
  10. package/dist/esm/components/Alert/AlertActionLink.js.map +1 -1
  11. package/dist/esm/components/Alert/AlertIcon.d.ts +4 -4
  12. package/dist/esm/components/Alert/AlertIcon.d.ts.map +1 -1
  13. package/dist/esm/components/Alert/AlertToggleExpandButton.d.ts +5 -5
  14. package/dist/esm/components/Alert/AlertToggleExpandButton.d.ts.map +1 -1
  15. package/dist/esm/components/CalendarMonth/CalendarMonth.d.ts +34 -28
  16. package/dist/esm/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
  17. package/dist/esm/components/CalendarMonth/CalendarMonth.js +1 -0
  18. package/dist/esm/components/CalendarMonth/CalendarMonth.js.map +1 -1
  19. package/dist/esm/components/DatePicker/DatePicker.d.ts +43 -36
  20. package/dist/esm/components/DatePicker/DatePicker.d.ts.map +1 -1
  21. package/dist/esm/components/DatePicker/DatePicker.js +4 -0
  22. package/dist/esm/components/DatePicker/DatePicker.js.map +1 -1
  23. package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts +34 -24
  24. package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
  25. package/dist/esm/components/ExpandableSection/ExpandableSection.js.map +1 -1
  26. package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts +10 -5
  27. package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
  28. package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.js.map +1 -1
  29. package/dist/esm/components/FileUpload/FileUpload.d.ts +53 -47
  30. package/dist/esm/components/FileUpload/FileUpload.d.ts.map +1 -1
  31. package/dist/esm/components/FileUpload/FileUpload.js.map +1 -1
  32. package/dist/esm/components/FileUpload/FileUploadField.d.ts +51 -46
  33. package/dist/esm/components/FileUpload/FileUploadField.d.ts.map +1 -1
  34. package/dist/esm/components/FileUpload/FileUploadField.js.map +1 -1
  35. package/dist/esm/components/Modal/Modal.d.ts +57 -48
  36. package/dist/esm/components/Modal/Modal.d.ts.map +1 -1
  37. package/dist/esm/components/Modal/Modal.js.map +1 -1
  38. package/dist/esm/components/Modal/ModalBox.d.ts +12 -12
  39. package/dist/esm/components/Modal/ModalBox.d.ts.map +1 -1
  40. package/dist/esm/components/Modal/ModalBoxBody.d.ts +2 -2
  41. package/dist/esm/components/Modal/ModalBoxBody.d.ts.map +1 -1
  42. package/dist/esm/components/Modal/ModalBoxCloseButton.d.ts +2 -2
  43. package/dist/esm/components/Modal/ModalBoxCloseButton.d.ts.map +1 -1
  44. package/dist/esm/components/Modal/ModalBoxDescription.d.ts +3 -3
  45. package/dist/esm/components/Modal/ModalBoxDescription.d.ts.map +1 -1
  46. package/dist/esm/components/Modal/ModalBoxFooter.d.ts +2 -2
  47. package/dist/esm/components/Modal/ModalBoxFooter.d.ts.map +1 -1
  48. package/dist/esm/components/Modal/ModalBoxHeader.d.ts +3 -3
  49. package/dist/esm/components/Modal/ModalBoxHeader.d.ts.map +1 -1
  50. package/dist/esm/components/Modal/ModalBoxTitle.d.ts +8 -9
  51. package/dist/esm/components/Modal/ModalBoxTitle.d.ts.map +1 -1
  52. package/dist/esm/components/Modal/ModalBoxTitle.js.map +1 -1
  53. package/dist/esm/components/Modal/ModalContent.d.ts +56 -48
  54. package/dist/esm/components/Modal/ModalContent.d.ts.map +1 -1
  55. package/dist/esm/components/Modal/ModalContent.js.map +1 -1
  56. package/dist/esm/components/NotificationBadge/NotificationBadge.d.ts +17 -13
  57. package/dist/esm/components/NotificationBadge/NotificationBadge.d.ts.map +1 -1
  58. package/dist/esm/components/NotificationBadge/NotificationBadge.js +3 -3
  59. package/dist/esm/components/NotificationBadge/NotificationBadge.js.map +1 -1
  60. package/dist/esm/components/Pagination/Navigation.d.ts +33 -33
  61. package/dist/esm/components/Pagination/Navigation.d.ts.map +1 -1
  62. package/dist/esm/components/Pagination/OptionsToggle.d.ts +27 -26
  63. package/dist/esm/components/Pagination/OptionsToggle.d.ts.map +1 -1
  64. package/dist/esm/components/Pagination/OptionsToggle.js.map +1 -1
  65. package/dist/esm/components/Pagination/Pagination.d.ts +76 -65
  66. package/dist/esm/components/Pagination/Pagination.d.ts.map +1 -1
  67. package/dist/esm/components/Pagination/Pagination.js +1 -1
  68. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  69. package/dist/esm/components/Pagination/PaginationOptionsMenu.d.ts +22 -18
  70. package/dist/esm/components/Pagination/PaginationOptionsMenu.d.ts.map +1 -1
  71. package/dist/esm/components/Pagination/PaginationOptionsMenu.js.map +1 -1
  72. package/dist/esm/components/Pagination/ToggleTemplate.d.ts +3 -0
  73. package/dist/esm/components/Pagination/ToggleTemplate.d.ts.map +1 -1
  74. package/dist/esm/components/Pagination/ToggleTemplate.js.map +1 -1
  75. package/dist/esm/components/Popover/Popover.d.ts +88 -73
  76. package/dist/esm/components/Popover/Popover.d.ts.map +1 -1
  77. package/dist/esm/components/Popover/Popover.js.map +1 -1
  78. package/dist/esm/components/SearchInput/AdvancedSearchMenu.d.ts +27 -26
  79. package/dist/esm/components/SearchInput/AdvancedSearchMenu.d.ts.map +1 -1
  80. package/dist/esm/components/SearchInput/AdvancedSearchMenu.js.map +1 -1
  81. package/dist/esm/components/SearchInput/SearchInput.d.ts +71 -60
  82. package/dist/esm/components/SearchInput/SearchInput.d.ts.map +1 -1
  83. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  84. package/dist/esm/components/Select/Select.d.ts +2 -0
  85. package/dist/esm/components/Select/Select.d.ts.map +1 -1
  86. package/dist/esm/components/Select/Select.js +4 -3
  87. package/dist/esm/components/Select/Select.js.map +1 -1
  88. package/dist/esm/components/Select/SelectToggle.d.ts +2 -0
  89. package/dist/esm/components/Select/SelectToggle.d.ts.map +1 -1
  90. package/dist/esm/components/Select/SelectToggle.js +3 -5
  91. package/dist/esm/components/Select/SelectToggle.js.map +1 -1
  92. package/dist/esm/components/Slider/Slider.d.ts +45 -39
  93. package/dist/esm/components/Slider/Slider.d.ts.map +1 -1
  94. package/dist/esm/components/Slider/Slider.js.map +1 -1
  95. package/dist/esm/components/Slider/SliderStep.d.ts +10 -10
  96. package/dist/esm/components/Slider/SliderStep.d.ts.map +1 -1
  97. package/dist/esm/components/TreeView/TreeView.d.ts +65 -53
  98. package/dist/esm/components/TreeView/TreeView.d.ts.map +1 -1
  99. package/dist/esm/components/TreeView/TreeView.js.map +1 -1
  100. package/dist/esm/components/TreeView/TreeViewList.d.ts +4 -4
  101. package/dist/esm/components/TreeView/TreeViewList.d.ts.map +1 -1
  102. package/dist/esm/components/TreeView/TreeViewListItem.d.ts +46 -39
  103. package/dist/esm/components/TreeView/TreeViewListItem.d.ts.map +1 -1
  104. package/dist/esm/components/TreeView/TreeViewListItem.js.map +1 -1
  105. package/dist/esm/components/TreeView/TreeViewRoot.d.ts +4 -4
  106. package/dist/esm/components/TreeView/TreeViewRoot.d.ts.map +1 -1
  107. package/dist/esm/components/TreeView/TreeViewSearch.d.ts +11 -8
  108. package/dist/esm/components/TreeView/TreeViewSearch.d.ts.map +1 -1
  109. package/dist/esm/components/TreeView/TreeViewSearch.js.map +1 -1
  110. package/dist/esm/helpers/Popper/Popper.js +8 -8
  111. package/dist/esm/helpers/Popper/Popper.js.map +1 -1
  112. package/dist/js/components/Alert/Alert.d.ts +41 -34
  113. package/dist/js/components/Alert/Alert.d.ts.map +1 -1
  114. package/dist/js/components/Alert/Alert.js.map +1 -1
  115. package/dist/js/components/Alert/AlertActionCloseButton.d.ts +8 -5
  116. package/dist/js/components/Alert/AlertActionCloseButton.d.ts.map +1 -1
  117. package/dist/js/components/Alert/AlertActionCloseButton.js.map +1 -1
  118. package/dist/js/components/Alert/AlertActionLink.d.ts +5 -2
  119. package/dist/js/components/Alert/AlertActionLink.d.ts.map +1 -1
  120. package/dist/js/components/Alert/AlertActionLink.js.map +1 -1
  121. package/dist/js/components/Alert/AlertIcon.d.ts +4 -4
  122. package/dist/js/components/Alert/AlertIcon.d.ts.map +1 -1
  123. package/dist/js/components/Alert/AlertToggleExpandButton.d.ts +5 -5
  124. package/dist/js/components/Alert/AlertToggleExpandButton.d.ts.map +1 -1
  125. package/dist/js/components/CalendarMonth/CalendarMonth.d.ts +34 -28
  126. package/dist/js/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
  127. package/dist/js/components/CalendarMonth/CalendarMonth.js +1 -0
  128. package/dist/js/components/CalendarMonth/CalendarMonth.js.map +1 -1
  129. package/dist/js/components/DatePicker/DatePicker.d.ts +43 -36
  130. package/dist/js/components/DatePicker/DatePicker.d.ts.map +1 -1
  131. package/dist/js/components/DatePicker/DatePicker.js +4 -0
  132. package/dist/js/components/DatePicker/DatePicker.js.map +1 -1
  133. package/dist/js/components/ExpandableSection/ExpandableSection.d.ts +34 -24
  134. package/dist/js/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
  135. package/dist/js/components/ExpandableSection/ExpandableSection.js.map +1 -1
  136. package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts +10 -5
  137. package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
  138. package/dist/js/components/ExpandableSection/ExpandableSectionToggle.js.map +1 -1
  139. package/dist/js/components/FileUpload/FileUpload.d.ts +53 -47
  140. package/dist/js/components/FileUpload/FileUpload.d.ts.map +1 -1
  141. package/dist/js/components/FileUpload/FileUpload.js.map +1 -1
  142. package/dist/js/components/FileUpload/FileUploadField.d.ts +51 -46
  143. package/dist/js/components/FileUpload/FileUploadField.d.ts.map +1 -1
  144. package/dist/js/components/FileUpload/FileUploadField.js.map +1 -1
  145. package/dist/js/components/Modal/Modal.d.ts +57 -48
  146. package/dist/js/components/Modal/Modal.d.ts.map +1 -1
  147. package/dist/js/components/Modal/Modal.js.map +1 -1
  148. package/dist/js/components/Modal/ModalBox.d.ts +12 -12
  149. package/dist/js/components/Modal/ModalBox.d.ts.map +1 -1
  150. package/dist/js/components/Modal/ModalBoxBody.d.ts +2 -2
  151. package/dist/js/components/Modal/ModalBoxBody.d.ts.map +1 -1
  152. package/dist/js/components/Modal/ModalBoxCloseButton.d.ts +2 -2
  153. package/dist/js/components/Modal/ModalBoxCloseButton.d.ts.map +1 -1
  154. package/dist/js/components/Modal/ModalBoxDescription.d.ts +3 -3
  155. package/dist/js/components/Modal/ModalBoxDescription.d.ts.map +1 -1
  156. package/dist/js/components/Modal/ModalBoxFooter.d.ts +2 -2
  157. package/dist/js/components/Modal/ModalBoxFooter.d.ts.map +1 -1
  158. package/dist/js/components/Modal/ModalBoxHeader.d.ts +3 -3
  159. package/dist/js/components/Modal/ModalBoxHeader.d.ts.map +1 -1
  160. package/dist/js/components/Modal/ModalBoxTitle.d.ts +8 -9
  161. package/dist/js/components/Modal/ModalBoxTitle.d.ts.map +1 -1
  162. package/dist/js/components/Modal/ModalBoxTitle.js.map +1 -1
  163. package/dist/js/components/Modal/ModalContent.d.ts +56 -48
  164. package/dist/js/components/Modal/ModalContent.d.ts.map +1 -1
  165. package/dist/js/components/Modal/ModalContent.js.map +1 -1
  166. package/dist/js/components/NotificationBadge/NotificationBadge.d.ts +17 -13
  167. package/dist/js/components/NotificationBadge/NotificationBadge.d.ts.map +1 -1
  168. package/dist/js/components/NotificationBadge/NotificationBadge.js +3 -3
  169. package/dist/js/components/NotificationBadge/NotificationBadge.js.map +1 -1
  170. package/dist/js/components/Pagination/Navigation.d.ts +33 -33
  171. package/dist/js/components/Pagination/Navigation.d.ts.map +1 -1
  172. package/dist/js/components/Pagination/OptionsToggle.d.ts +27 -26
  173. package/dist/js/components/Pagination/OptionsToggle.d.ts.map +1 -1
  174. package/dist/js/components/Pagination/OptionsToggle.js.map +1 -1
  175. package/dist/js/components/Pagination/Pagination.d.ts +76 -65
  176. package/dist/js/components/Pagination/Pagination.d.ts.map +1 -1
  177. package/dist/js/components/Pagination/Pagination.js +1 -1
  178. package/dist/js/components/Pagination/Pagination.js.map +1 -1
  179. package/dist/js/components/Pagination/PaginationOptionsMenu.d.ts +22 -18
  180. package/dist/js/components/Pagination/PaginationOptionsMenu.d.ts.map +1 -1
  181. package/dist/js/components/Pagination/PaginationOptionsMenu.js.map +1 -1
  182. package/dist/js/components/Pagination/ToggleTemplate.d.ts +3 -0
  183. package/dist/js/components/Pagination/ToggleTemplate.d.ts.map +1 -1
  184. package/dist/js/components/Pagination/ToggleTemplate.js.map +1 -1
  185. package/dist/js/components/Popover/Popover.d.ts +88 -73
  186. package/dist/js/components/Popover/Popover.d.ts.map +1 -1
  187. package/dist/js/components/Popover/Popover.js.map +1 -1
  188. package/dist/js/components/SearchInput/AdvancedSearchMenu.d.ts +27 -26
  189. package/dist/js/components/SearchInput/AdvancedSearchMenu.d.ts.map +1 -1
  190. package/dist/js/components/SearchInput/AdvancedSearchMenu.js.map +1 -1
  191. package/dist/js/components/SearchInput/SearchInput.d.ts +71 -60
  192. package/dist/js/components/SearchInput/SearchInput.d.ts.map +1 -1
  193. package/dist/js/components/SearchInput/SearchInput.js.map +1 -1
  194. package/dist/js/components/Select/Select.d.ts +2 -0
  195. package/dist/js/components/Select/Select.d.ts.map +1 -1
  196. package/dist/js/components/Select/Select.js +4 -3
  197. package/dist/js/components/Select/Select.js.map +1 -1
  198. package/dist/js/components/Select/SelectToggle.d.ts +2 -0
  199. package/dist/js/components/Select/SelectToggle.d.ts.map +1 -1
  200. package/dist/js/components/Select/SelectToggle.js +3 -5
  201. package/dist/js/components/Select/SelectToggle.js.map +1 -1
  202. package/dist/js/components/Slider/Slider.d.ts +45 -39
  203. package/dist/js/components/Slider/Slider.d.ts.map +1 -1
  204. package/dist/js/components/Slider/Slider.js.map +1 -1
  205. package/dist/js/components/Slider/SliderStep.d.ts +10 -10
  206. package/dist/js/components/Slider/SliderStep.d.ts.map +1 -1
  207. package/dist/js/components/TreeView/TreeView.d.ts +65 -53
  208. package/dist/js/components/TreeView/TreeView.d.ts.map +1 -1
  209. package/dist/js/components/TreeView/TreeView.js.map +1 -1
  210. package/dist/js/components/TreeView/TreeViewList.d.ts +4 -4
  211. package/dist/js/components/TreeView/TreeViewList.d.ts.map +1 -1
  212. package/dist/js/components/TreeView/TreeViewListItem.d.ts +46 -39
  213. package/dist/js/components/TreeView/TreeViewListItem.d.ts.map +1 -1
  214. package/dist/js/components/TreeView/TreeViewListItem.js.map +1 -1
  215. package/dist/js/components/TreeView/TreeViewRoot.d.ts +4 -4
  216. package/dist/js/components/TreeView/TreeViewRoot.d.ts.map +1 -1
  217. package/dist/js/components/TreeView/TreeViewSearch.d.ts +11 -8
  218. package/dist/js/components/TreeView/TreeViewSearch.d.ts.map +1 -1
  219. package/dist/js/components/TreeView/TreeViewSearch.js.map +1 -1
  220. package/dist/js/helpers/Popper/Popper.js +8 -8
  221. package/dist/js/helpers/Popper/Popper.js.map +1 -1
  222. package/dist/umd/react-core.min.css +172 -172
  223. package/dist/umd/react-core.min.js +3 -3
  224. package/package.json +2 -2
  225. package/src/components/Alert/Alert.tsx +42 -34
  226. package/src/components/Alert/AlertActionCloseButton.tsx +9 -5
  227. package/src/components/Alert/AlertActionLink.tsx +6 -2
  228. package/src/components/Alert/AlertIcon.tsx +4 -4
  229. package/src/components/Alert/AlertToggleExpandButton.tsx +5 -5
  230. package/src/components/Badge/__tests__/Badge.test.tsx +45 -8
  231. package/src/components/Badge/__tests__/__snapshots__/Badge.test.tsx.snap +2 -12
  232. package/src/components/CalendarMonth/CalendarMonth.tsx +36 -28
  233. package/src/components/DatePicker/DatePicker.tsx +49 -36
  234. package/src/components/DatePicker/__tests__/DatePicker.test.tsx +21 -0
  235. package/src/components/ExpandableSection/ExpandableSection.tsx +35 -24
  236. package/src/components/ExpandableSection/ExpandableSectionToggle.tsx +11 -5
  237. package/src/components/FileUpload/FileUpload.tsx +56 -49
  238. package/src/components/FileUpload/FileUploadField.tsx +56 -50
  239. package/src/components/Modal/Modal.tsx +57 -48
  240. package/src/components/Modal/ModalBox.tsx +12 -12
  241. package/src/components/Modal/ModalBoxBody.tsx +2 -2
  242. package/src/components/Modal/ModalBoxCloseButton.tsx +2 -2
  243. package/src/components/Modal/ModalBoxDescription.tsx +3 -3
  244. package/src/components/Modal/ModalBoxFooter.tsx +2 -2
  245. package/src/components/Modal/ModalBoxHeader.tsx +3 -3
  246. package/src/components/Modal/ModalBoxTitle.tsx +8 -9
  247. package/src/components/Modal/ModalContent.tsx +56 -48
  248. package/src/components/Modal/examples/Modal.md +1 -3
  249. package/src/components/NotificationBadge/NotificationBadge.tsx +22 -15
  250. package/src/components/NotificationBadge/__tests__/NotificationBadge.test.tsx +25 -1
  251. package/src/components/NotificationBadge/__tests__/__snapshots__/NotificationBadge.test.tsx.snap +5 -0
  252. package/src/components/NotificationBadge/examples/NotificationBadge.md +16 -3
  253. package/src/components/NotificationBadge/examples/NotificationBadgeBasic.tsx +26 -13
  254. package/src/components/NotificationBadge/examples/NotificationBadgeWithCount.tsx +28 -18
  255. package/src/components/Pagination/Navigation.tsx +33 -33
  256. package/src/components/Pagination/OptionsToggle.tsx +27 -26
  257. package/src/components/Pagination/Pagination.tsx +79 -65
  258. package/src/components/Pagination/PaginationOptionsMenu.tsx +22 -18
  259. package/src/components/Pagination/ToggleTemplate.tsx +4 -0
  260. package/src/components/Popover/Popover.tsx +89 -73
  261. package/src/components/SearchInput/AdvancedSearchMenu.tsx +29 -28
  262. package/src/components/SearchInput/SearchInput.tsx +76 -62
  263. package/src/components/Select/Select.tsx +5 -0
  264. package/src/components/Select/SelectToggle.tsx +5 -4
  265. package/src/components/Slider/Slider.tsx +47 -41
  266. package/src/components/Slider/SliderStep.tsx +10 -10
  267. package/src/components/TreeView/TreeView.tsx +67 -53
  268. package/src/components/TreeView/TreeViewList.tsx +4 -4
  269. package/src/components/TreeView/TreeViewListItem.tsx +46 -39
  270. package/src/components/TreeView/TreeViewRoot.tsx +4 -4
  271. package/src/components/TreeView/TreeViewSearch.tsx +12 -8
  272. package/src/demos/Masthead.md +9 -193
  273. package/src/demos/NotificationDrawer/NotificationDrawer.md +2 -0
  274. package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +305 -0
  275. package/src/helpers/Popper/Popper.tsx +8 -8
@@ -15,62 +15,70 @@ import { ModalBoxHeader } from './ModalBoxHeader';
15
15
  import { ModalBoxTitle, isVariantIcon } from './ModalBoxTitle';
16
16
 
17
17
  export interface ModalContentProps extends OUIAProps {
18
- /** Content rendered inside the Modal. */
18
+ /** Action buttons to add to the standard modal footer. Ignored if the footer property
19
+ * is passed in.
20
+ */
21
+ actions?: any;
22
+ /** Id to use for the modal box descriptor. */
23
+ 'aria-describedby'?: string;
24
+ /** Accessible descriptor of the modal. */
25
+ 'aria-label'?: string;
26
+ /** Id to use for the modal box label. */
27
+ 'aria-labelledby'?: string | null;
28
+ /** Accessible label applied to the modal box body. This should be used to communicate
29
+ * important information about the modal box body div element if needed, such as that it
30
+ * is scrollable.
31
+ */
32
+ bodyAriaLabel?: string;
33
+ /** Accessible role applied to the modal box body. This will default to "region" if the
34
+ * bodyAriaLabel property is passed in. Set to a more appropriate role as applicable
35
+ * based on the modal content and context.
36
+ */
37
+ bodyAriaRole?: string;
38
+ /** Id of the modal box container. */
39
+ boxId: string;
40
+ /** Content rendered inside the modal. */
19
41
  children: React.ReactNode;
20
- /** Additional classes added to the button */
42
+ /** Additional classes added to the modal box. */
21
43
  className?: string;
22
- /** Variant of the modal */
23
- variant?: 'small' | 'medium' | 'large' | 'default';
24
- /** Alternate position of the modal */
25
- position?: 'top';
26
- /** Offset from alternate position. Can be any valid CSS length/percentage */
27
- positionOffset?: string;
28
- /** Flag to show the modal */
29
- isOpen?: boolean;
30
- /** Complex header (more than just text), supersedes title for header content */
44
+ /** Description of the modal. */
45
+ description?: React.ReactNode;
46
+ /** Id of the modal box description. */
47
+ descriptorId: string;
48
+ /** Flag to disable focus trap. */
49
+ disableFocusTrap?: boolean;
50
+ /** Custom footer. */
51
+ footer?: React.ReactNode;
52
+ /** Flag indicating if modal content should be placed in a modal box body wrapper. */
53
+ hasNoBodyWrapper?: boolean;
54
+ /** Complex header (more than just text), supersedes the title property for header content. */
31
55
  header?: React.ReactNode;
32
- /** Optional help section for the Modal Header */
56
+ /** Optional help section for the modal header. */
33
57
  help?: React.ReactNode;
34
- /** Description of the modal */
35
- description?: React.ReactNode;
36
- /** Simple text content of the Modal Header, also used for aria-label on the body */
58
+ /** Flag to show the modal. */
59
+ isOpen?: boolean;
60
+ /** Id of the modal box title. */
61
+ labelId: string;
62
+ /** A callback for when the close button is clicked. */
63
+ onClose?: () => void;
64
+ /** Alternate position of the modal. */
65
+ position?: 'top';
66
+ /** Offset from alternate position. Can be any valid CSS length/percentage. */
67
+ positionOffset?: string;
68
+ /** Flag to show the close button in the header area of the modal. */
69
+ showClose?: boolean;
70
+ /** Simple text content of the modal header. Also used for the aria-label on the body. */
37
71
  title?: string;
38
- /** Optional alert icon (or other) to show before the title of the Modal Header
39
- * When the predefined alert types are used the default styling
40
- * will be automatically applied */
72
+ /** Optional alert icon (or other) to show before the title of the modal header. When the
73
+ * predefined alert types are used the default styling will be automatically applied.
74
+ */
41
75
  titleIconVariant?: 'success' | 'danger' | 'warning' | 'info' | 'default' | React.ComponentType<any>;
42
- /** Optional title label text for screen readers */
76
+ /** Optional title label text for screen readers. */
43
77
  titleLabel?: string;
44
- /** Id of Modal Box label */
45
- 'aria-labelledby'?: string | null;
46
- /** Accessible descriptor of modal */
47
- 'aria-label'?: string;
48
- /** Id of Modal Box description */
49
- 'aria-describedby'?: string;
50
- /** Accessible label applied to the modal box body. This should be used to communicate important information about the modal box body div if needed, such as that it is scrollable */
51
- bodyAriaLabel?: string;
52
- /** Accessible role applied to the modal box body. This will default to region if a body aria label is applied. Set to a more appropriate role as applicable based on the modal content and context */
53
- bodyAriaRole?: string;
54
- /** Flag to show the close button in the header area of the modal */
55
- showClose?: boolean;
56
- /** Default width of the content. */
78
+ /** Variant of the modal. */
79
+ variant?: 'small' | 'medium' | 'large' | 'default';
80
+ /** Default width of the modal. */
57
81
  width?: number | string;
58
- /** Custom footer */
59
- footer?: React.ReactNode;
60
- /** Action buttons to add to the standard Modal Footer, ignored if `footer` is given */
61
- actions?: any;
62
- /** A callback for when the close button is clicked */
63
- onClose?: () => void;
64
- /** Id of the ModalBox container */
65
- boxId: string;
66
- /** Id of the ModalBox title */
67
- labelId: string;
68
- /** Id of the ModalBoxBody */
69
- descriptorId: string;
70
- /** Flag to disable focus trap */
71
- disableFocusTrap?: boolean;
72
- /** Flag indicating if modal content should be placed in a modal box body wrapper */
73
- hasNoBodyWrapper?: boolean;
74
82
  }
75
83
 
76
84
  export const ModalContent: React.FunctionComponent<ModalContentProps> = ({
@@ -2,7 +2,7 @@
2
2
  id: Modal
3
3
  section: components
4
4
  cssPrefix: pf-c-modal-box
5
- propComponents: ['Modal', 'ModalBox', 'ModalBoxBody', 'ModalBoxCloseButton', 'ModalBoxFooter', 'ModalContent']
5
+ propComponents: ['Modal']
6
6
  ouia: true
7
7
  ---
8
8
 
@@ -94,5 +94,3 @@ If the content that you're passing to the modal is likely to overflow the modal
94
94
 
95
95
  ```ts file="ModalWithOverflowingContent.tsx"
96
96
  ```
97
-
98
-
@@ -12,22 +12,26 @@ export enum NotificationBadgeVariant {
12
12
  }
13
13
 
14
14
  export interface NotificationBadgeProps extends Omit<ButtonProps, 'variant'> {
15
- /** @deprecated Use the variant prop instead - Adds styling to the notification badge to indicate it has been read */
16
- isRead?: boolean;
17
- /** Determines the variant of the notification badge */
18
- variant?: NotificationBadgeVariant | 'read' | 'unread' | 'attention';
19
- /** A number displayed in the badge alongside the icon */
20
- count?: number;
21
- /** content rendered inside the notification badge */
22
- children?: React.ReactNode;
23
- /** additional classes added to the notification badge */
24
- className?: string;
25
- /** Adds accessible text to the notification badge. */
15
+ /** Adds an accessible label to the notification badge. */
26
16
  'aria-label'?: string;
27
- /** Icon to display for attention variant */
17
+ /** Icon to display for attention variant. */
28
18
  attentionIcon?: React.ReactNode;
29
- /** Icon do display in notification badge */
19
+ /** Content rendered inside the notification badge. */
20
+ children?: React.ReactNode;
21
+ /** Additional classes added to the notification badge. */
22
+ className?: string;
23
+ /** A number displayed in the badge alongside the icon. */
24
+ count?: number;
25
+ /** Icon to display in the notification badge. */
30
26
  icon?: React.ReactNode;
27
+ /** Flag for applying expanded styling and setting the aria-expanded attribute on the
28
+ * notification badge.
29
+ */
30
+ isExpanded?: boolean;
31
+ /** @deprecated Use the variant prop instead - Adds styling to the notification badge to indicate it has been read. */
32
+ isRead?: boolean;
33
+ /** Determines the variant of the notification badge. */
34
+ variant?: NotificationBadgeVariant | 'read' | 'unread' | 'attention';
31
35
  }
32
36
 
33
37
  export const NotificationBadge: React.FunctionComponent<NotificationBadgeProps> = ({
@@ -38,6 +42,7 @@ export const NotificationBadge: React.FunctionComponent<NotificationBadgeProps>
38
42
  attentionIcon = <AttentionBellIcon />,
39
43
  icon = <BellIcon />,
40
44
  className,
45
+ isExpanded = false,
41
46
  ...props
42
47
  }: NotificationBadgeProps) => {
43
48
  let notificationChild = icon;
@@ -47,8 +52,10 @@ export const NotificationBadge: React.FunctionComponent<NotificationBadgeProps>
47
52
  notificationChild = attentionIcon;
48
53
  }
49
54
  return (
50
- <Button variant={ButtonVariant.plain} className={className} {...props}>
51
- <span className={css(styles.notificationBadge, styles.modifiers[variant])}>
55
+ <Button variant={ButtonVariant.plain} className={className} aria-expanded={isExpanded} {...props}>
56
+ <span
57
+ className={css(styles.notificationBadge, styles.modifiers[variant], isExpanded && styles.modifiers.expanded)}
58
+ >
52
59
  {notificationChild}
53
60
  {count > 0 && <span className={css(styles.notificationBadgeCount)}>{count}</span>}
54
61
  </span>
@@ -1,6 +1,6 @@
1
1
  import { NotificationBadge } from '../NotificationBadge';
2
2
  import React from 'react';
3
- import { render } from '@testing-library/react';
3
+ import { render, screen } from '@testing-library/react';
4
4
 
5
5
  Object.values([true, false]).forEach(isRead => {
6
6
  test(`${isRead} NotificationBadge`, () => {
@@ -24,3 +24,27 @@ test(`NotificationBadge count`, () => {
24
24
  const { asFragment } = render(<NotificationBadge variant="read" count={3} />);
25
25
  expect(asFragment()).toMatchSnapshot();
26
26
  });
27
+
28
+ test('Renders with aria-expanded="false" when isExpanded is not passed in.', () => {
29
+ render(<NotificationBadge />);
30
+
31
+ expect(screen.getByRole('button')).toHaveAttribute('aria-expanded', 'false');
32
+ });
33
+
34
+ test('Renders with aria-expanded="true" when isExpanded is passed in.', () => {
35
+ render(<NotificationBadge isExpanded />);
36
+
37
+ expect(screen.getByRole('button')).toHaveAttribute('aria-expanded', 'true');
38
+ });
39
+
40
+ test('Does not render with .pf-m-expanded when isExpanded is not passed in.', () => {
41
+ render(<NotificationBadge />);
42
+
43
+ expect(screen.getByRole('button').firstChild).not.toHaveClass('pf-m-expanded');
44
+ });
45
+
46
+ test('Renders with .pf-m-expanded when isExpanded is passed in.', () => {
47
+ render(<NotificationBadge isExpanded />);
48
+
49
+ expect(screen.getByRole('button').firstChild).toHaveClass('pf-m-expanded');
50
+ });
@@ -4,6 +4,7 @@ exports[`NotificationBadge count 1`] = `
4
4
  <DocumentFragment>
5
5
  <button
6
6
  aria-disabled="false"
7
+ aria-expanded="false"
7
8
  class="pf-c-button pf-m-plain"
8
9
  data-ouia-component-id="OUIA-Generated-Button-plain-5"
9
10
  data-ouia-component-type="PF4/Button"
@@ -40,6 +41,7 @@ exports[`false NotificationBadge 1`] = `
40
41
  <DocumentFragment>
41
42
  <button
42
43
  aria-disabled="false"
44
+ aria-expanded="false"
43
45
  class="pf-c-button pf-m-plain"
44
46
  data-ouia-component-id="OUIA-Generated-Button-plain-2"
45
47
  data-ouia-component-type="PF4/Button"
@@ -71,6 +73,7 @@ exports[`false NotificationBadge needs attention 1`] = `
71
73
  <DocumentFragment>
72
74
  <button
73
75
  aria-disabled="false"
76
+ aria-expanded="false"
74
77
  class="pf-c-button pf-m-plain"
75
78
  data-ouia-component-id="OUIA-Generated-Button-plain-4"
76
79
  data-ouia-component-type="PF4/Button"
@@ -90,6 +93,7 @@ exports[`true NotificationBadge 1`] = `
90
93
  <DocumentFragment>
91
94
  <button
92
95
  aria-disabled="false"
96
+ aria-expanded="false"
93
97
  class="pf-c-button pf-m-plain"
94
98
  data-ouia-component-id="OUIA-Generated-Button-plain-1"
95
99
  data-ouia-component-type="PF4/Button"
@@ -121,6 +125,7 @@ exports[`true NotificationBadge needs attention 1`] = `
121
125
  <DocumentFragment>
122
126
  <button
123
127
  aria-disabled="false"
128
+ aria-expanded="false"
124
129
  class="pf-c-button pf-m-plain"
125
130
  data-ouia-component-id="OUIA-Generated-Button-plain-3"
126
131
  data-ouia-component-type="PF4/Button"
@@ -4,15 +4,28 @@ section: components
4
4
  cssPrefix: pf-c-notification-badge
5
5
  propComponents: ['NotificationBadge']
6
6
  ---
7
+
7
8
  import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon';
8
9
  import './notificationBadge.css';
9
10
 
10
11
  ## Examples
11
12
 
12
13
  ### Basic
13
- ```ts file='./NotificationBadgeBasic.tsx'
14
+
15
+ The following example demonstrates the three variants of notification badge that are available: "read", "unread", and "attention".
16
+
17
+ The `isExpanded` property is also passed in to:
18
+
19
+ - set the `aria-expanded` attribute on the notification badge,
20
+ - apply visual styling on the notification badge, and
21
+ - to indiciate that a notification drawer is expanded, for use-cases as seen in our [notification drawer react demos](/components/notification-drawer/react-demos).
22
+
23
+ ```ts file='./NotificationBadgeBasic.tsx'
14
24
  ```
15
25
 
16
26
  ### With count
17
- ```ts file='./NotificationBadgeWithCount.tsx'
18
- ```
27
+
28
+ You can display a number within the notification badge by passing in the `count` property, to indicate how many read, unread, or attention notifications there are. The `isExpanded` property is also passed in, similar to the [notification badge basic example](/components/notification-badge#basic).
29
+
30
+ ```ts file='./NotificationBadgeWithCount.tsx'
31
+ ```
@@ -1,29 +1,42 @@
1
1
  import React from 'react';
2
2
  import { NotificationBadge, NotificationBadgeVariant } from '@patternfly/react-core';
3
3
 
4
- export const SimpleNotificationBadge: React.FunctionComponent = () => {
5
- const [unreadVariant, setUnreadVariant] = React.useState(NotificationBadgeVariant.unread);
6
- const [attentionVariant, setAttentionVariant] = React.useState(NotificationBadgeVariant.attention);
4
+ export const NotificationBadgeBasic: React.FunctionComponent = () => {
5
+ const [readExpanded, setReadExpanded] = React.useState(false);
6
+ const [unreadExpanded, setUnreadExpanded] = React.useState(false);
7
+ const [attentionExpanded, setAttentionExpanded] = React.useState(false);
7
8
 
8
- const onFirstClick = (value: NotificationBadgeVariant) => {
9
- setUnreadVariant(value);
9
+ const onReadClick = () => {
10
+ setReadExpanded(!readExpanded);
10
11
  };
11
12
 
12
- const onSecondClick = (value: NotificationBadgeVariant) => {
13
- setAttentionVariant(value);
13
+ const onUnreadClick = () => {
14
+ setUnreadExpanded(!unreadExpanded);
15
+ };
16
+
17
+ const onAttentionClick = () => {
18
+ setAttentionExpanded(!attentionExpanded);
14
19
  };
15
20
 
16
21
  return (
17
22
  <div className="pf-t-dark">
18
23
  <NotificationBadge
19
- variant={unreadVariant}
20
- onClick={() => onFirstClick(NotificationBadgeVariant.read)}
21
- aria-label="First notifications"
24
+ variant={NotificationBadgeVariant.read}
25
+ onClick={onReadClick}
26
+ aria-label="Basic notification badge with read variant"
27
+ isExpanded={readExpanded}
28
+ />
29
+ <NotificationBadge
30
+ variant={NotificationBadgeVariant.unread}
31
+ onClick={onUnreadClick}
32
+ aria-label="Basic notification badge with unread variant"
33
+ isExpanded={unreadExpanded}
22
34
  />
23
35
  <NotificationBadge
24
- variant={attentionVariant}
25
- onClick={() => onSecondClick(NotificationBadgeVariant.read)}
26
- aria-label="Second notifications"
36
+ variant={NotificationBadgeVariant.attention}
37
+ onClick={onAttentionClick}
38
+ aria-label="Basic notification badge with attention variant"
39
+ isExpanded={attentionExpanded}
27
40
  />
28
41
  </div>
29
42
  );
@@ -2,34 +2,44 @@ import React from 'react';
2
2
  import { NotificationBadge, NotificationBadgeVariant } from '@patternfly/react-core';
3
3
 
4
4
  export const NotificationBadgeWithCount: React.FunctionComponent = () => {
5
- const [firstVariant, setFirstVariant] = React.useState(NotificationBadgeVariant.unread);
6
- const [firstVariantCount, setFirstVariantCount] = React.useState(30);
7
- const [secondVariant, setSecondVariant] = React.useState(NotificationBadgeVariant.attention);
8
- const [secondVariantCount, setSecondVariantCount] = React.useState(30);
5
+ const [readExpanded, setReadExpanded] = React.useState(false);
6
+ const [unreadExpanded, setUnreadExpanded] = React.useState(false);
7
+ const [attentionExpanded, setAttentionExpanded] = React.useState(false);
9
8
 
10
- const onFirstClick = (value: NotificationBadgeVariant) => {
11
- setFirstVariant(value);
12
- setFirstVariantCount(10);
9
+ const onReadClick = () => {
10
+ setReadExpanded(!readExpanded);
13
11
  };
14
12
 
15
- const onSecondClick = (value: NotificationBadgeVariant) => {
16
- setSecondVariant(value);
17
- setSecondVariantCount(10);
13
+ const onUnreadClick = () => {
14
+ setUnreadExpanded(!unreadExpanded);
15
+ };
16
+
17
+ const onAttentionClick = () => {
18
+ setAttentionExpanded(!attentionExpanded);
18
19
  };
19
20
 
20
21
  return (
21
22
  <div className="pf-t-dark">
22
23
  <NotificationBadge
23
- variant={firstVariant}
24
- onClick={() => onFirstClick(NotificationBadgeVariant.read)}
25
- aria-label="First notifications"
26
- count={firstVariantCount}
24
+ variant={NotificationBadgeVariant.read}
25
+ onClick={onReadClick}
26
+ aria-label="Notification badge with count and read variant"
27
+ isExpanded={readExpanded}
28
+ count={10}
29
+ />
30
+ <NotificationBadge
31
+ variant={NotificationBadgeVariant.unread}
32
+ onClick={onUnreadClick}
33
+ aria-label="Notification badge with count and unread variant"
34
+ isExpanded={unreadExpanded}
35
+ count={10}
27
36
  />
28
37
  <NotificationBadge
29
- variant={secondVariant}
30
- onClick={() => onSecondClick(NotificationBadgeVariant.read)}
31
- aria-label="Second notifications"
32
- count={secondVariantCount}
38
+ variant={NotificationBadgeVariant.attention}
39
+ onClick={onAttentionClick}
40
+ aria-label="Notification badge with count and attention variant"
41
+ isExpanded={attentionExpanded}
42
+ count={10}
33
43
  />
34
44
  </div>
35
45
  );
@@ -11,52 +11,52 @@ import { pluralize, PickOptional } from '../../helpers';
11
11
  import { KeyTypes } from '../../helpers/constants';
12
12
 
13
13
  export interface NavigationProps extends React.HTMLProps<HTMLElement> {
14
- /** Additional classes for the container */
14
+ /** Additional classes for the pagination navigation container. */
15
15
  className?: string;
16
- /** Flag indicating if the pagination is disabled */
17
- isDisabled?: boolean;
18
- /** Flag indicating if the pagination is compact */
16
+ /** Accessible label for the input displaying the current page. */
17
+ currPage?: string;
18
+ /** The number of first page where pagination starts. */
19
+ firstPage?: number;
20
+ /** Flag indicating if the pagination is compact. */
19
21
  isCompact?: boolean;
22
+ /** Flag indicating if the pagination is disabled. */
23
+ isDisabled?: boolean;
20
24
  /** Total number of items. */
21
25
  itemCount?: number;
22
- /** The number of the last page */
26
+ /** The number of the last page. */
23
27
  lastPage?: number;
24
- /** The number of first page where pagination starts */
25
- firstPage?: number;
26
- /** The title of a page displayed beside the page number */
28
+ /** Label for the English word "of". */
29
+ ofWord?: string;
30
+ /** The number of the current page. */
31
+ page: React.ReactText;
32
+ /** The title of a page displayed beside the page number. */
27
33
  pagesTitle?: string;
28
- /** The title of a page displayed beside the page number (the plural form) */
34
+ /** The title of a page displayed beside the page number (the plural form). */
29
35
  pagesTitlePlural?: string;
30
- /** Accessible label for the button which moves to the last page */
31
- toLastPage?: string;
32
- /** Accessible label for the button which moves to the previous page */
33
- toPreviousPage?: string;
34
- /** Accessible label for the button which moves to the next page */
35
- toNextPage?: string;
36
- /** Accessible label for the button which moves to the first page */
37
- toFirstPage?: string;
38
- /** Accessible label for the input displaying the current page */
39
- currPage?: string;
40
- /** Accessible label for the pagination component */
36
+ /** Accessible label for the pagination component. */
41
37
  paginationTitle?: string;
42
- /** Accessible label for the English word "of" */
43
- ofWord?: string;
44
- /** The number of the current page */
45
- page: React.ReactText;
46
38
  /** Number of items per page. */
47
39
  perPage?: number;
48
- /** Function called when page is changed */
49
- onSetPage: OnSetPage;
50
- /** Function called when user clicks to navigate to next page */
51
- onNextClick?: (event: React.SyntheticEvent<HTMLButtonElement>, page: number) => void;
52
- /** Function called when user clicks to navigate to previous page */
53
- onPreviousClick?: (event: React.SyntheticEvent<HTMLButtonElement>, page: number) => void;
54
- /** Function called when user clicks to navigate to first page */
40
+ /** Accessible label for the button which moves to the first page. */
41
+ toFirstPage?: string;
42
+ /** Accessible label for the button which moves to the last page. */
43
+ toLastPage?: string;
44
+ /** Accessible label for the button which moves to the next page. */
45
+ toNextPage?: string;
46
+ /** Accessible label for the button which moves to the previous page. */
47
+ toPreviousPage?: string;
48
+ /** Function called when user clicks to navigate to first page. */
55
49
  onFirstClick?: (event: React.SyntheticEvent<HTMLButtonElement>, page: number) => void;
56
- /** Function called when user clicks to navigate to last page */
50
+ /** Function called when user clicks to navigate to last page. */
57
51
  onLastClick?: (event: React.SyntheticEvent<HTMLButtonElement>, page: number) => void;
58
- /** Function called when user inputs page number */
52
+ /** Function called when user clicks to navigate to next page. */
53
+ onNextClick?: (event: React.SyntheticEvent<HTMLButtonElement>, page: number) => void;
54
+ /** Function called when user clicks to navigate to previous page. */
55
+ onPreviousClick?: (event: React.SyntheticEvent<HTMLButtonElement>, page: number) => void;
56
+ /** Function called when user inputs page number. */
59
57
  onPageInput?: (event: React.SyntheticEvent<HTMLButtonElement>, page: number) => void;
58
+ /** Function called when page is changed. */
59
+ onSetPage: OnSetPage;
60
60
  }
61
61
 
62
62
  export interface NavigationState {
@@ -7,40 +7,41 @@ import { ToggleTemplateProps } from './ToggleTemplate';
7
7
  import { DropdownToggle } from '../Dropdown';
8
8
 
9
9
  export interface OptionsToggleProps extends React.HTMLProps<HTMLDivElement> {
10
- /** The type or title of the items being paginated */
11
- itemsTitle?: string;
12
- /** Accessible label for the options toggle */
13
- optionsToggle?: string;
14
- /** The title of the pagination options menu */
15
- itemsPerPageTitle?: string;
16
- /** The first index of the items being paginated */
10
+ /** The first index of the items being paginated. */
17
11
  firstIndex?: number;
18
- /** The last index of the items being paginated */
19
- lastIndex?: number;
20
- /** The total number of items being paginated */
12
+ /** Flag indicating if the options menu is disabled. */
13
+ isDisabled?: boolean;
14
+ /** Flag indicating if the options menu dropdown is open or not. */
15
+ isOpen?: boolean;
16
+ /** The total number of items being paginated. */
21
17
  itemCount?: number;
22
- /** Id added to the title of the pagination options menu */
23
- widgetId?: string;
24
- /** showToggle */
25
- showToggle?: boolean;
26
- /** Event function that fires when user clicks the options menu toggle */
18
+ /** The title of the pagination options menu. */
19
+ itemsPerPageTitle?: string;
20
+ /** The type or title of the items being paginated. */
21
+ itemsTitle?: string;
22
+ /** The last index of the items being paginated. */
23
+ lastIndex?: number;
24
+ /** Label for the English word "of". */
25
+ ofWord?: string;
26
+ /** Callback for toggle open on keyboard entry. */
27
+ onEnter?: () => void;
28
+ /** Event function that fires when user clicks the options menu toggle. */
27
29
  onToggle?: (isOpen: boolean) => void;
28
- /** Flag indicating if the options menu dropdown is open or not */
29
- isOpen?: boolean;
30
- /** Flag indicating if the options menu is disabled */
31
- isDisabled?: boolean;
30
+ /** Accessible label for the options toggle. */
31
+ optionsToggle?: string;
32
32
  /** */
33
33
  parentRef?: HTMLElement;
34
- /** This will be shown in pagination toggle span. You can use firstIndex, lastIndex, itemCount, itemsTitle props. */
35
- toggleTemplate?: ((props: ToggleTemplateProps) => React.ReactElement) | string;
36
- /** Callback for toggle open on keyboard entry */
37
- onEnter?: () => void;
38
- /** Label for the English word "of" */
39
- ofWord?: string;
40
- /** Component to be used for wrapping the toggle contents. Use 'button' when you want
34
+ /** Component to be used for wrapping the toggle contents. Use "button" when you want
41
35
  * all of the toggle text to be clickable.
42
36
  */
43
37
  perPageComponent?: 'div' | 'button';
38
+ /** Flag for indicating whether the toggle should be shown. */
39
+ showToggle?: boolean;
40
+ /** This will be shown in pagination toggle span. You can use firstIndex, lastIndex,
41
+ * itemCount, and/or itemsTitle props. */
42
+ toggleTemplate?: ((props: ToggleTemplateProps) => React.ReactElement) | string;
43
+ /** Id added to the title of the pagination options menu. */
44
+ widgetId?: string;
44
45
  }
45
46
 
46
47
  let toggleId = 0;