@patternfly/react-core 6.0.0-alpha.62 → 6.0.0-alpha.64
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 +16 -0
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/AboutModal/package.json +1 -1
- package/dist/dynamic/components/Accordion/package.json +1 -1
- package/dist/dynamic/components/ActionList/package.json +1 -1
- package/dist/dynamic/components/Alert/package.json +1 -1
- package/dist/dynamic/components/Avatar/package.json +1 -1
- package/dist/dynamic/components/BackToTop/package.json +1 -1
- package/dist/dynamic/components/Backdrop/package.json +1 -1
- package/dist/dynamic/components/BackgroundImage/package.json +1 -1
- package/dist/dynamic/components/Badge/package.json +1 -1
- package/dist/dynamic/components/Banner/package.json +1 -1
- package/dist/dynamic/components/Brand/package.json +1 -1
- package/dist/dynamic/components/Breadcrumb/package.json +1 -1
- package/dist/dynamic/components/Button/package.json +1 -1
- package/dist/dynamic/components/CalendarMonth/package.json +1 -1
- package/dist/dynamic/components/Card/package.json +1 -1
- package/dist/dynamic/components/Checkbox/package.json +1 -1
- package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/DataList/package.json +1 -1
- package/dist/dynamic/components/DatePicker/package.json +1 -1
- package/dist/dynamic/components/DescriptionList/package.json +1 -1
- package/dist/dynamic/components/Divider/package.json +1 -1
- package/dist/dynamic/components/Drawer/package.json +1 -1
- package/dist/dynamic/components/Dropdown/package.json +1 -1
- package/dist/dynamic/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/components/EmptyState/package.json +1 -1
- package/dist/dynamic/components/ExpandableSection/package.json +1 -1
- package/dist/dynamic/components/FileUpload/package.json +1 -1
- package/dist/dynamic/components/Form/package.json +1 -1
- package/dist/dynamic/components/FormSelect/package.json +1 -1
- package/dist/dynamic/components/HelperText/package.json +1 -1
- package/dist/dynamic/components/Hint/package.json +1 -1
- package/dist/dynamic/components/Icon/package.json +1 -1
- package/dist/dynamic/components/InputGroup/package.json +1 -1
- package/dist/dynamic/components/JumpLinks/package.json +1 -1
- package/dist/dynamic/components/Label/package.json +1 -1
- package/dist/dynamic/components/List/package.json +1 -1
- package/dist/dynamic/components/LoginPage/package.json +1 -1
- package/dist/dynamic/components/Masthead/package.json +1 -1
- package/dist/dynamic/components/Menu/package.json +1 -1
- package/dist/dynamic/components/MenuToggle/package.json +1 -1
- package/dist/dynamic/components/Modal/package.json +1 -1
- package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
- package/dist/dynamic/components/Nav/package.json +1 -1
- package/dist/dynamic/components/NotificationBadge/package.json +1 -1
- package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
- package/dist/dynamic/components/NumberInput/package.json +1 -1
- package/dist/dynamic/components/OverflowMenu/package.json +1 -1
- package/dist/dynamic/components/Page/package.json +1 -1
- package/dist/dynamic/components/Pagination/package.json +1 -1
- package/dist/dynamic/components/Panel/package.json +1 -1
- package/dist/dynamic/components/Popover/package.json +1 -1
- package/dist/dynamic/components/Progress/package.json +1 -1
- package/dist/dynamic/components/ProgressStepper/package.json +1 -1
- package/dist/dynamic/components/Radio/package.json +1 -1
- package/dist/dynamic/components/SearchInput/package.json +1 -1
- package/dist/dynamic/components/Select/package.json +1 -1
- package/dist/dynamic/components/Sidebar/package.json +1 -1
- package/dist/dynamic/components/SimpleList/package.json +1 -1
- package/dist/dynamic/components/Skeleton/package.json +1 -1
- package/dist/dynamic/components/SkipToContent/package.json +1 -1
- package/dist/dynamic/components/Slider/package.json +1 -1
- package/dist/dynamic/components/Spinner/package.json +1 -1
- package/dist/dynamic/components/Switch/package.json +1 -1
- package/dist/dynamic/components/Tabs/package.json +1 -1
- package/dist/dynamic/components/Text/package.json +1 -1
- package/dist/dynamic/components/TextArea/package.json +1 -1
- package/dist/dynamic/components/TextInput/package.json +1 -1
- package/dist/dynamic/components/TextInputGroup/package.json +1 -1
- package/dist/dynamic/components/Tile/package.json +1 -1
- package/dist/dynamic/components/TimePicker/package.json +1 -1
- package/dist/dynamic/components/Timestamp/package.json +1 -1
- package/dist/dynamic/components/Title/package.json +1 -1
- package/dist/dynamic/components/ToggleGroup/package.json +1 -1
- package/dist/dynamic/components/Toolbar/package.json +1 -1
- package/dist/dynamic/components/Tooltip/package.json +1 -1
- package/dist/dynamic/components/TreeView/package.json +1 -1
- package/dist/dynamic/components/Truncate/package.json +1 -1
- package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
- package/dist/dynamic/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
- package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
- package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
- package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
- package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
- package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
- package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
- package/dist/dynamic/helpers/constants/package.json +1 -1
- package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
- package/dist/dynamic/helpers/fileUtils/package.json +1 -1
- package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
- package/dist/dynamic/helpers/package.json +1 -1
- package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
- package/dist/dynamic/helpers/typeUtils/package.json +1 -1
- package/dist/dynamic/helpers/useInterval/package.json +1 -1
- package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
- package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
- package/dist/dynamic/helpers/util/package.json +1 -1
- package/dist/dynamic/layouts/Bullseye/package.json +1 -1
- package/dist/dynamic/layouts/Flex/package.json +1 -1
- package/dist/dynamic/layouts/Gallery/package.json +1 -1
- package/dist/dynamic/layouts/Grid/package.json +1 -1
- package/dist/dynamic/layouts/Level/package.json +1 -1
- package/dist/dynamic/layouts/Split/package.json +1 -1
- package/dist/dynamic/layouts/Stack/package.json +1 -1
- package/dist/dynamic/next/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/next/components/Modal/package.json +1 -1
- package/dist/dynamic/next/components/package.json +1 -1
- package/dist/dynamic/styles/package.json +1 -1
- package/dist/dynamic-modules.json +0 -5
- package/dist/esm/components/EmptyState/index.d.ts +0 -2
- package/dist/esm/components/EmptyState/index.d.ts.map +1 -1
- package/dist/esm/components/EmptyState/index.js +0 -2
- package/dist/esm/components/EmptyState/index.js.map +1 -1
- package/dist/esm/components/Hint/Hint.d.ts +2 -0
- package/dist/esm/components/Hint/Hint.d.ts.map +1 -1
- package/dist/esm/components/Hint/Hint.js +2 -2
- package/dist/esm/components/Hint/Hint.js.map +1 -1
- package/dist/js/components/EmptyState/index.d.ts +0 -2
- package/dist/js/components/EmptyState/index.d.ts.map +1 -1
- package/dist/js/components/EmptyState/index.js +0 -2
- package/dist/js/components/EmptyState/index.js.map +1 -1
- package/dist/js/components/Hint/Hint.d.ts +2 -0
- package/dist/js/components/Hint/Hint.d.ts.map +1 -1
- package/dist/js/components/Hint/Hint.js +2 -2
- package/dist/js/components/Hint/Hint.js.map +1 -1
- package/dist/styles/base-no-reset.css +31 -11
- package/dist/styles/base.css +31 -11
- package/dist/umd/assets/{output-C7loZMMj.css → output-BvT0K3uY.css} +2471 -2445
- package/dist/umd/react-core.min.js +2 -2
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +6 -6
- package/src/components/EmptyState/index.ts +0 -2
- package/src/components/Hint/Hint.tsx +12 -2
- package/src/components/Hint/__tests__/Hint.test.tsx +19 -1
- package/src/components/Hint/__tests__/__snapshots__/Hint.test.tsx.snap +12 -2
- package/src/components/Hint/examples/Hint.md +12 -0
- package/src/components/Hint/examples/HintActionsWithNoOffset.tsx +32 -0
- package/src/demos/CardDemos.md +2 -2
- package/src/demos/Filters/FilterDemos.md +7 -2
- package/src/demos/examples/Card/CardUtilizationDemo3.tsx +6 -6
- package/src/deprecated/components/Wizard/examples/Wizard.md +17 -3
package/helpers/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.0.0-alpha.
|
|
1
|
+
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.0.0-alpha.63","private":true}
|
package/layouts/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.0.0-alpha.
|
|
1
|
+
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.0.0-alpha.63","private":true}
|
package/next/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.0.0-alpha.
|
|
1
|
+
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.0.0-alpha.63","private":true}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.64",
|
|
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",
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"clean:exports": "node scripts/cleanDistExports.js"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@patternfly/react-icons": "^6.0.0-alpha.
|
|
51
|
-
"@patternfly/react-styles": "^6.0.0-alpha.
|
|
52
|
-
"@patternfly/react-tokens": "^6.0.0-alpha.
|
|
50
|
+
"@patternfly/react-icons": "^6.0.0-alpha.24",
|
|
51
|
+
"@patternfly/react-styles": "^6.0.0-alpha.24",
|
|
52
|
+
"@patternfly/react-tokens": "^6.0.0-alpha.24",
|
|
53
53
|
"focus-trap": "7.5.4",
|
|
54
54
|
"react-dropzone": "^14.2.3",
|
|
55
55
|
"tslib": "^2.6.2"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@patternfly/patternfly": "6.0.0-alpha.
|
|
58
|
+
"@patternfly/patternfly": "6.0.0-alpha.150",
|
|
59
59
|
"case-anything": "^2.1.13",
|
|
60
60
|
"css": "^2.2.3",
|
|
61
61
|
"fs-extra": "^11.1.1",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"react": "^17 || ^18",
|
|
66
66
|
"react-dom": "^17 || ^18"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "8e3a02226113a421ca5340644360999ef4cdf32e"
|
|
69
69
|
}
|
|
@@ -9,11 +9,21 @@ export interface HintProps {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
/** Actions of the hint. */
|
|
11
11
|
actions?: React.ReactNode;
|
|
12
|
+
/** Flag indicating that the actions have no offset */
|
|
13
|
+
hasNoActionsOffset?: boolean;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
export const Hint: React.FunctionComponent<HintProps> = ({
|
|
16
|
+
export const Hint: React.FunctionComponent<HintProps> = ({
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
actions,
|
|
20
|
+
hasNoActionsOffset = false,
|
|
21
|
+
...props
|
|
22
|
+
}: HintProps) => (
|
|
15
23
|
<div className={css(styles.hint, className)} {...props}>
|
|
16
|
-
|
|
24
|
+
{actions && (
|
|
25
|
+
<div className={css(styles.hintActions, hasNoActionsOffset && styles.modifiers.noOffset)}>{actions}</div>
|
|
26
|
+
)}
|
|
17
27
|
{children}
|
|
18
28
|
</div>
|
|
19
29
|
);
|
|
@@ -47,12 +47,25 @@ test('renders actions options', () => {
|
|
|
47
47
|
expect(actions).toBeVisible();
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
test(`renders with class ${styles.hintActions} if there is an action prop`, () => {
|
|
50
|
+
test(`renders with class ${styles.hintActions} if there is an action prop and not have class ${styles.modifiers.noOffset} without hasNoActionsOffset prop`, () => {
|
|
51
51
|
render(<Hint actions="actions">Test</Hint>);
|
|
52
52
|
|
|
53
53
|
const hint = screen.getByText('actions');
|
|
54
54
|
|
|
55
55
|
expect(hint).toHaveClass(styles.hintActions);
|
|
56
|
+
expect(hint).not.toHaveClass(styles.modifiers.noOffset);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
test(`renders with class ${styles.modifiers.noOffset} if there is an action prop and hasNoActionsOffset is true`, () => {
|
|
60
|
+
render(
|
|
61
|
+
<Hint actions="actions" hasNoActionsOffset>
|
|
62
|
+
Test
|
|
63
|
+
</Hint>
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
const hint = screen.getByText('actions');
|
|
67
|
+
|
|
68
|
+
expect(hint).toHaveClass(styles.modifiers.noOffset);
|
|
56
69
|
});
|
|
57
70
|
|
|
58
71
|
test('renders with inherited element props spread to the component', () => {
|
|
@@ -65,3 +78,8 @@ test('matches hint snapshot', () => {
|
|
|
65
78
|
const { asFragment } = render(<Hint />);
|
|
66
79
|
expect(asFragment()).toMatchSnapshot();
|
|
67
80
|
});
|
|
81
|
+
|
|
82
|
+
test('actions are rendered', () => {
|
|
83
|
+
const { asFragment } = render(<Hint actions="test" />);
|
|
84
|
+
expect(asFragment()).toMatchSnapshot();
|
|
85
|
+
});
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`
|
|
3
|
+
exports[`actions are rendered 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<div
|
|
6
6
|
class="pf-v6-c-hint"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
9
|
class="pf-v6-c-hint__actions"
|
|
10
|
-
|
|
10
|
+
>
|
|
11
|
+
test
|
|
12
|
+
</div>
|
|
11
13
|
</div>
|
|
12
14
|
</DocumentFragment>
|
|
13
15
|
`;
|
|
16
|
+
|
|
17
|
+
exports[`matches hint snapshot 1`] = `
|
|
18
|
+
<DocumentFragment>
|
|
19
|
+
<div
|
|
20
|
+
class="pf-v6-c-hint"
|
|
21
|
+
/>
|
|
22
|
+
</DocumentFragment>
|
|
23
|
+
`;
|
|
@@ -20,3 +20,15 @@ import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-ico
|
|
|
20
20
|
```ts file="HintBasicWithoutTitle.tsx"
|
|
21
21
|
|
|
22
22
|
```
|
|
23
|
+
|
|
24
|
+
### With actions
|
|
25
|
+
|
|
26
|
+
You can add actions to a hint to allow users to respond to suggestions and initiate any related processes.
|
|
27
|
+
|
|
28
|
+
When a `<Hint>` contains `actions`, a negative margin is applied to the actions so that they are better aligned with the hint title. For larger-sized titles or non-plain actions (such as a button), remove this negative margin by setting `hasNoActionsOffset` to `true`.
|
|
29
|
+
|
|
30
|
+
To illustrate this behavior, select the "actions hasNoActionsOffset" checkbox in the following example.
|
|
31
|
+
|
|
32
|
+
```ts file="HintActionsWithNoOffset.tsx"
|
|
33
|
+
|
|
34
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Hint, HintTitle, HintBody, Button, Checkbox } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const HintActionsWithNoOffset: React.FunctionComponent = () => {
|
|
5
|
+
const [hasNoActionsOffset, setHasNoActionsOffset] = React.useState<boolean>(false);
|
|
6
|
+
|
|
7
|
+
const toggleOffset = (checked: boolean) => {
|
|
8
|
+
setHasNoActionsOffset(checked);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const actions = <Button variant="primary">Action</Button>;
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<Checkbox
|
|
15
|
+
label="actions hasNoOffset"
|
|
16
|
+
isChecked={hasNoActionsOffset}
|
|
17
|
+
onChange={(_event, checked) => toggleOffset(checked)}
|
|
18
|
+
aria-label="remove actions offset"
|
|
19
|
+
id="toggle-actions-offset"
|
|
20
|
+
name="toggle-actions-offset"
|
|
21
|
+
/>
|
|
22
|
+
<div style={{ marginTop: '15px' }}>
|
|
23
|
+
<Hint actions={actions} hasNoActionsOffset={hasNoActionsOffset}>
|
|
24
|
+
<HintTitle>Do more with Find it Fix it capabilities</HintTitle>
|
|
25
|
+
<HintBody>
|
|
26
|
+
Upgrade to Red Hat Smart Management to remediate all your systems across regions and geographies.
|
|
27
|
+
</HintBody>
|
|
28
|
+
</Hint>
|
|
29
|
+
</div>
|
|
30
|
+
</>
|
|
31
|
+
);
|
|
32
|
+
};
|
package/src/demos/CardDemos.md
CHANGED
|
@@ -10,8 +10,8 @@ import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-
|
|
|
10
10
|
import { CheckCircleIcon, ExclamationCircleIcon, ExclamationTriangleIcon, BellIcon } from '@patternfly/react-icons';
|
|
11
11
|
import { Table, Thead, Tbody, Tr, Th, Td, ExpandableRowContent } from '@patternfly/react-table';
|
|
12
12
|
import { Chart, ChartAxis, ChartGroup, ChartVoronoiContainer, ChartStack, ChartBar, ChartTooltip, ChartDonutThreshold, ChartDonutUtilization, ChartArea, ChartContainer, ChartLabel } from '@patternfly/react-charts';
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import chart_color_yellow_100 from '@patternfly/react-tokens/dist/esm/chart_color_yellow_100';
|
|
14
|
+
import chart_color_yellow_300 from '@patternfly/react-tokens/dist/esm/chart_color_yellow_300';
|
|
15
15
|
import chart_color_orange_300 from '@patternfly/react-tokens/dist/esm/chart_color_orange_300';
|
|
16
16
|
import chart_color_red_100 from '@patternfly/react-tokens/dist/esm/chart_color_red_100';
|
|
17
17
|
import l_gallery_GridTemplateColumns_min from '@patternfly/react-tokens/dist/esm/l_gallery_GridTemplateColumns_min';
|
|
@@ -21,9 +21,7 @@ Badge,
|
|
|
21
21
|
Pagination,
|
|
22
22
|
EmptyState,
|
|
23
23
|
EmptyStateBody,
|
|
24
|
-
EmptyStateHeader,
|
|
25
24
|
EmptyStateFooter,
|
|
26
|
-
EmptyStateIcon,
|
|
27
25
|
EmptyStateActions,
|
|
28
26
|
Title,
|
|
29
27
|
Button,
|
|
@@ -39,34 +37,41 @@ import { Table, Thead, Tr, Th, Tbody, Td } from '@patternfly/react-table';
|
|
|
39
37
|
### Search input
|
|
40
38
|
|
|
41
39
|
```ts file="./examples/FilterSearchInput.tsx"
|
|
40
|
+
|
|
42
41
|
```
|
|
43
42
|
|
|
44
43
|
### Single select
|
|
45
44
|
|
|
46
45
|
```ts file="./examples/FilterSingleSelect.tsx"
|
|
46
|
+
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
### Checkbox select
|
|
50
50
|
|
|
51
51
|
```ts file="./examples/FilterCheckboxSelect.tsx"
|
|
52
|
+
|
|
52
53
|
```
|
|
53
54
|
|
|
54
55
|
### Attribute search
|
|
55
56
|
|
|
56
57
|
```ts file="./examples/FilterAttributeSearch.tsx"
|
|
58
|
+
|
|
57
59
|
```
|
|
58
60
|
|
|
59
61
|
### Mixed select filter group
|
|
60
62
|
|
|
61
63
|
```ts file="./examples/FilterMixedSelectGroup.tsx"
|
|
64
|
+
|
|
62
65
|
```
|
|
63
66
|
|
|
64
67
|
### Single select filter group
|
|
65
68
|
|
|
66
69
|
```ts file="./examples/FilterSameSelectGroup.tsx"
|
|
70
|
+
|
|
67
71
|
```
|
|
68
72
|
|
|
69
73
|
### Faceted filter
|
|
70
74
|
|
|
71
75
|
```ts file="./examples/FilterFaceted.tsx"
|
|
76
|
+
|
|
72
77
|
```
|
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
} from '@patternfly/react-core';
|
|
20
20
|
import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
|
|
21
21
|
import { Chart, ChartStack, ChartBar, ChartTooltip } from '@patternfly/react-charts';
|
|
22
|
-
import
|
|
23
|
-
import
|
|
22
|
+
import chart_color_yellow_100 from '@patternfly/react-tokens/dist/esm/chart_color_yellow_100';
|
|
23
|
+
import chart_color_yellow_300 from '@patternfly/react-tokens/dist/esm/chart_color_yellow_300';
|
|
24
24
|
import chart_color_orange_300 from '@patternfly/react-tokens/dist/esm/chart_color_orange_300';
|
|
25
25
|
import chart_color_red_100 from '@patternfly/react-tokens/dist/esm/chart_color_red_100';
|
|
26
26
|
import flex from '@patternfly/react-styles/css/utilities/Flex/flex';
|
|
@@ -88,8 +88,8 @@ export const CardUtilizationDemo3: React.FunctionComponent = () => {
|
|
|
88
88
|
ariaTitle="Mock stack chart"
|
|
89
89
|
domainPadding={{ x: [30, 25] }}
|
|
90
90
|
legendData={[
|
|
91
|
-
{ name: 'Low', symbol: { fill:
|
|
92
|
-
{ name: 'Important', symbol: { fill:
|
|
91
|
+
{ name: 'Low', symbol: { fill: chart_color_yellow_100.value } },
|
|
92
|
+
{ name: 'Important', symbol: { fill: chart_color_yellow_300.value } },
|
|
93
93
|
{ name: 'Moderate', symbol: { fill: chart_color_orange_300.value } },
|
|
94
94
|
{ name: 'Critical', symbol: { fill: chart_color_red_100.value } }
|
|
95
95
|
]}
|
|
@@ -107,8 +107,8 @@ export const CardUtilizationDemo3: React.FunctionComponent = () => {
|
|
|
107
107
|
<ChartStack
|
|
108
108
|
horizontal
|
|
109
109
|
colorScale={[
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
chart_color_yellow_100.value,
|
|
111
|
+
chart_color_yellow_300.value,
|
|
112
112
|
chart_color_orange_300.value,
|
|
113
113
|
chart_color_red_100.value
|
|
114
114
|
]}
|
|
@@ -10,13 +10,12 @@ deprecated: true
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
import { Button, Drawer, DrawerActions, DrawerCloseButton, DrawerColorVariant,
|
|
13
|
-
DrawerContent, DrawerContentBody, DrawerHead, DrawerPanelContent, DrawerSection, ModalVariant, Alert, EmptyState,
|
|
13
|
+
DrawerContent, DrawerContentBody, DrawerHead, DrawerPanelContent, DrawerSection, ModalVariant, Alert, EmptyState, EmptyStateFooter, EmptyStateBody, EmptyStateActions, Title, Progress, Form, FormGroup, TextInput } from '@patternfly/react-core';
|
|
14
14
|
import { Wizard as WizardDeprecated, WizardFooter as WizardFooterDeprecated, WizardContextConsumer as WizardContextConsumerDeprecated } from '@patternfly/react-core/deprecated';
|
|
15
15
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
|
|
16
16
|
import SlackHashIcon from '@patternfly/react-icons/dist/esm/icons/slack-hash-icon';
|
|
17
17
|
import CogsIcon from '@patternfly/react-icons/dist/esm/icons/cogs-icon';
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
If you seek a wizard solution that allows for more composition, see the [React](/components/wizard) tab.
|
|
21
20
|
|
|
22
21
|
## Examples
|
|
@@ -24,36 +23,43 @@ If you seek a wizard solution that allows for more composition, see the [React](
|
|
|
24
23
|
### Basic
|
|
25
24
|
|
|
26
25
|
```js file="./WizardBasic.tsx"
|
|
26
|
+
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
### Basic with disabled steps
|
|
30
30
|
|
|
31
31
|
```js file="./WizardBasicWithDisabledSteps.tsx"
|
|
32
|
+
|
|
32
33
|
```
|
|
33
34
|
|
|
34
35
|
### Anchors for nav items
|
|
35
36
|
|
|
36
37
|
```js file="./WizardAnchorsForNavItems.tsx"
|
|
38
|
+
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
### Incrementally enabled steps
|
|
40
42
|
|
|
41
43
|
```js file="./WizardIncrementallyEnabledSteps.tsx"
|
|
44
|
+
|
|
42
45
|
```
|
|
43
46
|
|
|
44
47
|
### Expandable steps
|
|
45
48
|
|
|
46
49
|
```js file="./WizardExpandableSteps.tsx"
|
|
50
|
+
|
|
47
51
|
```
|
|
48
52
|
|
|
49
53
|
### Finished
|
|
50
54
|
|
|
51
55
|
```js file="./WizardFinished.tsx"
|
|
56
|
+
|
|
52
57
|
```
|
|
53
58
|
|
|
54
59
|
### Enabled on form validation
|
|
55
60
|
|
|
56
61
|
```js file="./WizardEnabledOnFormValidation.tsx"
|
|
62
|
+
|
|
57
63
|
```
|
|
58
64
|
|
|
59
65
|
### Validate on button press
|
|
@@ -74,6 +80,7 @@ interface WizardContext {
|
|
|
74
80
|
```
|
|
75
81
|
|
|
76
82
|
```js file="./WizardValidateOnButtonPress.tsx"
|
|
83
|
+
|
|
77
84
|
```
|
|
78
85
|
|
|
79
86
|
### Progressive steps
|
|
@@ -81,7 +88,11 @@ interface WizardContext {
|
|
|
81
88
|
```js
|
|
82
89
|
import React from 'react';
|
|
83
90
|
import { Button, Radio, Alert } from '@patternfly/react-core';
|
|
84
|
-
import {
|
|
91
|
+
import {
|
|
92
|
+
Wizard as WizardDeprecated,
|
|
93
|
+
WizardFooter as WizardFooterDeprecated,
|
|
94
|
+
WizardContextConsumer as WizardContextConsumerDeprecated
|
|
95
|
+
} from '@patternfly/react-core/deprecated';
|
|
85
96
|
|
|
86
97
|
class ProgressiveWizard extends React.Component {
|
|
87
98
|
constructor(props) {
|
|
@@ -367,14 +378,17 @@ class ProgressiveWizard extends React.Component {
|
|
|
367
378
|
### Get current step
|
|
368
379
|
|
|
369
380
|
```js file="./WizardGetCurrentStep.tsx"
|
|
381
|
+
|
|
370
382
|
```
|
|
371
383
|
|
|
372
384
|
### Wizard in modal
|
|
373
385
|
|
|
374
386
|
```js file="./WizardInModal.tsx"
|
|
387
|
+
|
|
375
388
|
```
|
|
376
389
|
|
|
377
390
|
### Wizard with drawer
|
|
378
391
|
|
|
379
392
|
```js file="./WizardWithDrawer.tsx"
|
|
393
|
+
|
|
380
394
|
```
|