@patternfly/react-core 6.1.0-prerelease.9 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/components/package.json +1 -1
  3. package/deprecated/package.json +1 -1
  4. package/dist/dynamic/components/AboutModal/package.json +1 -1
  5. package/dist/dynamic/components/Accordion/package.json +1 -1
  6. package/dist/dynamic/components/ActionList/package.json +1 -1
  7. package/dist/dynamic/components/Alert/package.json +1 -1
  8. package/dist/dynamic/components/Avatar/package.json +1 -1
  9. package/dist/dynamic/components/BackToTop/package.json +1 -1
  10. package/dist/dynamic/components/Backdrop/package.json +1 -1
  11. package/dist/dynamic/components/BackgroundImage/package.json +1 -1
  12. package/dist/dynamic/components/Badge/package.json +1 -1
  13. package/dist/dynamic/components/Banner/package.json +1 -1
  14. package/dist/dynamic/components/Brand/package.json +1 -1
  15. package/dist/dynamic/components/Breadcrumb/package.json +1 -1
  16. package/dist/dynamic/components/Button/package.json +1 -1
  17. package/dist/dynamic/components/CalendarMonth/package.json +1 -1
  18. package/dist/dynamic/components/Card/package.json +1 -1
  19. package/dist/dynamic/components/Checkbox/package.json +1 -1
  20. package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
  21. package/dist/dynamic/components/CodeBlock/package.json +1 -1
  22. package/dist/dynamic/components/Content/package.json +1 -1
  23. package/dist/dynamic/components/DataList/package.json +1 -1
  24. package/dist/dynamic/components/DatePicker/package.json +1 -1
  25. package/dist/dynamic/components/DescriptionList/package.json +1 -1
  26. package/dist/dynamic/components/Divider/package.json +1 -1
  27. package/dist/dynamic/components/Drawer/package.json +1 -1
  28. package/dist/dynamic/components/Dropdown/package.json +1 -1
  29. package/dist/dynamic/components/DualListSelector/package.json +1 -1
  30. package/dist/dynamic/components/EmptyState/package.json +1 -1
  31. package/dist/dynamic/components/ExpandableSection/package.json +1 -1
  32. package/dist/dynamic/components/FileUpload/package.json +1 -1
  33. package/dist/dynamic/components/Form/package.json +1 -1
  34. package/dist/dynamic/components/FormSelect/package.json +1 -1
  35. package/dist/dynamic/components/HelperText/package.json +1 -1
  36. package/dist/dynamic/components/Hint/package.json +1 -1
  37. package/dist/dynamic/components/Icon/package.json +1 -1
  38. package/dist/dynamic/components/InputGroup/package.json +1 -1
  39. package/dist/dynamic/components/JumpLinks/package.json +1 -1
  40. package/dist/dynamic/components/Label/package.json +1 -1
  41. package/dist/dynamic/components/List/package.json +1 -1
  42. package/dist/dynamic/components/LoginPage/package.json +1 -1
  43. package/dist/dynamic/components/Masthead/package.json +1 -1
  44. package/dist/dynamic/components/Menu/package.json +1 -1
  45. package/dist/dynamic/components/MenuToggle/package.json +1 -1
  46. package/dist/dynamic/components/Modal/package.json +1 -1
  47. package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
  48. package/dist/dynamic/components/Nav/package.json +1 -1
  49. package/dist/dynamic/components/NotificationBadge/package.json +1 -1
  50. package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
  51. package/dist/dynamic/components/NumberInput/package.json +1 -1
  52. package/dist/dynamic/components/OverflowMenu/package.json +1 -1
  53. package/dist/dynamic/components/Page/package.json +1 -1
  54. package/dist/dynamic/components/Pagination/package.json +1 -1
  55. package/dist/dynamic/components/Panel/package.json +1 -1
  56. package/dist/dynamic/components/Popover/package.json +1 -1
  57. package/dist/dynamic/components/Progress/package.json +1 -1
  58. package/dist/dynamic/components/ProgressStepper/package.json +1 -1
  59. package/dist/dynamic/components/Radio/package.json +1 -1
  60. package/dist/dynamic/components/SearchInput/package.json +1 -1
  61. package/dist/dynamic/components/Select/package.json +1 -1
  62. package/dist/dynamic/components/Sidebar/package.json +1 -1
  63. package/dist/dynamic/components/SimpleList/package.json +1 -1
  64. package/dist/dynamic/components/Skeleton/package.json +1 -1
  65. package/dist/dynamic/components/SkipToContent/package.json +1 -1
  66. package/dist/dynamic/components/Slider/package.json +1 -1
  67. package/dist/dynamic/components/Spinner/package.json +1 -1
  68. package/dist/dynamic/components/Switch/package.json +1 -1
  69. package/dist/dynamic/components/Tabs/package.json +1 -1
  70. package/dist/dynamic/components/TextArea/package.json +1 -1
  71. package/dist/dynamic/components/TextInput/package.json +1 -1
  72. package/dist/dynamic/components/TextInputGroup/package.json +1 -1
  73. package/dist/dynamic/components/TimePicker/package.json +1 -1
  74. package/dist/dynamic/components/Timestamp/package.json +1 -1
  75. package/dist/dynamic/components/Title/package.json +1 -1
  76. package/dist/dynamic/components/ToggleGroup/package.json +1 -1
  77. package/dist/dynamic/components/Toolbar/package.json +1 -1
  78. package/dist/dynamic/components/Tooltip/package.json +1 -1
  79. package/dist/dynamic/components/TreeView/package.json +1 -1
  80. package/dist/dynamic/components/Truncate/package.json +1 -1
  81. package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
  82. package/dist/dynamic/components/Wizard/package.json +1 -1
  83. package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
  84. package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
  85. package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
  86. package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
  87. package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
  88. package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
  89. package/dist/dynamic/deprecated/components/package.json +1 -1
  90. package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
  91. package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
  92. package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
  93. package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
  94. package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
  95. package/dist/dynamic/helpers/constants/package.json +1 -1
  96. package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
  97. package/dist/dynamic/helpers/fileUtils/package.json +1 -1
  98. package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
  99. package/dist/dynamic/helpers/package.json +1 -1
  100. package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
  101. package/dist/dynamic/helpers/typeUtils/package.json +1 -1
  102. package/dist/dynamic/helpers/useInterval/package.json +1 -1
  103. package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
  104. package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
  105. package/dist/dynamic/helpers/util/package.json +1 -1
  106. package/dist/dynamic/layouts/Bullseye/package.json +1 -1
  107. package/dist/dynamic/layouts/Flex/package.json +1 -1
  108. package/dist/dynamic/layouts/Gallery/package.json +1 -1
  109. package/dist/dynamic/layouts/Grid/package.json +1 -1
  110. package/dist/dynamic/layouts/Level/package.json +1 -1
  111. package/dist/dynamic/layouts/Split/package.json +1 -1
  112. package/dist/dynamic/layouts/Stack/package.json +1 -1
  113. package/dist/dynamic/styles/package.json +1 -1
  114. package/dist/dynamic-modules.json +1 -0
  115. package/dist/esm/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
  116. package/dist/esm/components/CalendarMonth/CalendarMonth.js +7 -11
  117. package/dist/esm/components/CalendarMonth/CalendarMonth.js.map +1 -1
  118. package/dist/esm/components/FileUpload/FileUpload.d.ts +2 -1
  119. package/dist/esm/components/FileUpload/FileUpload.d.ts.map +1 -1
  120. package/dist/esm/components/FileUpload/FileUpload.js +2 -1
  121. package/dist/esm/components/FileUpload/FileUpload.js.map +1 -1
  122. package/dist/esm/components/Toolbar/ToolbarFilter.d.ts.map +1 -1
  123. package/dist/esm/components/Toolbar/ToolbarFilter.js +4 -2
  124. package/dist/esm/components/Toolbar/ToolbarFilter.js.map +1 -1
  125. package/dist/esm/demos/DashboardWrapper.d.ts.map +1 -1
  126. package/dist/esm/demos/DashboardWrapper.js +10 -2
  127. package/dist/esm/demos/DashboardWrapper.js.map +1 -1
  128. package/dist/js/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
  129. package/dist/js/components/CalendarMonth/CalendarMonth.js +7 -11
  130. package/dist/js/components/CalendarMonth/CalendarMonth.js.map +1 -1
  131. package/dist/js/components/FileUpload/FileUpload.d.ts +2 -1
  132. package/dist/js/components/FileUpload/FileUpload.d.ts.map +1 -1
  133. package/dist/js/components/FileUpload/FileUpload.js +2 -1
  134. package/dist/js/components/FileUpload/FileUpload.js.map +1 -1
  135. package/dist/js/components/Toolbar/ToolbarFilter.d.ts.map +1 -1
  136. package/dist/js/components/Toolbar/ToolbarFilter.js +4 -2
  137. package/dist/js/components/Toolbar/ToolbarFilter.js.map +1 -1
  138. package/dist/js/demos/DashboardWrapper.d.ts.map +1 -1
  139. package/dist/js/demos/DashboardWrapper.js +10 -2
  140. package/dist/js/demos/DashboardWrapper.js.map +1 -1
  141. package/dist/umd/assets/{output-B0G4u0sM.css → output-ByZdJvYx.css} +9561 -9514
  142. package/dist/umd/react-core.min.js +1 -1
  143. package/helpers/package.json +1 -1
  144. package/layouts/package.json +1 -1
  145. package/next/package.json +1 -1
  146. package/package.json +6 -6
  147. package/src/components/CalendarMonth/CalendarMonth.tsx +7 -10
  148. package/src/components/FileUpload/FileUpload.tsx +3 -1
  149. package/src/components/FileUpload/examples/FileUpload.md +1 -1
  150. package/src/components/FileUpload/examples/FileUploadTextWithRestrictions.tsx +24 -7
  151. package/src/components/LoginPage/examples/LoginPage.md +1 -1
  152. package/src/components/LoginPage/examples/LoginPageBasic.tsx +2 -2
  153. package/src/components/LoginPage/examples/LoginPageLanguageSelect.tsx +2 -2
  154. package/src/components/LoginPage/examples/LoginPageShowHidePassword.tsx +2 -2
  155. package/src/components/Modal/examples/Modal.md +1 -1
  156. package/src/components/SkipToContent/examples/SkipToContentBasic.tsx +144 -126
  157. package/src/components/Toolbar/ToolbarFilter.tsx +2 -1
  158. package/src/components/Wizard/examples/Wizard.md +2 -1
  159. package/src/components/Wizard/examples/WizardWithinModal.tsx +5 -8
  160. package/src/demos/CustomMenus/ApplicationLauncher.md +1 -1
  161. package/src/demos/CustomMenus/CustomMenus.md +1 -1
  162. package/src/demos/CustomMenus/examples/ApplicationLauncherDemo.tsx +2 -2
  163. package/src/demos/CustomMenus/examples/DrilldownMenuDemo.tsx +1 -1
  164. package/src/demos/DashboardWrapper.tsx +13 -2
  165. package/src/demos/ExpandableSection/examples/ExpandableTextDemo.tsx +1 -7
  166. package/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +15 -1
  167. package/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +15 -1
  168. package/src/demos/assets/PF-IconLogo.svg +17 -0
  169. package/src/demos/examples/Masthead/MastheadWithHorizontalNav.tsx +14 -1
  170. package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +14 -1
  171. package/src/demos/examples/Nav/NavDefault.tsx +15 -1
  172. package/src/demos/examples/Nav/NavExpandable.tsx +15 -1
  173. package/src/demos/examples/Nav/NavFlyout.tsx +15 -1
  174. package/src/demos/examples/Nav/NavGrouped.tsx +15 -1
  175. package/src/demos/examples/Nav/NavHorizontal.tsx +15 -1
  176. package/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx +15 -1
  177. package/src/demos/examples/Nav/NavManual.tsx +15 -1
  178. package/src/demos/examples/Nav/NavWithSubnav.tsx +15 -1
  179. package/src/demos/examples/Page/PageContextSelector.tsx +14 -1
  180. package/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +14 -1
  181. package/src/demos/examples/Page/PageStickySectionGroup.tsx +14 -1
  182. package/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +14 -1
  183. package/src/demos/examples/Wizard/InPageWithDrawer.tsx +15 -1
  184. package/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx +14 -1
  185. package/src/demos/examples/DashboardWrapper.js +0 -126
@@ -1 +1 @@
1
- {"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.1.0-prerelease.8","private":true}
1
+ {"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.1.0-prerelease.16","private":true}
@@ -1 +1 @@
1
- {"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.1.0-prerelease.8","private":true}
1
+ {"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.1.0-prerelease.16","private":true}
package/next/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.1.0-prerelease.8","private":true}
1
+ {"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.1.0-prerelease.16","private":true}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "6.1.0-prerelease.9",
3
+ "version": "6.1.0",
4
4
  "description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -46,15 +46,15 @@
46
46
  "subpaths": "node ../../scripts/exportSubpaths.mjs --config subpaths.config.json"
47
47
  },
48
48
  "dependencies": {
49
- "@patternfly/react-icons": "^6.1.0-prerelease.4",
50
- "@patternfly/react-styles": "^6.1.0-prerelease.3",
51
- "@patternfly/react-tokens": "^6.1.0-prerelease.3",
49
+ "@patternfly/react-icons": "^6.1.0",
50
+ "@patternfly/react-styles": "^6.1.0",
51
+ "@patternfly/react-tokens": "^6.1.0",
52
52
  "focus-trap": "7.6.2",
53
53
  "react-dropzone": "^14.3.5",
54
54
  "tslib": "^2.8.1"
55
55
  },
56
56
  "devDependencies": {
57
- "@patternfly/patternfly": "6.1.0-prerelease.5",
57
+ "@patternfly/patternfly": "6.1.0-prerelease.11",
58
58
  "case-anything": "^2.1.13",
59
59
  "css": "^3.0.0",
60
60
  "fs-extra": "^11.2.0"
@@ -63,5 +63,5 @@
63
63
  "react": "^17 || ^18",
64
64
  "react-dom": "^17 || ^18"
65
65
  },
66
- "gitHead": "adb27fc981481c31bf249fb185ebc1850929cd87"
66
+ "gitHead": "fc70165f6d07de6a24f6943c826c1432ea6d44cf"
67
67
  }
@@ -319,18 +319,15 @@ export const CalendarMonth = ({
319
319
  onSelectToggle(isOpen);
320
320
  }}
321
321
  onSelect={(ev, monthNum) => {
322
- // When we put CalendarMonth in a Popover we want the Popover's onDocumentClick
323
- // to see the SelectOption as a child so it doesn't close the Popover.
324
- setTimeout(() => {
325
- setIsSelectOpen(false);
326
- onSelectToggle(false);
327
- const newDate = changeMonth(Number(monthNum as string));
328
- setFocusedDate(newDate);
329
- setShouldFocus(false);
330
- onMonthChange(ev, newDate);
331
- }, 0);
322
+ setIsSelectOpen(false);
323
+ onSelectToggle(false);
324
+ const newDate = changeMonth(Number(monthNum as string));
325
+ setFocusedDate(newDate);
326
+ setShouldFocus(false);
327
+ onMonthChange(ev, newDate);
332
328
  }}
333
329
  selected={monthFormatted}
330
+ popperProps={{ appendTo: 'inline' }}
334
331
  >
335
332
  <SelectList>
336
333
  {longMonths.map((longMonth, index) => (
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { DropzoneInputProps, DropzoneOptions, FileRejection, useDropzone } from 'react-dropzone';
2
+ import { DropzoneInputProps, DropzoneOptions, FileRejection, useDropzone, ErrorCode } from 'react-dropzone';
3
3
  import { FileUploadField, FileUploadFieldProps } from './FileUploadField';
4
4
  import { readFile, fileReaderType } from '../../helpers/fileUtils';
5
5
  import { DropEvent } from '../../helpers/typeUtils';
@@ -84,6 +84,8 @@ export interface FileUploadProps
84
84
  onTextChange?: (event: React.ChangeEvent<HTMLTextAreaElement>, text: string) => void;
85
85
  }
86
86
 
87
+ export { ErrorCode as DropzoneErrorCode }; // FileInvalidType, FileTooLarge, FileTooSmall, TooManyFiles
88
+
87
89
  export const FileUpload: React.FunctionComponent<FileUploadProps> = ({
88
90
  id,
89
91
  type,
@@ -40,7 +40,7 @@ Typing/pasting text in the box will call `onTextChange` with a string, and a str
40
40
 
41
41
  ### Restricting file size and type
42
42
 
43
- Any [props accepted by `react-dropzone`'s `Dropzone` component](https://react-dropzone.js.org/#!/Dropzone) can be passed as a `dropzoneProps` object in order to customize the behavior of the Dropzone, such as restricting the size and type of files allowed. The following example will only accept CSV files smaller than 1 KB. Note that file type determination is not reliable across platforms (see the note on react-dropzone's docs about the `accept` prop), so be sure to test the behavior of your file upload restriction on all browsers and operating systems targeted by your application.
43
+ Any [props accepted by `react-dropzone`'s `Dropzone` component](https://react-dropzone.js.org/#!/Dropzone) can be passed as a `dropzoneProps` object in order to customize the behavior of the Dropzone, such as restricting the size and type of files allowed. You can also capture and act upon native `react-dropzone` errors using the exposed `DropzoneErrorCode` enum. The following example will only accept CSV files smaller than 1 KB. Note that file type determination is not reliable across platforms (see the note on react-dropzone's docs about the `accept` prop), so be sure to test the behavior of your file upload restriction on all browsers and operating systems targeted by your application.
44
44
 
45
45
  #### IMPORTANT: A note about security
46
46
 
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import {
3
3
  FileUpload,
4
+ DropzoneErrorCode,
4
5
  FileUploadHelperText,
5
6
  Form,
6
7
  FormGroup,
@@ -9,13 +10,13 @@ import {
9
10
  DropEvent,
10
11
  Icon
11
12
  } from '@patternfly/react-core';
12
- import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
13
13
 
14
14
  export const TextFileUploadWithRestrictions: React.FunctionComponent = () => {
15
15
  const [value, setValue] = React.useState('');
16
16
  const [filename, setFilename] = React.useState('');
17
17
  const [isLoading, setIsLoading] = React.useState(false);
18
18
  const [isRejected, setIsRejected] = React.useState(false);
19
+ const [message, setMessage] = React.useState('Must be a CSV file no larger than 1 KB');
19
20
 
20
21
  const handleFileInputChange = (_, file: File) => {
21
22
  setFilename(file.name);
@@ -29,16 +30,25 @@ export const TextFileUploadWithRestrictions: React.FunctionComponent = () => {
29
30
  setValue(value);
30
31
  };
31
32
 
32
- const handleClear = (_event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
33
+ const reset = () => {
33
34
  setFilename('');
34
35
  setValue('');
36
+ };
37
+
38
+ const handleClear = (_event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
39
+ reset();
35
40
  setIsRejected(false);
36
41
  };
37
42
 
38
43
  const handleFileRejected = () => {
44
+ reset();
39
45
  setIsRejected(true);
40
46
  };
41
47
 
48
+ const handleFileAccepted = () => {
49
+ setIsRejected(false);
50
+ };
51
+
42
52
  const handleFileReadStarted = (_event: DropEvent, _fileHandle: File) => {
43
53
  setIsLoading(true);
44
54
  };
@@ -66,7 +76,16 @@ export const TextFileUploadWithRestrictions: React.FunctionComponent = () => {
66
76
  dropzoneProps={{
67
77
  accept: { 'text/csv': ['.csv'] },
68
78
  maxSize: 1024,
69
- onDropRejected: handleFileRejected
79
+ onDropRejected: (rejections) => {
80
+ const error = rejections[0].errors[0];
81
+ if (error.code === DropzoneErrorCode.FileTooLarge) {
82
+ setMessage('File is too big');
83
+ } else if (error.code === DropzoneErrorCode.FileInvalidType) {
84
+ setMessage('File is not a CSV file');
85
+ }
86
+ handleFileRejected();
87
+ },
88
+ onDropAccepted: handleFileAccepted
70
89
  }}
71
90
  validated={isRejected ? 'error' : 'default'}
72
91
  browseButtonText="Upload"
@@ -77,10 +96,8 @@ export const TextFileUploadWithRestrictions: React.FunctionComponent = () => {
77
96
  <HelperTextItem id="restricted-file-example-helpText" variant={isRejected ? 'error' : 'default'}>
78
97
  {isRejected ? (
79
98
  <>
80
- <Icon status="danger">
81
- <ExclamationCircleIcon />
82
- </Icon>
83
- Must be a CSV file no larger than 1 KB
99
+ <Icon status="danger" />
100
+ {message}
84
101
  </>
85
102
  ) : (
86
103
  'Upload a CSV file'
@@ -18,7 +18,7 @@ propComponents:
18
18
  ]
19
19
  ---
20
20
 
21
- import brandImg2 from '../../assets/brandImgColor2.svg';
21
+ import brandImg from '../../assets/PF-IconLogo.svg';
22
22
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
23
23
  import GoogleIcon from '@patternfly/react-icons/dist/esm/icons/google-icon';
24
24
  import GithubIcon from '@patternfly/react-icons/dist/esm/icons/github-icon';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import brandImg2 from '../../assets/brandImgColor2.svg';
2
+ import brandImg from '../../assets/PF-IconLogo.svg';
3
3
  import {
4
4
  LoginFooterItem,
5
5
  LoginForm,
@@ -114,7 +114,7 @@ export const SimpleLoginPage: React.FunctionComponent = () => {
114
114
  return (
115
115
  <LoginPage
116
116
  footerListVariants={ListVariant.inline}
117
- brandImgSrc={brandImg2}
117
+ brandImgSrc={brandImg}
118
118
  brandImgAlt="PatternFly logo"
119
119
  backgroundImgSrc="/assets/images/pfbg-icon.svg"
120
120
  footerListItems={listItem}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import brandImg2 from '../../assets/brandImgColor2.svg';
2
+ import brandImg from '../../assets/PF-IconLogo.svg';
3
3
  import {
4
4
  LoginFooterItem,
5
5
  LoginForm,
@@ -187,7 +187,7 @@ export const LoginPageLanguageSelect: React.FunctionComponent = () => {
187
187
  return (
188
188
  <LoginPage
189
189
  footerListVariants={ListVariant.inline}
190
- brandImgSrc={brandImg2}
190
+ brandImgSrc={brandImg}
191
191
  brandImgAlt="PatternFly logo"
192
192
  backgroundImgSrc="/assets/images/pfbg-icon.svg"
193
193
  footerListItems={listItem}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import brandImg2 from '../../assets/brandImgColor2.svg';
2
+ import brandImg from '../../assets/PF-IconLogo.svg';
3
3
  import {
4
4
  LoginFooterItem,
5
5
  LoginForm,
@@ -115,7 +115,7 @@ export const LoginPageHideShowPassword: React.FunctionComponent = () => {
115
115
  return (
116
116
  <LoginPage
117
117
  footerListVariants={ListVariant.inline}
118
- brandImgSrc={brandImg2}
118
+ brandImgSrc={brandImg}
119
119
  brandImgAlt="PatternFly logo"
120
120
  backgroundImgSrc="/assets/images/pfbg-icon.svg"
121
121
  footerListItems={listItem}
@@ -20,7 +20,7 @@ Basic modals give users the option to either confirm or cancel an action.
20
20
 
21
21
  To flag an open modal, use the `isOpen` property. To execute a callback when a modal is closed, use the `onClose` property.
22
22
 
23
- A modal must have a `<ModalBody>`, containing the main content of the modal. The `<ModalHeader>` and `<ModalFooter>` components are not required, but are typically used to display the modal title and any button actions, respectively.
23
+ The `<ModalBody>`, `<ModalHeader>`, and `<ModalFooter>` components are not required, but are typically used to display the main content of the modal, modal title, and any button actions, respectively.
24
24
 
25
25
  ```ts file="./ModalBasic.tsx"
26
26
 
@@ -1,128 +1,146 @@
1
1
  import React from 'react';
2
- import { SkipToContent } from '@patternfly/react-core';
2
+ import { Content, SkipToContent } from '@patternfly/react-core';
3
3
 
4
- export const SkipToContentBasic: React.FunctionComponent = () => (
5
- <React.Fragment>
6
- <SkipToContent href="#main-content">Skip to content</SkipToContent>
7
- <p>Press tab to skip to content at the bottom of the page.</p>
8
- <div style={{ height: '2000px' }}></div>
9
- <h1 id="main-content">Main content</h1>
10
- <p>
11
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida, nulla
12
- nunc varius lectus, nec rutrum justo nibh eu lectus. Ut vulputate semper dui. Fusce erat odio, sollicitudin vel
13
- erat vel, interdum mattis neque. Sub works as well!
14
- </p>
15
- <h2>Second level</h2>
16
- <p>
17
- Curabitur accumsan turpis pharetra
18
- <strong>augue tincidunt</strong> blandit. Quisque condimentum maximus mi, sit amet commodo arcu rutrum id. Proin
19
- pretium urna vel cursus venenatis. Suspendisse potenti. Etiam mattis sem rhoncus lacus dapibus facilisis. Donec at
20
- dignissim dui. Ut et neque nisl.
21
- </p>
22
- <ul>
23
- <li>In fermentum leo eu lectus mollis, quis dictum mi aliquet.</li>
24
- <li>Morbi eu nulla lobortis, lobortis est in, fringilla felis.</li>
25
- <li>
26
- Aliquam nec felis in sapien venenatis viverra fermentum nec lectus.
27
- <ul>
28
- <li>In fermentum leo eu lectus mollis, quis dictum mi aliquet.</li>
29
- <li>Morbi eu nulla lobortis, lobortis est in, fringilla felis.</li>
30
- <li>
31
- Ut venenatis, nisl scelerisque.
32
- <ol>
33
- <li>Donec blandit a lorem id convallis.</li>
34
- <li>Cras gravida arcu at diam gravida gravida.</li>
35
- <li>Integer in volutpat libero.</li>
36
- </ol>
37
- </li>
38
- </ul>
39
- </li>
40
- <li>Ut non enim metus.</li>
41
- </ul>
42
- <h3>Third level</h3>
43
- <p>
44
- Quisque ante lacus, malesuada ac auctor vitae, congue
45
- <a href="#">non ante</a>. Phasellus lacus ex, semper ac tortor nec, fringilla condimentum orci. Fusce eu rutrum
46
- tellus.
47
- </p>
48
- <ol>
49
- <li>Donec blandit a lorem id convallis.</li>
50
- <li>Cras gravida arcu at diam gravida gravida.</li>
51
- <li>Integer in volutpat libero.</li>
52
- <li>Donec a diam tellus.</li>
53
- <li>
54
- Etiam auctor nisl et.
55
- <ul>
56
- <li>Donec blandit a lorem id convallis.</li>
57
- <li>Cras gravida arcu at diam gravida gravida.</li>
58
- <li>
59
- Integer in volutpat libero.
60
- <ol>
61
- <li>Donec blandit a lorem id convallis.</li>
62
- <li>Cras gravida arcu at diam gravida gravida.</li>
63
- </ol>
64
- </li>
65
- </ul>
66
- </li>
67
- <li>Aenean nec tortor orci.</li>
68
- <li>Quisque aliquam cursus urna, non bibendum massa viverra eget.</li>
69
- <li>Vivamus maximus ultricies pulvinar.</li>
70
- </ol>
71
- <blockquote>
72
- Ut venenatis, nisl scelerisque sollicitudin fermentum, quam libero hendrerit ipsum, ut blandit est tellus sit amet
73
- turpis.
74
- </blockquote>
75
- <p>
76
- Quisque at semper enim, eu hendrerit odio. Etiam auctor nisl et
77
- <em>justo sodales</em> elementum. Maecenas ultrices lacus quis neque consectetur, et lobortis nisi molestie.
78
- </p>
79
- <hr />
80
- <p>
81
- Sed sagittis enim ac tortor maximus rutrum. Nulla facilisi. Donec mattis vulputate risus in luctus. Maecenas
82
- vestibulum interdum commodo.
83
- </p>
84
- <dl>
85
- <dt>Web</dt>
86
- <dd>The part of the internet that contains websites and web pages</dd>
87
- <dt>HTML</dt>
88
- <dd>A markup language for creating web pages</dd>
89
- <dt>CSS</dt>
90
- <dd>A technology to make HTML look better</dd>
91
- </dl>
92
- <p>
93
- Suspendisse egestas sapien non felis placerat elementum. Morbi tortor nisl, suscipit sed mi sit amet, mollis
94
- malesuada nulla. Nulla facilisi. Nullam ac erat ante.
95
- </p>
96
- <h4>Fourth level</h4>
97
- <p>
98
- Nulla efficitur eleifend nisi, sit amet bibendum sapien fringilla ac. Mauris euismod metus a tellus laoreet, at
99
- elementum ex efficitur.
100
- </p>
101
- <p>
102
- Maecenas eleifend sollicitudin dui, faucibus sollicitudin augue cursus non. Ut finibus eleifend arcu ut vehicula.
103
- Mauris eu est maximus est porta condimentum in eu justo. Nulla id iaculis sapien.
104
- </p>
105
- <small>Sometimes you need small text to display things like date created</small>
106
- <p>
107
- Phasellus porttitor enim id metus volutpat ultricies. Ut nisi nunc, blandit sed dapibus at, vestibulum in felis.
108
- Etiam iaculis lorem ac nibh bibendum rhoncus. Nam interdum efficitur ligula sit amet ullamcorper. Etiam tristique,
109
- leo vitae porta faucibus, mi lacus laoreet metus, at cursus leo est vel tellus. Sed ac posuere est. Nunc ultricies
110
- nunc neque, vitae ultricies ex sodales quis. Aliquam eu nibh in libero accumsan pulvinar. Nullam nec nisl
111
- placerat, pretium metus vel, euismod ipsum. Proin tempor cursus nisl vel condimentum. Nam pharetra varius metus
112
- non pellentesque.
113
- </p>
114
- <h5>Fifth level</h5>
115
- <p>
116
- Aliquam sagittis rhoncus vulputate. Cras non luctus sem, sed tincidunt ligula. Vestibulum at nunc elit. Praesent
117
- aliquet ligula mi, in luctus elit volutpat porta. Phasellus molestie diam vel nisi sodales, a eleifend augue
118
- laoreet. Sed nec eleifend justo. Nam et sollicitudin odio.
119
- </p>
120
- <h6>Sixth level</h6>
121
- <p>
122
- Cras in nibh lacinia, venenatis nisi et, auctor urna. Donec pulvinar lacus sed diam dignissim, ut eleifend eros
123
- accumsan. Phasellus non tortor eros. Ut sed rutrum lacus. Etiam purus nunc, scelerisque quis enim vitae, malesuada
124
- ultrices turpis. Nunc vitae maximus purus, nec consectetur dui. Suspendisse euismod, elit vel rutrum commodo,
125
- ipsum tortor maximus dui, sed varius sapien odio vitae est. Etiam at cursus metus.
126
- </p>
127
- </React.Fragment>
128
- );
4
+ export const SkipToContentBasic: React.FunctionComponent = () => {
5
+ const mainContentId = 'main-content';
6
+ const handleClick = (e) => {
7
+ e.preventDefault();
8
+ const mainContentElement = document.getElementById(mainContentId);
9
+ if (mainContentElement) {
10
+ mainContentElement.focus();
11
+ mainContentElement.scrollIntoView();
12
+ }
13
+ };
14
+
15
+ return (
16
+ <React.Fragment>
17
+ <SkipToContent onClick={handleClick} href={`#${mainContentId}`}>
18
+ Skip to content
19
+ </SkipToContent>
20
+ <p>Press tab to skip to content at the bottom of the page.</p>
21
+ <div style={{ height: '2000px' }}></div>
22
+ <div tabIndex={-1} id={mainContentId}>
23
+ <Content>
24
+ <h1>Main content</h1>
25
+ <p>
26
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan, metus ultrices eleifend gravida,
27
+ nulla nunc varius lectus, nec rutrum justo nibh eu lectus. Ut vulputate semper dui. Fusce erat odio,
28
+ sollicitudin vel erat vel, interdum mattis neque. Sub works as well!
29
+ </p>
30
+ <h2>Second level</h2>
31
+ <p>
32
+ Curabitur accumsan turpis pharetra
33
+ <strong>augue tincidunt</strong> blandit. Quisque condimentum maximus mi, sit amet commodo arcu rutrum id.
34
+ Proin pretium urna vel cursus venenatis. Suspendisse potenti. Etiam mattis sem rhoncus lacus dapibus
35
+ facilisis. Donec at dignissim dui. Ut et neque nisl.
36
+ </p>
37
+ <ul>
38
+ <li>In fermentum leo eu lectus mollis, quis dictum mi aliquet.</li>
39
+ <li>Morbi eu nulla lobortis, lobortis est in, fringilla felis.</li>
40
+ <li>
41
+ Aliquam nec felis in sapien venenatis viverra fermentum nec lectus.
42
+ <ul>
43
+ <li>In fermentum leo eu lectus mollis, quis dictum mi aliquet.</li>
44
+ <li>Morbi eu nulla lobortis, lobortis est in, fringilla felis.</li>
45
+ <li>
46
+ Ut venenatis, nisl scelerisque.
47
+ <ol>
48
+ <li>Donec blandit a lorem id convallis.</li>
49
+ <li>Cras gravida arcu at diam gravida gravida.</li>
50
+ <li>Integer in volutpat libero.</li>
51
+ </ol>
52
+ </li>
53
+ </ul>
54
+ </li>
55
+ <li>Ut non enim metus.</li>
56
+ </ul>
57
+ <h3>Third level</h3>
58
+ <p>
59
+ Quisque ante lacus, malesuada ac auctor vitae, congue
60
+ <a href="#">non ante</a>. Phasellus lacus ex, semper ac tortor nec, fringilla condimentum orci. Fusce eu
61
+ rutrum tellus.
62
+ </p>
63
+ <ol>
64
+ <li>Donec blandit a lorem id convallis.</li>
65
+ <li>Cras gravida arcu at diam gravida gravida.</li>
66
+ <li>Integer in volutpat libero.</li>
67
+ <li>Donec a diam tellus.</li>
68
+ <li>
69
+ Etiam auctor nisl et.
70
+ <ul>
71
+ <li>Donec blandit a lorem id convallis.</li>
72
+ <li>Cras gravida arcu at diam gravida gravida.</li>
73
+ <li>
74
+ Integer in volutpat libero.
75
+ <ol>
76
+ <li>Donec blandit a lorem id convallis.</li>
77
+ <li>Cras gravida arcu at diam gravida gravida.</li>
78
+ </ol>
79
+ </li>
80
+ </ul>
81
+ </li>
82
+ <li>Aenean nec tortor orci.</li>
83
+ <li>Quisque aliquam cursus urna, non bibendum massa viverra eget.</li>
84
+ <li>Vivamus maximus ultricies pulvinar.</li>
85
+ </ol>
86
+ <blockquote>
87
+ Ut venenatis, nisl scelerisque sollicitudin fermentum, quam libero hendrerit ipsum, ut blandit est tellus
88
+ sit amet turpis.
89
+ </blockquote>
90
+ <p>
91
+ Quisque at semper enim, eu hendrerit odio. Etiam auctor nisl et
92
+ <em>justo sodales</em> elementum. Maecenas ultrices lacus quis neque consectetur, et lobortis nisi molestie.
93
+ </p>
94
+ <hr />
95
+ <p>
96
+ Sed sagittis enim ac tortor maximus rutrum. Nulla facilisi. Donec mattis vulputate risus in luctus. Maecenas
97
+ vestibulum interdum commodo.
98
+ </p>
99
+ <dl>
100
+ <dt>Web</dt>
101
+ <dd>The part of the internet that contains websites and web pages</dd>
102
+ <dt>HTML</dt>
103
+ <dd>A markup language for creating web pages</dd>
104
+ <dt>CSS</dt>
105
+ <dd>A technology to make HTML look better</dd>
106
+ </dl>
107
+ <p>
108
+ Suspendisse egestas sapien non felis placerat elementum. Morbi tortor nisl, suscipit sed mi sit amet, mollis
109
+ malesuada nulla. Nulla facilisi. Nullam ac erat ante.
110
+ </p>
111
+ <h4>Fourth level</h4>
112
+ <p>
113
+ Nulla efficitur eleifend nisi, sit amet bibendum sapien fringilla ac. Mauris euismod metus a tellus laoreet,
114
+ at elementum ex efficitur.
115
+ </p>
116
+ <p>
117
+ Maecenas eleifend sollicitudin dui, faucibus sollicitudin augue cursus non. Ut finibus eleifend arcu ut
118
+ vehicula. Mauris eu est maximus est porta condimentum in eu justo. Nulla id iaculis sapien.
119
+ </p>
120
+ <small>Sometimes you need small text to display things like date created</small>
121
+ <p>
122
+ Phasellus porttitor enim id metus volutpat ultricies. Ut nisi nunc, blandit sed dapibus at, vestibulum in
123
+ felis. Etiam iaculis lorem ac nibh bibendum rhoncus. Nam interdum efficitur ligula sit amet ullamcorper.
124
+ Etiam tristique, leo vitae porta faucibus, mi lacus laoreet metus, at cursus leo est vel tellus. Sed ac
125
+ posuere est. Nunc ultricies nunc neque, vitae ultricies ex sodales quis. Aliquam eu nibh in libero accumsan
126
+ pulvinar. Nullam nec nisl placerat, pretium metus vel, euismod ipsum. Proin tempor cursus nisl vel
127
+ condimentum. Nam pharetra varius metus non pellentesque.
128
+ </p>
129
+ <h5>Fifth level</h5>
130
+ <p>
131
+ Aliquam sagittis rhoncus vulputate. Cras non luctus sem, sed tincidunt ligula. Vestibulum at nunc elit.
132
+ Praesent aliquet ligula mi, in luctus elit volutpat porta. Phasellus molestie diam vel nisi sodales, a
133
+ eleifend augue laoreet. Sed nec eleifend justo. Nam et sollicitudin odio.
134
+ </p>
135
+ <h6>Sixth level</h6>
136
+ <p>
137
+ Cras in nibh lacinia, venenatis nisi et, auctor urna. Donec pulvinar lacus sed diam dignissim, ut eleifend
138
+ eros accumsan. Phasellus non tortor eros. Ut sed rutrum lacus. Etiam purus nunc, scelerisque quis enim
139
+ vitae, malesuada ultrices turpis. Nunc vitae maximus purus, nec consectetur dui. Suspendisse euismod, elit
140
+ vel rutrum commodo, ipsum tortor maximus dui, sed varius sapien odio vitae est. Etiam at cursus metus.
141
+ </p>
142
+ </Content>
143
+ </div>
144
+ </React.Fragment>
145
+ );
146
+ };
@@ -133,7 +133,8 @@ class ToolbarFilter extends React.Component<ToolbarFilterProps, ToolbarFilterSta
133
133
  return (
134
134
  <React.Fragment>
135
135
  {showToolbarItem && <ToolbarItem {...props}>{children}</ToolbarItem>}
136
- {ReactDOM.createPortal(labelGroup, labelGroupContentRef.current.firstElementChild)}
136
+ {labelGroupContentRef?.current?.firstElementChild !== null &&
137
+ ReactDOM.createPortal(labelGroup, labelGroupContentRef.current.firstElementChild)}
137
138
  </React.Fragment>
138
139
  );
139
140
  }
@@ -34,6 +34,8 @@ DrawerColorVariant,
34
34
  DrawerHead,
35
35
  DrawerActions,
36
36
  DrawerCloseButton,
37
+ Modal,
38
+ ModalVariant,
37
39
  Wizard,
38
40
  WizardFooter,
39
41
  WizardFooterWrapper,
@@ -46,7 +48,6 @@ WizardNavItem,
46
48
  WizardNav,
47
49
  WizardHeader
48
50
  } from '@patternfly/react-core';
49
- import { Modal as ModalDeprecated, ModalVariant as ModalVariantDeprecated } from '@patternfly/react-core/deprecated';
50
51
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
51
52
  import SlackHashIcon from '@patternfly/react-icons/dist/esm/icons/slack-hash-icon';
52
53
  import CogsIcon from '@patternfly/react-icons/dist/esm/icons/cogs-icon';
@@ -1,21 +1,18 @@
1
1
  import React from 'react';
2
- import { Button, Wizard, WizardStep, WizardHeader } from '@patternfly/react-core';
3
- import { Modal as ModalDeprecated, ModalVariant as ModalVariantDeprecated } from '@patternfly/react-core/deprecated';
2
+ import { Button, Modal, ModalVariant, Wizard, WizardHeader, WizardStep } from '@patternfly/react-core';
4
3
 
5
- export const WizardWithinModal = () => {
4
+ export const WizardWithinModal: React.FunctionComponent = () => {
6
5
  const [isModelOpen, setIsModalOpen] = React.useState(false);
7
6
 
8
7
  return (
9
8
  <>
10
9
  <Button onClick={() => setIsModalOpen(true)}>Show Modal</Button>
11
10
 
12
- <ModalDeprecated
11
+ <Modal
13
12
  isOpen={isModelOpen}
14
- showClose={false}
15
13
  aria-label="Wizard modal"
16
- hasNoBodyWrapper
17
14
  onEscapePress={() => setIsModalOpen(false)}
18
- variant={ModalVariantDeprecated.medium}
15
+ variant={ModalVariant.medium}
19
16
  >
20
17
  <Wizard
21
18
  height={400}
@@ -43,7 +40,7 @@ export const WizardWithinModal = () => {
43
40
  Review step content
44
41
  </WizardStep>
45
42
  </Wizard>
46
- </ModalDeprecated>
43
+ </Modal>
47
44
  </>
48
45
  );
49
46
  };
@@ -19,7 +19,7 @@ propComponents:
19
19
  ---
20
20
 
21
21
  import ThIcon from '@patternfly/react-icons/dist/esm/icons/th-icon';
22
- import pfIcon from '../assets/pf-logo-small.svg';
22
+ import brandImg from '../assets/PF-IconLogo.svg';
23
23
 
24
24
  As the application launcher component is now deprecated, an application launcher may now be built using the new suite of menu components. This is showcased in the following demo, which uses the new [dropdown](/components/menus/dropdown) component that is built off of menu.
25
25
 
@@ -17,7 +17,7 @@ import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
17
17
  import ClipboardIcon from '@patternfly/react-icons/dist/esm/icons/clipboard-icon';
18
18
  import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon';
19
19
  import ThIcon from '@patternfly/react-icons/dist/esm/icons/th-icon';
20
- import pfIcon from '../assets/pf-logo-small.svg';
20
+ import brandImg from '../assets/PF-IconLogo.svg';
21
21
  import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
22
22
  import CaretDownIcon from '@patternfly/react-icons/dist/esm/icons/caret-down-icon';
23
23
  import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';