@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.
- package/CHANGELOG.md +48 -0
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/AboutModal/package.json +1 -1
- package/dist/dynamic/components/Accordion/package.json +1 -1
- package/dist/dynamic/components/ActionList/package.json +1 -1
- package/dist/dynamic/components/Alert/package.json +1 -1
- package/dist/dynamic/components/Avatar/package.json +1 -1
- package/dist/dynamic/components/BackToTop/package.json +1 -1
- package/dist/dynamic/components/Backdrop/package.json +1 -1
- package/dist/dynamic/components/BackgroundImage/package.json +1 -1
- package/dist/dynamic/components/Badge/package.json +1 -1
- package/dist/dynamic/components/Banner/package.json +1 -1
- package/dist/dynamic/components/Brand/package.json +1 -1
- package/dist/dynamic/components/Breadcrumb/package.json +1 -1
- package/dist/dynamic/components/Button/package.json +1 -1
- package/dist/dynamic/components/CalendarMonth/package.json +1 -1
- package/dist/dynamic/components/Card/package.json +1 -1
- package/dist/dynamic/components/Checkbox/package.json +1 -1
- package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/Content/package.json +1 -1
- package/dist/dynamic/components/DataList/package.json +1 -1
- package/dist/dynamic/components/DatePicker/package.json +1 -1
- package/dist/dynamic/components/DescriptionList/package.json +1 -1
- package/dist/dynamic/components/Divider/package.json +1 -1
- package/dist/dynamic/components/Drawer/package.json +1 -1
- package/dist/dynamic/components/Dropdown/package.json +1 -1
- package/dist/dynamic/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/components/EmptyState/package.json +1 -1
- package/dist/dynamic/components/ExpandableSection/package.json +1 -1
- package/dist/dynamic/components/FileUpload/package.json +1 -1
- package/dist/dynamic/components/Form/package.json +1 -1
- package/dist/dynamic/components/FormSelect/package.json +1 -1
- package/dist/dynamic/components/HelperText/package.json +1 -1
- package/dist/dynamic/components/Hint/package.json +1 -1
- package/dist/dynamic/components/Icon/package.json +1 -1
- package/dist/dynamic/components/InputGroup/package.json +1 -1
- package/dist/dynamic/components/JumpLinks/package.json +1 -1
- package/dist/dynamic/components/Label/package.json +1 -1
- package/dist/dynamic/components/List/package.json +1 -1
- package/dist/dynamic/components/LoginPage/package.json +1 -1
- package/dist/dynamic/components/Masthead/package.json +1 -1
- package/dist/dynamic/components/Menu/package.json +1 -1
- package/dist/dynamic/components/MenuToggle/package.json +1 -1
- package/dist/dynamic/components/Modal/package.json +1 -1
- package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
- package/dist/dynamic/components/Nav/package.json +1 -1
- package/dist/dynamic/components/NotificationBadge/package.json +1 -1
- package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
- package/dist/dynamic/components/NumberInput/package.json +1 -1
- package/dist/dynamic/components/OverflowMenu/package.json +1 -1
- package/dist/dynamic/components/Page/package.json +1 -1
- package/dist/dynamic/components/Pagination/package.json +1 -1
- package/dist/dynamic/components/Panel/package.json +1 -1
- package/dist/dynamic/components/Popover/package.json +1 -1
- package/dist/dynamic/components/Progress/package.json +1 -1
- package/dist/dynamic/components/ProgressStepper/package.json +1 -1
- package/dist/dynamic/components/Radio/package.json +1 -1
- package/dist/dynamic/components/SearchInput/package.json +1 -1
- package/dist/dynamic/components/Select/package.json +1 -1
- package/dist/dynamic/components/Sidebar/package.json +1 -1
- package/dist/dynamic/components/SimpleList/package.json +1 -1
- package/dist/dynamic/components/Skeleton/package.json +1 -1
- package/dist/dynamic/components/SkipToContent/package.json +1 -1
- package/dist/dynamic/components/Slider/package.json +1 -1
- package/dist/dynamic/components/Spinner/package.json +1 -1
- package/dist/dynamic/components/Switch/package.json +1 -1
- package/dist/dynamic/components/Tabs/package.json +1 -1
- package/dist/dynamic/components/TextArea/package.json +1 -1
- package/dist/dynamic/components/TextInput/package.json +1 -1
- package/dist/dynamic/components/TextInputGroup/package.json +1 -1
- package/dist/dynamic/components/TimePicker/package.json +1 -1
- package/dist/dynamic/components/Timestamp/package.json +1 -1
- package/dist/dynamic/components/Title/package.json +1 -1
- package/dist/dynamic/components/ToggleGroup/package.json +1 -1
- package/dist/dynamic/components/Toolbar/package.json +1 -1
- package/dist/dynamic/components/Tooltip/package.json +1 -1
- package/dist/dynamic/components/TreeView/package.json +1 -1
- package/dist/dynamic/components/Truncate/package.json +1 -1
- package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
- package/dist/dynamic/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
- package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
- package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
- package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
- package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
- package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
- package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
- package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
- package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
- package/dist/dynamic/helpers/constants/package.json +1 -1
- package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
- package/dist/dynamic/helpers/fileUtils/package.json +1 -1
- package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
- package/dist/dynamic/helpers/package.json +1 -1
- package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
- package/dist/dynamic/helpers/typeUtils/package.json +1 -1
- package/dist/dynamic/helpers/useInterval/package.json +1 -1
- package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
- package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
- package/dist/dynamic/helpers/util/package.json +1 -1
- package/dist/dynamic/layouts/Bullseye/package.json +1 -1
- package/dist/dynamic/layouts/Flex/package.json +1 -1
- package/dist/dynamic/layouts/Gallery/package.json +1 -1
- package/dist/dynamic/layouts/Grid/package.json +1 -1
- package/dist/dynamic/layouts/Level/package.json +1 -1
- package/dist/dynamic/layouts/Split/package.json +1 -1
- package/dist/dynamic/layouts/Stack/package.json +1 -1
- package/dist/dynamic/styles/package.json +1 -1
- package/dist/dynamic-modules.json +1 -0
- package/dist/esm/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/esm/components/CalendarMonth/CalendarMonth.js +7 -11
- package/dist/esm/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/esm/components/FileUpload/FileUpload.d.ts +2 -1
- package/dist/esm/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/esm/components/FileUpload/FileUpload.js +2 -1
- package/dist/esm/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarFilter.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarFilter.js +4 -2
- package/dist/esm/components/Toolbar/ToolbarFilter.js.map +1 -1
- package/dist/esm/demos/DashboardWrapper.d.ts.map +1 -1
- package/dist/esm/demos/DashboardWrapper.js +10 -2
- package/dist/esm/demos/DashboardWrapper.js.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.js +7 -11
- package/dist/js/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/js/components/FileUpload/FileUpload.d.ts +2 -1
- package/dist/js/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/js/components/FileUpload/FileUpload.js +2 -1
- package/dist/js/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarFilter.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarFilter.js +4 -2
- package/dist/js/components/Toolbar/ToolbarFilter.js.map +1 -1
- package/dist/js/demos/DashboardWrapper.d.ts.map +1 -1
- package/dist/js/demos/DashboardWrapper.js +10 -2
- package/dist/js/demos/DashboardWrapper.js.map +1 -1
- package/dist/umd/assets/{output-B0G4u0sM.css → output-ByZdJvYx.css} +9561 -9514
- package/dist/umd/react-core.min.js +1 -1
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +6 -6
- package/src/components/CalendarMonth/CalendarMonth.tsx +7 -10
- package/src/components/FileUpload/FileUpload.tsx +3 -1
- package/src/components/FileUpload/examples/FileUpload.md +1 -1
- package/src/components/FileUpload/examples/FileUploadTextWithRestrictions.tsx +24 -7
- package/src/components/LoginPage/examples/LoginPage.md +1 -1
- package/src/components/LoginPage/examples/LoginPageBasic.tsx +2 -2
- package/src/components/LoginPage/examples/LoginPageLanguageSelect.tsx +2 -2
- package/src/components/LoginPage/examples/LoginPageShowHidePassword.tsx +2 -2
- package/src/components/Modal/examples/Modal.md +1 -1
- package/src/components/SkipToContent/examples/SkipToContentBasic.tsx +144 -126
- package/src/components/Toolbar/ToolbarFilter.tsx +2 -1
- package/src/components/Wizard/examples/Wizard.md +2 -1
- package/src/components/Wizard/examples/WizardWithinModal.tsx +5 -8
- package/src/demos/CustomMenus/ApplicationLauncher.md +1 -1
- package/src/demos/CustomMenus/CustomMenus.md +1 -1
- package/src/demos/CustomMenus/examples/ApplicationLauncherDemo.tsx +2 -2
- package/src/demos/CustomMenus/examples/DrilldownMenuDemo.tsx +1 -1
- package/src/demos/DashboardWrapper.tsx +13 -2
- package/src/demos/ExpandableSection/examples/ExpandableTextDemo.tsx +1 -7
- package/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +15 -1
- package/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +15 -1
- package/src/demos/assets/PF-IconLogo.svg +17 -0
- package/src/demos/examples/Masthead/MastheadWithHorizontalNav.tsx +14 -1
- package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +14 -1
- package/src/demos/examples/Nav/NavDefault.tsx +15 -1
- package/src/demos/examples/Nav/NavExpandable.tsx +15 -1
- package/src/demos/examples/Nav/NavFlyout.tsx +15 -1
- package/src/demos/examples/Nav/NavGrouped.tsx +15 -1
- package/src/demos/examples/Nav/NavHorizontal.tsx +15 -1
- package/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx +15 -1
- package/src/demos/examples/Nav/NavManual.tsx +15 -1
- package/src/demos/examples/Nav/NavWithSubnav.tsx +15 -1
- package/src/demos/examples/Page/PageContextSelector.tsx +14 -1
- package/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +14 -1
- package/src/demos/examples/Page/PageStickySectionGroup.tsx +14 -1
- package/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +14 -1
- package/src/demos/examples/Wizard/InPageWithDrawer.tsx +15 -1
- package/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx +14 -1
- package/src/demos/examples/DashboardWrapper.js +0 -126
package/helpers/package.json
CHANGED
|
@@ -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.
|
|
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}
|
package/layouts/package.json
CHANGED
|
@@ -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.
|
|
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.
|
|
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
|
|
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
|
|
50
|
-
"@patternfly/react-styles": "^6.1.0
|
|
51
|
-
"@patternfly/react-tokens": "^6.1.0
|
|
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.
|
|
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": "
|
|
66
|
+
"gitHead": "fc70165f6d07de6a24f6943c826c1432ea6d44cf"
|
|
67
67
|
}
|
|
@@ -319,18 +319,15 @@ export const CalendarMonth = ({
|
|
|
319
319
|
onSelectToggle(isOpen);
|
|
320
320
|
}}
|
|
321
321
|
onSelect={(ev, monthNum) => {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
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
|
|
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:
|
|
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
|
-
|
|
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
|
|
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
|
|
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={
|
|
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
|
|
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={
|
|
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
|
|
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={
|
|
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
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
-
{
|
|
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,
|
|
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
|
-
<
|
|
11
|
+
<Modal
|
|
13
12
|
isOpen={isModelOpen}
|
|
14
|
-
showClose={false}
|
|
15
13
|
aria-label="Wizard modal"
|
|
16
|
-
hasNoBodyWrapper
|
|
17
14
|
onEscapePress={() => setIsModalOpen(false)}
|
|
18
|
-
variant={
|
|
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
|
-
</
|
|
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
|
|
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
|
|
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';
|