From c676e2f25a44e1f4d8444f3b47bf8d0255af6f02 Mon Sep 17 00:00:00 2001 From: adamviktora Date: Thu, 13 Jun 2024 15:34:08 +0200 Subject: [PATCH 01/18] feat(Text): move to Content folder --- .../src/components/Content/examples/Text.md | 64 +++++++++++++++++++ .../src/components/Text/examples/Text.md | 2 +- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 packages/react-core/src/components/Content/examples/Text.md diff --git a/packages/react-core/src/components/Content/examples/Text.md b/packages/react-core/src/components/Content/examples/Text.md new file mode 100644 index 00000000000..61566a36d43 --- /dev/null +++ b/packages/react-core/src/components/Content/examples/Text.md @@ -0,0 +1,64 @@ +--- +id: Text +section: components +cssPrefix: pf-v5-c-content +propComponents: ['TextContent', 'Text', 'TextList', 'TextListItem'] +--- + +The `` component provides simple, built-in styling for putting common blocks of HTML elements together. It establishes the block of content and styling within it for the elements listed in the `component` property(`h1` through `h6`, `p`, `a`, `small`, `blockquote`, and `pre`), as well as the text component suite ``, and ``. `TextContent` may be used as a container for the text components, but nesting them inside `` is not required. + +You cannot nest other components within ``, and doing so can cause styling overrides or other conflicts. Instead, you can use the `` component's properties to achieve the same results. + +For example, rather than nesting the `` and `Codestin Search App + +

Custom header modal

Add custom content to the header by not passing the titles prop the modal box header component.

-
+ diff --git a/packages/react-core/src/components/Slider/examples/SliderActions.tsx b/packages/react-core/src/components/Slider/examples/SliderActions.tsx index 23e21dfecb3..f5df5ce1e24 100644 --- a/packages/react-core/src/components/Slider/examples/SliderActions.tsx +++ b/packages/react-core/src/components/Slider/examples/SliderActions.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Slider, SliderOnChangeEvent, Button, Text, TextVariants } from '@patternfly/react-core'; +import { Slider, SliderOnChangeEvent, Button, Content } from '@patternfly/react-core'; import MinusIcon from '@patternfly/react-icons/dist/esm/icons/minus-icon'; import PlusIcon from '@patternfly/react-icons/dist/esm/icons/plus-icon'; import LockIcon from '@patternfly/react-icons/dist/esm/icons/lock-icon'; @@ -64,7 +64,7 @@ export const SliderActions: React.FunctionComponent = () => { return ( <> - Slider value is: {value1} + Slider value is: {value1} { const [hasTooltipOverThumb, setHasTooltipOverThumb] = React.useState(false); @@ -15,14 +15,14 @@ export const SliderContinuous: React.FunctionComponent = () => { onChange={(_event: React.FormEvent, checked: boolean) => setHasTooltipOverThumb(checked)} style={{ marginBottom: 20 }} /> - Slider Value is: {value} + Slider Value is: {value} setValue(value)} />
- Slider value is: {valueCustom} + Slider value is: {valueCustom} setValueCustom(value)} value={valueCustom} diff --git a/packages/react-core/src/components/Slider/examples/SliderDisabled.tsx b/packages/react-core/src/components/Slider/examples/SliderDisabled.tsx index 31b36872194..8656b95f6b9 100644 --- a/packages/react-core/src/components/Slider/examples/SliderDisabled.tsx +++ b/packages/react-core/src/components/Slider/examples/SliderDisabled.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Slider, SliderOnChangeEvent, Text, TextVariants } from '@patternfly/react-core'; +import { Slider, SliderOnChangeEvent, Content } from '@patternfly/react-core'; export const SliderDisabled: React.FunctionComponent = () => { const [value, setValue] = React.useState(50); @@ -22,7 +22,7 @@ export const SliderDisabled: React.FunctionComponent = () => { return ( <> - Slider value is: {displayValue()} + Slider value is: {displayValue()} { const initialValues = { @@ -50,15 +50,15 @@ export const SliderDiscrete: React.FunctionComponent = () => { return ( <> - Slider value is: {numValue.value1} + Slider value is: {numValue.value1} handleChange(value, 'value1')} customSteps={steps} />
- Slider value is: {numValue.value2} - (min = 0, max = 200, step = 50) + Slider value is: {numValue.value2} + (min = 0, max = 200, step = 50) handleChange(value, 'value2')} @@ -67,8 +67,8 @@ export const SliderDiscrete: React.FunctionComponent = () => { showTicks />
- Slider value is: {Math.floor(numValue.value3)} - (min = -25, max = 75, step = 10, boundaries not shown) + Slider value is: {Math.floor(numValue.value3)} + (min = -25, max = 75, step = 10, boundaries not shown) handleChange(value, 'value3')} @@ -79,8 +79,8 @@ export const SliderDiscrete: React.FunctionComponent = () => { showBoundaries={false} />
- Slider value is: {Math.floor(numValue.value4)} - (min = -25, max = 75, step = 10, boundaries shown) + Slider value is: {Math.floor(numValue.value4)} + (min = -25, max = 75, step = 10, boundaries shown) handleChange(value, 'value4')} @@ -90,8 +90,8 @@ export const SliderDiscrete: React.FunctionComponent = () => { showTicks />
- Slider value is: {Math.floor(numValue.value5)} - (min = -25, max = 75, step = 10, boundaries shown, ticks not shown) + Slider value is: {Math.floor(numValue.value5)} + (min = -25, max = 75, step = 10, boundaries shown, ticks not shown) handleChange(value, 'value5')} @@ -100,8 +100,8 @@ export const SliderDiscrete: React.FunctionComponent = () => { step={10} />
- Slider value is: {Math.floor(numValue.value6)} - (max = 5, custom steps) + Slider value is: {Math.floor(numValue.value6)} + (max = 5, custom steps) { onChange={(_event: SliderOnChangeEvent, value: number) => handleChange(value, 'value6')} />
- Slider value is: {Math.floor(numValue.value7)} - (min = 12, max = 86, custom steps with non linear data) + Slider value is: {Math.floor(numValue.value7)} + (min = 12, max = 86, custom steps with non linear data) ( - - + +

Heading - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit Sed hendrerit nisi in cursus maximus. - - +

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit Sed hendrerit nisi in cursus maximus.

+

Second level - - +

+

Curabitur accumsan turpis pharetra blandit. Quisque condimentum maximus mi,{' '} sit amet commodo arcu rutrum id. Proin pretium urna vel cursus venenatis. Suspendisse potenti. - +

Sometimes you need small text -
+
); diff --git a/packages/react-core/src/demos/Banner.md b/packages/react-core/src/demos/Banner.md index ac1b38cea37..6d2342da70a 100644 --- a/packages/react-core/src/demos/Banner.md +++ b/packages/react-core/src/demos/Banner.md @@ -13,17 +13,7 @@ import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/Dashboard ```js isFullscreen import React from 'react'; -import { - Banner, - Card, - CardBody, - Flex, - Gallery, - GalleryItem, - PageSection, - TextContent, - Text -} from '@patternfly/react-core'; +import { Banner, Card, CardBody, Flex, Gallery, GalleryItem, PageSection, Content } from '@patternfly/react-core'; import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; import { css } from '@patternfly/react-styles'; @@ -48,13 +38,13 @@ class BannerDemo extends React.Component { - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of it’s relative line height of 1.5. - - +

+
@@ -87,8 +77,7 @@ import { Gallery, GalleryItem, PageSection, - TextContent, - Text + Content } from '@patternfly/react-core'; import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; import { css } from '@patternfly/react-styles'; @@ -122,13 +111,13 @@ class BannerDemo extends React.Component { - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of it’s relative line height of 1.5. - - +

+
diff --git a/packages/react-core/src/demos/CardView/examples/CardView.tsx b/packages/react-core/src/demos/CardView/examples/CardView.tsx index 8b15178b537..32ff8a17d19 100644 --- a/packages/react-core/src/demos/CardView/examples/CardView.tsx +++ b/packages/react-core/src/demos/CardView/examples/CardView.tsx @@ -7,6 +7,7 @@ import { CardHeader, CardTitle, CardBody, + Content, Divider, Dropdown, DropdownItem, @@ -24,8 +25,6 @@ import { OverflowMenuItem, PageSection, Pagination, - TextContent, - Text, Toolbar, ToolbarItem, ToolbarFilter, @@ -470,10 +469,10 @@ export const CardViewBasic: React.FunctionComponent = () => { - - Projects - This is a demo that showcases PatternFly cards. - + +

Projects

+

This is a demo that showcases PatternFly cards.

+
{toolbarItems} diff --git a/packages/react-core/src/demos/DashboardWrapper.tsx b/packages/react-core/src/demos/DashboardWrapper.tsx index 8dd074b6d21..95f2382bcbc 100644 --- a/packages/react-core/src/demos/DashboardWrapper.tsx +++ b/packages/react-core/src/demos/DashboardWrapper.tsx @@ -2,6 +2,7 @@ import React, { useState } from 'react'; import { Breadcrumb, BreadcrumbItem, + Content, Nav, NavItem, NavList, @@ -10,9 +11,7 @@ import { PageSection, PageSidebar, PageSidebarBody, - SkipToContent, - Text, - TextContent + SkipToContent } from '../components'; import { DashboardHeader } from './DashboardHeader'; @@ -38,10 +37,10 @@ export const DashboardBreadcrumb = ( const PageTemplateTitle = ( - - Main title - This is a full page demo. - + +

Main title

+

This is a full page demo.

+
); diff --git a/packages/react-core/src/demos/DataList/examples/DataListBasic.tsx b/packages/react-core/src/demos/DataList/examples/DataListBasic.tsx index d006554ca47..0867d08e8ca 100644 --- a/packages/react-core/src/demos/DataList/examples/DataListBasic.tsx +++ b/packages/react-core/src/demos/DataList/examples/DataListBasic.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Button, + Content, DataList, DataListItem, DataListCell, @@ -16,9 +17,6 @@ import { PageSection, PageSectionVariants, Pagination, - Text, - TextContent, - TextVariants, Toolbar, ToolbarItem, ToolbarContent @@ -77,10 +75,10 @@ export const DataListBasic: React.FunctionComponent = () => { - - Projects - This is a demo that showcases PatternFly Data List - + +

Projects

+

This is a demo that showcases PatternFly Data List

+
@@ -94,13 +92,13 @@ export const DataListBasic: React.FunctionComponent = () => { - patternfly + patternfly - + Working repo for PatternFly - + @@ -139,10 +137,10 @@ export const DataListBasic: React.FunctionComponent = () => { - patternfly-elements + patternfly-elements - PatternFly elements + PatternFly elements @@ -191,7 +189,7 @@ export const DataListBasic: React.FunctionComponent = () => { - patternfly-unified-design-kit + patternfly-unified-design-kit , @@ -216,13 +214,13 @@ export const DataListBasic: React.FunctionComponent = () => { - patternfly + patternfly - + Working repo for PatternFly - + @@ -262,10 +260,10 @@ export const DataListBasic: React.FunctionComponent = () => { - patternfly-elements + patternfly-elements - PatternFly elements + PatternFly elements diff --git a/packages/react-core/src/demos/DataList/examples/DataListExpandableControlInToolbar.tsx b/packages/react-core/src/demos/DataList/examples/DataListExpandableControlInToolbar.tsx index 71bfd2beff3..da45bc79aff 100644 --- a/packages/react-core/src/demos/DataList/examples/DataListExpandableControlInToolbar.tsx +++ b/packages/react-core/src/demos/DataList/examples/DataListExpandableControlInToolbar.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Button, + Content, DataList, DataListItem, DataListItemRow, @@ -23,9 +24,7 @@ import { Tooltip, Icon, PageSection, - PageSectionVariants, - Text, - TextContent + PageSectionVariants } from '@patternfly/react-core'; import { DashboardWrapper } from '@patternfly/react-core/src/demos/DashboardWrapper'; @@ -136,10 +135,10 @@ export const DataListExpandableControlInToolbar: React.FunctionComponent = () => - - Projects - This is a demo that showcases PatternFly Data List - + +

Projects

+

This is a demo that showcases PatternFly Data List

+
{renderToolbar()} diff --git a/packages/react-core/src/demos/JumpLinks.md b/packages/react-core/src/demos/JumpLinks.md index d7791146942..b871c508948 100644 --- a/packages/react-core/src/demos/JumpLinks.md +++ b/packages/react-core/src/demos/JumpLinks.md @@ -32,7 +32,7 @@ import { SidebarPanel, Switch, Title, - TextContent, + Content, getResizeObserver } from '@patternfly/react-core'; import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; @@ -101,7 +101,7 @@ ScrollspyH2 = () => { - + {headings.map(i => (

@@ -128,7 +128,7 @@ ScrollspyH2 = () => {

))} -
+
diff --git a/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx b/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx index e1eaa7f23a4..16ba7634b80 100644 --- a/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +++ b/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx @@ -6,6 +6,7 @@ import { BreadcrumbItem, Button, ButtonVariant, + Content, Divider, Dropdown, DropdownItem, @@ -32,8 +33,6 @@ import { PageSidebar, PageSidebarBody, SkipToContent, - TextContent, - Text, PageToggleButton, Masthead, MastheadMain, @@ -530,13 +529,13 @@ export const NotificationDrawerBasic: React.FunctionComponent = () => { mainContainerId={pageId} > - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of its relative line height of 1.5. - - +

+
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 9fe635abc3b..27919549fe4 100644 --- a/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +++ b/packages/react-core/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx @@ -6,6 +6,7 @@ import { BreadcrumbItem, Button, ButtonVariant, + Content, Divider, Dropdown, DropdownItem, @@ -34,8 +35,6 @@ import { PageSidebar, PageSidebarBody, SkipToContent, - TextContent, - Text, PageToggleButton, Masthead, MastheadMain, @@ -769,13 +768,13 @@ export const NotificationDrawerGrouped: React.FunctionComponent = () => { mainContainerId={pageId} > - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of its relative line height of 1.5. - - +

+
Panel section content diff --git a/packages/react-core/src/demos/RTL/examples/PaginatedTable.jsx b/packages/react-core/src/demos/RTL/examples/PaginatedTable.jsx index d644cfd34f0..5cf53cb3a26 100644 --- a/packages/react-core/src/demos/RTL/examples/PaginatedTable.jsx +++ b/packages/react-core/src/demos/RTL/examples/PaginatedTable.jsx @@ -8,6 +8,7 @@ import { Button, ButtonVariant, Card, + Content, Divider, Dropdown, DropdownGroup, @@ -32,9 +33,6 @@ import { PageToggleButton, Pagination, PaginationVariant, - Text, - TextContent, - TextVariants, Toolbar, ToolbarContent, ToolbarGroup, @@ -448,10 +446,10 @@ export const PaginatedTableAction = () => { - - {translation.title} - {translation.body} - + +

{translation.title}

+

{translation.body}

+
diff --git a/packages/react-core/src/demos/RTL/examples/PaginatedTable.tsx b/packages/react-core/src/demos/RTL/examples/PaginatedTable.tsx index 7c69f8ebcc3..e56ee7f700f 100644 --- a/packages/react-core/src/demos/RTL/examples/PaginatedTable.tsx +++ b/packages/react-core/src/demos/RTL/examples/PaginatedTable.tsx @@ -8,6 +8,7 @@ import { Button, ButtonVariant, Card, + Content, Divider, Dropdown, DropdownGroup, @@ -32,9 +33,6 @@ import { PageToggleButton, Pagination, PaginationVariant, - Text, - TextContent, - TextVariants, Toolbar, ToolbarContent, ToolbarGroup, @@ -474,10 +472,10 @@ export const PaginatedTableAction: React.FunctionComponent = () => { - - {translation.title} - {translation.body} - + +

{translation.title}

+

{translation.body}

+
diff --git a/packages/react-core/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx b/packages/react-core/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx index a22daa093be..3f125d9ccb8 100644 --- a/packages/react-core/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx +++ b/packages/react-core/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx @@ -13,8 +13,7 @@ import { NotificationDrawerListItemBody, NotificationDrawerListItemHeader, PageSection, - TextContent, - Text, + Content, EmptyStateVariant, NumberInput, Alert, @@ -316,15 +315,15 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = () isNotificationDrawerExpanded={isDrawerExpanded} > - - Alert Group with Notification Drawer demo - + +

Alert Group with Notification Drawer demo

+

New alerts can be added with buttons below. Each alert has a timeout of 7 seconds, however, even after the timeout expires, all alerts are still visible in the notification drawer. By default, only 3 alerts are displayed. The rest can be accessed in the notification drawer after clicking on the bell icon in the header or by clicking on the overflow message. - - +

+
@@ -348,11 +347,11 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = () - +
- Max displayed alerts - The maximum number of displayed alerts can be set below. -
+

Max displayed alerts

+

The maximum number of displayed alerts can be set below.

+ { - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px.It should have leading of 24px because
of it’s relative line height of 1.5. - +

-
+
- - Main title - This is a full page demo. - + +

Main title

+

This is a full page demo.

+
); diff --git a/packages/react-core/src/demos/examples/JumpLinks/JumpLinksWithDrawer.js b/packages/react-core/src/demos/examples/JumpLinks/JumpLinksWithDrawer.js index 5dfe9fd73e9..fecce0e8359 100644 --- a/packages/react-core/src/demos/examples/JumpLinks/JumpLinksWithDrawer.js +++ b/packages/react-core/src/demos/examples/JumpLinks/JumpLinksWithDrawer.js @@ -1,6 +1,7 @@ import React from 'react'; import { Button, + Content, Drawer, DrawerPanelContent, DrawerContent, @@ -15,7 +16,6 @@ import { Sidebar, SidebarContent, SidebarPanel, - TextContent, getResizeObserver, DrawerContext } from '@patternfly/react-core'; @@ -100,7 +100,7 @@ export const JumpLinksWithDrawer = () => {
- + {headings.map((heading) => (
))} -
+
diff --git a/packages/react-core/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx b/packages/react-core/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx index 1301337abcb..fff4b1f5132 100644 --- a/packages/react-core/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +++ b/packages/react-core/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx @@ -8,6 +8,7 @@ import { ButtonVariant, Card, CardBody, + Content, Divider, Dropdown, DropdownGroup, @@ -36,8 +37,6 @@ import { PageToggleButton, Popper, SkipToContent, - Text, - TextContent, Toolbar, ToolbarContent, ToolbarGroup, @@ -532,10 +531,10 @@ export const MastheadWithUtilitiesAndUserDropdownMenu: React.FunctionComponent = isBreadcrumbGrouped additionalGroupedContent={ - - Main title - This is a full page demo. - + +

Main title

+

This is a full page demo.

+
} > diff --git a/packages/react-core/src/demos/examples/Nav/NavDefault.tsx b/packages/react-core/src/demos/examples/Nav/NavDefault.tsx index 4cf810b6a65..9daba91948f 100644 --- a/packages/react-core/src/demos/examples/Nav/NavDefault.tsx +++ b/packages/react-core/src/demos/examples/Nav/NavDefault.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { Card, CardBody, + Content, Gallery, GalleryItem, Nav, @@ -11,9 +12,7 @@ import { PageSection, PageSidebar, PageSidebarBody, - SkipToContent, - TextContent, - Text + SkipToContent } from '@patternfly/react-core'; import { DashboardBreadcrumb } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; import { DashboardHeader } from '@patternfly/react-core/dist/js/demos/DashboardHeader'; @@ -72,13 +71,13 @@ export const NavDefault: React.FunctionComponent = () => { mainContainerId={pageId} > - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of its relative line height of 1.5. - - +

+
diff --git a/packages/react-core/src/demos/examples/Nav/NavExpandable.tsx b/packages/react-core/src/demos/examples/Nav/NavExpandable.tsx index 6ec464df3f1..999f87dc40d 100644 --- a/packages/react-core/src/demos/examples/Nav/NavExpandable.tsx +++ b/packages/react-core/src/demos/examples/Nav/NavExpandable.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { Card, CardBody, + Content, Gallery, GalleryItem, Nav, @@ -12,9 +13,7 @@ import { PageSection, PageSidebar, PageSidebarBody, - SkipToContent, - TextContent, - Text + SkipToContent } from '@patternfly/react-core'; import { DashboardBreadcrumb } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; import { DashboardHeader } from '@patternfly/react-core/dist/js/demos/DashboardHeader'; @@ -98,13 +97,13 @@ export const NavExpandableDemo: React.FunctionComponent = () => { mainContainerId={pageId} > - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of its relative line height of 1.5. - - +

+
diff --git a/packages/react-core/src/demos/examples/Nav/NavGrouped.tsx b/packages/react-core/src/demos/examples/Nav/NavGrouped.tsx index 59d13f54547..6e2032bdc9a 100644 --- a/packages/react-core/src/demos/examples/Nav/NavGrouped.tsx +++ b/packages/react-core/src/demos/examples/Nav/NavGrouped.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { + Content, Nav, NavGroup, NavItem, @@ -7,9 +8,7 @@ import { PageSection, PageSidebar, PageSidebarBody, - SkipToContent, - TextContent, - Text + SkipToContent } from '@patternfly/react-core'; import { DashboardHeader } from '@patternfly/react-core/dist/js/demos/DashboardHeader'; @@ -80,13 +79,13 @@ export const NavGrouped: React.FunctionComponent = () => { mainContainerId={pageId} > - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of its relative line height of 1.5. - - +

+
Section 1 Section 2 diff --git a/packages/react-core/src/demos/examples/Nav/NavHorizontal.tsx b/packages/react-core/src/demos/examples/Nav/NavHorizontal.tsx index 2b2a63d2863..11cec7df24c 100644 --- a/packages/react-core/src/demos/examples/Nav/NavHorizontal.tsx +++ b/packages/react-core/src/demos/examples/Nav/NavHorizontal.tsx @@ -6,6 +6,7 @@ import { ButtonVariant, Card, CardBody, + Content, Divider, Dropdown, DropdownGroup, @@ -24,8 +25,6 @@ import { Page, PageSection, SkipToContent, - TextContent, - Text, Toolbar, ToolbarContent, ToolbarGroup, @@ -216,13 +215,13 @@ export const NavHorizontal: React.FunctionComponent = () => { mainContainerId={pageId} > - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of its relative line height of 1.5. - - +

+
diff --git a/packages/react-core/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx b/packages/react-core/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx index 4a8f1249650..0eba9ef5f25 100644 --- a/packages/react-core/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx +++ b/packages/react-core/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx @@ -6,6 +6,7 @@ import { ButtonVariant, Card, CardBody, + Content, Divider, Dropdown, DropdownGroup, @@ -27,8 +28,6 @@ import { PageSectionTypes, PageToggleButton, SkipToContent, - TextContent, - Text, Toolbar, ToolbarContent, ToolbarGroup, @@ -271,13 +270,13 @@ export const NavHorizontalWithSubnav: React.FunctionComponent = () => { {DashboardBreadcrumb} - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of it’s relative line height of 1.5. - - +

+
diff --git a/packages/react-core/src/demos/examples/Nav/NavManual.tsx b/packages/react-core/src/demos/examples/Nav/NavManual.tsx index 2022bed84d4..0b7c1ce5ac7 100644 --- a/packages/react-core/src/demos/examples/Nav/NavManual.tsx +++ b/packages/react-core/src/demos/examples/Nav/NavManual.tsx @@ -6,6 +6,7 @@ import { ButtonVariant, Card, CardBody, + Content, Divider, Dropdown, DropdownGroup, @@ -28,8 +29,6 @@ import { PageSidebarBody, PageToggleButton, SkipToContent, - TextContent, - Text, Toolbar, ToolbarContent, ToolbarGroup, @@ -247,13 +246,13 @@ export const NavManual: React.FunctionComponent = () => { mainContainerId={pageId} > - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of its relative line height of 1.5. - - +

+
diff --git a/packages/react-core/src/demos/examples/Nav/NavWithSubnav.tsx b/packages/react-core/src/demos/examples/Nav/NavWithSubnav.tsx index db3db517c59..b378c19add0 100644 --- a/packages/react-core/src/demos/examples/Nav/NavWithSubnav.tsx +++ b/packages/react-core/src/demos/examples/Nav/NavWithSubnav.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { Card, CardBody, + Content, Gallery, GalleryItem, Nav, @@ -12,9 +13,7 @@ import { PageSectionTypes, PageSidebar, PageSidebarBody, - SkipToContent, - TextContent, - Text + SkipToContent } from '@patternfly/react-core'; import { DashboardBreadcrumb } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; import { DashboardHeader } from '@patternfly/react-core/dist/js/demos/DashboardHeader'; @@ -116,13 +115,13 @@ export const NavWithSubnav: React.FunctionComponent = () => { {DashboardBreadcrumb} - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of it’s relative line height of 1.5. - - +

+
diff --git a/packages/react-core/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx b/packages/react-core/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx index 0035615816b..0ea01aa908e 100644 --- a/packages/react-core/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +++ b/packages/react-core/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx @@ -8,6 +8,7 @@ import { ButtonVariant, Card, CardBody, + Content, Divider, Dropdown, DropdownGroup, @@ -31,8 +32,6 @@ import { PageSidebarBody, PageToggleButton, SkipToContent, - Text, - TextContent, Toolbar, ToolbarContent, ToolbarGroup, @@ -270,10 +269,10 @@ export const PageStickySectionBreadcrumb: React.FunctionComponent = () => { }} > - - Main title - This is a full page demo. - + +

Main title

+

This is a full page demo.

+
diff --git a/packages/react-core/src/demos/examples/Page/PageStickySectionGroup.tsx b/packages/react-core/src/demos/examples/Page/PageStickySectionGroup.tsx index 53ead691d6a..c3a48c031c8 100644 --- a/packages/react-core/src/demos/examples/Page/PageStickySectionGroup.tsx +++ b/packages/react-core/src/demos/examples/Page/PageStickySectionGroup.tsx @@ -8,6 +8,7 @@ import { ButtonVariant, Card, CardBody, + Content, Divider, Dropdown, DropdownGroup, @@ -31,8 +32,6 @@ import { PageSidebarBody, PageToggleButton, SkipToContent, - Text, - TextContent, Toolbar, ToolbarContent, ToolbarGroup, @@ -266,10 +265,10 @@ export const PageStickySectionGroup: React.FunctionComponent = () => { isBreadcrumbGrouped additionalGroupedContent={ - - Main title - This is a full page demo. - + +

Main title

+

This is a full page demo.

+
} groupProps={{ diff --git a/packages/react-core/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx b/packages/react-core/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx index be56dac07aa..d217f1b7f92 100644 --- a/packages/react-core/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +++ b/packages/react-core/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx @@ -8,6 +8,7 @@ import { ButtonVariant, Card, CardBody, + Content, Divider, Dropdown, DropdownGroup, @@ -33,8 +34,6 @@ import { PageSidebarBody, PageToggleButton, SkipToContent, - Text, - TextContent, Toolbar, ToolbarContent, ToolbarGroup, @@ -266,10 +265,10 @@ export const PageStickySectionGroupAlternate: React.FunctionComponent = () => { - - Main title - This is a full page demo. - + +

Main title

+

This is a full page demo.

+
{' '} diff --git a/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx b/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx index 737cca9effd..bcfcdf5ab4f 100644 --- a/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx +++ b/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx @@ -6,6 +6,7 @@ import { CardHeader, CardBody, CardTitle, + Content, Divider, Drawer, DrawerActions, @@ -30,8 +31,6 @@ import { Select, SelectList, SelectOption, - TextContent, - Text, Title, Toolbar, ToolbarFilter, @@ -573,11 +572,9 @@ export const PrimaryDetailCardView: React.FunctionComponent = () => {
- - - Provided by Red Hat - - + + Provided by Red Hat +
@@ -621,10 +618,10 @@ export const PrimaryDetailCardView: React.FunctionComponent = () => { return ( - - Projects - This is a demo that showcases Patternfly Cards. - + +

Projects

+

This is a demo that showcases Patternfly Cards.

+
diff --git a/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx b/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx index febc308cfbd..52ed42a55f4 100644 --- a/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx +++ b/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { Button, ButtonVariant, + Content, DataList, DataListAction, DataListCell, @@ -30,8 +31,6 @@ import { Progress, Stack, StackItem, - Text, - TextContent, TextInput, Title, Select, @@ -419,13 +418,13 @@ export const PrimaryDetailContentPadding: React.FunctionComponent = () => { return ( - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of it's relative line height of 1.5. - - +

+
diff --git a/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx b/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx index 4ae445c4455..a802027a51f 100644 --- a/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx +++ b/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Card, + Content, DataList, DataListCell, DataListItem, @@ -27,8 +28,6 @@ import { PageSection, PageSectionVariants, Progress, - Text, - TextContent, Title } from '@patternfly/react-core'; import { DashboardWrapper } from '@patternfly/react-core/src/demos/DashboardWrapper'; @@ -184,13 +183,13 @@ export const PrimaryDetailDataListInCard: React.FunctionComponent = () => { return ( - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of it’s relative line height of 1.5. - - +

+
diff --git a/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx b/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx index a03235749d9..a871fa6b607 100644 --- a/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx +++ b/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { Button, ButtonVariant, + Content, DataList, DataListAction, DataListCell, @@ -30,8 +31,6 @@ import { Progress, Stack, StackItem, - Text, - TextContent, TextInput, Title, Select, @@ -419,13 +418,13 @@ export const PrimaryDetailFullPage: React.FunctionComponent = () => { return ( - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of it's relative line height of 1.5. - - +

+
diff --git a/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx b/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx index bf3a95b82ee..d5084e76cc7 100644 --- a/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx +++ b/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { Button, ButtonVariant, + Content, DataList, DataListAction, DataListCell, @@ -30,8 +31,6 @@ import { Progress, Stack, StackItem, - Text, - TextContent, TextInput, Title, Select, @@ -419,13 +418,13 @@ export const PrimaryDetailInlineModifier: React.FunctionComponent = () => { return ( - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of it's relative line height of 1.5. - - +

+
diff --git a/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx b/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx index 9f500d6ea1c..3b51ac403a5 100644 --- a/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx +++ b/packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Card, + Content, Divider, Drawer, DrawerActions, @@ -18,8 +19,6 @@ import { SimpleList, SimpleListGroup, SimpleListItem, - Text, - TextContent, Title } from '@patternfly/react-core'; import { DashboardWrapper } from '@patternfly/react-core/src/demos/DashboardWrapper'; @@ -93,13 +92,13 @@ export const PrimaryDetailSimpleListInCard: React.FunctionComponent = () => { return ( - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px. It should have leading of 24px because
of it’s relative line height of 1.5. - - +

+
diff --git a/packages/react-core/src/demos/examples/Tabs/ModalTabs.tsx b/packages/react-core/src/demos/examples/Tabs/ModalTabs.tsx index f888e8795ca..50e452085f7 100644 --- a/packages/react-core/src/demos/examples/Tabs/ModalTabs.tsx +++ b/packages/react-core/src/demos/examples/Tabs/ModalTabs.tsx @@ -2,8 +2,7 @@ import React from 'react'; import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper'; import { PageSection, - TextContent, - Text, + Content, Gallery, Card, CardBody, @@ -82,10 +81,10 @@ export const ModalTabs: React.FunctionComponent = () => { - - Projects - Click any project card to view Tabs within Modals. - + +

Projects

+

Click any project card to view Tabs within Modals.

+
diff --git a/packages/react-core/src/demos/examples/Tabs/NestedUnindentedTabs.tsx b/packages/react-core/src/demos/examples/Tabs/NestedUnindentedTabs.tsx index 78ba131685a..7df037ae9fd 100644 --- a/packages/react-core/src/demos/examples/Tabs/NestedUnindentedTabs.tsx +++ b/packages/react-core/src/demos/examples/Tabs/NestedUnindentedTabs.tsx @@ -3,6 +3,7 @@ import { Card, CardHeader, CardBody, + Content, Grid, GridItem, PageSection, @@ -12,8 +13,6 @@ import { TabContentBody, TabTitleText, Title, - Text, - TextContent, TitleSizes, CardTitle } from '@patternfly/react-core'; @@ -65,9 +64,9 @@ export const NestedUnindentedTabs: React.FunctionComponent = () => { - - To perform a standard x86_64 installation using the GUI, you'll need to: - + + To perform a standard x86_64 installation using the GUI, you'll need to: + diff --git a/packages/react-core/src/demos/examples/Wizard/InModalWithDrawerInformationalStep.tsx b/packages/react-core/src/demos/examples/Wizard/InModalWithDrawerInformationalStep.tsx index a612060b473..fb2ed312ea8 100644 --- a/packages/react-core/src/demos/examples/Wizard/InModalWithDrawerInformationalStep.tsx +++ b/packages/react-core/src/demos/examples/Wizard/InModalWithDrawerInformationalStep.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Button, + Content, Drawer, DrawerActions, DrawerCloseButton, @@ -11,9 +12,6 @@ import { Flex, Modal, ModalVariant, - Text, - TextContent, - TextVariants, Wizard, WizardHeader, WizardStep @@ -59,8 +57,8 @@ export const WizardModalWithDrawerInfoStepDemo: React.FunctionComponent = () => spaceItems={{ default: 'spaceItemsLg' }} height="100%" > - - {stepName} content + +

{stepName} content

Wizard description goes here. If you need more assistance,{' '} {' '} in the side drawer.{' '}

-
+
diff --git a/packages/react-core/src/demos/examples/Wizard/InPageWithDrawer.tsx b/packages/react-core/src/demos/examples/Wizard/InPageWithDrawer.tsx index b55589387ab..8802409c7cc 100644 --- a/packages/react-core/src/demos/examples/Wizard/InPageWithDrawer.tsx +++ b/packages/react-core/src/demos/examples/Wizard/InPageWithDrawer.tsx @@ -4,6 +4,7 @@ import { Breadcrumb, BreadcrumbItem, Button, + Content, Drawer, DrawerActions, DrawerCloseButton, @@ -21,8 +22,6 @@ import { PageSidebar, PageSidebarBody, SkipToContent, - Text, - TextContent, Masthead, PageToggleButton, MastheadToggle, @@ -159,10 +158,10 @@ export const WizardFullPageWithDrawerDemo: React.FunctionComponent = () => { mainContainerId={pageId} > - - Main title - A demo of a wizard in a page. - + +

Main title

+

A demo of a wizard in a page.

+
diff --git a/packages/react-core/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx b/packages/react-core/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx index fae61080959..b5e13dfa326 100644 --- a/packages/react-core/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx +++ b/packages/react-core/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx @@ -4,6 +4,7 @@ import { Breadcrumb, BreadcrumbItem, Button, + Content, Drawer, DrawerActions, DrawerCloseButton, @@ -21,8 +22,6 @@ import { PageSidebar, PageSidebarBody, SkipToContent, - Text, - TextContent, Masthead, PageToggleButton, MastheadToggle, @@ -138,8 +137,8 @@ export const WizardFullPageWithDrawerInfoStepDemo: React.FunctionComponent = () spaceItems={{ default: 'spaceItemsLg' }} height="100%" > - - {stepName} content + +

{stepName} content

Wizard description goes here. If you need more assistance,{' '} {' '} in the side drawer.{' '}

-
+
@@ -164,10 +163,10 @@ export const WizardFullPageWithDrawerInfoStepDemo: React.FunctionComponent = () mainContainerId={pageId} > - - Main title - A demo of a wizard in a page. - + +

Main title

+

A demo of a wizard in a page.

+
diff --git a/packages/react-docs/patternfly-docs/pages/icons.js b/packages/react-docs/patternfly-docs/pages/icons.js index b3844cadfc9..6c2b50c5a0b 100644 --- a/packages/react-docs/patternfly-docs/pages/icons.js +++ b/packages/react-docs/patternfly-docs/pages/icons.js @@ -1,5 +1,5 @@ import React from 'react'; -import { Tooltip, Text, Grid, GridItem, PageSection } from '@patternfly/react-core'; +import { Tooltip, Grid, GridItem, PageSection, Content } from '@patternfly/react-core'; import spacerMd from '@patternfly/react-tokens/dist/esm/global_spacer_md'; import labelFontSize from '@patternfly/react-tokens/dist/esm/global_font_size_sm'; import * as IconsModule from '@patternfly/react-icons/dist/esm'; @@ -36,14 +36,14 @@ const iconsPage = () => { return ( - + These are all of the icons available for use in PatternFly React. For recommended icon usage, see our{' '} icon usage guidelines. - - + + Learn how you can use them in the{' '} react-icons docs. - + {allIcons // BREAKING CHANGE - remove line below when AnsibeTowerIcon is removed diff --git a/packages/react-integration/demo-app-ts/src/components/demos/AboutModal/AboutModalDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/AboutModal/AboutModalDemo.tsx index 3cda19c050f..30aa5e8f5a7 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/AboutModal/AboutModalDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/AboutModal/AboutModalDemo.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { AboutModal, Button, TextContent, TextList, TextListItem } from '@patternfly/react-core'; +import { AboutModal, Button, Content } from '@patternfly/react-core'; const brandImg = '../../../assets/images/brandImg.svg'; interface AboutModalState { @@ -37,24 +37,24 @@ export class AboutModalDemo extends React.Component<{}, AboutModalState> { brandImageAlt="Patternfly Logo" productName="Product Name" > - - - CFME Version - 5.5.3.4.20102789036450 - Cloudforms Version - 4.1 - Server Name - 40DemoMaster - User Name - Administrator - User Role - EvmRole-super_administrator - Browser Version - 601.2 - Browser OS - Mac - - + +
+
CFME Version
+
5.5.3.4.20102789036450
+
Cloudforms Version
+
4.1
+
Server Name
+
40DemoMaster
+
User Name
+
Administrator
+
User Role
+
EvmRole-super_administrator
+
Browser Version
+
601.2
+
Browser OS
+
Mac
+
+
); diff --git a/packages/react-integration/demo-app-ts/src/components/demos/BackToTopDemo/BackToTopDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/BackToTopDemo/BackToTopDemo.tsx index 4eb13c459c9..cb4111882df 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/BackToTopDemo/BackToTopDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/BackToTopDemo/BackToTopDemo.tsx @@ -1,25 +1,15 @@ -import { - BackToTop, - Card, - CardBody, - Gallery, - GalleryItem, - PageSection, - TextContent, - Text, - Page -} from '@patternfly/react-core'; +import { BackToTop, Card, CardBody, Content, Gallery, GalleryItem, PageSection, Page } from '@patternfly/react-core'; export const BackToTopDemo = () => ( - - Main title - + +

Main title

+

Body text should be Overpass Regular at 16px.It should have leading of 24px because
of it’s relative line height of 1.5. - - +

+
diff --git a/packages/react-integration/demo-app-ts/src/components/demos/TextAreaDemo/TextAreaDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/TextAreaDemo/TextAreaDemo.tsx index b6b5be34ae7..412d4655f44 100644 --- a/packages/react-integration/demo-app-ts/src/components/demos/TextAreaDemo/TextAreaDemo.tsx +++ b/packages/react-integration/demo-app-ts/src/components/demos/TextAreaDemo/TextAreaDemo.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { TextArea, Text, ValidatedOptions } from '@patternfly/react-core'; +import { Content, TextArea, ValidatedOptions } from '@patternfly/react-core'; interface TextAreaState { textAreaValue: string; @@ -81,7 +81,7 @@ export class TextAreaDemo extends React.Component<{}, TextAreaState> { } = this.state; return ( <> - Text area + Text area