@patternfly/react-core 4.236.11 → 4.236.14
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 +30 -0
- package/dist/esm/components/Masthead/Masthead.js +1 -1
- package/dist/esm/components/Masthead/Masthead.js.map +1 -1
- package/dist/esm/components/Page/Page.d.ts +0 -13
- package/dist/esm/components/Page/Page.d.ts.map +1 -1
- package/dist/esm/components/Page/Page.js +3 -13
- package/dist/esm/components/Page/Page.js.map +1 -1
- package/dist/esm/components/Page/PageBreadcrumb.js +1 -1
- package/dist/esm/components/Page/PageBreadcrumb.js.map +1 -1
- package/dist/esm/components/Page/PageContext.d.ts +15 -0
- package/dist/esm/components/Page/PageContext.d.ts.map +1 -0
- package/dist/esm/components/Page/PageContext.js +15 -0
- package/dist/esm/components/Page/PageContext.js.map +1 -0
- package/dist/esm/components/Page/PageGroup.js +1 -1
- package/dist/esm/components/Page/PageGroup.js.map +1 -1
- package/dist/esm/components/Page/PageHeader.js +1 -1
- package/dist/esm/components/Page/PageHeader.js.map +1 -1
- package/dist/esm/components/Page/PageHeaderToolsGroup.js +1 -1
- package/dist/esm/components/Page/PageHeaderToolsGroup.js.map +1 -1
- package/dist/esm/components/Page/PageHeaderToolsItem.js +1 -1
- package/dist/esm/components/Page/PageHeaderToolsItem.js.map +1 -1
- package/dist/esm/components/Page/PageNavigation.js +1 -1
- package/dist/esm/components/Page/PageNavigation.js.map +1 -1
- package/dist/esm/components/Page/PageSection.js +1 -1
- package/dist/esm/components/Page/PageSection.js.map +1 -1
- package/dist/esm/components/Page/PageSidebar.js +1 -1
- package/dist/esm/components/Page/PageSidebar.js.map +1 -1
- package/dist/esm/components/Page/PageToggleButton.js +1 -1
- package/dist/esm/components/Page/PageToggleButton.js.map +1 -1
- package/dist/esm/components/Page/index.d.ts +1 -0
- package/dist/esm/components/Page/index.d.ts.map +1 -1
- package/dist/esm/components/Page/index.js +1 -0
- package/dist/esm/components/Page/index.js.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.js +1 -1
- package/dist/esm/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarContent.js +1 -1
- package/dist/esm/components/Toolbar/ToolbarContent.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.js +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarItem.js +1 -1
- package/dist/esm/components/Toolbar/ToolbarItem.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.js +1 -1
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.js.map +1 -1
- package/dist/js/components/Masthead/Masthead.js +2 -2
- package/dist/js/components/Masthead/Masthead.js.map +1 -1
- package/dist/js/components/Page/Page.d.ts +0 -13
- package/dist/js/components/Page/Page.d.ts.map +1 -1
- package/dist/js/components/Page/Page.js +5 -15
- package/dist/js/components/Page/Page.js.map +1 -1
- package/dist/js/components/Page/PageBreadcrumb.js +2 -2
- package/dist/js/components/Page/PageBreadcrumb.js.map +1 -1
- package/dist/js/components/Page/PageContext.d.ts +15 -0
- package/dist/js/components/Page/PageContext.d.ts.map +1 -0
- package/dist/js/components/Page/PageContext.js +19 -0
- package/dist/js/components/Page/PageContext.js.map +1 -0
- package/dist/js/components/Page/PageGroup.js +2 -2
- package/dist/js/components/Page/PageGroup.js.map +1 -1
- package/dist/js/components/Page/PageHeader.js +2 -2
- package/dist/js/components/Page/PageHeader.js.map +1 -1
- package/dist/js/components/Page/PageHeaderToolsGroup.js +2 -2
- package/dist/js/components/Page/PageHeaderToolsGroup.js.map +1 -1
- package/dist/js/components/Page/PageHeaderToolsItem.js +2 -2
- package/dist/js/components/Page/PageHeaderToolsItem.js.map +1 -1
- package/dist/js/components/Page/PageNavigation.js +2 -2
- package/dist/js/components/Page/PageNavigation.js.map +1 -1
- package/dist/js/components/Page/PageSection.js +2 -2
- package/dist/js/components/Page/PageSection.js.map +1 -1
- package/dist/js/components/Page/PageSidebar.js +2 -2
- package/dist/js/components/Page/PageSidebar.js.map +1 -1
- package/dist/js/components/Page/PageToggleButton.js +2 -2
- package/dist/js/components/Page/PageToggleButton.js.map +1 -1
- package/dist/js/components/Page/index.d.ts +1 -0
- package/dist/js/components/Page/index.d.ts.map +1 -1
- package/dist/js/components/Page/index.js +1 -0
- package/dist/js/components/Page/index.js.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.js +2 -2
- package/dist/js/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarContent.js +2 -2
- package/dist/js/components/Toolbar/ToolbarContent.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarGroup.js +2 -2
- package/dist/js/components/Toolbar/ToolbarGroup.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarItem.js +2 -2
- package/dist/js/components/Toolbar/ToolbarItem.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarToggleGroup.js +2 -2
- package/dist/js/components/Toolbar/ToolbarToggleGroup.js.map +1 -1
- package/dist/umd/react-core.min.css +113 -102
- package/dist/umd/react-core.min.js +2 -2
- package/package.json +6 -6
- package/src/components/Masthead/Masthead.tsx +1 -1
- package/src/components/Page/Page.tsx +4 -34
- package/src/components/Page/PageBreadcrumb.tsx +1 -1
- package/src/components/Page/PageContext.tsx +27 -0
- package/src/components/Page/PageGroup.tsx +1 -1
- package/src/components/Page/PageHeader.tsx +1 -1
- package/src/components/Page/PageHeaderToolsGroup.tsx +1 -1
- package/src/components/Page/PageHeaderToolsItem.tsx +1 -1
- package/src/components/Page/PageNavigation.tsx +1 -1
- package/src/components/Page/PageSection.tsx +1 -1
- package/src/components/Page/PageSidebar.tsx +1 -1
- package/src/components/Page/PageToggleButton.tsx +1 -1
- package/src/components/Page/__tests__/Page.test.tsx +2 -1
- package/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap +2 -2
- package/src/components/Page/index.ts +1 -0
- package/src/components/Toolbar/Toolbar.tsx +1 -1
- package/src/components/Toolbar/ToolbarContent.tsx +1 -1
- package/src/components/Toolbar/ToolbarGroup.tsx +1 -1
- package/src/components/Toolbar/ToolbarItem.tsx +1 -1
- package/src/components/Toolbar/ToolbarToggleGroup.tsx +1 -1
- package/src/demos/Page/Page.md +10 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "4.236.
|
|
3
|
+
"version": "4.236.14",
|
|
4
4
|
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
"generate": "node scripts/copyStyles.js"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@patternfly/react-icons": "^4.87.
|
|
48
|
-
"@patternfly/react-styles": "^4.86.
|
|
49
|
-
"@patternfly/react-tokens": "^4.88.
|
|
47
|
+
"@patternfly/react-icons": "^4.87.14",
|
|
48
|
+
"@patternfly/react-styles": "^4.86.14",
|
|
49
|
+
"@patternfly/react-tokens": "^4.88.14",
|
|
50
50
|
"focus-trap": "6.9.2",
|
|
51
51
|
"react-dropzone": "9.0.0",
|
|
52
52
|
"tippy.js": "5.1.2",
|
|
53
53
|
"tslib": "^2.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@patternfly/patternfly": "4.
|
|
56
|
+
"@patternfly/patternfly": "4.214.1",
|
|
57
57
|
"@rollup/plugin-commonjs": "^21.0.0",
|
|
58
58
|
"@rollup/plugin-node-resolve": "^13.0.0",
|
|
59
59
|
"@rollup/plugin-replace": "^3.0.0",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"react": "^16.8.0 || ^17.0.0",
|
|
71
71
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "903be22b53212eaa7d4b2aa290a790ce64a10d52"
|
|
74
74
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import styles from '@patternfly/react-styles/css/components/Masthead/masthead';
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import { formatBreakpointMods } from '../../helpers/util';
|
|
5
|
-
import { PageContext } from '../Page/
|
|
5
|
+
import { PageContext } from '../Page/PageContext';
|
|
6
6
|
|
|
7
7
|
export interface MastheadProps extends React.DetailedHTMLProps<React.HTMLProps<HTMLDivElement>, HTMLDivElement> {
|
|
8
8
|
/** Content rendered inside of the masthead */
|
|
@@ -5,39 +5,15 @@ import globalBreakpointXl from '@patternfly/react-tokens/dist/esm/global_breakpo
|
|
|
5
5
|
import { debounce, canUseDOM } from '../../helpers/util';
|
|
6
6
|
import { Drawer, DrawerContent, DrawerContentBody, DrawerPanelContent } from '../Drawer';
|
|
7
7
|
import { PageBreadcrumbProps } from './PageBreadcrumb';
|
|
8
|
-
import { PageGroupProps } from './PageGroup';
|
|
8
|
+
import { PageGroup, PageGroupProps } from './PageGroup';
|
|
9
9
|
import { getResizeObserver } from '../../helpers/resizeObserver';
|
|
10
10
|
import { formatBreakpointMods, getBreakpoint, getVerticalBreakpoint } from '../../helpers/util';
|
|
11
|
+
import { PageContextProvider } from './PageContext';
|
|
11
12
|
|
|
12
13
|
export enum PageLayouts {
|
|
13
14
|
vertical = 'vertical',
|
|
14
15
|
horizontal = 'horizontal'
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
export interface PageContextProps {
|
|
18
|
-
isManagedSidebar: boolean;
|
|
19
|
-
onNavToggle: () => void;
|
|
20
|
-
isNavOpen: boolean;
|
|
21
|
-
width: number;
|
|
22
|
-
height: number;
|
|
23
|
-
getBreakpoint: (width: number | null) => 'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
24
|
-
getVerticalBreakpoint: (height: number | null) => 'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const pageContextDefaults: PageContextProps = {
|
|
28
|
-
isManagedSidebar: false,
|
|
29
|
-
isNavOpen: false,
|
|
30
|
-
onNavToggle: () => null,
|
|
31
|
-
width: null,
|
|
32
|
-
height: null,
|
|
33
|
-
getBreakpoint,
|
|
34
|
-
getVerticalBreakpoint
|
|
35
|
-
};
|
|
36
|
-
export const PageContext = React.createContext<PageContextProps>(pageContextDefaults);
|
|
37
|
-
|
|
38
|
-
export const PageContextProvider = PageContext.Provider;
|
|
39
|
-
export const PageContextConsumer = PageContext.Consumer;
|
|
40
|
-
|
|
41
17
|
export interface PageProps extends React.HTMLProps<HTMLDivElement> {
|
|
42
18
|
/** Content rendered inside the main section of the page layout (e.g. <PageSection />) */
|
|
43
19
|
children?: React.ReactNode;
|
|
@@ -306,17 +282,11 @@ export class Page extends React.Component<PageProps, PageState> {
|
|
|
306
282
|
const isGrouped = isTertiaryNavGrouped || isBreadcrumbGrouped || additionalGroupedContent;
|
|
307
283
|
|
|
308
284
|
const group = isGrouped ? (
|
|
309
|
-
<
|
|
310
|
-
className={css(
|
|
311
|
-
styles.pageMainGroup,
|
|
312
|
-
formatBreakpointMods(groupProps?.stickyOnBreakpoint, styles, 'sticky-', getVerticalBreakpoint(height), true)
|
|
313
|
-
)}
|
|
314
|
-
{...groupProps}
|
|
315
|
-
>
|
|
285
|
+
<PageGroup {...groupProps}>
|
|
316
286
|
{isTertiaryNavGrouped && nav}
|
|
317
287
|
{isBreadcrumbGrouped && crumb}
|
|
318
288
|
{additionalGroupedContent}
|
|
319
|
-
</
|
|
289
|
+
</PageGroup>
|
|
320
290
|
) : null;
|
|
321
291
|
|
|
322
292
|
const main = (
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
import styles from '@patternfly/react-styles/css/components/Page/page';
|
|
4
4
|
import { formatBreakpointMods } from '../../helpers/util';
|
|
5
|
-
import { PageContext } from '
|
|
5
|
+
import { PageContext } from './PageContext';
|
|
6
6
|
|
|
7
7
|
export interface PageBreadcrumbProps extends React.HTMLProps<HTMLElement> {
|
|
8
8
|
/** Additional classes to apply to the PageBreadcrumb */
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { getBreakpoint, getVerticalBreakpoint } from '../../helpers/util';
|
|
3
|
+
|
|
4
|
+
export interface PageContextProps {
|
|
5
|
+
isManagedSidebar: boolean;
|
|
6
|
+
onNavToggle: () => void;
|
|
7
|
+
isNavOpen: boolean;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
getBreakpoint: (width: number | null) => 'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
11
|
+
getVerticalBreakpoint: (height: number | null) => 'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const pageContextDefaults: PageContextProps = {
|
|
15
|
+
isManagedSidebar: false,
|
|
16
|
+
isNavOpen: false,
|
|
17
|
+
onNavToggle: () => null,
|
|
18
|
+
width: null,
|
|
19
|
+
height: null,
|
|
20
|
+
getBreakpoint,
|
|
21
|
+
getVerticalBreakpoint
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const PageContext = React.createContext<PageContextProps>(pageContextDefaults);
|
|
25
|
+
|
|
26
|
+
export const PageContextProvider = PageContext.Provider;
|
|
27
|
+
export const PageContextConsumer = PageContext.Consumer;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
import styles from '@patternfly/react-styles/css/components/Page/page';
|
|
4
4
|
import { formatBreakpointMods } from '../../helpers/util';
|
|
5
|
-
import { PageContext } from '
|
|
5
|
+
import { PageContext } from './PageContext';
|
|
6
6
|
export interface PageGroupProps extends React.HTMLProps<HTMLDivElement> {
|
|
7
7
|
/** Additional classes to apply to the PageGroup */
|
|
8
8
|
className?: string;
|
|
@@ -4,7 +4,7 @@ import styles from '@patternfly/react-styles/css/components/Page/page';
|
|
|
4
4
|
import { css } from '@patternfly/react-styles';
|
|
5
5
|
import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
|
|
6
6
|
import { Button, ButtonVariant } from '../../components/Button';
|
|
7
|
-
import { PageContextConsumer, PageContextProps } from './
|
|
7
|
+
import { PageContextConsumer, PageContextProps } from './PageContext';
|
|
8
8
|
|
|
9
9
|
export interface PageHeaderProps extends React.HTMLProps<HTMLDivElement> {
|
|
10
10
|
/** Additional classes added to the page header */
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import styles from '@patternfly/react-styles/css/components/Page/page';
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import { formatBreakpointMods } from '../../helpers/util';
|
|
5
|
-
import { PageContext } from '
|
|
5
|
+
import { PageContext } from './PageContext';
|
|
6
6
|
|
|
7
7
|
export interface PageHeaderToolsGroupProps extends React.HTMLProps<HTMLDivElement> {
|
|
8
8
|
/** Content rendered in the page header tools group */
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import styles from '@patternfly/react-styles/css/components/Page/page';
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import { formatBreakpointMods } from '../../helpers/util';
|
|
5
|
-
import { PageContext } from '
|
|
5
|
+
import { PageContext } from './PageContext';
|
|
6
6
|
|
|
7
7
|
export interface PageHeaderToolsItemProps extends React.HTMLProps<HTMLDivElement> {
|
|
8
8
|
/** Content rendered in page header tools item. */
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
import styles from '@patternfly/react-styles/css/components/Page/page';
|
|
4
4
|
import { formatBreakpointMods } from '../../helpers/util';
|
|
5
|
-
import { PageContext } from '
|
|
5
|
+
import { PageContext } from './PageContext';
|
|
6
6
|
|
|
7
7
|
export interface PageNavigationProps extends React.HTMLProps<HTMLDivElement> {
|
|
8
8
|
/** Additional classes to apply to the PageNavigation */
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import styles from '@patternfly/react-styles/css/components/Page/page';
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import { formatBreakpointMods } from '../../helpers/util';
|
|
5
|
-
import { PageContext } from '
|
|
5
|
+
import { PageContext } from './PageContext';
|
|
6
6
|
|
|
7
7
|
export enum PageSectionVariants {
|
|
8
8
|
default = 'default',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import styles from '@patternfly/react-styles/css/components/Page/page';
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
|
-
import { PageContextConsumer } from './
|
|
4
|
+
import { PageContextConsumer } from './PageContext';
|
|
5
5
|
|
|
6
6
|
export interface PageSidebarProps extends React.HTMLProps<HTMLDivElement> {
|
|
7
7
|
/** Additional classes added to the page sidebar */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Button, ButtonProps, ButtonVariant } from '../../components/Button';
|
|
4
|
-
import { PageContextConsumer, PageContextProps } from './
|
|
4
|
+
import { PageContextConsumer, PageContextProps } from './PageContext';
|
|
5
5
|
|
|
6
6
|
export interface PageToggleButtonProps extends ButtonProps {
|
|
7
7
|
/** Content of the page toggle button */
|
|
@@ -356,7 +356,7 @@ describe('Page', () => {
|
|
|
356
356
|
tertiaryNav={nav}
|
|
357
357
|
isBreadcrumbGrouped
|
|
358
358
|
isTertiaryNavGrouped
|
|
359
|
-
groupProps={{ stickyOnBreakpoint: { default: 'bottom' }, hasShadowTop: true }}
|
|
359
|
+
groupProps={{ stickyOnBreakpoint: { default: 'bottom' }, hasShadowTop: true, 'aria-label': 'test' }}
|
|
360
360
|
>
|
|
361
361
|
<PageSection variant="default">Section with default background</PageSection>
|
|
362
362
|
<PageSection variant="light">Section with light background</PageSection>
|
|
@@ -366,6 +366,7 @@ describe('Page', () => {
|
|
|
366
366
|
);
|
|
367
367
|
|
|
368
368
|
expect(screen.getByRole('main')).not.toHaveAttribute('id');
|
|
369
|
+
expect(screen.getByLabelText('test')).toHaveClass('pf-m-shadow-top');
|
|
369
370
|
expect(asFragment()).toMatchSnapshot();
|
|
370
371
|
});
|
|
371
372
|
|
|
@@ -785,8 +785,8 @@ exports[`Page Check page to verify grouped nav and breadcrumb - old / props synt
|
|
|
785
785
|
tabindex="-1"
|
|
786
786
|
>
|
|
787
787
|
<div
|
|
788
|
-
|
|
789
|
-
|
|
788
|
+
aria-label="test"
|
|
789
|
+
class="pf-c-page__main-group pf-m-sticky-bottom pf-m-shadow-top"
|
|
790
790
|
>
|
|
791
791
|
<div
|
|
792
792
|
class="pf-c-page__main-nav"
|
|
@@ -6,7 +6,7 @@ import { ToolbarContext } from './ToolbarUtils';
|
|
|
6
6
|
import { ToolbarChipGroupContent } from './ToolbarChipGroupContent';
|
|
7
7
|
import { formatBreakpointMods, canUseDOM } from '../../helpers/util';
|
|
8
8
|
import { getDefaultOUIAId, getOUIAProps, OUIAProps } from '../../helpers';
|
|
9
|
-
import { PageContext } from '../Page/
|
|
9
|
+
import { PageContext } from '../Page/PageContext';
|
|
10
10
|
|
|
11
11
|
export interface ToolbarProps extends React.HTMLProps<HTMLDivElement>, OUIAProps {
|
|
12
12
|
/** Optional callback for clearing all filters in the toolbar */
|
|
@@ -4,7 +4,7 @@ import { css } from '@patternfly/react-styles';
|
|
|
4
4
|
import { ToolbarContentContext, ToolbarContext } from './ToolbarUtils';
|
|
5
5
|
import { formatBreakpointMods } from '../../helpers/util';
|
|
6
6
|
import { ToolbarExpandableContent } from './ToolbarExpandableContent';
|
|
7
|
-
import { PageContext } from '../Page/
|
|
7
|
+
import { PageContext } from '../Page/PageContext';
|
|
8
8
|
|
|
9
9
|
export interface ToolbarContentProps extends React.HTMLProps<HTMLDivElement> {
|
|
10
10
|
/** Classes applied to root element of the data toolbar content row */
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import styles from '@patternfly/react-styles/css/components/Toolbar/toolbar';
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
import { formatBreakpointMods, toCamel } from '../../helpers/util';
|
|
5
|
-
import { PageContext } from '../Page/
|
|
5
|
+
import { PageContext } from '../Page/PageContext';
|
|
6
6
|
|
|
7
7
|
export enum ToolbarGroupVariant {
|
|
8
8
|
'filter-group' = 'filter-group',
|
|
@@ -4,7 +4,7 @@ import { css } from '@patternfly/react-styles';
|
|
|
4
4
|
|
|
5
5
|
import { formatBreakpointMods, toCamel } from '../../helpers/util';
|
|
6
6
|
import { Divider } from '../Divider';
|
|
7
|
-
import { PageContext } from '../Page/
|
|
7
|
+
import { PageContext } from '../Page/PageContext';
|
|
8
8
|
|
|
9
9
|
export enum ToolbarItemVariant {
|
|
10
10
|
separator = 'separator',
|
|
@@ -7,7 +7,7 @@ import { ToolbarContext, ToolbarContentContext } from './ToolbarUtils';
|
|
|
7
7
|
import { Button } from '../Button';
|
|
8
8
|
import globalBreakpointLg from '@patternfly/react-tokens/dist/esm/global_breakpoint_lg';
|
|
9
9
|
import { formatBreakpointMods, toCamel, canUseDOM } from '../../helpers/util';
|
|
10
|
-
import { PageContext } from '../Page/
|
|
10
|
+
import { PageContext } from '../Page/PageContext';
|
|
11
11
|
|
|
12
12
|
export interface ToolbarToggleGroupProps extends ToolbarGroupProps {
|
|
13
13
|
/** An icon to be rendered when the toggle group has collapsed down */
|
package/src/demos/Page/Page.md
CHANGED
|
@@ -3,8 +3,6 @@ id: Page
|
|
|
3
3
|
section: components
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
import { css } from '@patternfly/react-styles';
|
|
7
|
-
import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon';
|
|
8
6
|
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
|
|
9
7
|
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
|
|
10
8
|
import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
|
|
@@ -40,13 +38,11 @@ import {
|
|
|
40
38
|
ButtonVariant,
|
|
41
39
|
Card,
|
|
42
40
|
CardBody,
|
|
43
|
-
Checkbox,
|
|
44
41
|
Divider,
|
|
45
42
|
Dropdown,
|
|
46
43
|
DropdownGroup,
|
|
47
44
|
DropdownToggle,
|
|
48
45
|
DropdownItem,
|
|
49
|
-
DropdownSeparator,
|
|
50
46
|
Gallery,
|
|
51
47
|
GalleryItem,
|
|
52
48
|
KebabToggle,
|
|
@@ -78,8 +74,6 @@ import {
|
|
|
78
74
|
DrawerActions,
|
|
79
75
|
DrawerCloseButton,
|
|
80
76
|
} from '@patternfly/react-core';
|
|
81
|
-
import { css } from '@patternfly/react-styles';
|
|
82
|
-
import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon';
|
|
83
77
|
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
|
|
84
78
|
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
|
|
85
79
|
import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
|
|
@@ -181,10 +175,10 @@ class PageLayoutGrouped extends React.Component {
|
|
|
181
175
|
);
|
|
182
176
|
|
|
183
177
|
const kebabDropdownItems = [
|
|
184
|
-
<DropdownItem>
|
|
178
|
+
<DropdownItem key="settings">
|
|
185
179
|
<CogIcon /> Settings
|
|
186
180
|
</DropdownItem>,
|
|
187
|
-
<DropdownItem>
|
|
181
|
+
<DropdownItem key="help">
|
|
188
182
|
<HelpIcon /> Help
|
|
189
183
|
</DropdownItem>
|
|
190
184
|
];
|
|
@@ -357,7 +351,7 @@ class PageLayoutGrouped extends React.Component {
|
|
|
357
351
|
</PageSection>
|
|
358
352
|
}
|
|
359
353
|
groupProps={{
|
|
360
|
-
stickyOnBreakpoint: { default: 'top' }
|
|
354
|
+
stickyOnBreakpoint: { default: 'top' }
|
|
361
355
|
}}
|
|
362
356
|
>
|
|
363
357
|
<PageSection>
|
|
@@ -399,7 +393,6 @@ import {
|
|
|
399
393
|
DropdownGroup,
|
|
400
394
|
DropdownToggle,
|
|
401
395
|
DropdownItem,
|
|
402
|
-
DropdownSeparator,
|
|
403
396
|
Gallery,
|
|
404
397
|
GalleryItem,
|
|
405
398
|
KebabToggle,
|
|
@@ -410,7 +403,6 @@ import {
|
|
|
410
403
|
PageHeader,
|
|
411
404
|
PageSection,
|
|
412
405
|
PageSectionVariants,
|
|
413
|
-
PageSidebar,
|
|
414
406
|
SkipToContent,
|
|
415
407
|
TextContent,
|
|
416
408
|
Text,
|
|
@@ -418,8 +410,6 @@ import {
|
|
|
418
410
|
PageHeaderToolsGroup,
|
|
419
411
|
PageHeaderToolsItem
|
|
420
412
|
} from '@patternfly/react-core';
|
|
421
|
-
import { css } from '@patternfly/react-styles';
|
|
422
|
-
import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon';
|
|
423
413
|
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
|
|
424
414
|
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
|
|
425
415
|
import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
|
|
@@ -490,10 +480,10 @@ class PageLayoutGrouped extends React.Component {
|
|
|
490
480
|
</Nav>
|
|
491
481
|
);
|
|
492
482
|
const kebabDropdownItems = [
|
|
493
|
-
<DropdownItem>
|
|
483
|
+
<DropdownItem key="settings">
|
|
494
484
|
<CogIcon /> Settings
|
|
495
485
|
</DropdownItem>,
|
|
496
|
-
<DropdownItem>
|
|
486
|
+
<DropdownItem key="help">
|
|
497
487
|
<HelpIcon /> Help
|
|
498
488
|
</DropdownItem>
|
|
499
489
|
];
|
|
@@ -641,7 +631,6 @@ import {
|
|
|
641
631
|
DropdownGroup,
|
|
642
632
|
DropdownToggle,
|
|
643
633
|
DropdownItem,
|
|
644
|
-
DropdownSeparator,
|
|
645
634
|
Gallery,
|
|
646
635
|
GalleryItem,
|
|
647
636
|
KebabToggle,
|
|
@@ -652,7 +641,6 @@ import {
|
|
|
652
641
|
PageHeader,
|
|
653
642
|
PageSection,
|
|
654
643
|
PageSectionVariants,
|
|
655
|
-
PageSidebar,
|
|
656
644
|
PageGroup,
|
|
657
645
|
PageBreadcrumb,
|
|
658
646
|
PageNavigation,
|
|
@@ -663,8 +651,6 @@ import {
|
|
|
663
651
|
PageHeaderToolsGroup,
|
|
664
652
|
PageHeaderToolsItem
|
|
665
653
|
} from '@patternfly/react-core';
|
|
666
|
-
import { css } from '@patternfly/react-styles';
|
|
667
|
-
import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon';
|
|
668
654
|
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
|
|
669
655
|
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
|
|
670
656
|
import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
|
|
@@ -714,10 +700,10 @@ class PageLayoutGroupedAlt extends React.Component {
|
|
|
714
700
|
const { isDropdownOpen, isKebabDropdownOpen, activeItem } = this.state;
|
|
715
701
|
|
|
716
702
|
const kebabDropdownItems = [
|
|
717
|
-
<DropdownItem>
|
|
703
|
+
<DropdownItem key="settings">
|
|
718
704
|
<CogIcon /> Settings
|
|
719
705
|
</DropdownItem>,
|
|
720
|
-
<DropdownItem>
|
|
706
|
+
<DropdownItem key="help">
|
|
721
707
|
<HelpIcon /> Help
|
|
722
708
|
</DropdownItem>
|
|
723
709
|
];
|
|
@@ -863,13 +849,11 @@ import {
|
|
|
863
849
|
ButtonVariant,
|
|
864
850
|
Card,
|
|
865
851
|
CardBody,
|
|
866
|
-
Checkbox,
|
|
867
852
|
Divider,
|
|
868
853
|
Dropdown,
|
|
869
854
|
DropdownGroup,
|
|
870
855
|
DropdownToggle,
|
|
871
856
|
DropdownItem,
|
|
872
|
-
DropdownSeparator,
|
|
873
857
|
Gallery,
|
|
874
858
|
GalleryItem,
|
|
875
859
|
KebabToggle,
|
|
@@ -884,8 +868,8 @@ import {
|
|
|
884
868
|
Page,
|
|
885
869
|
PageSection,
|
|
886
870
|
PageSectionVariants,
|
|
887
|
-
PageSidebar,
|
|
888
871
|
PageToggleButton,
|
|
872
|
+
PageSidebar,
|
|
889
873
|
SkipToContent,
|
|
890
874
|
TextContent,
|
|
891
875
|
Text,
|
|
@@ -901,8 +885,6 @@ import {
|
|
|
901
885
|
DrawerActions,
|
|
902
886
|
DrawerCloseButton,
|
|
903
887
|
} from '@patternfly/react-core';
|
|
904
|
-
import { css } from '@patternfly/react-styles';
|
|
905
|
-
import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon';
|
|
906
888
|
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
|
|
907
889
|
import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
|
|
908
890
|
import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
|
|
@@ -1004,10 +986,10 @@ class PageLayoutGrouped extends React.Component {
|
|
|
1004
986
|
);
|
|
1005
987
|
|
|
1006
988
|
const kebabDropdownItems = [
|
|
1007
|
-
<DropdownItem>
|
|
989
|
+
<DropdownItem key="settings">
|
|
1008
990
|
<CogIcon /> Settings
|
|
1009
991
|
</DropdownItem>,
|
|
1010
|
-
<DropdownItem>
|
|
992
|
+
<DropdownItem key="help">
|
|
1011
993
|
<HelpIcon /> Help
|
|
1012
994
|
</DropdownItem>
|
|
1013
995
|
];
|