diff --git a/packages/react-core/package.json b/packages/react-core/package.json index 55628712808..8ccb4e0c4e6 100644 --- a/packages/react-core/package.json +++ b/packages/react-core/package.json @@ -54,7 +54,7 @@ "tslib": "^2.5.0" }, "devDependencies": { - "@patternfly/patternfly": "5.2.0-prerelease.3", + "@patternfly/patternfly": "6.0.0-alpha.12", "@rollup/plugin-commonjs": "^25.0.0", "@rollup/plugin-node-resolve": "^15.0.2", "@rollup/plugin-replace": "^5.0.2", diff --git a/packages/react-core/src/components/Masthead/Masthead.tsx b/packages/react-core/src/components/Masthead/Masthead.tsx index 897f7e2f0c5..990c6fc353b 100644 --- a/packages/react-core/src/components/Masthead/Masthead.tsx +++ b/packages/react-core/src/components/Masthead/Masthead.tsx @@ -9,8 +9,6 @@ export interface MastheadProps extends React.DetailedHTMLProps = ({ children, className, - backgroundColor = 'dark', display = { md: 'inline' }, @@ -48,8 +45,6 @@ export const Masthead: React.FunctionComponent = ({ styles.masthead, formatBreakpointMods(display, styles, 'display-', getBreakpoint(width)), formatBreakpointMods(inset, styles, '', getBreakpoint(width)), - backgroundColor === 'light' && styles.modifiers.light, - backgroundColor === 'light200' && styles.modifiers.light_200, className )} {...props} diff --git a/packages/react-core/src/components/Masthead/examples/Masthead.md b/packages/react-core/src/components/Masthead/examples/Masthead.md index 5a6215bc494..94563b6cd8e 100644 --- a/packages/react-core/src/components/Masthead/examples/Masthead.md +++ b/packages/react-core/src/components/Masthead/examples/Masthead.md @@ -140,50 +140,6 @@ import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon'; ; ``` -### Light variant - -```ts -import React from 'react'; -import { Masthead, MastheadToggle, MastheadMain, MastheadBrand, MastheadContent, Button } from '@patternfly/react-core'; -import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon'; - - - - - - - Logo - - - Content - -; -``` - -### Light 200 variant - -```ts -import React from 'react'; -import { Masthead, MastheadToggle, MastheadMain, MastheadBrand, MastheadContent, Button } from '@patternfly/react-core'; -import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon'; - - - - - - - Logo - - - Content - -; -``` - ### Inset ```ts diff --git a/packages/react-core/src/components/NotificationBadge/NotificationBadge.tsx b/packages/react-core/src/components/NotificationBadge/NotificationBadge.tsx index dbc08233a55..34d00d83357 100644 --- a/packages/react-core/src/components/NotificationBadge/NotificationBadge.tsx +++ b/packages/react-core/src/components/NotificationBadge/NotificationBadge.tsx @@ -54,7 +54,7 @@ export const NotificationBadge: React.FunctionComponent className={css(styles.notificationBadge, styles.modifiers[variant], isExpanded && styles.modifiers.expanded)} > {notificationChild} - {count > 0 && {count}} + {count > 0 && {count}} ); diff --git a/packages/react-core/src/components/Page/PageSection.tsx b/packages/react-core/src/components/Page/PageSection.tsx index 0793f85d83e..b3b7ed03c92 100644 --- a/packages/react-core/src/components/Page/PageSection.tsx +++ b/packages/react-core/src/components/Page/PageSection.tsx @@ -5,10 +5,7 @@ import { formatBreakpointMods } from '../../helpers/util'; import { PageContext } from './PageContext'; export enum PageSectionVariants { - default = 'default', - light = 'light', - dark = 'dark', - darker = 'darker' + default = 'default' } export enum PageSectionTypes { @@ -26,7 +23,7 @@ export interface PageSectionProps extends React.HTMLProps { /** Additional classes added to the section */ className?: string; /** Section background color variant */ - variant?: 'default' | 'light' | 'dark' | 'darker'; + variant?: 'default'; /** Section type variant */ type?: 'default' | 'nav' | 'subnav' | 'breadcrumb' | 'tabs' | 'wizard'; /** Enables the page section to fill the available vertical space */ @@ -77,10 +74,7 @@ const variantType = { }; const variantStyle = { - [PageSectionVariants.default]: '', - [PageSectionVariants.light]: styles.modifiers.light, - [PageSectionVariants.dark]: styles.modifiers.dark_200, - [PageSectionVariants.darker]: styles.modifiers.dark_100 + [PageSectionVariants.default]: '' }; export const PageSection: React.FunctionComponent = ({ diff --git a/packages/react-core/src/components/Page/PageSidebar.tsx b/packages/react-core/src/components/Page/PageSidebar.tsx index 8e5f6a610a9..df6b5f63bbe 100644 --- a/packages/react-core/src/components/Page/PageSidebar.tsx +++ b/packages/react-core/src/components/Page/PageSidebar.tsx @@ -15,8 +15,6 @@ export interface PageSidebarProps extends React.HTMLProps { isManagedSidebar?: boolean; /** Programmatically manage if the sidebar is shown, if isManagedSidebar is set to true in the Page component, this prop is managed */ isSidebarOpen?: boolean; - /** Indicates the color scheme of the sidebar */ - theme?: 'dark' | 'light'; /** Sidebar id */ id?: string; } @@ -33,7 +31,6 @@ export const PageSidebar: React.FunctionComponent = ({ className = '', children, isSidebarOpen = true, - theme = 'dark', id = 'page-sidebar', ...props }: PageSidebarProps) => ( @@ -46,7 +43,6 @@ export const PageSidebar: React.FunctionComponent = ({ id={id} className={css( styles.pageSidebar, - theme === 'light' && styles.modifiers.light, sidebarOpen && styles.modifiers.expanded, !sidebarOpen && styles.modifiers.collapsed, className diff --git a/packages/react-core/src/components/Page/__tests__/Generated/PageSidebar.test.tsx b/packages/react-core/src/components/Page/__tests__/Generated/PageSidebar.test.tsx index 6653c233175..27317fbcfe0 100644 --- a/packages/react-core/src/components/Page/__tests__/Generated/PageSidebar.test.tsx +++ b/packages/react-core/src/components/Page/__tests__/Generated/PageSidebar.test.tsx @@ -9,7 +9,7 @@ import {} from '../..'; it('PageSidebar should match snapshot (auto-generated)', () => { const { asFragment } = render( - +
ReactNode
); diff --git a/packages/react-core/src/components/Page/__tests__/Page.test.tsx b/packages/react-core/src/components/Page/__tests__/Page.test.tsx index 4bcee0f4cc8..761f5fe8d2c 100644 --- a/packages/react-core/src/components/Page/__tests__/Page.test.tsx +++ b/packages/react-core/src/components/Page/__tests__/Page.test.tsx @@ -32,9 +32,6 @@ describe('Page', () => { const { asFragment } = render( Section with default background - Section with light background - Section with dark background - Section with darker background ); @@ -44,7 +41,7 @@ describe('Page', () => { test('Check dark page against snapshot', () => { const Header = undefined} />; const Sidebar = ( - + Navigation ); @@ -52,9 +49,6 @@ describe('Page', () => { const { asFragment } = render( Section with default background - Section with light background - Section with dark background - Section with darker background ); @@ -68,9 +62,6 @@ describe('Page', () => { const { asFragment } = render( Section with default background - Section with light background - Section with dark background - Section with darker background ); @@ -94,9 +85,6 @@ describe('Page', () => { const { asFragment } = render( }> Section with default background - Section with light background - Section with dark background - Section with darker background ); @@ -127,9 +115,6 @@ describe('Page', () => { breadcrumbProps={{ stickyOnBreakpoint: { sm: 'top', md: 'top', lg: 'top', xl: 'top', '2xl': 'top' } }} > Section with default background - Section with light background - Section with dark background - Section with darker background ); @@ -162,9 +147,6 @@ describe('Page', () => { }} > Section with default background - Section with light background - Section with dark background - Section with darker background ); @@ -189,9 +171,6 @@ describe('Page', () => { Section with default background - Section with light background - Section with dark background - Section with darker background ); @@ -216,9 +195,6 @@ describe('Page', () => { Section with default background - Section with light background - Section with dark background - Section with darker background ); @@ -245,9 +221,6 @@ describe('Page', () => { Section with default background - Section with light background - Section with dark background - Section with darker background ); @@ -275,9 +248,6 @@ describe('Page', () => { Section with default background - Section with light background - Section with dark background - Section with darker background ); @@ -317,9 +287,6 @@ describe('Page', () => { Section with default background - Section with light background - Section with dark background - Section with darker background ); @@ -373,9 +340,6 @@ describe('Page', () => { }} > Section with default background - Section with light background - Section with dark background - Section with darker background ); @@ -411,9 +375,6 @@ describe('Page', () => { data-testid="page-test-id" > Section with default background - Section with light background - Section with dark background - Section with darker background ); diff --git a/packages/react-core/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap b/packages/react-core/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap index 1843b06aabc..6b5798ff1ca 100644 --- a/packages/react-core/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap +++ b/packages/react-core/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap @@ -41,21 +41,6 @@ exports[`Page Check dark page against snapshot 1`] = ` > Section with default background -
- Section with light background -
-
- Section with dark background -
-
- Section with darker background -
@@ -101,21 +86,6 @@ exports[`Page Check page horizontal layout example against snapshot 1`] = ` > Section with default background -
- Section with light background -
-
- Section with dark background -
-
- Section with darker background -
@@ -265,21 +235,6 @@ exports[`Page Check page to verify breadcrumb is created - PageBreadcrumb syntax > Section with default background -
- Section with light background -
-
- Section with dark background -
-
- Section with darker background -
@@ -429,21 +384,6 @@ exports[`Page Check page to verify breadcrumb is created 1`] = ` > Section with default background -
- Section with light background -
-
- Section with dark background -
-
- Section with darker background -
@@ -713,21 +653,6 @@ exports[`Page Check page to verify grouped nav and breadcrumb - new components s > Section with default background -
- Section with light background -
-
- Section with dark background -
-
- Section with darker background -
@@ -1004,21 +929,6 @@ exports[`Page Check page to verify grouped nav and breadcrumb - old / props synt > Section with default background -
- Section with light background -
-
- Section with dark background -
-
- Section with darker background -
@@ -1180,21 +1090,6 @@ exports[`Page Check page to verify nav is created - PageNavigation syntax 1`] = > Section with default background -
- Section with light background -
-
- Section with dark background -
-
- Section with darker background -
@@ -1360,21 +1255,6 @@ exports[`Page Check page to verify skip to content points to main content region > Section with default background -
- Section with light background -
-
- Section with dark background -
-
- Section with darker background -
@@ -1421,21 +1301,6 @@ exports[`Page Check page vertical layout example against snapshot 1`] = ` > Section with default background -
- Section with light background -
-
- Section with dark background -
-
- Section with darker background -
@@ -1585,21 +1450,6 @@ exports[`Page Sticky bottom breadcrumb on all height breakpoints - PageBreadcrum > Section with default background -
- Section with light background -
-
- Section with dark background -
-
- Section with darker background -
@@ -1749,21 +1599,6 @@ exports[`Page Verify sticky bottom breadcrumb on all height breakpoints 1`] = ` > Section with default background -
- Section with light background -
-
- Section with dark background -
-
- Section with darker background -
@@ -1913,21 +1748,6 @@ exports[`Page Verify sticky top breadcrumb on all height breakpoints - PageBread > Section with default background -
- Section with light background -
-
- Section with dark background -
-
- Section with darker background -
@@ -2077,21 +1897,6 @@ exports[`Page Verify sticky top breadcrumb on all height breakpoints 1`] = ` > Section with default background -
- Section with light background -
-
- Section with dark background -
-
- Section with darker background -
diff --git a/packages/react-core/src/components/Page/examples/PageGroupSection.tsx b/packages/react-core/src/components/Page/examples/PageGroupSection.tsx index 9256bbceea2..2aac5d0c8b7 100644 --- a/packages/react-core/src/components/Page/examples/PageGroupSection.tsx +++ b/packages/react-core/src/components/Page/examples/PageGroupSection.tsx @@ -12,7 +12,6 @@ import { PageGroup, PageBreadcrumb, PageNavigation, - PageSectionVariants, PageToggleButton, Breadcrumb, BreadcrumbItem, @@ -102,10 +101,10 @@ export const PageGroupSection: React.FunctionComponent = () => { - Grouped section + Grouped section - Section 1 - Section 2 + Section 1 + Section 2 ); }; diff --git a/packages/react-core/src/components/Page/examples/PageHorizontalNav.tsx b/packages/react-core/src/components/Page/examples/PageHorizontalNav.tsx index d252e937f01..b3c26ba24cc 100644 --- a/packages/react-core/src/components/Page/examples/PageHorizontalNav.tsx +++ b/packages/react-core/src/components/Page/examples/PageHorizontalNav.tsx @@ -6,7 +6,6 @@ import { MastheadBrand, MastheadContent, PageSection, - PageSectionVariants, Toolbar, ToolbarContent, ToolbarItem @@ -35,9 +34,9 @@ export const PageHorizontalNav: React.FunctionComponent = () => { return ( - Section with darker background - Section with dark background - Section with light background + Section 1 + Section 2 + Section 3 ); }; diff --git a/packages/react-core/src/components/Page/examples/PageMainSectionPadding.tsx b/packages/react-core/src/components/Page/examples/PageMainSectionPadding.tsx index 72372668cf9..cc2d3cdfcb9 100644 --- a/packages/react-core/src/components/Page/examples/PageMainSectionPadding.tsx +++ b/packages/react-core/src/components/Page/examples/PageMainSectionPadding.tsx @@ -9,7 +9,6 @@ import { PageSidebar, PageSidebarBody, PageSection, - PageSectionVariants, PageToggleButton, Toolbar, ToolbarContent, @@ -63,13 +62,9 @@ export const PageMainSectionPadding: React.FunctionComponent = () => { return ( Section with default padding - - Section with no padding - + Section with no padding Section with padding on medium - - Section with no padding on medium - + Section with no padding on medium ); }; diff --git a/packages/react-core/src/components/Page/examples/PageMultipleSidebarBody.tsx b/packages/react-core/src/components/Page/examples/PageMultipleSidebarBody.tsx index ac2b5ac5162..eacf5f12b53 100644 --- a/packages/react-core/src/components/Page/examples/PageMultipleSidebarBody.tsx +++ b/packages/react-core/src/components/Page/examples/PageMultipleSidebarBody.tsx @@ -9,7 +9,6 @@ import { PageSidebar, PageSidebarBody, PageSection, - PageSectionVariants, PageToggleButton, Toolbar, ToolbarContent, @@ -66,9 +65,9 @@ export const PageMultipleSidebarBody: React.FunctionComponent = () => { return ( - Section with darker background - Section with dark background - Section with light background + Section 1 + Section 2 + Section 3 ); }; diff --git a/packages/react-core/src/components/Page/examples/PageTertiaryNav.tsx b/packages/react-core/src/components/Page/examples/PageTertiaryNav.tsx index b5a11180563..2795e8f9da4 100644 --- a/packages/react-core/src/components/Page/examples/PageTertiaryNav.tsx +++ b/packages/react-core/src/components/Page/examples/PageTertiaryNav.tsx @@ -6,7 +6,6 @@ import { MastheadBrand, MastheadContent, PageSection, - PageSectionVariants, Toolbar, ToolbarContent, ToolbarItem @@ -34,9 +33,9 @@ export const PageTertiaryNav: React.FunctionComponent = () => { return ( - Section with darker background - Section with dark background - Section with light background + Section 1 + Section 2 + Section 3 ); }; diff --git a/packages/react-core/src/components/Page/examples/PageUncontrolledNav.tsx b/packages/react-core/src/components/Page/examples/PageUncontrolledNav.tsx index fbd539b1685..4357d19b541 100644 --- a/packages/react-core/src/components/Page/examples/PageUncontrolledNav.tsx +++ b/packages/react-core/src/components/Page/examples/PageUncontrolledNav.tsx @@ -9,7 +9,6 @@ import { PageSidebar, PageSidebarBody, PageSection, - PageSectionVariants, PageToggleButton, Toolbar, ToolbarContent, @@ -50,9 +49,9 @@ export const PageUncontrolledNav: React.FunctionComponent = () => { return ( - Section with darker background - Section with dark background - Section with light background + Section 1 + Section 2 + Section 3 ); }; diff --git a/packages/react-core/src/components/Page/examples/PageVerticalNav.tsx b/packages/react-core/src/components/Page/examples/PageVerticalNav.tsx index fb699c4dd27..a1248de01c1 100644 --- a/packages/react-core/src/components/Page/examples/PageVerticalNav.tsx +++ b/packages/react-core/src/components/Page/examples/PageVerticalNav.tsx @@ -9,7 +9,6 @@ import { PageSidebar, PageSidebarBody, PageSection, - PageSectionVariants, PageToggleButton, Toolbar, ToolbarContent, @@ -62,9 +61,9 @@ export const PageVerticalNav: React.FunctionComponent = () => { return ( - Section with darker background - Section with dark background - Section with light background + Section 1 + Section 2 + Section 3 ); }; diff --git a/packages/react-core/src/demos/Banner.md b/packages/react-core/src/demos/Banner.md index 13fa3742747..60d3cb79dc1 100644 --- a/packages/react-core/src/demos/Banner.md +++ b/packages/react-core/src/demos/Banner.md @@ -20,7 +20,6 @@ import { Gallery, GalleryItem, PageSection, - PageSectionVariants, TextContent, Text } from '@patternfly/react-core'; @@ -47,7 +46,7 @@ class BannerDemo extends React.Component {
Ned Username
- + Main title @@ -87,7 +86,6 @@ import { Gallery, GalleryItem, PageSection, - PageSectionVariants, TextContent, Text } from '@patternfly/react-core'; @@ -122,7 +120,7 @@ class BannerDemo extends React.Component { - + Main title diff --git a/packages/react-core/src/demos/CardView/examples/CardView.tsx b/packages/react-core/src/demos/CardView/examples/CardView.tsx index 61eac10e41f..8e6d004f9ef 100644 --- a/packages/react-core/src/demos/CardView/examples/CardView.tsx +++ b/packages/react-core/src/demos/CardView/examples/CardView.tsx @@ -25,7 +25,6 @@ import { OverflowMenuDropdownItem, OverflowMenuItem, PageSection, - PageSectionVariants, Pagination, TextContent, Text, @@ -472,7 +471,7 @@ export const CardViewBasic: React.FunctionComponent = () => { return ( - + Projects This is a demo that showcases PatternFly cards. @@ -554,12 +553,7 @@ export const CardViewBasic: React.FunctionComponent = () => { ))} - + + Main title This is a full page demo. diff --git a/packages/react-core/src/demos/JumpLinks.md b/packages/react-core/src/demos/JumpLinks.md index 2e20acb7e55..3ebb8a360fd 100644 --- a/packages/react-core/src/demos/JumpLinks.md +++ b/packages/react-core/src/demos/JumpLinks.md @@ -64,7 +64,7 @@ ScrollspyH2 = () => { return ( - + Main title diff --git a/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx b/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx index 721e40cdb1f..c421679018c 100644 --- a/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +++ b/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx @@ -31,7 +31,6 @@ import { NotificationDrawerListItemHeader, Page, PageSection, - PageSectionVariants, PageSidebar, PageSidebarBody, SkipToContent, @@ -541,7 +540,7 @@ export const NotificationDrawerBasic: React.FunctionComponent = () => { breadcrumb={PageBreadcrumb} mainContainerId={pageId} > - + Main title @@ -550,7 +549,7 @@ export const NotificationDrawerBasic: React.FunctionComponent = () => { - Panel section content + Panel section content ); diff --git a/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx b/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx index e1bf93e05c9..34377b28e49 100644 --- a/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +++ b/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx @@ -33,7 +33,6 @@ import { NotificationDrawerListItemHeader, Page, PageSection, - PageSectionVariants, PageSidebar, PageSidebarBody, SkipToContent, @@ -780,7 +779,7 @@ export const NotificationDrawerGrouped: React.FunctionComponent = () => { breadcrumb={PageBreadcrumb} mainContainerId={pageId} > - + Main title @@ -789,7 +788,7 @@ export const NotificationDrawerGrouped: React.FunctionComponent = () => { - Panel section content + Panel section content ); diff --git a/packages/react-core/src/demos/PrimaryDetail.md b/packages/react-core/src/demos/PrimaryDetail.md index 732b5c4e3f0..df8f6489d1c 100644 --- a/packages/react-core/src/demos/PrimaryDetail.md +++ b/packages/react-core/src/demos/PrimaryDetail.md @@ -66,7 +66,6 @@ import { MenuToggle, MenuToggleCheckbox, PageSection, - PageSectionVariants, Pagination, Progress, TextContent, @@ -597,7 +596,7 @@ class PrimaryDetailCardView extends React.Component { return ( - + Projects This is a demo that showcases Patternfly Cards. @@ -616,7 +615,7 @@ class PrimaryDetailCardView extends React.Component { - + - + Main title @@ -817,7 +815,6 @@ import { FlexItem, MenuToggle, PageSection, - PageSectionVariants, Progress, Text, TextContent, @@ -1000,7 +997,7 @@ class PrimaryDetailDataListInCard extends React.Component { return ( - + Main title diff --git a/packages/react-core/src/demos/Tabs.md b/packages/react-core/src/demos/Tabs.md index dff0305efec..613c17a0ffd 100644 --- a/packages/react-core/src/demos/Tabs.md +++ b/packages/react-core/src/demos/Tabs.md @@ -21,7 +21,6 @@ import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing'; import React from 'react'; import { PageSection, - PageSectionVariants, PageBreadcrumb, Breadcrumb, BreadcrumbItem, @@ -157,7 +156,7 @@ TabsOpenDemo = () => { return ( {tabsBreadcrumb} - + { - + Details} tabContentId={`tabContent${0}`} /> YAML} tabContentId={`tabContent${1}`} /> @@ -185,7 +184,7 @@ TabsOpenDemo = () => { Terminal} tabContentId={`tabContent${4}`} /> - + @@ -213,7 +212,6 @@ TabsOpenDemo = () => { import React from 'react'; import { PageSection, - PageSectionVariants, PageBreadcrumb, Breadcrumb, BreadcrumbItem, @@ -354,7 +352,7 @@ TabsOpenWithSecondaryTabsDemo = () => { return ( {tabsBreadcrumb} - + { - + Details} tabContentId={`tabContent${0}`} /> YAML} tabContentId={`tabContent${1}`} /> @@ -382,7 +380,7 @@ TabsOpenWithSecondaryTabsDemo = () => { Terminal} tabContentId={`tabContent${4}`} /> - +