@patternfly/react-core 5.0.0-alpha.31 → 5.0.0-alpha.33
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 +18 -0
- package/components/Alert/Alert.d.ts +0 -2
- package/components/Alert/Alert.d.ts.map +1 -1
- package/components/Alert/Alert.js +2 -6
- package/components/Alert/Alert.js.map +1 -1
- package/components/EmptyState/EmptyState.d.ts +6 -6
- package/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/components/EmptyState/EmptyState.js +4 -4
- package/components/EmptyState/EmptyState.js.map +1 -1
- package/components/EmptyState/EmptyStateActions.d.ts +9 -0
- package/components/EmptyState/EmptyStateActions.d.ts.map +1 -0
- package/components/EmptyState/EmptyStateActions.js +10 -0
- package/components/EmptyState/EmptyStateActions.js.map +1 -0
- package/components/EmptyState/EmptyStateBody.d.ts +2 -2
- package/components/EmptyState/EmptyStateBody.d.ts.map +1 -1
- package/components/EmptyState/EmptyStateBody.js +1 -1
- package/components/EmptyState/EmptyStateBody.js.map +1 -1
- package/components/EmptyState/EmptyStateFooter.d.ts +9 -0
- package/components/EmptyState/EmptyStateFooter.d.ts.map +1 -0
- package/components/EmptyState/EmptyStateFooter.js +10 -0
- package/components/EmptyState/EmptyStateFooter.js.map +1 -0
- package/components/EmptyState/EmptyStateHeader.d.ts +18 -0
- package/components/EmptyState/EmptyStateHeader.d.ts.map +1 -0
- package/components/EmptyState/EmptyStateHeader.js +14 -0
- package/components/EmptyState/EmptyStateHeader.js.map +1 -0
- package/components/EmptyState/EmptyStateIcon.d.ts +3 -9
- package/components/EmptyState/EmptyStateIcon.d.ts.map +1 -1
- package/components/EmptyState/EmptyStateIcon.js +6 -4
- package/components/EmptyState/EmptyStateIcon.js.map +1 -1
- package/components/EmptyState/index.d.ts +4 -3
- package/components/EmptyState/index.d.ts.map +1 -1
- package/components/EmptyState/index.js +4 -3
- package/components/EmptyState/index.js.map +1 -1
- package/dist/esm/components/Alert/Alert.d.ts +0 -2
- package/dist/esm/components/Alert/Alert.d.ts.map +1 -1
- package/dist/esm/components/Alert/Alert.js +2 -6
- package/dist/esm/components/Alert/Alert.js.map +1 -1
- package/dist/esm/components/EmptyState/EmptyState.d.ts +6 -6
- package/dist/esm/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/esm/components/EmptyState/EmptyState.js +4 -4
- package/dist/esm/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/esm/components/EmptyState/EmptyStateActions.d.ts +9 -0
- package/dist/esm/components/EmptyState/EmptyStateActions.d.ts.map +1 -0
- package/dist/esm/components/EmptyState/EmptyStateActions.js +10 -0
- package/dist/esm/components/EmptyState/EmptyStateActions.js.map +1 -0
- package/dist/esm/components/EmptyState/EmptyStateBody.d.ts +2 -2
- package/dist/esm/components/EmptyState/EmptyStateBody.d.ts.map +1 -1
- package/dist/esm/components/EmptyState/EmptyStateBody.js +1 -1
- package/dist/esm/components/EmptyState/EmptyStateBody.js.map +1 -1
- package/dist/esm/components/EmptyState/EmptyStateFooter.d.ts +9 -0
- package/dist/esm/components/EmptyState/EmptyStateFooter.d.ts.map +1 -0
- package/dist/esm/components/EmptyState/EmptyStateFooter.js +10 -0
- package/dist/esm/components/EmptyState/EmptyStateFooter.js.map +1 -0
- package/dist/esm/components/EmptyState/EmptyStateHeader.d.ts +18 -0
- package/dist/esm/components/EmptyState/EmptyStateHeader.d.ts.map +1 -0
- package/dist/esm/components/EmptyState/EmptyStateHeader.js +14 -0
- package/dist/esm/components/EmptyState/EmptyStateHeader.js.map +1 -0
- package/dist/esm/components/EmptyState/EmptyStateIcon.d.ts +3 -9
- package/dist/esm/components/EmptyState/EmptyStateIcon.d.ts.map +1 -1
- package/dist/esm/components/EmptyState/EmptyStateIcon.js +6 -4
- package/dist/esm/components/EmptyState/EmptyStateIcon.js.map +1 -1
- package/dist/esm/components/EmptyState/index.d.ts +4 -3
- package/dist/esm/components/EmptyState/index.d.ts.map +1 -1
- package/dist/esm/components/EmptyState/index.js +4 -3
- package/dist/esm/components/EmptyState/index.js.map +1 -1
- package/dist/js/components/Alert/Alert.d.ts +0 -2
- package/dist/js/components/Alert/Alert.d.ts.map +1 -1
- package/dist/js/components/Alert/Alert.js +2 -6
- package/dist/js/components/Alert/Alert.js.map +1 -1
- package/dist/js/components/EmptyState/EmptyState.d.ts +6 -6
- package/dist/js/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/js/components/EmptyState/EmptyState.js +4 -4
- package/dist/js/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/js/components/EmptyState/EmptyStateActions.d.ts +9 -0
- package/dist/js/components/EmptyState/EmptyStateActions.d.ts.map +1 -0
- package/dist/js/components/EmptyState/EmptyStateActions.js +14 -0
- package/dist/js/components/EmptyState/EmptyStateActions.js.map +1 -0
- package/dist/js/components/EmptyState/EmptyStateBody.d.ts +2 -2
- package/dist/js/components/EmptyState/EmptyStateBody.d.ts.map +1 -1
- package/dist/js/components/EmptyState/EmptyStateBody.js +1 -1
- package/dist/js/components/EmptyState/EmptyStateBody.js.map +1 -1
- package/dist/js/components/EmptyState/EmptyStateFooter.d.ts +9 -0
- package/dist/js/components/EmptyState/EmptyStateFooter.d.ts.map +1 -0
- package/dist/js/components/EmptyState/EmptyStateFooter.js +14 -0
- package/dist/js/components/EmptyState/EmptyStateFooter.js.map +1 -0
- package/dist/js/components/EmptyState/EmptyStateHeader.d.ts +18 -0
- package/dist/js/components/EmptyState/EmptyStateHeader.d.ts.map +1 -0
- package/dist/js/components/EmptyState/EmptyStateHeader.js +18 -0
- package/dist/js/components/EmptyState/EmptyStateHeader.js.map +1 -0
- package/dist/js/components/EmptyState/EmptyStateIcon.d.ts +3 -9
- package/dist/js/components/EmptyState/EmptyStateIcon.d.ts.map +1 -1
- package/dist/js/components/EmptyState/EmptyStateIcon.js +6 -4
- package/dist/js/components/EmptyState/EmptyStateIcon.js.map +1 -1
- package/dist/js/components/EmptyState/index.d.ts +4 -3
- package/dist/js/components/EmptyState/index.d.ts.map +1 -1
- package/dist/js/components/EmptyState/index.js +4 -3
- package/dist/js/components/EmptyState/index.js.map +1 -1
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +2 -2
- package/src/components/Alert/Alert.tsx +1 -10
- package/src/components/Alert/__tests__/Alert.test.tsx +2 -2
- package/src/components/DualListSelector/examples/DualListSelectorComposable.tsx +32 -30
- package/src/components/DualListSelector/examples/DualListSelectorComposableTree.tsx +38 -34
- package/src/components/EmptyState/EmptyState.tsx +9 -9
- package/src/components/EmptyState/EmptyStateActions.tsx +21 -0
- package/src/components/EmptyState/EmptyStateBody.tsx +3 -3
- package/src/components/EmptyState/EmptyStateFooter.tsx +21 -0
- package/src/components/EmptyState/EmptyStateHeader.tsx +42 -0
- package/src/components/EmptyState/EmptyStateIcon.tsx +15 -18
- package/src/components/EmptyState/__tests__/EmptyState.test.tsx +53 -60
- package/src/components/EmptyState/__tests__/Generated/{EmptyStatePrimary.test.tsx → EmptyStateActions.test.tsx} +3 -3
- package/src/components/EmptyState/__tests__/Generated/EmptyStateIcon.test.tsx +3 -6
- package/src/components/EmptyState/__tests__/Generated/__snapshots__/{EmptyStateSecondaryActions.test.tsx.snap → EmptyStateActions.test.tsx.snap} +2 -2
- package/src/components/EmptyState/__tests__/Generated/__snapshots__/EmptyStateIcon.test.tsx.snap +41 -22
- package/src/components/EmptyState/__tests__/__snapshots__/EmptyState.test.tsx.snap +115 -56
- package/src/components/EmptyState/examples/EmptyState.md +7 -3
- package/src/components/EmptyState/examples/EmptyStateBasic.tsx +20 -18
- package/src/components/EmptyState/examples/EmptyStateCustomIconColor.tsx +17 -0
- package/src/components/EmptyState/examples/EmptyStateExtraLarge.tsx +20 -18
- package/src/components/EmptyState/examples/EmptyStateExtraSmall.tsx +16 -15
- package/src/components/EmptyState/examples/EmptyStateLarge.tsx +21 -19
- package/src/components/EmptyState/examples/EmptyStateNoMatchFound.tsx +15 -8
- package/src/components/EmptyState/examples/EmptyStateSmall.tsx +21 -19
- package/src/components/EmptyState/examples/EmptyStateSpinner.tsx +2 -5
- package/src/components/EmptyState/index.ts +4 -3
- package/src/components/NotificationDrawer/examples/NotificationDrawerGroups.tsx +15 -11
- package/src/components/NotificationDrawer/examples/NotificationDrawerLightweight.tsx +14 -10
- package/src/components/Wizard/examples/Wizard.md +1 -1
- package/src/components/Wizard/examples/WizardFinished.tsx +18 -14
- package/src/components/Wizard/examples/WizardValidateOnButtonPress.tsx +20 -16
- package/src/demos/Card/Card.md +13 -8
- package/src/demos/Filters/FilterDemos.md +4 -2
- package/src/demos/Filters/examples/FilterAttributeSearch.tsx +20 -20
- package/src/demos/Filters/examples/FilterFaceted.tsx +19 -19
- package/src/demos/Filters/examples/FilterMixedSelectGroup.tsx +19 -19
- package/src/demos/Filters/examples/FilterSameSelectGroup.tsx +19 -19
- package/src/demos/Filters/examples/FilterSearchInput.tsx +18 -18
- package/src/demos/NotificationDrawer/NotificationDrawer.md +52 -39
- package/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx +19 -17
- package/src/next/components/Wizard/examples/WizardValidateOnButtonPress.tsx +19 -15
- package/src/next/components/Wizard/examples/WizardWithSubmitProgress.tsx +18 -14
- package/components/EmptyState/EmptyStatePrimary.d.ts +0 -9
- package/components/EmptyState/EmptyStatePrimary.d.ts.map +0 -1
- package/components/EmptyState/EmptyStatePrimary.js +0 -9
- package/components/EmptyState/EmptyStatePrimary.js.map +0 -1
- package/components/EmptyState/EmptyStateSecondaryActions.d.ts +0 -9
- package/components/EmptyState/EmptyStateSecondaryActions.d.ts.map +0 -1
- package/components/EmptyState/EmptyStateSecondaryActions.js +0 -9
- package/components/EmptyState/EmptyStateSecondaryActions.js.map +0 -1
- package/dist/esm/components/EmptyState/EmptyStatePrimary.d.ts +0 -9
- package/dist/esm/components/EmptyState/EmptyStatePrimary.d.ts.map +0 -1
- package/dist/esm/components/EmptyState/EmptyStatePrimary.js +0 -9
- package/dist/esm/components/EmptyState/EmptyStatePrimary.js.map +0 -1
- package/dist/esm/components/EmptyState/EmptyStateSecondaryActions.d.ts +0 -9
- package/dist/esm/components/EmptyState/EmptyStateSecondaryActions.d.ts.map +0 -1
- package/dist/esm/components/EmptyState/EmptyStateSecondaryActions.js +0 -9
- package/dist/esm/components/EmptyState/EmptyStateSecondaryActions.js.map +0 -1
- package/dist/js/components/EmptyState/EmptyStatePrimary.d.ts +0 -9
- package/dist/js/components/EmptyState/EmptyStatePrimary.d.ts.map +0 -1
- package/dist/js/components/EmptyState/EmptyStatePrimary.js +0 -13
- package/dist/js/components/EmptyState/EmptyStatePrimary.js.map +0 -1
- package/dist/js/components/EmptyState/EmptyStateSecondaryActions.d.ts +0 -9
- package/dist/js/components/EmptyState/EmptyStateSecondaryActions.d.ts.map +0 -1
- package/dist/js/components/EmptyState/EmptyStateSecondaryActions.js +0 -13
- package/dist/js/components/EmptyState/EmptyStateSecondaryActions.js.map +0 -1
- package/src/components/EmptyState/EmptyStatePrimary.tsx +0 -20
- package/src/components/EmptyState/EmptyStateSecondaryActions.tsx +0 -18
- package/src/components/EmptyState/__tests__/Generated/EmptyStateSecondaryActions.test.tsx +0 -13
- package/src/components/EmptyState/__tests__/Generated/__snapshots__/EmptyStatePrimary.test.tsx.snap +0 -13
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
|
-
Title,
|
|
4
3
|
Button,
|
|
5
4
|
EmptyState,
|
|
6
5
|
EmptyStateVariant,
|
|
7
|
-
EmptyStateIcon,
|
|
8
6
|
EmptyStateBody,
|
|
9
|
-
|
|
7
|
+
EmptyStateActions,
|
|
8
|
+
EmptyStateHeader,
|
|
9
|
+
EmptyStateFooter,
|
|
10
|
+
EmptyStateIcon
|
|
10
11
|
} from '@patternfly/react-core';
|
|
11
12
|
import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
|
|
12
13
|
|
|
13
14
|
export const EmptyStateExtraLarge: React.FunctionComponent = () => (
|
|
14
15
|
<EmptyState variant={EmptyStateVariant.xl}>
|
|
15
|
-
<EmptyStateIcon icon={CubesIcon} />
|
|
16
|
-
<Title headingLevel="h5" size="4xl">
|
|
17
|
-
Empty state
|
|
18
|
-
</Title>
|
|
16
|
+
<EmptyStateHeader titleText="Empty state" headingLevel="h4" icon={<EmptyStateIcon icon={CubesIcon} />} />
|
|
19
17
|
<EmptyStateBody>
|
|
20
|
-
This represents
|
|
21
|
-
|
|
18
|
+
This represents the empty state pattern in PatternFly. Hopefully it's simple enough to use but flexible enough to
|
|
19
|
+
meet a variety of needs.
|
|
22
20
|
</EmptyStateBody>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
<EmptyStateFooter>
|
|
22
|
+
<EmptyStateActions>
|
|
23
|
+
<Button variant="primary">Primary action</Button>
|
|
24
|
+
</EmptyStateActions>
|
|
25
|
+
<EmptyStateActions>
|
|
26
|
+
<Button variant="link">Multiple</Button>
|
|
27
|
+
<Button variant="link">Action Buttons</Button>
|
|
28
|
+
<Button variant="link">Can</Button>
|
|
29
|
+
<Button variant="link">Go here</Button>
|
|
30
|
+
<Button variant="link">In the secondary</Button>
|
|
31
|
+
<Button variant="link">Action area</Button>
|
|
32
|
+
</EmptyStateActions>
|
|
33
|
+
</EmptyStateFooter>
|
|
32
34
|
</EmptyState>
|
|
33
35
|
);
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
|
-
Title,
|
|
4
3
|
Button,
|
|
5
4
|
EmptyState,
|
|
6
5
|
EmptyStateVariant,
|
|
7
6
|
EmptyStateBody,
|
|
8
|
-
|
|
7
|
+
EmptyStateActions,
|
|
8
|
+
EmptyStateHeader,
|
|
9
|
+
EmptyStateFooter
|
|
9
10
|
} from '@patternfly/react-core';
|
|
10
11
|
|
|
11
12
|
export const EmptyStateExtraSmall: React.FunctionComponent = () => (
|
|
12
13
|
<EmptyState variant={EmptyStateVariant.xs}>
|
|
13
|
-
<
|
|
14
|
-
Empty state
|
|
15
|
-
</Title>
|
|
14
|
+
<EmptyStateHeader titleText="Empty state" headingLevel="h4" />
|
|
16
15
|
<EmptyStateBody>
|
|
17
|
-
This represents
|
|
18
|
-
|
|
16
|
+
This represents the empty state pattern in PatternFly. Hopefully it's simple enough to use but flexible enough to
|
|
17
|
+
meet a variety of needs.
|
|
19
18
|
</EmptyStateBody>
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
<EmptyStateFooter>
|
|
20
|
+
<EmptyStateActions>
|
|
21
|
+
<Button variant="link">Multiple</Button>
|
|
22
|
+
<Button variant="link">Action Buttons</Button>
|
|
23
|
+
<Button variant="link">Can</Button>
|
|
24
|
+
<Button variant="link">Go here</Button>
|
|
25
|
+
<Button variant="link">In the secondary</Button>
|
|
26
|
+
<Button variant="link">Action area</Button>
|
|
27
|
+
</EmptyStateActions>
|
|
28
|
+
</EmptyStateFooter>
|
|
28
29
|
</EmptyState>
|
|
29
30
|
);
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
|
-
Title,
|
|
4
3
|
Button,
|
|
5
4
|
EmptyState,
|
|
6
5
|
EmptyStateVariant,
|
|
7
|
-
EmptyStateIcon,
|
|
8
6
|
EmptyStateBody,
|
|
9
|
-
|
|
7
|
+
EmptyStateActions,
|
|
8
|
+
EmptyStateHeader,
|
|
9
|
+
EmptyStateFooter,
|
|
10
|
+
EmptyStateIcon
|
|
10
11
|
} from '@patternfly/react-core';
|
|
11
12
|
import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
|
|
12
13
|
|
|
13
14
|
export const EmptyStateLarge: React.FunctionComponent = () => (
|
|
14
|
-
<EmptyState variant={EmptyStateVariant.
|
|
15
|
-
<EmptyStateIcon icon={CubesIcon} />
|
|
16
|
-
<Title headingLevel="h4" size="lg">
|
|
17
|
-
Empty state
|
|
18
|
-
</Title>
|
|
15
|
+
<EmptyState variant={EmptyStateVariant.lg}>
|
|
16
|
+
<EmptyStateHeader titleText="Empty state" headingLevel="h4" icon={<EmptyStateIcon icon={CubesIcon} />} />
|
|
19
17
|
<EmptyStateBody>
|
|
20
|
-
This represents
|
|
21
|
-
|
|
18
|
+
This represents the empty state pattern in PatternFly. Hopefully it's simple enough to use but flexible enough to
|
|
19
|
+
meet a variety of needs.
|
|
22
20
|
</EmptyStateBody>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
<EmptyStateFooter>
|
|
22
|
+
<EmptyStateActions>
|
|
23
|
+
<Button variant="primary">Primary action</Button>
|
|
24
|
+
</EmptyStateActions>
|
|
25
|
+
<EmptyStateActions>
|
|
26
|
+
<Button variant="link">Multiple</Button>
|
|
27
|
+
<Button variant="link">Action Buttons</Button>
|
|
28
|
+
<Button variant="link">Can</Button>
|
|
29
|
+
<Button variant="link">Go here</Button>
|
|
30
|
+
<Button variant="link">In the secondary</Button>
|
|
31
|
+
<Button variant="link">Action area</Button>
|
|
32
|
+
</EmptyStateActions>
|
|
33
|
+
</EmptyStateFooter>
|
|
32
34
|
</EmptyState>
|
|
33
35
|
);
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
EmptyState,
|
|
5
|
+
EmptyStateBody,
|
|
6
|
+
EmptyStateHeader,
|
|
7
|
+
EmptyStateFooter,
|
|
8
|
+
EmptyStateActions,
|
|
9
|
+
EmptyStateIcon
|
|
10
|
+
} from '@patternfly/react-core';
|
|
3
11
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
4
12
|
|
|
5
13
|
export const EmptyStateNoMatchFound: React.FunctionComponent = () => (
|
|
6
14
|
<EmptyState>
|
|
7
|
-
<EmptyStateIcon icon={SearchIcon} />
|
|
8
|
-
<Title size="lg" headingLevel="h4">
|
|
9
|
-
No results found
|
|
10
|
-
</Title>
|
|
15
|
+
<EmptyStateHeader titleText="No results found" headingLevel="h4" icon={<EmptyStateIcon icon={SearchIcon} />} />
|
|
11
16
|
<EmptyStateBody>No results match the filter criteria. Clear all filters and try again.</EmptyStateBody>
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
17
|
+
<EmptyStateFooter>
|
|
18
|
+
<EmptyStateActions>
|
|
19
|
+
<Button variant="link">Clear all filters</Button>
|
|
20
|
+
</EmptyStateActions>
|
|
21
|
+
</EmptyStateFooter>
|
|
15
22
|
</EmptyState>
|
|
16
23
|
);
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
|
-
Title,
|
|
4
3
|
Button,
|
|
5
4
|
EmptyState,
|
|
6
5
|
EmptyStateVariant,
|
|
7
|
-
EmptyStateIcon,
|
|
8
6
|
EmptyStateBody,
|
|
9
|
-
|
|
7
|
+
EmptyStateActions,
|
|
8
|
+
EmptyStateHeader,
|
|
9
|
+
EmptyStateFooter,
|
|
10
|
+
EmptyStateIcon
|
|
10
11
|
} from '@patternfly/react-core';
|
|
11
12
|
import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
|
|
12
13
|
|
|
13
14
|
export const EmptyStateSmall: React.FunctionComponent = () => (
|
|
14
|
-
<EmptyState variant={EmptyStateVariant.
|
|
15
|
-
<EmptyStateIcon icon={CubesIcon} />
|
|
16
|
-
<Title headingLevel="h4" size="lg">
|
|
17
|
-
Empty state
|
|
18
|
-
</Title>
|
|
15
|
+
<EmptyState variant={EmptyStateVariant.sm}>
|
|
16
|
+
<EmptyStateHeader titleText="Empty state" headingLevel="h4" icon={<EmptyStateIcon icon={CubesIcon} />} />
|
|
19
17
|
<EmptyStateBody>
|
|
20
|
-
This represents
|
|
21
|
-
|
|
18
|
+
This represents the empty state pattern in PatternFly. Hopefully it's simple enough to use but flexible enough to
|
|
19
|
+
meet a variety of needs.
|
|
22
20
|
</EmptyStateBody>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
<EmptyStateFooter>
|
|
22
|
+
<EmptyStateActions>
|
|
23
|
+
<Button variant="primary">Primary action</Button>
|
|
24
|
+
</EmptyStateActions>
|
|
25
|
+
<EmptyStateActions>
|
|
26
|
+
<Button variant="link">Multiple</Button>
|
|
27
|
+
<Button variant="link">Action Buttons</Button>
|
|
28
|
+
<Button variant="link">Can</Button>
|
|
29
|
+
<Button variant="link">Go here</Button>
|
|
30
|
+
<Button variant="link">In the secondary</Button>
|
|
31
|
+
<Button variant="link">Action area</Button>
|
|
32
|
+
</EmptyStateActions>
|
|
33
|
+
</EmptyStateFooter>
|
|
32
34
|
</EmptyState>
|
|
33
35
|
);
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { EmptyState, EmptyStateHeader, EmptyStateIcon, Spinner } from '@patternfly/react-core';
|
|
3
3
|
|
|
4
4
|
export const EmptyStateSpinner: React.FunctionComponent = () => (
|
|
5
5
|
<EmptyState>
|
|
6
|
-
<
|
|
7
|
-
<Title size="lg" headingLevel="h4">
|
|
8
|
-
Loading
|
|
9
|
-
</Title>
|
|
6
|
+
<EmptyStateHeader titleText="Loading" headingLevel="h4" icon={<EmptyStateIcon icon={Spinner} />} />
|
|
10
7
|
</EmptyState>
|
|
11
8
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './EmptyState';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './EmptyStateHeader';
|
|
3
3
|
export * from './EmptyStateIcon';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
4
|
+
export * from './EmptyStateBody';
|
|
5
|
+
export * from './EmptyStateFooter';
|
|
6
|
+
export * from './EmptyStateActions';
|
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
DropdownSeparator,
|
|
9
9
|
EmptyState,
|
|
10
10
|
EmptyStateBody,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
EmptyStateHeader,
|
|
12
|
+
EmptyStateFooter,
|
|
13
13
|
KebabToggle,
|
|
14
14
|
NotificationDrawer,
|
|
15
15
|
NotificationDrawerBody,
|
|
@@ -20,8 +20,9 @@ import {
|
|
|
20
20
|
NotificationDrawerListItem,
|
|
21
21
|
NotificationDrawerListItemBody,
|
|
22
22
|
NotificationDrawerListItemHeader,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
EmptyStateVariant,
|
|
24
|
+
EmptyStateActions,
|
|
25
|
+
EmptyStateIcon
|
|
25
26
|
} from '@patternfly/react-core';
|
|
26
27
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
27
28
|
|
|
@@ -319,17 +320,20 @@ export const NotificationDrawerGroups: React.FunctionComponent = () => {
|
|
|
319
320
|
>
|
|
320
321
|
<NotificationDrawerList isHidden={!thirdGroupExpanded} aria-label="Notifications in the third group">
|
|
321
322
|
<EmptyState variant={EmptyStateVariant.full}>
|
|
322
|
-
<
|
|
323
|
-
|
|
324
|
-
No alerts found
|
|
325
|
-
|
|
323
|
+
<EmptyStateHeader
|
|
324
|
+
headingLevel="h2"
|
|
325
|
+
titleText="No alerts found"
|
|
326
|
+
icon={<EmptyStateIcon icon={SearchIcon} />}
|
|
327
|
+
/>
|
|
326
328
|
<EmptyStateBody>
|
|
327
329
|
There are currently no critical alerts firing. There may be firing alerts of other severities or
|
|
328
330
|
silenced critical alerts however.
|
|
329
331
|
</EmptyStateBody>
|
|
330
|
-
<
|
|
331
|
-
<
|
|
332
|
-
|
|
332
|
+
<EmptyStateFooter>
|
|
333
|
+
<EmptyStateActions>
|
|
334
|
+
<Button variant="link">Action</Button>
|
|
335
|
+
</EmptyStateActions>
|
|
336
|
+
</EmptyStateFooter>
|
|
333
337
|
</EmptyState>
|
|
334
338
|
</NotificationDrawerList>
|
|
335
339
|
</NotificationDrawerGroup>
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
Button,
|
|
4
4
|
EmptyState,
|
|
5
5
|
EmptyStateBody,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
EmptyStateFooter,
|
|
7
|
+
EmptyStateHeader,
|
|
8
8
|
EmptyStateVariant,
|
|
9
9
|
NotificationDrawer,
|
|
10
10
|
NotificationDrawerBody,
|
|
@@ -15,7 +15,8 @@ import {
|
|
|
15
15
|
NotificationDrawerListItem,
|
|
16
16
|
NotificationDrawerListItemBody,
|
|
17
17
|
NotificationDrawerListItemHeader,
|
|
18
|
-
|
|
18
|
+
EmptyStateActions,
|
|
19
|
+
EmptyStateIcon
|
|
19
20
|
} from '@patternfly/react-core';
|
|
20
21
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
21
22
|
|
|
@@ -173,17 +174,20 @@ export const NotificationDrawerLightweight: React.FunctionComponent = () => {
|
|
|
173
174
|
aria-label="Notifications in the third lightweight group"
|
|
174
175
|
>
|
|
175
176
|
<EmptyState variant={EmptyStateVariant.full}>
|
|
176
|
-
<
|
|
177
|
-
|
|
178
|
-
No alerts found
|
|
179
|
-
|
|
177
|
+
<EmptyStateHeader
|
|
178
|
+
headingLevel="h2"
|
|
179
|
+
titleText="No alerts found"
|
|
180
|
+
icon={<EmptyStateIcon icon={SearchIcon} />}
|
|
181
|
+
/>
|
|
180
182
|
<EmptyStateBody>
|
|
181
183
|
There are currently no critical alerts firing. There may be firing alerts of other severities or
|
|
182
184
|
silenced critical alerts however.
|
|
183
185
|
</EmptyStateBody>
|
|
184
|
-
<
|
|
185
|
-
<
|
|
186
|
-
|
|
186
|
+
<EmptyStateFooter>
|
|
187
|
+
<EmptyStateActions>
|
|
188
|
+
<Button variant="link">Action</Button>
|
|
189
|
+
</EmptyStateActions>
|
|
190
|
+
</EmptyStateFooter>
|
|
187
191
|
</EmptyState>
|
|
188
192
|
</NotificationDrawerList>
|
|
189
193
|
</NotificationDrawerGroup>
|
|
@@ -8,7 +8,7 @@ ouia: true
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
import { Button, Drawer, DrawerActions, DrawerCloseButton, DrawerColorVariant,
|
|
11
|
-
DrawerContent, DrawerContentBody, DrawerHead, DrawerPanelContent, DrawerSection, Wizard, WizardFooter, WizardContextConsumer, ModalVariant, Alert, EmptyState,
|
|
11
|
+
DrawerContent, DrawerContentBody, DrawerHead, DrawerPanelContent, DrawerSection, Wizard, WizardFooter, WizardContextConsumer, ModalVariant, Alert, EmptyState, EmptyStateHeader, EmptyStateFooter, EmptyStateBody, EmptyStateActions, Title, Progress, Form, FormGroup, TextInput } from '@patternfly/react-core';
|
|
12
12
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
|
|
13
13
|
import SlackHashIcon from '@patternfly/react-icons/dist/esm/icons/slack-hash-icon';
|
|
14
14
|
import CogsIcon from '@patternfly/react-icons/dist/esm/icons/cogs-icon';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
3
|
EmptyState,
|
|
4
|
-
|
|
4
|
+
EmptyStateHeader,
|
|
5
|
+
EmptyStateFooter,
|
|
5
6
|
EmptyStateBody,
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
EmptyStateActions,
|
|
8
|
+
EmptyStateIcon,
|
|
8
9
|
Progress,
|
|
9
10
|
Button,
|
|
10
11
|
Wizard
|
|
@@ -20,7 +21,7 @@ const FinishedStep: React.FunctionComponent<finishedProps> = (props: finishedPro
|
|
|
20
21
|
const [percent, setPercent] = React.useState(0);
|
|
21
22
|
|
|
22
23
|
const tick = () => {
|
|
23
|
-
setPercent(prevPercent => {
|
|
24
|
+
setPercent((prevPercent) => {
|
|
24
25
|
if (prevPercent < 100) {
|
|
25
26
|
return prevPercent + 20;
|
|
26
27
|
} else {
|
|
@@ -41,11 +42,12 @@ const FinishedStep: React.FunctionComponent<finishedProps> = (props: finishedPro
|
|
|
41
42
|
|
|
42
43
|
return (
|
|
43
44
|
<div className="pf-l-bullseye">
|
|
44
|
-
<EmptyState variant="
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
{percent === 100 ? 'Validation complete' : 'Validating credentials'}
|
|
48
|
-
|
|
45
|
+
<EmptyState variant="lg">
|
|
46
|
+
<EmptyStateHeader
|
|
47
|
+
headingLevel="h4"
|
|
48
|
+
titleText={percent === 100 ? 'Validation complete' : 'Validating credentials'}
|
|
49
|
+
icon={<EmptyStateIcon icon={CogsIcon} />}
|
|
50
|
+
/>
|
|
49
51
|
<EmptyStateBody>
|
|
50
52
|
<Progress value={percent} measureLocation="outside" aria-label="validation-progress" />
|
|
51
53
|
</EmptyStateBody>
|
|
@@ -53,11 +55,13 @@ const FinishedStep: React.FunctionComponent<finishedProps> = (props: finishedPro
|
|
|
53
55
|
Description can be used to further elaborate on the validation step, or give the user a better idea of how
|
|
54
56
|
long the process will take.
|
|
55
57
|
</EmptyStateBody>
|
|
56
|
-
<
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
<EmptyStateFooter>
|
|
59
|
+
<EmptyStateActions>
|
|
60
|
+
<Button isDisabled={percent !== 100} onClick={props.onClose}>
|
|
61
|
+
Log to console
|
|
62
|
+
</Button>
|
|
63
|
+
</EmptyStateActions>
|
|
64
|
+
</EmptyStateFooter>
|
|
61
65
|
</EmptyState>
|
|
62
66
|
</div>
|
|
63
67
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
3
|
EmptyState,
|
|
4
|
-
|
|
4
|
+
EmptyStateHeader,
|
|
5
|
+
EmptyStateFooter,
|
|
5
6
|
EmptyStateBody,
|
|
6
|
-
|
|
7
|
-
Title,
|
|
7
|
+
EmptyStateActions,
|
|
8
8
|
Form,
|
|
9
9
|
FormGroup,
|
|
10
10
|
TextInput,
|
|
@@ -13,7 +13,8 @@ import {
|
|
|
13
13
|
Wizard,
|
|
14
14
|
WizardFooter,
|
|
15
15
|
WizardContextConsumer,
|
|
16
|
-
Alert
|
|
16
|
+
Alert,
|
|
17
|
+
EmptyStateIcon
|
|
17
18
|
} from '@patternfly/react-core';
|
|
18
19
|
// eslint-disable-next-line patternfly-react/import-tokens-icons
|
|
19
20
|
import { CogsIcon } from '@patternfly/react-icons';
|
|
@@ -26,7 +27,7 @@ const FinishedStep: React.FunctionComponent<finishedProps> = (props: finishedPro
|
|
|
26
27
|
const [percent, setPercent] = React.useState(0);
|
|
27
28
|
|
|
28
29
|
const tick = () => {
|
|
29
|
-
setPercent(prevPercent => {
|
|
30
|
+
setPercent((prevPercent) => {
|
|
30
31
|
if (prevPercent < 100) {
|
|
31
32
|
return prevPercent + 20;
|
|
32
33
|
} else {
|
|
@@ -47,11 +48,12 @@ const FinishedStep: React.FunctionComponent<finishedProps> = (props: finishedPro
|
|
|
47
48
|
|
|
48
49
|
return (
|
|
49
50
|
<div className="pf-l-bullseye">
|
|
50
|
-
<EmptyState variant="
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
{percent === 100 ? 'Validation complete' : 'Validating credentials'}
|
|
54
|
-
|
|
51
|
+
<EmptyState variant="lg">
|
|
52
|
+
<EmptyStateHeader
|
|
53
|
+
headingLevel="h4"
|
|
54
|
+
titleText={percent === 100 ? 'Validation complete' : 'Validating credentials'}
|
|
55
|
+
icon={<EmptyStateIcon icon={CogsIcon} />}
|
|
56
|
+
/>
|
|
55
57
|
<EmptyStateBody>
|
|
56
58
|
<Progress value={percent} measureLocation="outside" aria-label="validation-progress" />
|
|
57
59
|
</EmptyStateBody>
|
|
@@ -59,11 +61,13 @@ const FinishedStep: React.FunctionComponent<finishedProps> = (props: finishedPro
|
|
|
59
61
|
Description can be used to further elaborate on the validation step, or give the user a better idea of how
|
|
60
62
|
long the process will take.
|
|
61
63
|
</EmptyStateBody>
|
|
62
|
-
<
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
<EmptyStateFooter>
|
|
65
|
+
<EmptyStateActions>
|
|
66
|
+
<Button isDisabled={percent !== 100} onClick={props.onClose}>
|
|
67
|
+
Log to console
|
|
68
|
+
</Button>
|
|
69
|
+
</EmptyStateActions>
|
|
70
|
+
</EmptyStateFooter>
|
|
67
71
|
</EmptyState>
|
|
68
72
|
</div>
|
|
69
73
|
);
|
|
@@ -126,7 +130,7 @@ export const WizardValidateButtonPress: React.FunctionComponent = () => {
|
|
|
126
130
|
setFormValue(value);
|
|
127
131
|
};
|
|
128
132
|
|
|
129
|
-
const validateLastStep: (onNext: () => void) => void = onNext => {
|
|
133
|
+
const validateLastStep: (onNext: () => void) => void = (onNext) => {
|
|
130
134
|
if (stepsValid !== 1 && !isFormValid) {
|
|
131
135
|
setErrorText(true);
|
|
132
136
|
} else {
|
package/src/demos/Card/Card.md
CHANGED
|
@@ -42,9 +42,11 @@ import {
|
|
|
42
42
|
DropdownPosition,
|
|
43
43
|
DropdownToggleCheckbox,
|
|
44
44
|
EmptyState,
|
|
45
|
+
EmptyStateHeader,
|
|
45
46
|
EmptyStateIcon,
|
|
47
|
+
EmptyStateFooter,
|
|
46
48
|
EmptyStateVariant,
|
|
47
|
-
|
|
49
|
+
EmptyStateActions,
|
|
48
50
|
Gallery,
|
|
49
51
|
KebabToggle,
|
|
50
52
|
OverflowMenu,
|
|
@@ -605,13 +607,16 @@ class CardViewBasic extends React.Component {
|
|
|
605
607
|
<Card isCompact>
|
|
606
608
|
<Bullseye>
|
|
607
609
|
<EmptyState variant={EmptyStateVariant.xs}>
|
|
608
|
-
<
|
|
609
|
-
|
|
610
|
-
Add a new card to your page
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
610
|
+
<EmptyStateHeader
|
|
611
|
+
headingLevel="h2"
|
|
612
|
+
titleText="Add a new card to your page"
|
|
613
|
+
icon={<EmptyStateIcon icon={PlusCircleIcon} />}
|
|
614
|
+
/>
|
|
615
|
+
<EmptyStateFooter>
|
|
616
|
+
<EmptyStateActions>
|
|
617
|
+
<Button variant="link">Add card</Button>
|
|
618
|
+
</EmptyStateActions>
|
|
619
|
+
</EmptyStateFooter>
|
|
615
620
|
</EmptyState>
|
|
616
621
|
</Bullseye>
|
|
617
622
|
</Card>
|
|
@@ -20,10 +20,12 @@ ToolbarFilter,
|
|
|
20
20
|
Badge,
|
|
21
21
|
Pagination,
|
|
22
22
|
EmptyState,
|
|
23
|
+
EmptyStateBody,
|
|
24
|
+
EmptyStateHeader,
|
|
25
|
+
EmptyStateFooter,
|
|
23
26
|
EmptyStateIcon,
|
|
27
|
+
EmptyStateActions,
|
|
24
28
|
Title,
|
|
25
|
-
EmptyStateBody,
|
|
26
|
-
EmptyStatePrimary,
|
|
27
29
|
Button,
|
|
28
30
|
Bullseye,
|
|
29
31
|
ToolbarToggleGroup
|
|
@@ -13,16 +13,17 @@ import {
|
|
|
13
13
|
Popper,
|
|
14
14
|
Pagination,
|
|
15
15
|
EmptyState,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
EmptyStateHeader,
|
|
17
|
+
EmptyStateFooter,
|
|
18
18
|
EmptyStateBody,
|
|
19
|
-
EmptyStatePrimary,
|
|
20
19
|
Button,
|
|
21
20
|
Bullseye,
|
|
22
21
|
Badge,
|
|
23
22
|
ToolbarGroup,
|
|
24
23
|
ToolbarFilter,
|
|
25
|
-
ToolbarToggleGroup
|
|
24
|
+
ToolbarToggleGroup,
|
|
25
|
+
EmptyStateActions,
|
|
26
|
+
EmptyStateIcon
|
|
26
27
|
} from '@patternfly/react-core';
|
|
27
28
|
import { TableComposable, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
|
|
28
29
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
@@ -627,23 +628,22 @@ export const FilterAttributeSearch: React.FunctionComponent = () => {
|
|
|
627
628
|
|
|
628
629
|
const emptyState = (
|
|
629
630
|
<EmptyState>
|
|
630
|
-
<EmptyStateIcon icon={SearchIcon} />
|
|
631
|
-
<Title size="lg" headingLevel="h4">
|
|
632
|
-
No results found
|
|
633
|
-
</Title>
|
|
631
|
+
<EmptyStateHeader headingLevel="h4" titleText="No results found" icon={<EmptyStateIcon icon={SearchIcon} />} />
|
|
634
632
|
<EmptyStateBody>No results match the filter criteria. Clear all filters and try again.</EmptyStateBody>
|
|
635
|
-
<
|
|
636
|
-
<
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
633
|
+
<EmptyStateFooter>
|
|
634
|
+
<EmptyStateActions>
|
|
635
|
+
<Button
|
|
636
|
+
variant="link"
|
|
637
|
+
onClick={() => {
|
|
638
|
+
setSearchValue('');
|
|
639
|
+
setStatusSelection('');
|
|
640
|
+
setLocationSelections([]);
|
|
641
|
+
}}
|
|
642
|
+
>
|
|
643
|
+
Clear all filters
|
|
644
|
+
</Button>
|
|
645
|
+
</EmptyStateActions>
|
|
646
|
+
</EmptyStateFooter>
|
|
647
647
|
</EmptyState>
|
|
648
648
|
);
|
|
649
649
|
|