@patternfly/react-core 4.227.1 → 4.227.4
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 +24 -0
- package/dist/esm/components/DataList/DataList.d.ts +0 -2
- package/dist/esm/components/DataList/DataList.d.ts.map +1 -1
- package/dist/esm/components/DataList/DataList.js.map +1 -1
- package/dist/esm/components/DataList/DataListItem.d.ts.map +1 -1
- package/dist/esm/components/DataList/DataListItem.js +1 -2
- package/dist/esm/components/DataList/DataListItem.js.map +1 -1
- package/dist/js/components/DataList/DataList.d.ts +0 -2
- package/dist/js/components/DataList/DataList.d.ts.map +1 -1
- package/dist/js/components/DataList/DataList.js.map +1 -1
- package/dist/js/components/DataList/DataListItem.d.ts.map +1 -1
- package/dist/js/components/DataList/DataListItem.js +1 -2
- package/dist/js/components/DataList/DataListItem.js.map +1 -1
- package/dist/umd/react-core.js +1 -2
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +5 -5
- package/src/components/DataList/DataList.tsx +0 -2
- package/src/components/DataList/DataListItem.tsx +1 -3
- package/src/components/DataList/__tests__/DataList.test.tsx +14 -32
- package/src/components/DataList/examples/DataListSelectableRows.tsx +1 -1
- package/src/components/Menu/examples/Menu.md +19 -1290
- package/src/components/Menu/examples/MenuBasic.tsx +51 -0
- package/src/components/Menu/examples/MenuFilteringWithTextInput.tsx +52 -0
- package/src/components/Menu/examples/MenuOptionMultiSelect.tsx +30 -0
- package/src/components/Menu/examples/MenuOptionSingleSelect.tsx +27 -0
- package/src/components/Menu/examples/MenuScrollable.tsx +48 -0
- package/src/components/Menu/examples/MenuScrollableCustomMenuHeight.tsx +48 -0
- package/src/components/Menu/examples/MenuWithActions.tsx +75 -0
- package/src/components/Menu/examples/MenuWithCheckbox.tsx +2 -2
- package/src/components/Menu/examples/MenuWithDescription.tsx +35 -0
- package/src/components/Menu/examples/{MenuDrilldown.tsx → MenuWithDrilldown.tsx} +1 -1
- package/src/components/Menu/examples/MenuWithDrilldownBreadcrumbs.tsx +331 -0
- package/src/components/Menu/examples/{MenuDrilldownInitialState.tsx → MenuWithDrilldownInitialState.tsx} +0 -0
- package/src/components/Menu/examples/{MenuDrilldownSubmenuFunctions.tsx → MenuWithDrilldownSubmenuFunctions.tsx} +1 -1
- package/src/components/Menu/examples/MenuWithFavorites.tsx +104 -0
- package/src/components/Menu/examples/MenuWithFooter.tsx +40 -0
- package/src/components/Menu/examples/MenuWithIcons.tsx +33 -0
- package/src/components/Menu/examples/MenuWithLinks.tsx +30 -0
- package/src/components/Menu/examples/MenuWithSeparators.tsx +26 -0
- package/src/components/Menu/examples/MenuWithTitledGroups.tsx +46 -0
- package/src/components/Menu/examples/MenuWithViewMore.tsx +118 -0
- package/src/components/ProgressStepper/examples/ProgressStepper.md +13 -356
- package/src/components/ProgressStepper/examples/ProgressStepperBasic.tsx +21 -0
- package/src/components/ProgressStepper/examples/ProgressStepperBasicFailure.tsx +48 -0
- package/src/components/ProgressStepper/examples/ProgressStepperBasicIssue.tsx +48 -0
- package/src/components/ProgressStepper/examples/ProgressStepperBasicWithAlignment.tsx +59 -0
- package/src/components/ProgressStepper/examples/ProgressStepperBasicWithDescription.tsx +35 -0
- package/src/components/ProgressStepper/examples/ProgressStepperCompact.tsx +51 -0
- package/src/components/ProgressStepper/examples/ProgressStepperCustomIcons.tsx +35 -0
- package/src/components/ProgressStepper/examples/ProgressStepperHelpPopover.tsx +62 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProgressStepper, ProgressStep } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const ProgressStepperBasicWithDescription: React.FunctionComponent = () => (
|
|
5
|
+
<ProgressStepper>
|
|
6
|
+
<ProgressStep
|
|
7
|
+
variant="success"
|
|
8
|
+
description="This is the first thing to happen"
|
|
9
|
+
id="basic-desc-step1"
|
|
10
|
+
titleId="basic-desc-step1-title"
|
|
11
|
+
aria-label="completed step, step with success"
|
|
12
|
+
>
|
|
13
|
+
First step
|
|
14
|
+
</ProgressStep>
|
|
15
|
+
<ProgressStep
|
|
16
|
+
variant="info"
|
|
17
|
+
isCurrent
|
|
18
|
+
description="This is the second thing to happen"
|
|
19
|
+
id="basic-desc-step2"
|
|
20
|
+
titleId="basic-desc-step2-title"
|
|
21
|
+
aria-label="step with info"
|
|
22
|
+
>
|
|
23
|
+
Second step
|
|
24
|
+
</ProgressStep>
|
|
25
|
+
<ProgressStep
|
|
26
|
+
variant="pending"
|
|
27
|
+
description="This is the last thing to happen"
|
|
28
|
+
id="basic-desc-step3"
|
|
29
|
+
titleId="basic-desc-step3-title"
|
|
30
|
+
aria-label="pending step"
|
|
31
|
+
>
|
|
32
|
+
Third step
|
|
33
|
+
</ProgressStep>
|
|
34
|
+
</ProgressStepper>
|
|
35
|
+
);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProgressStepper, ProgressStep, Checkbox } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const ProgressStepperCompact: React.FunctionComponent = () => {
|
|
5
|
+
const [isVertical, setIsVertical] = React.useState(false);
|
|
6
|
+
const [isCenterAligned, setIsCenterAligned] = React.useState(false);
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<React.Fragment>
|
|
10
|
+
<Checkbox
|
|
11
|
+
label="Vertical alignment"
|
|
12
|
+
isChecked={isVertical}
|
|
13
|
+
onChange={setIsVertical}
|
|
14
|
+
aria-label="Toggle compact vertical alignment"
|
|
15
|
+
id="toggle-compact-vertical"
|
|
16
|
+
name="toggle-compact-vertical"
|
|
17
|
+
/>
|
|
18
|
+
<Checkbox
|
|
19
|
+
label="Center alignment"
|
|
20
|
+
isChecked={isCenterAligned}
|
|
21
|
+
onChange={setIsCenterAligned}
|
|
22
|
+
aria-label="Toggle compact center alignment"
|
|
23
|
+
id="toggle-compact-center"
|
|
24
|
+
name="toggle-compact-center"
|
|
25
|
+
/>
|
|
26
|
+
<br />
|
|
27
|
+
<ProgressStepper isCompact isVertical={isVertical} isCenterAligned={isCenterAligned}>
|
|
28
|
+
<ProgressStep
|
|
29
|
+
variant="success"
|
|
30
|
+
id="compact-step1"
|
|
31
|
+
titleId="compact-step1-title"
|
|
32
|
+
aria-label="completed step, step with success"
|
|
33
|
+
>
|
|
34
|
+
First step
|
|
35
|
+
</ProgressStep>
|
|
36
|
+
<ProgressStep
|
|
37
|
+
variant="info"
|
|
38
|
+
isCurrent
|
|
39
|
+
id="compact-step2"
|
|
40
|
+
titleId="compact-step2-title"
|
|
41
|
+
aria-label="step with info"
|
|
42
|
+
>
|
|
43
|
+
Second step
|
|
44
|
+
</ProgressStep>
|
|
45
|
+
<ProgressStep variant="pending" id="compact-step3" titleId="compact-step3-title" aria-label="pending step">
|
|
46
|
+
Third step
|
|
47
|
+
</ProgressStep>
|
|
48
|
+
</ProgressStepper>
|
|
49
|
+
</React.Fragment>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProgressStepper, ProgressStep } from '@patternfly/react-core';
|
|
3
|
+
import InProgressIcon from '@patternfly/react-icons/dist/esm/icons/in-progress-icon';
|
|
4
|
+
import PendingIcon from '@patternfly/react-icons/dist/esm/icons/pending-icon';
|
|
5
|
+
|
|
6
|
+
export const ProgressStepperCustomIcons: React.FunctionComponent = () => (
|
|
7
|
+
<ProgressStepper>
|
|
8
|
+
<ProgressStep
|
|
9
|
+
variant="success"
|
|
10
|
+
id="custom-step1"
|
|
11
|
+
titleId="custom-step1-title"
|
|
12
|
+
aria-label="completed step, step with success"
|
|
13
|
+
>
|
|
14
|
+
Successful completion
|
|
15
|
+
</ProgressStep>
|
|
16
|
+
<ProgressStep
|
|
17
|
+
isCurrent
|
|
18
|
+
icon={<InProgressIcon />}
|
|
19
|
+
id="custom-step2"
|
|
20
|
+
titleId="custom-step2-title"
|
|
21
|
+
aria-label="in progress"
|
|
22
|
+
>
|
|
23
|
+
In process
|
|
24
|
+
</ProgressStep>
|
|
25
|
+
<ProgressStep
|
|
26
|
+
variant="pending"
|
|
27
|
+
icon={<PendingIcon />}
|
|
28
|
+
id="custom-step3"
|
|
29
|
+
titleId="custom-step3-title"
|
|
30
|
+
aria-label="pending step"
|
|
31
|
+
>
|
|
32
|
+
Pending
|
|
33
|
+
</ProgressStep>
|
|
34
|
+
</ProgressStepper>
|
|
35
|
+
);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProgressStepper, ProgressStep, Popover } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const PopoverProgressStep = () => (
|
|
5
|
+
<ProgressStepper>
|
|
6
|
+
<ProgressStep
|
|
7
|
+
variant="success"
|
|
8
|
+
id="popover-step1"
|
|
9
|
+
titleId="popover-step1-title"
|
|
10
|
+
aria-label="completed step with popover, step with success"
|
|
11
|
+
popoverRender={stepRef => (
|
|
12
|
+
<Popover
|
|
13
|
+
aria-label="First step help"
|
|
14
|
+
headerContent={<div>First step popover</div>}
|
|
15
|
+
bodyContent={<div>Additional info or help text content.</div>}
|
|
16
|
+
reference={stepRef}
|
|
17
|
+
position="right"
|
|
18
|
+
/>
|
|
19
|
+
)}
|
|
20
|
+
>
|
|
21
|
+
First step
|
|
22
|
+
</ProgressStep>
|
|
23
|
+
<ProgressStep
|
|
24
|
+
variant="danger"
|
|
25
|
+
id="popover-step2"
|
|
26
|
+
titleId="popover-step2-title"
|
|
27
|
+
aria-label="completed step with popover, step with danger"
|
|
28
|
+
popoverRender={stepRef => (
|
|
29
|
+
<Popover
|
|
30
|
+
aria-label="Second step help"
|
|
31
|
+
headerContent={<div>Second step popover</div>}
|
|
32
|
+
bodyContent={<div>Additional info or help text content.</div>}
|
|
33
|
+
reference={stepRef}
|
|
34
|
+
position="right"
|
|
35
|
+
/>
|
|
36
|
+
)}
|
|
37
|
+
>
|
|
38
|
+
Second step
|
|
39
|
+
</ProgressStep>
|
|
40
|
+
<ProgressStep
|
|
41
|
+
variant="info"
|
|
42
|
+
id="popover-step3"
|
|
43
|
+
titleId="popover-step3-title"
|
|
44
|
+
aria-label="step with popover"
|
|
45
|
+
popoverRender={stepRef => (
|
|
46
|
+
<Popover
|
|
47
|
+
aria-label="Third step help"
|
|
48
|
+
headerContent={<div>Third step popover</div>}
|
|
49
|
+
bodyContent={<div>Additional info or help text content.</div>}
|
|
50
|
+
reference={stepRef}
|
|
51
|
+
position="right"
|
|
52
|
+
/>
|
|
53
|
+
)}
|
|
54
|
+
isCurrent
|
|
55
|
+
>
|
|
56
|
+
Third step
|
|
57
|
+
</ProgressStep>
|
|
58
|
+
<ProgressStep variant="pending" id="popover-step4" titleId="popover-step4-title" aria-label="pending step">
|
|
59
|
+
Fourth step
|
|
60
|
+
</ProgressStep>
|
|
61
|
+
</ProgressStepper>
|
|
62
|
+
);
|