@patternfly/react-core 6.0.0-alpha.91 → 6.0.0-alpha.93
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 +10 -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/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/DualListSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Modal/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 +2 -0
- package/dist/esm/components/Label/Label.d.ts.map +1 -1
- package/dist/esm/components/Label/Label.js +1 -1
- package/dist/esm/components/Label/Label.js.map +1 -1
- package/dist/esm/components/Masthead/MastheadBrand.d.ts +1 -3
- package/dist/esm/components/Masthead/MastheadBrand.d.ts.map +1 -1
- package/dist/esm/components/Masthead/MastheadBrand.js +2 -11
- package/dist/esm/components/Masthead/MastheadBrand.js.map +1 -1
- package/dist/esm/components/Masthead/MastheadLogo.d.ts +11 -0
- package/dist/esm/components/Masthead/MastheadLogo.d.ts.map +1 -0
- package/dist/esm/components/Masthead/MastheadLogo.js +19 -0
- package/dist/esm/components/Masthead/MastheadLogo.js.map +1 -0
- package/dist/esm/components/Masthead/index.d.ts +1 -0
- package/dist/esm/components/Masthead/index.d.ts.map +1 -1
- package/dist/esm/components/Masthead/index.js +1 -0
- package/dist/esm/components/Masthead/index.js.map +1 -1
- package/dist/esm/demos/DashboardHeader.d.ts.map +1 -1
- package/dist/esm/demos/DashboardHeader.js +6 -5
- package/dist/esm/demos/DashboardHeader.js.map +1 -1
- package/dist/js/components/Label/Label.d.ts.map +1 -1
- package/dist/js/components/Label/Label.js +1 -1
- package/dist/js/components/Label/Label.js.map +1 -1
- package/dist/js/components/Masthead/MastheadBrand.d.ts +1 -3
- package/dist/js/components/Masthead/MastheadBrand.d.ts.map +1 -1
- package/dist/js/components/Masthead/MastheadBrand.js +2 -11
- package/dist/js/components/Masthead/MastheadBrand.js.map +1 -1
- package/dist/js/components/Masthead/MastheadLogo.d.ts +11 -0
- package/dist/js/components/Masthead/MastheadLogo.d.ts.map +1 -0
- package/dist/js/components/Masthead/MastheadLogo.js +23 -0
- package/dist/js/components/Masthead/MastheadLogo.js.map +1 -0
- package/dist/js/components/Masthead/index.d.ts +1 -0
- package/dist/js/components/Masthead/index.d.ts.map +1 -1
- package/dist/js/components/Masthead/index.js +1 -0
- package/dist/js/components/Masthead/index.js.map +1 -1
- package/dist/js/demos/DashboardHeader.d.ts.map +1 -1
- package/dist/js/demos/DashboardHeader.js +5 -4
- package/dist/js/demos/DashboardHeader.js.map +1 -1
- package/dist/umd/assets/{output-B27G637D.css → output-DHPAPKR8.css} +19065 -18950
- 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/Label/Label.tsx +1 -0
- package/src/components/Label/__tests__/Label.test.tsx +7 -0
- package/src/components/Label/__tests__/__snapshots__/Label.test.tsx.snap +19 -0
- package/src/components/Label/__tests__/__snapshots__/LabelGroup.test.tsx.snap +1 -0
- package/src/components/Masthead/MastheadBrand.tsx +6 -20
- package/src/components/Masthead/MastheadLogo.tsx +35 -0
- package/src/components/Masthead/__tests__/Masthead.test.tsx +14 -12
- package/src/components/Masthead/__tests__/__snapshots__/Masthead.test.tsx.snap +44 -40
- package/src/components/Masthead/examples/Masthead.md +3 -3
- package/src/components/Masthead/examples/MastheadBasic.tsx +15 -5
- package/src/components/Masthead/examples/MastheadBasicMixedContent.tsx +8 -5
- package/src/components/Masthead/examples/MastheadDisplayInline.tsx +15 -5
- package/src/components/Masthead/examples/MastheadDisplayStack.tsx +15 -5
- package/src/components/Masthead/examples/MastheadDisplayStackInlineResponsive.tsx +15 -5
- package/src/components/Masthead/examples/MastheadIconRouterLink.tsx +9 -6
- package/src/components/Masthead/examples/MastheadInsets.tsx +15 -5
- package/src/components/Masthead/index.ts +1 -0
- package/src/components/Page/examples/Page.md +4 -1
- package/src/components/Page/examples/PageCenteredSection.tsx +17 -14
- package/src/components/Page/examples/PageGroupSection.tsx +17 -14
- package/src/components/Page/examples/PageHorizontalNav.tsx +5 -2
- package/src/components/Page/examples/PageMainSectionPadding.tsx +17 -14
- package/src/components/Page/examples/PageMainSectionVariations.tsx +17 -14
- package/src/components/Page/examples/PageMultipleSidebarBody.tsx +17 -14
- package/src/components/Page/examples/PageUncontrolledNav.tsx +11 -8
- package/src/components/Page/examples/PageVerticalNav.tsx +17 -14
- package/src/components/Page/examples/PageWithOrWithoutFill.tsx +17 -14
- package/src/demos/DashboardHeader.tsx +10 -7
- package/src/demos/Masthead.md +2 -0
- package/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +10 -7
- package/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +10 -7
- package/src/demos/RTL/examples/PaginatedTable.jsx +13 -10
- package/src/demos/RTL/examples/PaginatedTable.tsx +13 -10
- package/src/demos/examples/Masthead/MastheadWithHorizontalNav.tsx +6 -3
- package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +11 -8
- package/src/demos/examples/Nav/NavFlyout.tsx +15 -12
- package/src/demos/examples/Nav/NavHorizontal.tsx +4 -1
- package/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx +11 -8
- package/src/demos/examples/Nav/NavManual.tsx +15 -12
- package/src/demos/examples/Page/PageContextSelector.tsx +11 -8
- package/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +11 -8
- package/src/demos/examples/Page/PageStickySectionGroup.tsx +11 -8
- package/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +11 -8
- package/src/demos/examples/Wizard/InPageWithDrawer.tsx +11 -8
- package/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx +11 -8
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Masthead,
|
|
4
|
+
MastheadMain,
|
|
5
|
+
MastheadToggle,
|
|
6
|
+
MastheadBrand,
|
|
7
|
+
MastheadLogo,
|
|
8
|
+
MastheadContent,
|
|
9
|
+
Button
|
|
10
|
+
} from '@patternfly/react-core';
|
|
3
11
|
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
|
|
4
12
|
|
|
5
13
|
export const MastheadInsets: React.FunctionComponent = () => (
|
|
6
14
|
<Masthead id="inset-masthead" inset={{ default: 'insetSm' }}>
|
|
7
|
-
<MastheadToggle>
|
|
8
|
-
<Button variant="plain" onClick={() => {}} aria-label="Global navigation" icon={<BarsIcon />} />
|
|
9
|
-
</MastheadToggle>
|
|
10
15
|
<MastheadMain>
|
|
11
|
-
<
|
|
16
|
+
<MastheadToggle>
|
|
17
|
+
<Button variant="plain" onClick={() => {}} aria-label="Global navigation" icon={<BarsIcon />} />
|
|
18
|
+
</MastheadToggle>
|
|
19
|
+
<MastheadBrand>
|
|
20
|
+
<MastheadLogo component="a">Logo</MastheadLogo>
|
|
21
|
+
</MastheadBrand>
|
|
12
22
|
</MastheadMain>
|
|
13
23
|
<MastheadContent>
|
|
14
24
|
<span>Content</span>
|
|
@@ -16,7 +16,10 @@ import c_page_section_m_limit_width_MaxWidth from '@patternfly/react-tokens/dist
|
|
|
16
16
|
A page will typically contain the following components:
|
|
17
17
|
|
|
18
18
|
- A `<Page>` with a `masthead` prop that often contains a [masthead](/components/masthead) component
|
|
19
|
-
|
|
19
|
+
|
|
20
|
+
The `<MastheadMain>` component includes the smaller area that typically contains the `<MastheadToggle>` and a `<MastheadLogo>`. `<MastheadContent>` represents the main portion of the masthead, and will typically contain a `<Toolbar>` or other menu-like components, like a `<Dropdown>`.
|
|
21
|
+
|
|
22
|
+
- Mastheads contain a `<MastheadMain>` component, which includes the `<MastheadToggle>`, a `<MastheadLogo>`, and the page's toolbar (via `<MastheadContent>`.) The `<MastheadToggle>` component contains a `<PageToggleButton>`, and the `<MastheadLogo>` component contains a `<MastheadBrand>`.
|
|
20
23
|
- 1 or more `<PageSidebarBody>` components inside `<PageSidebar>` for vertical navigation or other sidebar content
|
|
21
24
|
- 1 or more `<PageSection>` components
|
|
22
25
|
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
Page,
|
|
4
4
|
Masthead,
|
|
5
|
-
MastheadToggle,
|
|
6
5
|
MastheadMain,
|
|
6
|
+
MastheadToggle,
|
|
7
7
|
MastheadBrand,
|
|
8
|
+
MastheadLogo,
|
|
8
9
|
MastheadContent,
|
|
9
10
|
PageSidebar,
|
|
10
11
|
PageSidebarBody,
|
|
@@ -37,20 +38,22 @@ export const PageCenteredSection: React.FunctionComponent = () => {
|
|
|
37
38
|
|
|
38
39
|
const masthead = (
|
|
39
40
|
<Masthead>
|
|
40
|
-
<MastheadToggle>
|
|
41
|
-
<PageToggleButton
|
|
42
|
-
variant="plain"
|
|
43
|
-
aria-label="Global navigation"
|
|
44
|
-
isSidebarOpen={isSidebarOpen}
|
|
45
|
-
onSidebarToggle={onSidebarToggle}
|
|
46
|
-
id="centered-nav-toggle"
|
|
47
|
-
>
|
|
48
|
-
<BarsIcon />
|
|
49
|
-
</PageToggleButton>
|
|
50
|
-
</MastheadToggle>
|
|
51
41
|
<MastheadMain>
|
|
52
|
-
<
|
|
53
|
-
|
|
42
|
+
<MastheadToggle>
|
|
43
|
+
<PageToggleButton
|
|
44
|
+
variant="plain"
|
|
45
|
+
aria-label="Global navigation"
|
|
46
|
+
isSidebarOpen={isSidebarOpen}
|
|
47
|
+
onSidebarToggle={onSidebarToggle}
|
|
48
|
+
id="centered-nav-toggle"
|
|
49
|
+
>
|
|
50
|
+
<BarsIcon />
|
|
51
|
+
</PageToggleButton>
|
|
52
|
+
</MastheadToggle>
|
|
53
|
+
<MastheadBrand>
|
|
54
|
+
<MastheadLogo href="https://patternfly.org" target="_blank">
|
|
55
|
+
Logo
|
|
56
|
+
</MastheadLogo>
|
|
54
57
|
</MastheadBrand>
|
|
55
58
|
</MastheadMain>
|
|
56
59
|
<MastheadContent>{headerToolbar}</MastheadContent>
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
Page,
|
|
4
4
|
Masthead,
|
|
5
|
-
MastheadToggle,
|
|
6
5
|
MastheadMain,
|
|
6
|
+
MastheadToggle,
|
|
7
7
|
MastheadBrand,
|
|
8
|
+
MastheadLogo,
|
|
8
9
|
MastheadContent,
|
|
9
10
|
PageSidebar,
|
|
10
11
|
PageSidebarBody,
|
|
@@ -40,20 +41,22 @@ export const PageGroupSection: React.FunctionComponent = () => {
|
|
|
40
41
|
|
|
41
42
|
const masthead = (
|
|
42
43
|
<Masthead>
|
|
43
|
-
<MastheadToggle>
|
|
44
|
-
<PageToggleButton
|
|
45
|
-
variant="plain"
|
|
46
|
-
aria-label="Global navigation"
|
|
47
|
-
isSidebarOpen={isSidebarOpen}
|
|
48
|
-
onSidebarToggle={onSidebarToggle}
|
|
49
|
-
id="group-section-nav-toggle"
|
|
50
|
-
>
|
|
51
|
-
<BarsIcon />
|
|
52
|
-
</PageToggleButton>
|
|
53
|
-
</MastheadToggle>
|
|
54
44
|
<MastheadMain>
|
|
55
|
-
<
|
|
56
|
-
|
|
45
|
+
<MastheadToggle>
|
|
46
|
+
<PageToggleButton
|
|
47
|
+
variant="plain"
|
|
48
|
+
aria-label="Global navigation"
|
|
49
|
+
isSidebarOpen={isSidebarOpen}
|
|
50
|
+
onSidebarToggle={onSidebarToggle}
|
|
51
|
+
id="group-section-nav-toggle"
|
|
52
|
+
>
|
|
53
|
+
<BarsIcon />
|
|
54
|
+
</PageToggleButton>
|
|
55
|
+
</MastheadToggle>
|
|
56
|
+
<MastheadBrand>
|
|
57
|
+
<MastheadLogo href="https://patternfly.org" target="_blank">
|
|
58
|
+
Logo
|
|
59
|
+
</MastheadLogo>
|
|
57
60
|
</MastheadBrand>
|
|
58
61
|
</MastheadMain>
|
|
59
62
|
<MastheadContent>{headerToolbar}</MastheadContent>
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
Masthead,
|
|
5
5
|
MastheadMain,
|
|
6
6
|
MastheadBrand,
|
|
7
|
+
MastheadLogo,
|
|
7
8
|
MastheadContent,
|
|
8
9
|
PageSection,
|
|
9
10
|
Toolbar,
|
|
@@ -24,8 +25,10 @@ export const PageHorizontalNav: React.FunctionComponent = () => {
|
|
|
24
25
|
const masthead = (
|
|
25
26
|
<Masthead inset={{ default: 'insetXs' }}>
|
|
26
27
|
<MastheadMain>
|
|
27
|
-
<MastheadBrand
|
|
28
|
-
|
|
28
|
+
<MastheadBrand>
|
|
29
|
+
<MastheadLogo href="https://patternfly.org" target="_blank">
|
|
30
|
+
Logo
|
|
31
|
+
</MastheadLogo>
|
|
29
32
|
</MastheadBrand>
|
|
30
33
|
</MastheadMain>
|
|
31
34
|
<MastheadContent>{headerToolbar}</MastheadContent>
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
Page,
|
|
4
4
|
Masthead,
|
|
5
|
-
MastheadToggle,
|
|
6
5
|
MastheadMain,
|
|
6
|
+
MastheadToggle,
|
|
7
7
|
MastheadBrand,
|
|
8
|
+
MastheadLogo,
|
|
8
9
|
MastheadContent,
|
|
9
10
|
PageSidebar,
|
|
10
11
|
PageSidebarBody,
|
|
@@ -33,20 +34,22 @@ export const PageMainSectionPadding: React.FunctionComponent = () => {
|
|
|
33
34
|
|
|
34
35
|
const masthead = (
|
|
35
36
|
<Masthead>
|
|
36
|
-
<MastheadToggle>
|
|
37
|
-
<PageToggleButton
|
|
38
|
-
variant="plain"
|
|
39
|
-
aria-label="Global navigation"
|
|
40
|
-
isSidebarOpen={isSidebarOpen}
|
|
41
|
-
onSidebarToggle={onSidebarToggle}
|
|
42
|
-
id="main-padding-nav-toggle"
|
|
43
|
-
>
|
|
44
|
-
<BarsIcon />
|
|
45
|
-
</PageToggleButton>
|
|
46
|
-
</MastheadToggle>
|
|
47
37
|
<MastheadMain>
|
|
48
|
-
<
|
|
49
|
-
|
|
38
|
+
<MastheadToggle>
|
|
39
|
+
<PageToggleButton
|
|
40
|
+
variant="plain"
|
|
41
|
+
aria-label="Global navigation"
|
|
42
|
+
isSidebarOpen={isSidebarOpen}
|
|
43
|
+
onSidebarToggle={onSidebarToggle}
|
|
44
|
+
id="main-padding-nav-toggle"
|
|
45
|
+
>
|
|
46
|
+
<BarsIcon />
|
|
47
|
+
</PageToggleButton>
|
|
48
|
+
</MastheadToggle>
|
|
49
|
+
<MastheadBrand>
|
|
50
|
+
<MastheadLogo href="https://patternfly.org" target="_blank">
|
|
51
|
+
Logo
|
|
52
|
+
</MastheadLogo>
|
|
50
53
|
</MastheadBrand>
|
|
51
54
|
</MastheadMain>
|
|
52
55
|
<MastheadContent>{headerToolbar}</MastheadContent>
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
Page,
|
|
4
4
|
Masthead,
|
|
5
|
-
MastheadToggle,
|
|
6
5
|
MastheadMain,
|
|
6
|
+
MastheadToggle,
|
|
7
7
|
MastheadBrand,
|
|
8
|
+
MastheadLogo,
|
|
8
9
|
MastheadContent,
|
|
9
10
|
PageSidebar,
|
|
10
11
|
PageSidebarBody,
|
|
@@ -33,20 +34,22 @@ export const PageMainSectionPadding: React.FunctionComponent = () => {
|
|
|
33
34
|
|
|
34
35
|
const header = (
|
|
35
36
|
<Masthead>
|
|
36
|
-
<MastheadToggle>
|
|
37
|
-
<PageToggleButton
|
|
38
|
-
variant="plain"
|
|
39
|
-
aria-label="Global navigation"
|
|
40
|
-
isSidebarOpen={isSidebarOpen}
|
|
41
|
-
onSidebarToggle={onSidebarToggle}
|
|
42
|
-
id="main-variations-nav-toggle"
|
|
43
|
-
>
|
|
44
|
-
<BarsIcon />
|
|
45
|
-
</PageToggleButton>
|
|
46
|
-
</MastheadToggle>
|
|
47
37
|
<MastheadMain>
|
|
48
|
-
<
|
|
49
|
-
|
|
38
|
+
<MastheadToggle>
|
|
39
|
+
<PageToggleButton
|
|
40
|
+
variant="plain"
|
|
41
|
+
aria-label="Global navigation"
|
|
42
|
+
isSidebarOpen={isSidebarOpen}
|
|
43
|
+
onSidebarToggle={onSidebarToggle}
|
|
44
|
+
id="main-variations-nav-toggle"
|
|
45
|
+
>
|
|
46
|
+
<BarsIcon />
|
|
47
|
+
</PageToggleButton>
|
|
48
|
+
</MastheadToggle>
|
|
49
|
+
<MastheadBrand>
|
|
50
|
+
<MastheadLogo href="https://patternfly.org" target="_blank">
|
|
51
|
+
Logo
|
|
52
|
+
</MastheadLogo>
|
|
50
53
|
</MastheadBrand>
|
|
51
54
|
</MastheadMain>
|
|
52
55
|
<MastheadContent>{headerToolbar}</MastheadContent>
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
Page,
|
|
4
4
|
Masthead,
|
|
5
|
-
MastheadToggle,
|
|
6
5
|
MastheadMain,
|
|
6
|
+
MastheadToggle,
|
|
7
7
|
MastheadBrand,
|
|
8
|
+
MastheadLogo,
|
|
8
9
|
MastheadContent,
|
|
9
10
|
PageSidebar,
|
|
10
11
|
PageSidebarBody,
|
|
@@ -33,20 +34,22 @@ export const PageMultipleSidebarBody: React.FunctionComponent = () => {
|
|
|
33
34
|
|
|
34
35
|
const masthead = (
|
|
35
36
|
<Masthead>
|
|
36
|
-
<MastheadToggle>
|
|
37
|
-
<PageToggleButton
|
|
38
|
-
variant="plain"
|
|
39
|
-
aria-label="Global navigation"
|
|
40
|
-
isSidebarOpen={isSidebarOpen}
|
|
41
|
-
onSidebarToggle={onSidebarToggle}
|
|
42
|
-
id="multiple-sidebar-body-nav-toggle"
|
|
43
|
-
>
|
|
44
|
-
<BarsIcon />
|
|
45
|
-
</PageToggleButton>
|
|
46
|
-
</MastheadToggle>
|
|
47
37
|
<MastheadMain>
|
|
48
|
-
<
|
|
49
|
-
|
|
38
|
+
<MastheadToggle>
|
|
39
|
+
<PageToggleButton
|
|
40
|
+
variant="plain"
|
|
41
|
+
aria-label="Global navigation"
|
|
42
|
+
isSidebarOpen={isSidebarOpen}
|
|
43
|
+
onSidebarToggle={onSidebarToggle}
|
|
44
|
+
id="multiple-sidebar-body-nav-toggle"
|
|
45
|
+
>
|
|
46
|
+
<BarsIcon />
|
|
47
|
+
</PageToggleButton>
|
|
48
|
+
</MastheadToggle>
|
|
49
|
+
<MastheadBrand>
|
|
50
|
+
<MastheadLogo href="https://patternfly.org" target="_blank">
|
|
51
|
+
Logo
|
|
52
|
+
</MastheadLogo>
|
|
50
53
|
</MastheadBrand>
|
|
51
54
|
</MastheadMain>
|
|
52
55
|
<MastheadContent>{headerToolbar}</MastheadContent>
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
Page,
|
|
4
4
|
Masthead,
|
|
5
|
-
MastheadToggle,
|
|
6
5
|
MastheadMain,
|
|
6
|
+
MastheadToggle,
|
|
7
7
|
MastheadBrand,
|
|
8
|
+
MastheadLogo,
|
|
8
9
|
MastheadContent,
|
|
9
10
|
PageSidebar,
|
|
10
11
|
PageSidebarBody,
|
|
@@ -27,14 +28,16 @@ export const PageUncontrolledNav: React.FunctionComponent = () => {
|
|
|
27
28
|
|
|
28
29
|
const masthead = (
|
|
29
30
|
<Masthead>
|
|
30
|
-
<MastheadToggle>
|
|
31
|
-
<PageToggleButton variant="plain" aria-label="Global navigation" id="uncontrolled-nav-toggle">
|
|
32
|
-
<BarsIcon />
|
|
33
|
-
</PageToggleButton>
|
|
34
|
-
</MastheadToggle>
|
|
35
31
|
<MastheadMain>
|
|
36
|
-
<
|
|
37
|
-
|
|
32
|
+
<MastheadToggle>
|
|
33
|
+
<PageToggleButton variant="plain" aria-label="Global navigation" id="uncontrolled-nav-toggle">
|
|
34
|
+
<BarsIcon />
|
|
35
|
+
</PageToggleButton>
|
|
36
|
+
</MastheadToggle>
|
|
37
|
+
<MastheadBrand>
|
|
38
|
+
<MastheadLogo href="https://patternfly.org" target="_blank">
|
|
39
|
+
Logo
|
|
40
|
+
</MastheadLogo>
|
|
38
41
|
</MastheadBrand>
|
|
39
42
|
</MastheadMain>
|
|
40
43
|
<MastheadContent>{headerToolbar}</MastheadContent>
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
Page,
|
|
4
4
|
Masthead,
|
|
5
|
-
MastheadToggle,
|
|
6
5
|
MastheadMain,
|
|
6
|
+
MastheadToggle,
|
|
7
7
|
MastheadBrand,
|
|
8
|
+
MastheadLogo,
|
|
8
9
|
MastheadContent,
|
|
9
10
|
PageSidebar,
|
|
10
11
|
PageSidebarBody,
|
|
@@ -33,20 +34,22 @@ export const PageVerticalNav: React.FunctionComponent = () => {
|
|
|
33
34
|
|
|
34
35
|
const masthead = (
|
|
35
36
|
<Masthead>
|
|
36
|
-
<MastheadToggle>
|
|
37
|
-
<PageToggleButton
|
|
38
|
-
variant="plain"
|
|
39
|
-
aria-label="Global navigation"
|
|
40
|
-
isSidebarOpen={isSidebarOpen}
|
|
41
|
-
onSidebarToggle={onSidebarToggle}
|
|
42
|
-
id="vertical-nav-toggle"
|
|
43
|
-
>
|
|
44
|
-
<BarsIcon />
|
|
45
|
-
</PageToggleButton>
|
|
46
|
-
</MastheadToggle>
|
|
47
37
|
<MastheadMain>
|
|
48
|
-
<
|
|
49
|
-
|
|
38
|
+
<MastheadToggle>
|
|
39
|
+
<PageToggleButton
|
|
40
|
+
variant="plain"
|
|
41
|
+
aria-label="Global navigation"
|
|
42
|
+
isSidebarOpen={isSidebarOpen}
|
|
43
|
+
onSidebarToggle={onSidebarToggle}
|
|
44
|
+
id="vertical-nav-toggle"
|
|
45
|
+
>
|
|
46
|
+
<BarsIcon />
|
|
47
|
+
</PageToggleButton>
|
|
48
|
+
</MastheadToggle>
|
|
49
|
+
<MastheadBrand>
|
|
50
|
+
<MastheadLogo href="https://patternfly.org" target="_blank">
|
|
51
|
+
Logo
|
|
52
|
+
</MastheadLogo>
|
|
50
53
|
</MastheadBrand>
|
|
51
54
|
</MastheadMain>
|
|
52
55
|
<MastheadContent>{headerToolbar}</MastheadContent>
|
|
@@ -2,9 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
Page,
|
|
4
4
|
Masthead,
|
|
5
|
-
MastheadToggle,
|
|
6
5
|
MastheadMain,
|
|
6
|
+
MastheadToggle,
|
|
7
7
|
MastheadBrand,
|
|
8
|
+
MastheadLogo,
|
|
8
9
|
MastheadContent,
|
|
9
10
|
PageSidebar,
|
|
10
11
|
PageSidebarBody,
|
|
@@ -33,20 +34,22 @@ export const PageWithOrWithoutFill: React.FunctionComponent = () => {
|
|
|
33
34
|
|
|
34
35
|
const masthead = (
|
|
35
36
|
<Masthead>
|
|
36
|
-
<MastheadToggle>
|
|
37
|
-
<PageToggleButton
|
|
38
|
-
variant="plain"
|
|
39
|
-
aria-label="Global navigation"
|
|
40
|
-
isSidebarOpen={isSidebarOpen}
|
|
41
|
-
onSidebarToggle={onSidebarToggle}
|
|
42
|
-
id="fill-nav-toggle"
|
|
43
|
-
>
|
|
44
|
-
<BarsIcon />
|
|
45
|
-
</PageToggleButton>
|
|
46
|
-
</MastheadToggle>
|
|
47
37
|
<MastheadMain>
|
|
48
|
-
<
|
|
49
|
-
|
|
38
|
+
<MastheadToggle>
|
|
39
|
+
<PageToggleButton
|
|
40
|
+
variant="plain"
|
|
41
|
+
aria-label="Global navigation"
|
|
42
|
+
isSidebarOpen={isSidebarOpen}
|
|
43
|
+
onSidebarToggle={onSidebarToggle}
|
|
44
|
+
id="fill-nav-toggle"
|
|
45
|
+
>
|
|
46
|
+
<BarsIcon />
|
|
47
|
+
</PageToggleButton>
|
|
48
|
+
</MastheadToggle>
|
|
49
|
+
<MastheadBrand>
|
|
50
|
+
<MastheadLogo href="https://patternfly.org" target="_blank">
|
|
51
|
+
Logo
|
|
52
|
+
</MastheadLogo>
|
|
50
53
|
</MastheadBrand>
|
|
51
54
|
</MastheadMain>
|
|
52
55
|
<MastheadContent>{headerToolbar}</MastheadContent>
|
|
@@ -10,9 +10,10 @@ import {
|
|
|
10
10
|
DropdownItem,
|
|
11
11
|
DropdownList,
|
|
12
12
|
Masthead,
|
|
13
|
-
MastheadToggle,
|
|
14
13
|
MastheadMain,
|
|
14
|
+
MastheadToggle,
|
|
15
15
|
MastheadBrand,
|
|
16
|
+
MastheadLogo,
|
|
16
17
|
MastheadContent,
|
|
17
18
|
MenuToggle,
|
|
18
19
|
Toolbar,
|
|
@@ -85,14 +86,16 @@ export const DashboardHeader: React.FC<DashboardHeaderProps> = ({ notificationBa
|
|
|
85
86
|
|
|
86
87
|
return (
|
|
87
88
|
<Masthead>
|
|
88
|
-
<MastheadToggle>
|
|
89
|
-
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
90
|
-
<BarsIcon />
|
|
91
|
-
</PageToggleButton>
|
|
92
|
-
</MastheadToggle>
|
|
93
89
|
<MastheadMain>
|
|
90
|
+
<MastheadToggle>
|
|
91
|
+
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
92
|
+
<BarsIcon />
|
|
93
|
+
</PageToggleButton>
|
|
94
|
+
</MastheadToggle>
|
|
94
95
|
<MastheadBrand>
|
|
95
|
-
<
|
|
96
|
+
<MastheadLogo>
|
|
97
|
+
<Brand src={pfLogo} alt="PatternFly" heights={{ default: '36px' }} />
|
|
98
|
+
</MastheadLogo>
|
|
96
99
|
</MastheadBrand>
|
|
97
100
|
</MastheadMain>
|
|
98
101
|
<MastheadContent>
|
package/src/demos/Masthead.md
CHANGED
|
@@ -4,10 +4,12 @@ section: components
|
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
|
|
7
|
+
import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
|
|
7
8
|
import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon';
|
|
8
9
|
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
|
|
9
10
|
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
|
|
10
11
|
import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
|
|
12
|
+
import ThIcon from '@patternfly/react-icons/dist/esm/icons/th-icon';
|
|
11
13
|
import imgAvatar from '@patternfly/react-core/src/components/assets/avatarImg.svg';
|
|
12
14
|
import pfIcon from './assets/pf-logo-small.svg';
|
|
13
15
|
import pfLogo from './assets/PF-HorizontalLogo-Color.svg';
|
|
@@ -36,9 +36,10 @@ import {
|
|
|
36
36
|
PageToggleButton,
|
|
37
37
|
Masthead,
|
|
38
38
|
MastheadMain,
|
|
39
|
+
MastheadBrand,
|
|
39
40
|
MastheadToggle,
|
|
40
41
|
MastheadContent,
|
|
41
|
-
|
|
42
|
+
MastheadLogo,
|
|
42
43
|
Toolbar,
|
|
43
44
|
ToolbarItem,
|
|
44
45
|
ToolbarGroup,
|
|
@@ -259,14 +260,16 @@ export const NotificationDrawerBasic: React.FunctionComponent = () => {
|
|
|
259
260
|
|
|
260
261
|
const masthead = (
|
|
261
262
|
<Masthead>
|
|
262
|
-
<MastheadToggle>
|
|
263
|
-
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
264
|
-
<BarsIcon />
|
|
265
|
-
</PageToggleButton>
|
|
266
|
-
</MastheadToggle>
|
|
267
263
|
<MastheadMain>
|
|
264
|
+
<MastheadToggle>
|
|
265
|
+
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
266
|
+
<BarsIcon />
|
|
267
|
+
</PageToggleButton>
|
|
268
|
+
</MastheadToggle>
|
|
268
269
|
<MastheadBrand>
|
|
269
|
-
<
|
|
270
|
+
<MastheadLogo>
|
|
271
|
+
<Brand src={pfLogo} alt="PatternFly" heights={{ default: '36px' }} />
|
|
272
|
+
</MastheadLogo>
|
|
270
273
|
</MastheadBrand>
|
|
271
274
|
</MastheadMain>
|
|
272
275
|
<MastheadContent>{headerToolbar}</MastheadContent>
|
|
@@ -38,9 +38,10 @@ import {
|
|
|
38
38
|
PageToggleButton,
|
|
39
39
|
Masthead,
|
|
40
40
|
MastheadMain,
|
|
41
|
+
MastheadBrand,
|
|
41
42
|
MastheadToggle,
|
|
42
43
|
MastheadContent,
|
|
43
|
-
|
|
44
|
+
MastheadLogo,
|
|
44
45
|
Toolbar,
|
|
45
46
|
ToolbarItem,
|
|
46
47
|
ToolbarGroup,
|
|
@@ -309,14 +310,16 @@ export const NotificationDrawerGrouped: React.FunctionComponent = () => {
|
|
|
309
310
|
|
|
310
311
|
const masthead = (
|
|
311
312
|
<Masthead>
|
|
312
|
-
<MastheadToggle>
|
|
313
|
-
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
314
|
-
<BarsIcon />
|
|
315
|
-
</PageToggleButton>
|
|
316
|
-
</MastheadToggle>
|
|
317
313
|
<MastheadMain>
|
|
314
|
+
<MastheadToggle>
|
|
315
|
+
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
316
|
+
<BarsIcon />
|
|
317
|
+
</PageToggleButton>
|
|
318
|
+
</MastheadToggle>
|
|
318
319
|
<MastheadBrand>
|
|
319
|
-
<
|
|
320
|
+
<MastheadLogo>
|
|
321
|
+
<Brand src={pfLogo} alt="PatternFly" heights={{ default: '36px' }} />
|
|
322
|
+
</MastheadLogo>
|
|
320
323
|
</MastheadBrand>
|
|
321
324
|
</MastheadMain>
|
|
322
325
|
<MastheadContent>{headerToolbar}</MastheadContent>
|
|
@@ -17,9 +17,10 @@ import {
|
|
|
17
17
|
Icon,
|
|
18
18
|
Label,
|
|
19
19
|
Masthead,
|
|
20
|
-
MastheadBrand,
|
|
21
|
-
MastheadContent,
|
|
22
20
|
MastheadMain,
|
|
21
|
+
MastheadLogo,
|
|
22
|
+
MastheadContent,
|
|
23
|
+
MastheadBrand,
|
|
23
24
|
MastheadToggle,
|
|
24
25
|
MenuToggle,
|
|
25
26
|
Nav,
|
|
@@ -323,15 +324,17 @@ export const PaginatedTableAction = () => {
|
|
|
323
324
|
|
|
324
325
|
const masthead = (
|
|
325
326
|
<Masthead>
|
|
326
|
-
<MastheadToggle>
|
|
327
|
-
<PageToggleButton variant="plain" aria-label={translation.mastheadToggleAriaLabel}>
|
|
328
|
-
<BarsIcon />
|
|
329
|
-
</PageToggleButton>
|
|
330
|
-
</MastheadToggle>
|
|
331
327
|
<MastheadMain>
|
|
332
|
-
<
|
|
333
|
-
<
|
|
334
|
-
|
|
328
|
+
<MastheadToggle>
|
|
329
|
+
<PageToggleButton variant="plain" aria-label={translation.mastheadToggleAriaLabel}>
|
|
330
|
+
<BarsIcon />
|
|
331
|
+
</PageToggleButton>
|
|
332
|
+
</MastheadToggle>
|
|
333
|
+
<MastheadBrand>
|
|
334
|
+
<MastheadLogo dir="ltr">
|
|
335
|
+
<Brand src={pfLogo} alt="PatternFly" heights={{ default: '36px' }} />
|
|
336
|
+
{translation.brandLanguage && <span className="brand-language">{translation.brandLanguage}</span>}
|
|
337
|
+
</MastheadLogo>
|
|
335
338
|
</MastheadBrand>
|
|
336
339
|
</MastheadMain>
|
|
337
340
|
<MastheadContent>
|
|
@@ -17,9 +17,10 @@ import {
|
|
|
17
17
|
Icon,
|
|
18
18
|
Label,
|
|
19
19
|
Masthead,
|
|
20
|
-
MastheadBrand,
|
|
21
|
-
MastheadContent,
|
|
22
20
|
MastheadMain,
|
|
21
|
+
MastheadLogo,
|
|
22
|
+
MastheadContent,
|
|
23
|
+
MastheadBrand,
|
|
23
24
|
MastheadToggle,
|
|
24
25
|
MenuToggle,
|
|
25
26
|
Nav,
|
|
@@ -347,15 +348,17 @@ export const PaginatedTableAction: React.FunctionComponent = () => {
|
|
|
347
348
|
|
|
348
349
|
const masthead = (
|
|
349
350
|
<Masthead>
|
|
350
|
-
<MastheadToggle>
|
|
351
|
-
<PageToggleButton variant="plain" aria-label={translation.mastheadToggleAriaLabel}>
|
|
352
|
-
<BarsIcon />
|
|
353
|
-
</PageToggleButton>
|
|
354
|
-
</MastheadToggle>
|
|
355
351
|
<MastheadMain>
|
|
356
|
-
<
|
|
357
|
-
<
|
|
358
|
-
|
|
352
|
+
<MastheadToggle>
|
|
353
|
+
<PageToggleButton variant="plain" aria-label={translation.mastheadToggleAriaLabel}>
|
|
354
|
+
<BarsIcon />
|
|
355
|
+
</PageToggleButton>
|
|
356
|
+
</MastheadToggle>
|
|
357
|
+
<MastheadBrand>
|
|
358
|
+
<MastheadLogo dir="ltr">
|
|
359
|
+
<Brand src={pfLogo} alt="PatternFly" heights={{ default: '36px' }} />
|
|
360
|
+
{translation.brandLanguage && <span className="brand-language">{translation.brandLanguage}</span>}
|
|
361
|
+
</MastheadLogo>
|
|
359
362
|
</MastheadBrand>
|
|
360
363
|
</MastheadMain>
|
|
361
364
|
<MastheadContent>
|
|
@@ -16,9 +16,10 @@ import {
|
|
|
16
16
|
Gallery,
|
|
17
17
|
GalleryItem,
|
|
18
18
|
Masthead,
|
|
19
|
-
MastheadBrand,
|
|
20
|
-
MastheadContent,
|
|
21
19
|
MastheadMain,
|
|
20
|
+
MastheadLogo,
|
|
21
|
+
MastheadContent,
|
|
22
|
+
MastheadBrand,
|
|
22
23
|
MenuToggle,
|
|
23
24
|
MenuToggleElement,
|
|
24
25
|
Nav,
|
|
@@ -273,7 +274,9 @@ export const MastheadWithHorizontalNav: React.FunctionComponent = () => {
|
|
|
273
274
|
<Masthead>
|
|
274
275
|
<MastheadMain>
|
|
275
276
|
<MastheadBrand>
|
|
276
|
-
<
|
|
277
|
+
<MastheadLogo>
|
|
278
|
+
<Brand src={pfLogo} alt="PatternFly" heights={{ default: '36px' }} />
|
|
279
|
+
</MastheadLogo>
|
|
277
280
|
</MastheadBrand>
|
|
278
281
|
</MastheadMain>
|
|
279
282
|
<MastheadContent>{headerToolbar}</MastheadContent>
|