@patternfly/react-core 6.0.0-alpha.61 → 6.0.0-alpha.62
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 +6 -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/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/Text/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/Tile/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/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/next/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/next/components/Modal/package.json +1 -1
- package/dist/dynamic/next/components/package.json +1 -1
- package/dist/dynamic/styles/package.json +1 -1
- package/dist/esm/components/Page/Page.d.ts +2 -2
- package/dist/esm/components/Page/Page.d.ts.map +1 -1
- package/dist/esm/components/Page/Page.js +3 -3
- package/dist/esm/components/Page/Page.js.map +1 -1
- package/dist/esm/components/Page/PageSidebar.d.ts +1 -1
- package/dist/esm/demos/DashboardWrapper.js +2 -2
- package/dist/esm/demos/DashboardWrapper.js.map +1 -1
- package/dist/js/components/Page/Page.d.ts +2 -2
- package/dist/js/components/Page/Page.d.ts.map +1 -1
- package/dist/js/components/Page/Page.js +3 -3
- package/dist/js/components/Page/Page.js.map +1 -1
- package/dist/js/components/Page/PageSidebar.d.ts +1 -1
- package/dist/js/demos/DashboardWrapper.js +2 -2
- package/dist/js/demos/DashboardWrapper.js.map +1 -1
- package/dist/umd/assets/{output-DtgGh3m9.css → output-C7loZMMj.css} +2538 -2538
- 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 +2 -2
- package/src/components/Page/Page.tsx +4 -4
- package/src/components/Page/PageSidebar.tsx +1 -1
- package/src/components/Page/__tests__/Page.test.tsx +26 -26
- package/src/components/Page/examples/Page.md +1 -1
- package/src/components/Page/examples/PageCenteredSection.tsx +2 -2
- package/src/components/Page/examples/PageGroupSection.tsx +2 -2
- package/src/components/Page/examples/PageHorizontalNav.tsx +2 -2
- package/src/components/Page/examples/PageMainSectionPadding.tsx +2 -2
- package/src/components/Page/examples/PageMultipleSidebarBody.tsx +2 -2
- package/src/components/Page/examples/PageUncontrolledNav.tsx +2 -2
- package/src/components/Page/examples/PageVerticalNav.tsx +2 -2
- package/src/components/Page/examples/PageWithOrWithoutFill.tsx +2 -2
- package/src/demos/DashboardWrapper.tsx +2 -2
- package/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +2 -2
- package/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +2 -2
- package/src/demos/RTL/examples/PaginatedTable.jsx +1 -1
- package/src/demos/RTL/examples/PaginatedTable.tsx +1 -1
- package/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx +1 -1
- package/src/demos/examples/DashboardWrapper.js +2 -2
- package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +1 -1
- package/src/demos/examples/Nav/NavDefault.tsx +1 -1
- package/src/demos/examples/Nav/NavDrilldown.tsx +1 -1
- package/src/demos/examples/Nav/NavExpandable.tsx +1 -1
- package/src/demos/examples/Nav/NavFlyout.tsx +2 -2
- package/src/demos/examples/Nav/NavGrouped.tsx +1 -1
- package/src/demos/examples/Nav/NavHorizontal.tsx +7 -2
- package/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx +2 -2
- package/src/demos/examples/Nav/NavManual.tsx +2 -2
- package/src/demos/examples/Nav/NavWithSubnav.tsx +1 -1
- package/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +1 -1
- package/src/demos/examples/Page/PageStickySectionGroup.tsx +1 -1
- package/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +1 -1
- package/src/demos/examples/Wizard/InPageWithDrawer.tsx +2 -2
- package/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx +2 -2
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.0.0-alpha.
|
|
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.0.0-alpha.61","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.0.0-alpha.
|
|
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.0.0-alpha.61","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.0.0-alpha.
|
|
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.0.0-alpha.61","private":true}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.62",
|
|
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",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"react": "^17 || ^18",
|
|
66
66
|
"react-dom": "^17 || ^18"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "c2840cf2e9e7f864392097450cc2ee11d163ed69"
|
|
69
69
|
}
|
|
@@ -19,8 +19,8 @@ export interface PageProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
19
19
|
children?: React.ReactNode;
|
|
20
20
|
/** Additional classes added to the page layout */
|
|
21
21
|
className?: string;
|
|
22
|
-
/**
|
|
23
|
-
|
|
22
|
+
/** Masthead component (e.g. <Masthead />) */
|
|
23
|
+
masthead?: React.ReactNode;
|
|
24
24
|
/** Sidebar component for a side nav (e.g. <PageSidebar />) */
|
|
25
25
|
sidebar?: React.ReactNode;
|
|
26
26
|
/** Notification drawer component for an optional notification drawer (e.g. <NotificationDrawer />) */
|
|
@@ -220,7 +220,7 @@ class Page extends React.Component<PageProps, PageState> {
|
|
|
220
220
|
isBreadcrumbWidthLimited,
|
|
221
221
|
className,
|
|
222
222
|
children,
|
|
223
|
-
|
|
223
|
+
masthead,
|
|
224
224
|
sidebar,
|
|
225
225
|
notificationDrawer,
|
|
226
226
|
isNotificationDrawerExpanded,
|
|
@@ -341,7 +341,7 @@ class Page extends React.Component<PageProps, PageState> {
|
|
|
341
341
|
)}
|
|
342
342
|
>
|
|
343
343
|
{skipToContent}
|
|
344
|
-
{
|
|
344
|
+
{masthead}
|
|
345
345
|
{sidebar}
|
|
346
346
|
{notificationDrawer && (
|
|
347
347
|
<div className={css(styles.pageDrawer)}>
|
|
@@ -10,7 +10,7 @@ export interface PageSidebarProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
/**
|
|
12
12
|
* If true, manages the sidebar open/close state and there is no need to pass the isSidebarOpen boolean into
|
|
13
|
-
* the sidebar component or add a callback onSidebarToggle function into the
|
|
13
|
+
* the sidebar component or add a callback onSidebarToggle function into the Masthead component
|
|
14
14
|
*/
|
|
15
15
|
isManagedSidebar?: boolean;
|
|
16
16
|
/** Programmatically manage if the sidebar is shown, if isManagedSidebar is set to true in the Page component, this prop is managed */
|
|
@@ -22,7 +22,7 @@ const props = {
|
|
|
22
22
|
|
|
23
23
|
describe('Page', () => {
|
|
24
24
|
test('Check page vertical layout example against snapshot', () => {
|
|
25
|
-
const
|
|
25
|
+
const masthead = <Masthead />;
|
|
26
26
|
const Sidebar = (
|
|
27
27
|
<PageSidebar isSidebarOpen>
|
|
28
28
|
<PageSidebarBody>Navigation</PageSidebarBody>
|
|
@@ -30,7 +30,7 @@ describe('Page', () => {
|
|
|
30
30
|
);
|
|
31
31
|
|
|
32
32
|
const { asFragment } = render(
|
|
33
|
-
<Page {...props}
|
|
33
|
+
<Page {...props} masthead={masthead} sidebar={Sidebar}>
|
|
34
34
|
<PageSection variant="default">Section with default background</PageSection>
|
|
35
35
|
</Page>
|
|
36
36
|
);
|
|
@@ -39,7 +39,7 @@ describe('Page', () => {
|
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
test('Check dark page against snapshot', () => {
|
|
42
|
-
const
|
|
42
|
+
const masthead = <Masthead />;
|
|
43
43
|
const Sidebar = (
|
|
44
44
|
<PageSidebar isSidebarOpen>
|
|
45
45
|
<PageSidebarBody>Navigation</PageSidebarBody>
|
|
@@ -47,7 +47,7 @@ describe('Page', () => {
|
|
|
47
47
|
);
|
|
48
48
|
|
|
49
49
|
const { asFragment } = render(
|
|
50
|
-
<Page {...props}
|
|
50
|
+
<Page {...props} masthead={masthead} sidebar={Sidebar}>
|
|
51
51
|
<PageSection variant="default">Section with default background</PageSection>
|
|
52
52
|
</Page>
|
|
53
53
|
);
|
|
@@ -56,11 +56,11 @@ describe('Page', () => {
|
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
test('Check page horizontal layout example against snapshot', () => {
|
|
59
|
-
const
|
|
59
|
+
const masthead = <Masthead />;
|
|
60
60
|
const Sidebar = <PageSidebar isSidebarOpen />;
|
|
61
61
|
|
|
62
62
|
const { asFragment } = render(
|
|
63
|
-
<Page {...props}
|
|
63
|
+
<Page {...props} masthead={masthead} sidebar={Sidebar}>
|
|
64
64
|
<PageSection variant="default">Section with default background</PageSection>
|
|
65
65
|
</Page>
|
|
66
66
|
);
|
|
@@ -69,7 +69,7 @@ describe('Page', () => {
|
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
test('Check page to verify breadcrumb is created', () => {
|
|
72
|
-
const
|
|
72
|
+
const masthead = <Masthead />;
|
|
73
73
|
const Sidebar = <PageSidebar isSidebarOpen />;
|
|
74
74
|
const PageBreadcrumb = () => (
|
|
75
75
|
<Breadcrumb>
|
|
@@ -83,7 +83,7 @@ describe('Page', () => {
|
|
|
83
83
|
);
|
|
84
84
|
|
|
85
85
|
const { asFragment } = render(
|
|
86
|
-
<Page {...props}
|
|
86
|
+
<Page {...props} masthead={masthead} sidebar={Sidebar} breadcrumb={<PageBreadcrumb />}>
|
|
87
87
|
<PageSection variant="default">Section with default background</PageSection>
|
|
88
88
|
</Page>
|
|
89
89
|
);
|
|
@@ -93,7 +93,7 @@ describe('Page', () => {
|
|
|
93
93
|
});
|
|
94
94
|
|
|
95
95
|
test('Verify sticky top breadcrumb on all height breakpoints', () => {
|
|
96
|
-
const
|
|
96
|
+
const masthead = <Masthead />;
|
|
97
97
|
const Sidebar = <PageSidebar isSidebarOpen />;
|
|
98
98
|
const PageBreadcrumb = () => (
|
|
99
99
|
<Breadcrumb>
|
|
@@ -109,7 +109,7 @@ describe('Page', () => {
|
|
|
109
109
|
const { asFragment } = render(
|
|
110
110
|
<Page
|
|
111
111
|
{...props}
|
|
112
|
-
|
|
112
|
+
masthead={masthead}
|
|
113
113
|
sidebar={Sidebar}
|
|
114
114
|
breadcrumb={<PageBreadcrumb />}
|
|
115
115
|
breadcrumbProps={{ stickyOnBreakpoint: { sm: 'top', md: 'top', lg: 'top', xl: 'top', '2xl': 'top' } }}
|
|
@@ -123,7 +123,7 @@ describe('Page', () => {
|
|
|
123
123
|
});
|
|
124
124
|
|
|
125
125
|
test('Verify sticky bottom breadcrumb on all height breakpoints', () => {
|
|
126
|
-
const
|
|
126
|
+
const masthead = <Masthead />;
|
|
127
127
|
const Sidebar = <PageSidebar isSidebarOpen />;
|
|
128
128
|
const PageBreadcrumb = () => (
|
|
129
129
|
<Breadcrumb>
|
|
@@ -139,7 +139,7 @@ describe('Page', () => {
|
|
|
139
139
|
const { asFragment } = render(
|
|
140
140
|
<Page
|
|
141
141
|
{...props}
|
|
142
|
-
|
|
142
|
+
masthead={masthead}
|
|
143
143
|
sidebar={Sidebar}
|
|
144
144
|
breadcrumb={<PageBreadcrumb />}
|
|
145
145
|
breadcrumbProps={{
|
|
@@ -155,11 +155,11 @@ describe('Page', () => {
|
|
|
155
155
|
});
|
|
156
156
|
|
|
157
157
|
test('Check page to verify breadcrumb is created - PageBreadcrumb syntax', () => {
|
|
158
|
-
const
|
|
158
|
+
const masthead = <Masthead />;
|
|
159
159
|
const Sidebar = <PageSidebar isSidebarOpen />;
|
|
160
160
|
|
|
161
161
|
const { asFragment } = render(
|
|
162
|
-
<Page {...props}
|
|
162
|
+
<Page {...props} masthead={masthead} sidebar={Sidebar}>
|
|
163
163
|
<PageBreadcrumb>
|
|
164
164
|
<Breadcrumb>
|
|
165
165
|
<BreadcrumbItem>Section Home</BreadcrumbItem>
|
|
@@ -179,11 +179,11 @@ describe('Page', () => {
|
|
|
179
179
|
});
|
|
180
180
|
|
|
181
181
|
test('Verify sticky top breadcrumb on all height breakpoints - PageBreadcrumb syntax', () => {
|
|
182
|
-
const
|
|
182
|
+
const masthead = <Masthead />;
|
|
183
183
|
const Sidebar = <PageSidebar isSidebarOpen />;
|
|
184
184
|
|
|
185
185
|
const { asFragment } = render(
|
|
186
|
-
<Page {...props}
|
|
186
|
+
<Page {...props} masthead={masthead} sidebar={Sidebar}>
|
|
187
187
|
<PageBreadcrumb stickyOnBreakpoint={{ sm: 'top', md: 'top', lg: 'top', xl: 'top', '2xl': 'top' }}>
|
|
188
188
|
<Breadcrumb>
|
|
189
189
|
<BreadcrumbItem>Section Home</BreadcrumbItem>
|
|
@@ -203,11 +203,11 @@ describe('Page', () => {
|
|
|
203
203
|
});
|
|
204
204
|
|
|
205
205
|
test('Sticky bottom breadcrumb on all height breakpoints - PageBreadcrumb syntax', () => {
|
|
206
|
-
const
|
|
206
|
+
const masthead = <Masthead />;
|
|
207
207
|
const Sidebar = <PageSidebar isSidebarOpen />;
|
|
208
208
|
|
|
209
209
|
const { asFragment } = render(
|
|
210
|
-
<Page {...props}
|
|
210
|
+
<Page {...props} masthead={masthead} sidebar={Sidebar}>
|
|
211
211
|
<PageBreadcrumb
|
|
212
212
|
stickyOnBreakpoint={{ sm: 'bottom', md: 'bottom', lg: 'bottom', xl: 'bottom', '2xl': 'bottom' }}
|
|
213
213
|
>
|
|
@@ -229,11 +229,11 @@ describe('Page', () => {
|
|
|
229
229
|
});
|
|
230
230
|
|
|
231
231
|
test('Check page to verify nav is created - PageNavigation syntax', () => {
|
|
232
|
-
const
|
|
232
|
+
const masthead = <Masthead />;
|
|
233
233
|
const Sidebar = <PageSidebar isSidebarOpen />;
|
|
234
234
|
|
|
235
235
|
const { asFragment } = render(
|
|
236
|
-
<Page {...props}
|
|
236
|
+
<Page {...props} masthead={masthead} sidebar={Sidebar}>
|
|
237
237
|
<PageNavigation>
|
|
238
238
|
<Nav aria-label="Nav" variant="horizontal-subnav">
|
|
239
239
|
<NavList>
|
|
@@ -256,11 +256,11 @@ describe('Page', () => {
|
|
|
256
256
|
});
|
|
257
257
|
|
|
258
258
|
test('Check page to verify grouped nav and breadcrumb - new components syntax', () => {
|
|
259
|
-
const
|
|
259
|
+
const masthead = <Masthead />;
|
|
260
260
|
const Sidebar = <PageSidebar isSidebarOpen />;
|
|
261
261
|
|
|
262
262
|
const { asFragment } = render(
|
|
263
|
-
<Page {...props}
|
|
263
|
+
<Page {...props} masthead={masthead} sidebar={Sidebar}>
|
|
264
264
|
<PageGroup stickyOnBreakpoint={{ default: 'bottom' }}>
|
|
265
265
|
<PageBreadcrumb>
|
|
266
266
|
<Breadcrumb>
|
|
@@ -295,7 +295,7 @@ describe('Page', () => {
|
|
|
295
295
|
});
|
|
296
296
|
|
|
297
297
|
test('Check page to verify grouped nav and breadcrumb - old / props syntax', () => {
|
|
298
|
-
const
|
|
298
|
+
const masthead = <Masthead />;
|
|
299
299
|
const Sidebar = <PageSidebar isSidebarOpen />;
|
|
300
300
|
const crumb = (
|
|
301
301
|
<PageBreadcrumb>
|
|
@@ -326,7 +326,7 @@ describe('Page', () => {
|
|
|
326
326
|
const { asFragment } = render(
|
|
327
327
|
<Page
|
|
328
328
|
{...props}
|
|
329
|
-
|
|
329
|
+
masthead={masthead}
|
|
330
330
|
sidebar={Sidebar}
|
|
331
331
|
breadcrumb={crumb}
|
|
332
332
|
horizontalSubnav={nav}
|
|
@@ -349,7 +349,7 @@ describe('Page', () => {
|
|
|
349
349
|
});
|
|
350
350
|
|
|
351
351
|
test('Check page to verify skip to content points to main content region', () => {
|
|
352
|
-
const
|
|
352
|
+
const masthead = <Masthead />;
|
|
353
353
|
const Sidebar = <PageSidebar isSidebarOpen />;
|
|
354
354
|
const PageBreadcrumb = (
|
|
355
355
|
<Breadcrumb>
|
|
@@ -367,7 +367,7 @@ describe('Page', () => {
|
|
|
367
367
|
const { asFragment } = render(
|
|
368
368
|
<Page
|
|
369
369
|
{...props}
|
|
370
|
-
|
|
370
|
+
masthead={masthead}
|
|
371
371
|
sidebar={Sidebar}
|
|
372
372
|
breadcrumb={PageBreadcrumb}
|
|
373
373
|
skipToContent={PageSkipToContent}
|
|
@@ -24,7 +24,7 @@ import c_page_section_m_limit_width_MaxWidth from '@patternfly/react-tokens/dist
|
|
|
24
24
|
|
|
25
25
|
A page will typically contain the following components:
|
|
26
26
|
|
|
27
|
-
- A `<Page>` with a `
|
|
27
|
+
- A `<Page>` with a `masthead` prop that often contains a [masthead](/components/masthead) component
|
|
28
28
|
- Mastheads contain the `<PageToggleButton>`, a `<MastheadMain>` that contains a `<MastheadBrand>`, and the page's header toolbar within `<MastheadContent>`.
|
|
29
29
|
- 1 or more `<PageSidebarBody>` components inside `<PageSidebar>` for vertical navigation or other sidebar content
|
|
30
30
|
- 1 or more `<PageSection>` components
|
|
@@ -35,7 +35,7 @@ export const PageCenteredSection: React.FunctionComponent = () => {
|
|
|
35
35
|
</Toolbar>
|
|
36
36
|
);
|
|
37
37
|
|
|
38
|
-
const
|
|
38
|
+
const masthead = (
|
|
39
39
|
<Masthead>
|
|
40
40
|
<MastheadToggle>
|
|
41
41
|
<PageToggleButton
|
|
@@ -64,7 +64,7 @@ export const PageCenteredSection: React.FunctionComponent = () => {
|
|
|
64
64
|
);
|
|
65
65
|
|
|
66
66
|
return (
|
|
67
|
-
<Page
|
|
67
|
+
<Page masthead={masthead} sidebar={sidebar}>
|
|
68
68
|
<PageSection isWidthLimited isCenterAligned>
|
|
69
69
|
<Card>
|
|
70
70
|
<CardBody>
|
|
@@ -39,7 +39,7 @@ export const PageGroupSection: React.FunctionComponent = () => {
|
|
|
39
39
|
</Toolbar>
|
|
40
40
|
);
|
|
41
41
|
|
|
42
|
-
const
|
|
42
|
+
const masthead = (
|
|
43
43
|
<Masthead>
|
|
44
44
|
<MastheadToggle>
|
|
45
45
|
<PageToggleButton
|
|
@@ -68,7 +68,7 @@ export const PageGroupSection: React.FunctionComponent = () => {
|
|
|
68
68
|
);
|
|
69
69
|
|
|
70
70
|
return (
|
|
71
|
-
<Page
|
|
71
|
+
<Page masthead={masthead} sidebar={sidebar}>
|
|
72
72
|
<PageGroup>
|
|
73
73
|
<PageNavigation>
|
|
74
74
|
<Nav aria-label="Group section navigation" variant="horizontal-subnav">
|
|
@@ -21,7 +21,7 @@ export const PageHorizontalNav: React.FunctionComponent = () => {
|
|
|
21
21
|
</Toolbar>
|
|
22
22
|
);
|
|
23
23
|
|
|
24
|
-
const
|
|
24
|
+
const masthead = (
|
|
25
25
|
<Masthead inset={{ default: 'insetXs' }}>
|
|
26
26
|
<MastheadMain>
|
|
27
27
|
<MastheadBrand href="https://patternfly.org" target="_blank">
|
|
@@ -33,7 +33,7 @@ export const PageHorizontalNav: React.FunctionComponent = () => {
|
|
|
33
33
|
);
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
|
-
<Page
|
|
36
|
+
<Page masthead={masthead}>
|
|
37
37
|
<PageSection>Section 1</PageSection>
|
|
38
38
|
<PageSection variant="secondary">Section 2 with secondary variant styling</PageSection>
|
|
39
39
|
<PageSection>Section 3</PageSection>
|
|
@@ -31,7 +31,7 @@ export const PageMainSectionPadding: React.FunctionComponent = () => {
|
|
|
31
31
|
</Toolbar>
|
|
32
32
|
);
|
|
33
33
|
|
|
34
|
-
const
|
|
34
|
+
const masthead = (
|
|
35
35
|
<Masthead>
|
|
36
36
|
<MastheadToggle>
|
|
37
37
|
<PageToggleButton
|
|
@@ -60,7 +60,7 @@ export const PageMainSectionPadding: React.FunctionComponent = () => {
|
|
|
60
60
|
);
|
|
61
61
|
|
|
62
62
|
return (
|
|
63
|
-
<Page
|
|
63
|
+
<Page masthead={masthead} sidebar={sidebar}>
|
|
64
64
|
<PageSection>Section with default padding</PageSection>
|
|
65
65
|
<PageSection padding={{ default: 'noPadding' }}>Section with no padding</PageSection>
|
|
66
66
|
<PageSection padding={{ default: 'noPadding', md: 'padding' }}>Section with padding on medium</PageSection>
|
|
@@ -31,7 +31,7 @@ export const PageMultipleSidebarBody: React.FunctionComponent = () => {
|
|
|
31
31
|
</Toolbar>
|
|
32
32
|
);
|
|
33
33
|
|
|
34
|
-
const
|
|
34
|
+
const masthead = (
|
|
35
35
|
<Masthead>
|
|
36
36
|
<MastheadToggle>
|
|
37
37
|
<PageToggleButton
|
|
@@ -64,7 +64,7 @@ export const PageMultipleSidebarBody: React.FunctionComponent = () => {
|
|
|
64
64
|
);
|
|
65
65
|
|
|
66
66
|
return (
|
|
67
|
-
<Page
|
|
67
|
+
<Page masthead={masthead} sidebar={sidebar}>
|
|
68
68
|
<PageSection>Section 1</PageSection>
|
|
69
69
|
<PageSection>Section 2</PageSection>
|
|
70
70
|
<PageSection>Section 3</PageSection>
|
|
@@ -25,7 +25,7 @@ export const PageUncontrolledNav: React.FunctionComponent = () => {
|
|
|
25
25
|
</Toolbar>
|
|
26
26
|
);
|
|
27
27
|
|
|
28
|
-
const
|
|
28
|
+
const masthead = (
|
|
29
29
|
<Masthead>
|
|
30
30
|
<MastheadToggle>
|
|
31
31
|
<PageToggleButton variant="plain" aria-label="Global navigation" id="uncontrolled-nav-toggle">
|
|
@@ -48,7 +48,7 @@ export const PageUncontrolledNav: React.FunctionComponent = () => {
|
|
|
48
48
|
);
|
|
49
49
|
|
|
50
50
|
return (
|
|
51
|
-
<Page isManagedSidebar
|
|
51
|
+
<Page isManagedSidebar masthead={masthead} sidebar={sidebar}>
|
|
52
52
|
<PageSection>Section 1</PageSection>
|
|
53
53
|
<PageSection>Section 2</PageSection>
|
|
54
54
|
<PageSection>Section 3</PageSection>
|
|
@@ -31,7 +31,7 @@ export const PageVerticalNav: React.FunctionComponent = () => {
|
|
|
31
31
|
</Toolbar>
|
|
32
32
|
);
|
|
33
33
|
|
|
34
|
-
const
|
|
34
|
+
const masthead = (
|
|
35
35
|
<Masthead>
|
|
36
36
|
<MastheadToggle>
|
|
37
37
|
<PageToggleButton
|
|
@@ -60,7 +60,7 @@ export const PageVerticalNav: React.FunctionComponent = () => {
|
|
|
60
60
|
);
|
|
61
61
|
|
|
62
62
|
return (
|
|
63
|
-
<Page
|
|
63
|
+
<Page masthead={masthead} sidebar={sidebar}>
|
|
64
64
|
<PageSection>Section 1</PageSection>
|
|
65
65
|
<PageSection variant="secondary">Section 2 with secondary variant styling</PageSection>
|
|
66
66
|
<PageSection>Section 3</PageSection>
|
|
@@ -31,7 +31,7 @@ export const PageWithOrWithoutFill: React.FunctionComponent = () => {
|
|
|
31
31
|
</Toolbar>
|
|
32
32
|
);
|
|
33
33
|
|
|
34
|
-
const
|
|
34
|
+
const masthead = (
|
|
35
35
|
<Masthead>
|
|
36
36
|
<MastheadToggle>
|
|
37
37
|
<PageToggleButton
|
|
@@ -60,7 +60,7 @@ export const PageWithOrWithoutFill: React.FunctionComponent = () => {
|
|
|
60
60
|
);
|
|
61
61
|
|
|
62
62
|
return (
|
|
63
|
-
<Page
|
|
63
|
+
<Page masthead={masthead} sidebar={sidebar}>
|
|
64
64
|
<PageSection>A default page section</PageSection>
|
|
65
65
|
<PageSection isFilled={true}>This section fills the available space.</PageSection>
|
|
66
66
|
<PageSection isFilled={false}>
|
|
@@ -49,7 +49,7 @@ export const DashboardWrapper: React.FC<DashboardWrapperProps> = ({
|
|
|
49
49
|
children,
|
|
50
50
|
mainContainerId,
|
|
51
51
|
breadcrumb,
|
|
52
|
-
|
|
52
|
+
masthead,
|
|
53
53
|
sidebar,
|
|
54
54
|
sidebarNavOpen,
|
|
55
55
|
onPageResize,
|
|
@@ -106,7 +106,7 @@ export const DashboardWrapper: React.FC<DashboardWrapperProps> = ({
|
|
|
106
106
|
|
|
107
107
|
return (
|
|
108
108
|
<Page
|
|
109
|
-
|
|
109
|
+
masthead={masthead ?? <DashboardHeader />}
|
|
110
110
|
sidebar={sidebar ?? _sidebar}
|
|
111
111
|
isManagedSidebar
|
|
112
112
|
skipToContent={PageSkipToContent}
|
|
@@ -262,7 +262,7 @@ export const NotificationDrawerBasic: React.FunctionComponent = () => {
|
|
|
262
262
|
</Toolbar>
|
|
263
263
|
);
|
|
264
264
|
|
|
265
|
-
const
|
|
265
|
+
const masthead = (
|
|
266
266
|
<Masthead>
|
|
267
267
|
<MastheadToggle>
|
|
268
268
|
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
@@ -521,7 +521,7 @@ export const NotificationDrawerBasic: React.FunctionComponent = () => {
|
|
|
521
521
|
return (
|
|
522
522
|
<React.Fragment>
|
|
523
523
|
<Page
|
|
524
|
-
|
|
524
|
+
masthead={masthead}
|
|
525
525
|
sidebar={Sidebar}
|
|
526
526
|
isManagedSidebar
|
|
527
527
|
notificationDrawer={notificationDrawer}
|
|
@@ -312,7 +312,7 @@ export const NotificationDrawerGrouped: React.FunctionComponent = () => {
|
|
|
312
312
|
</Toolbar>
|
|
313
313
|
);
|
|
314
314
|
|
|
315
|
-
const
|
|
315
|
+
const masthead = (
|
|
316
316
|
<Masthead>
|
|
317
317
|
<MastheadToggle>
|
|
318
318
|
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
@@ -760,7 +760,7 @@ export const NotificationDrawerGrouped: React.FunctionComponent = () => {
|
|
|
760
760
|
return (
|
|
761
761
|
<React.Fragment>
|
|
762
762
|
<Page
|
|
763
|
-
|
|
763
|
+
masthead={masthead}
|
|
764
764
|
sidebar={Sidebar}
|
|
765
765
|
isManagedSidebar
|
|
766
766
|
notificationDrawer={notificationDrawer}
|
|
@@ -436,7 +436,7 @@ export const PaginatedTableAction = () => {
|
|
|
436
436
|
|
|
437
437
|
return (
|
|
438
438
|
<React.Fragment>
|
|
439
|
-
<Page sidebar={sidebar}
|
|
439
|
+
<Page sidebar={sidebar} masthead={masthead} isManagedSidebar>
|
|
440
440
|
<PageBreadcrumb>
|
|
441
441
|
<Breadcrumb aria-label={translation.breadcrumbs.ariaLabel || undefined}>
|
|
442
442
|
{Object.keys(breadcrumbItems).map((key, idx, arr) => (
|
|
@@ -462,7 +462,7 @@ export const PaginatedTableAction: React.FunctionComponent = () => {
|
|
|
462
462
|
|
|
463
463
|
return (
|
|
464
464
|
<React.Fragment>
|
|
465
|
-
<Page sidebar={sidebar}
|
|
465
|
+
<Page sidebar={sidebar} masthead={masthead} isManagedSidebar>
|
|
466
466
|
<PageBreadcrumb>
|
|
467
467
|
<Breadcrumb aria-label={translation.breadcrumbs.ariaLabel || undefined}>
|
|
468
468
|
{Object.keys(breadcrumbItems).map((key: string, idx: number, arr: string[]) => (
|
|
@@ -310,7 +310,7 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
|
|
|
310
310
|
|
|
311
311
|
return (
|
|
312
312
|
<DashboardWrapper
|
|
313
|
-
|
|
313
|
+
masthead={<DashboardHeader notificationBadge={notificationBadge} />}
|
|
314
314
|
mainContainerId="main-content-page-layout-default-nav"
|
|
315
315
|
notificationDrawer={notificationDrawer}
|
|
316
316
|
isNotificationDrawerExpanded={isDrawerExpanded}
|
|
@@ -55,7 +55,7 @@ export default class DashboardWrapper extends React.Component {
|
|
|
55
55
|
children,
|
|
56
56
|
mainContainerId,
|
|
57
57
|
breadcrumb,
|
|
58
|
-
|
|
58
|
+
masthead,
|
|
59
59
|
sidebar,
|
|
60
60
|
sidebarNavOpen,
|
|
61
61
|
onPageResize = () => {},
|
|
@@ -106,7 +106,7 @@ export default class DashboardWrapper extends React.Component {
|
|
|
106
106
|
|
|
107
107
|
return (
|
|
108
108
|
<Page
|
|
109
|
-
|
|
109
|
+
masthead={masthead !== undefined ? masthead : <DashboardHeader />}
|
|
110
110
|
sidebar={sidebar !== undefined ? sidebar : _sidebar}
|
|
111
111
|
isManagedSidebar
|
|
112
112
|
skipToContent={PageSkipToContent}
|
|
@@ -128,7 +128,7 @@ export const NavDrilldown: React.FunctionComponent = () => {
|
|
|
128
128
|
);
|
|
129
129
|
|
|
130
130
|
return (
|
|
131
|
-
<Page
|
|
131
|
+
<Page masthead={<DashboardHeader />} sidebar={sidebar}>
|
|
132
132
|
<PageSection>
|
|
133
133
|
<strong>Nav Layer: </strong>
|
|
134
134
|
{navLayer}
|
|
@@ -215,7 +215,7 @@ export const NavFlyout: React.FunctionComponent = () => {
|
|
|
215
215
|
</Toolbar>
|
|
216
216
|
);
|
|
217
217
|
|
|
218
|
-
const
|
|
218
|
+
const masthead = (
|
|
219
219
|
<Masthead>
|
|
220
220
|
<MastheadToggle>
|
|
221
221
|
<PageToggleButton
|
|
@@ -263,7 +263,7 @@ export const NavFlyout: React.FunctionComponent = () => {
|
|
|
263
263
|
|
|
264
264
|
return (
|
|
265
265
|
<Page
|
|
266
|
-
|
|
266
|
+
masthead={masthead}
|
|
267
267
|
sidebar={Sidebar}
|
|
268
268
|
onPageResize={onPageResize}
|
|
269
269
|
skipToContent={PageSkipToContent}
|
|
@@ -193,7 +193,7 @@ export const NavHorizontal: React.FunctionComponent = () => {
|
|
|
193
193
|
</ToolbarContent>
|
|
194
194
|
</Toolbar>
|
|
195
195
|
);
|
|
196
|
-
const
|
|
196
|
+
const masthead = (
|
|
197
197
|
<Masthead>
|
|
198
198
|
<MastheadMain>
|
|
199
199
|
<MastheadBrand>
|
|
@@ -209,7 +209,12 @@ export const NavHorizontal: React.FunctionComponent = () => {
|
|
|
209
209
|
|
|
210
210
|
return (
|
|
211
211
|
<React.Fragment>
|
|
212
|
-
<Page
|
|
212
|
+
<Page
|
|
213
|
+
masthead={masthead}
|
|
214
|
+
skipToContent={PageSkipToContent}
|
|
215
|
+
breadcrumb={DashboardBreadcrumb}
|
|
216
|
+
mainContainerId={pageId}
|
|
217
|
+
>
|
|
213
218
|
<PageSection>
|
|
214
219
|
<TextContent>
|
|
215
220
|
<Text component="h1">Main title</Text>
|
|
@@ -242,7 +242,7 @@ export const NavHorizontalWithSubnav: React.FunctionComponent = () => {
|
|
|
242
242
|
</ToolbarContent>
|
|
243
243
|
</Toolbar>
|
|
244
244
|
);
|
|
245
|
-
const
|
|
245
|
+
const masthead = (
|
|
246
246
|
<Masthead>
|
|
247
247
|
<MastheadToggle>
|
|
248
248
|
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
@@ -263,7 +263,7 @@ export const NavHorizontalWithSubnav: React.FunctionComponent = () => {
|
|
|
263
263
|
|
|
264
264
|
return (
|
|
265
265
|
<React.Fragment>
|
|
266
|
-
<Page
|
|
266
|
+
<Page masthead={masthead} skipToContent={PageSkipToContent} mainContainerId={pageId}>
|
|
267
267
|
<PageSection type={PageSectionTypes.subNav} isWidthLimited>
|
|
268
268
|
{SubNav}
|
|
269
269
|
</PageSection>
|