@patternfly/react-core 4.232.7 → 4.232.10
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/Page/Page.d.ts +1 -1
- package/dist/esm/components/Page/Page.d.ts.map +1 -1
- package/dist/esm/components/Page/PageBreadcrumb.d.ts +3 -1
- package/dist/esm/components/Page/PageBreadcrumb.d.ts.map +1 -1
- package/dist/esm/components/Page/PageBreadcrumb.js +8 -2
- package/dist/esm/components/Page/PageBreadcrumb.js.map +1 -1
- package/dist/esm/components/Page/PageGroup.d.ts +3 -1
- package/dist/esm/components/Page/PageGroup.d.ts.map +1 -1
- package/dist/esm/components/Page/PageGroup.js +8 -2
- package/dist/esm/components/Page/PageGroup.js.map +1 -1
- package/dist/esm/components/Page/PageNavigation.d.ts +3 -1
- package/dist/esm/components/Page/PageNavigation.d.ts.map +1 -1
- package/dist/esm/components/Page/PageNavigation.js +8 -2
- package/dist/esm/components/Page/PageNavigation.js.map +1 -1
- package/dist/esm/components/Page/PageSection.d.ts +4 -0
- package/dist/esm/components/Page/PageSection.d.ts.map +1 -1
- package/dist/esm/components/Page/PageSection.js +8 -2
- package/dist/esm/components/Page/PageSection.js.map +1 -1
- package/dist/js/components/Page/Page.d.ts +1 -1
- package/dist/js/components/Page/Page.d.ts.map +1 -1
- package/dist/js/components/Page/PageBreadcrumb.d.ts +3 -1
- package/dist/js/components/Page/PageBreadcrumb.d.ts.map +1 -1
- package/dist/js/components/Page/PageBreadcrumb.js +8 -2
- package/dist/js/components/Page/PageBreadcrumb.js.map +1 -1
- package/dist/js/components/Page/PageGroup.d.ts +3 -1
- package/dist/js/components/Page/PageGroup.d.ts.map +1 -1
- package/dist/js/components/Page/PageGroup.js +8 -2
- package/dist/js/components/Page/PageGroup.js.map +1 -1
- package/dist/js/components/Page/PageNavigation.d.ts +3 -1
- package/dist/js/components/Page/PageNavigation.d.ts.map +1 -1
- package/dist/js/components/Page/PageNavigation.js +8 -2
- package/dist/js/components/Page/PageNavigation.js.map +1 -1
- package/dist/js/components/Page/PageSection.d.ts +4 -0
- package/dist/js/components/Page/PageSection.d.ts.map +1 -1
- package/dist/js/components/Page/PageSection.js +8 -2
- package/dist/js/components/Page/PageSection.js.map +1 -1
- package/dist/styles/base-no-reset.css +1 -1
- package/dist/styles/base.css +1 -1
- package/dist/umd/react-core.css +669 -669
- package/dist/umd/react-core.js +444 -515
- package/dist/umd/react-core.min.js +5 -5
- package/package.json +12 -12
- package/src/components/Nav/examples/Nav.md +10 -626
- package/src/components/Nav/examples/NavDefault.tsx +29 -0
- package/src/components/Nav/examples/NavDrilldown.tsx +20 -15
- package/src/components/Nav/examples/NavExpandable.tsx +119 -0
- package/src/components/Nav/examples/NavExpandableThirdLevel.tsx +115 -0
- package/src/components/Nav/examples/NavFlyout.tsx +102 -0
- package/src/components/Nav/examples/NavGrouped.tsx +67 -0
- package/src/components/Nav/examples/NavHorizontalPageHeader.tsx +34 -0
- package/src/components/Nav/examples/NavHorizontalSubNav.tsx +32 -0
- package/src/components/Nav/examples/NavLegacyTertiary.tsx +32 -0
- package/src/components/Nav/examples/NavMixed.tsx +101 -0
- package/src/components/Page/Page.tsx +1 -1
- package/src/components/Page/PageBreadcrumb.tsx +11 -0
- package/src/components/Page/PageGroup.tsx +11 -0
- package/src/components/Page/PageNavigation.tsx +11 -0
- package/src/components/Page/PageSection.tsx +13 -0
- package/src/components/Page/__tests__/PageBreadcrumb.test.tsx +41 -1
- package/src/components/Page/__tests__/PageGroup.test.tsx +41 -1
- package/src/components/Page/__tests__/PageNavigation.test.tsx +41 -1
- package/src/components/Page/__tests__/PageSection.test.tsx +41 -1
- package/src/components/Popover/examples/Popover.md +10 -293
- package/src/components/Popover/examples/PopoverAdvanced.tsx +79 -0
- package/src/components/Popover/examples/PopoverAlert.tsx +47 -0
- package/src/components/Popover/examples/PopoverBasic.tsx +15 -0
- package/src/components/Popover/examples/PopoverCloseControlled.tsx +29 -0
- package/src/components/Popover/examples/PopoverCloseUncontrolled.tsx +25 -0
- package/src/components/Popover/examples/PopoverReactRef.tsx +23 -0
- package/src/components/Popover/examples/PopoverSelectorRef.tsx +19 -0
- package/src/components/Popover/examples/PopoverWidthAuto.tsx +14 -0
- package/src/components/Popover/examples/PopoverWithIconInTheTitle.tsx +17 -0
- package/src/components/Popover/examples/PopoverWithoutHeaderFooterCloseNoPadding.tsx +21 -0
- package/src/components/Progress/examples/Progress.md +18 -117
- package/src/components/Progress/examples/ProgressBasic.tsx +4 -0
- package/src/components/Progress/examples/ProgressFailure.tsx +6 -0
- package/src/components/Progress/examples/ProgressFailureWithoutMeasure.tsx +6 -0
- package/src/components/Progress/examples/ProgressFiniteStep.tsx +14 -0
- package/src/components/Progress/examples/ProgressInside.tsx +6 -0
- package/src/components/Progress/examples/ProgressInsideSuccess.tsx +11 -0
- package/src/components/Progress/examples/ProgressLarge.tsx +6 -0
- package/src/components/Progress/examples/ProgressOutside.tsx +6 -0
- package/src/components/Progress/examples/ProgressOutsideFailure.tsx +11 -0
- package/src/components/Progress/examples/ProgressSingleLine.tsx +6 -0
- package/src/components/Progress/examples/ProgressSmall.tsx +6 -0
- package/src/components/Progress/examples/ProgressStepInstruction.tsx +6 -0
- package/src/components/Progress/examples/ProgressSuccess.tsx +6 -0
- package/src/components/Progress/examples/ProgressTitleOutsideOfProgressBar.tsx +24 -0
- package/src/components/Progress/examples/ProgressTruncateTitle.tsx +10 -0
- package/src/components/Progress/examples/ProgressWarning.tsx +6 -0
- package/src/components/Progress/examples/ProgressWithoutMeasure.tsx +6 -0
- package/src/demos/JumpLinks.md +1 -0
- package/src/demos/examples/BackToTop/BackToTopNameDemo.tsx +6 -1
|
@@ -7,169 +7,70 @@ propComponents: ['Progress']
|
|
|
7
7
|
|
|
8
8
|
## Examples
|
|
9
9
|
### Basic
|
|
10
|
-
```ts
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import { Progress, ProgressSize, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
13
|
-
|
|
14
|
-
<Progress value={33} title="Title" />
|
|
10
|
+
```ts file="./ProgressBasic.tsx"
|
|
15
11
|
```
|
|
16
12
|
|
|
17
13
|
### Small
|
|
18
|
-
```ts
|
|
19
|
-
import React from 'react';
|
|
20
|
-
import { Progress, ProgressSize, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
21
|
-
|
|
22
|
-
<Progress value={33} title="Title" size={ProgressSize.sm} />
|
|
14
|
+
```ts file="./ProgressSmall.tsx"
|
|
23
15
|
```
|
|
24
16
|
|
|
25
17
|
### Large
|
|
26
|
-
```ts
|
|
27
|
-
import React from 'react';
|
|
28
|
-
import { Progress, ProgressSize, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
29
|
-
|
|
30
|
-
<Progress value={33} title="Title" size={ProgressSize.lg} />
|
|
18
|
+
```ts file="./ProgressLarge.tsx"
|
|
31
19
|
```
|
|
32
20
|
|
|
33
21
|
### Outside
|
|
34
|
-
```ts
|
|
35
|
-
import React from 'react';
|
|
36
|
-
import { Progress, ProgressSize, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
37
|
-
|
|
38
|
-
<Progress value={33} title="Title" measureLocation={ProgressMeasureLocation.outside} />
|
|
22
|
+
```ts file="./ProgressOutside.tsx"
|
|
39
23
|
```
|
|
40
24
|
|
|
41
25
|
### Inside
|
|
42
|
-
```ts
|
|
43
|
-
import React from 'react';
|
|
44
|
-
import { Progress, ProgressSize, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
45
|
-
|
|
46
|
-
<Progress value={33} title="Title" measureLocation={ProgressMeasureLocation.inside} />
|
|
26
|
+
```ts file="./ProgressInside.tsx"
|
|
47
27
|
```
|
|
48
28
|
|
|
49
29
|
### Success
|
|
50
|
-
```ts
|
|
51
|
-
import React from 'react';
|
|
52
|
-
import { Progress, ProgressSize, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
53
|
-
|
|
54
|
-
<Progress value={100} title="Title" variant={ProgressVariant.success} />
|
|
30
|
+
```ts file="./ProgressSuccess.tsx"
|
|
55
31
|
```
|
|
56
32
|
|
|
57
33
|
### Failure
|
|
58
|
-
```ts
|
|
59
|
-
import React from 'react';
|
|
60
|
-
import { Progress, ProgressSize, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
61
|
-
|
|
62
|
-
<Progress value={33} title="Title" variant={ProgressVariant.danger} />
|
|
34
|
+
```ts file="./ProgressFailure.tsx"
|
|
63
35
|
```
|
|
64
36
|
|
|
65
37
|
### Warning
|
|
66
|
-
```ts
|
|
67
|
-
import React from 'react';
|
|
68
|
-
import { Progress, ProgressSize, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
69
|
-
|
|
70
|
-
<Progress value={90} title="Title" variant={ProgressVariant.warning} />
|
|
38
|
+
```ts file="./ProgressWarning.tsx"
|
|
71
39
|
```
|
|
72
40
|
|
|
73
41
|
### Inside success
|
|
74
|
-
```ts
|
|
75
|
-
import React from 'react';
|
|
76
|
-
import { Progress, ProgressSize, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
77
|
-
|
|
78
|
-
<Progress
|
|
79
|
-
value={100}
|
|
80
|
-
title="Title"
|
|
81
|
-
measureLocation={ProgressMeasureLocation.inside}
|
|
82
|
-
variant={ProgressVariant.success}
|
|
83
|
-
/>
|
|
42
|
+
```ts file="./ProgressInsideSuccess.tsx"
|
|
84
43
|
```
|
|
85
44
|
|
|
86
45
|
### Outside failure
|
|
87
|
-
```ts
|
|
88
|
-
import React from 'react';
|
|
89
|
-
import { Progress, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
90
|
-
|
|
91
|
-
<Progress
|
|
92
|
-
value={33}
|
|
93
|
-
title="Title"
|
|
94
|
-
measureLocation={ProgressMeasureLocation.outside}
|
|
95
|
-
variant={ProgressVariant.danger}
|
|
96
|
-
/>
|
|
46
|
+
```ts file="./ProgressOutsideFailure.tsx"
|
|
97
47
|
```
|
|
98
48
|
|
|
99
49
|
### Single line
|
|
100
|
-
```ts
|
|
101
|
-
import React from 'react';
|
|
102
|
-
import { Progress, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
103
|
-
|
|
104
|
-
<Progress value={33} measureLocation={ProgressMeasureLocation.outside} aria-label="Title"/>
|
|
50
|
+
```ts file="./ProgressSingleLine.tsx"
|
|
105
51
|
```
|
|
106
52
|
|
|
107
53
|
### Without measure
|
|
108
|
-
```ts
|
|
109
|
-
import React from 'react';
|
|
110
|
-
import { Progress, ProgressMeasureLocation } from '@patternfly/react-core';
|
|
111
|
-
|
|
112
|
-
<Progress value={33} title="Title" measureLocation={ProgressMeasureLocation.none} />
|
|
54
|
+
```ts file="./ProgressWithoutMeasure.tsx"
|
|
113
55
|
```
|
|
114
56
|
|
|
115
57
|
### Failure without measure
|
|
116
|
-
```ts
|
|
117
|
-
import React from 'react';
|
|
118
|
-
import { Progress, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
119
|
-
|
|
120
|
-
<Progress
|
|
121
|
-
value={33}
|
|
122
|
-
title="Title"
|
|
123
|
-
measureLocation={ProgressMeasureLocation.none}
|
|
124
|
-
variant={ProgressVariant.danger}
|
|
125
|
-
/>
|
|
58
|
+
```ts file="./ProgressFailureWithoutMeasure.tsx"
|
|
126
59
|
```
|
|
127
60
|
|
|
128
61
|
|
|
129
62
|
### Finite step
|
|
130
|
-
```ts
|
|
131
|
-
import React from 'react';
|
|
132
|
-
import { Progress, ProgressMeasureLocation } from '@patternfly/react-core';
|
|
133
|
-
|
|
134
|
-
<Progress value={2} min={0} max={5} title="Title" measureLocation={ProgressMeasureLocation.top} label="2 of 5" valueText="2 of 5"/>
|
|
63
|
+
```ts file="./ProgressFiniteStep.tsx"
|
|
135
64
|
```
|
|
136
65
|
|
|
137
|
-
### Progress
|
|
138
|
-
```ts
|
|
139
|
-
import React from 'react';
|
|
140
|
-
import { Progress} from '@patternfly/react-core';
|
|
141
|
-
|
|
142
|
-
<Progress value={2} title="Title" min={0} max={5} label="Step 2: Copying files" valueText="Step 2: Copying files" />
|
|
66
|
+
### Progress with step instructions
|
|
67
|
+
```ts file="./ProgressStepInstruction.tsx"
|
|
143
68
|
```
|
|
144
69
|
|
|
145
70
|
### Truncate title
|
|
146
|
-
```ts
|
|
147
|
-
import React from 'react';
|
|
148
|
-
import { Progress } from '@patternfly/react-core';
|
|
149
|
-
|
|
150
|
-
<Progress value={33} title="Very very very very very very very very very very very long title which should be truncated if it does not fit onto one line above the progress bar" isTitleTruncated />
|
|
71
|
+
```ts file="./ProgressTruncateTitle.tsx"
|
|
151
72
|
```
|
|
152
73
|
|
|
153
74
|
### Title outside of progress bar
|
|
154
|
-
```ts
|
|
155
|
-
import React from 'react';
|
|
156
|
-
import {
|
|
157
|
-
DescriptionList,
|
|
158
|
-
DescriptionListGroup,
|
|
159
|
-
DescriptionListTerm,
|
|
160
|
-
DescriptionListDescription,
|
|
161
|
-
Progress,
|
|
162
|
-
ProgressMeasureLocation,
|
|
163
|
-
} from '@patternfly/react-core';
|
|
164
|
-
|
|
165
|
-
<DescriptionList>
|
|
166
|
-
<DescriptionListGroup>
|
|
167
|
-
<DescriptionListTerm id="progress-label">
|
|
168
|
-
Title outside of progress bar
|
|
169
|
-
</DescriptionListTerm>
|
|
170
|
-
<DescriptionListDescription>
|
|
171
|
-
<Progress value={33} measureLocation={ProgressMeasureLocation.outside} aria-labelledby="progress-label"/>
|
|
172
|
-
</DescriptionListDescription>
|
|
173
|
-
</DescriptionListGroup>
|
|
174
|
-
</DescriptionList>
|
|
75
|
+
```ts file="./ProgressTitleOutsideOfProgressBar.tsx"
|
|
175
76
|
```
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Progress, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const ProgressFailureWithoutMeasure: React.FunctionComponent = () => (
|
|
5
|
+
<Progress value={33} title="Title" measureLocation={ProgressMeasureLocation.none} variant={ProgressVariant.danger} />
|
|
6
|
+
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Progress, ProgressMeasureLocation } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const ProgressFiniteStep: React.FunctionComponent = () => (
|
|
5
|
+
<Progress
|
|
6
|
+
value={2}
|
|
7
|
+
min={0}
|
|
8
|
+
max={5}
|
|
9
|
+
title="Title"
|
|
10
|
+
measureLocation={ProgressMeasureLocation.top}
|
|
11
|
+
label="2 of 5"
|
|
12
|
+
valueText="2 of 5"
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Progress, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const ProgressInsideSuccess: React.FunctionComponent = () => (
|
|
5
|
+
<Progress
|
|
6
|
+
value={100}
|
|
7
|
+
title="Title"
|
|
8
|
+
measureLocation={ProgressMeasureLocation.inside}
|
|
9
|
+
variant={ProgressVariant.success}
|
|
10
|
+
/>
|
|
11
|
+
);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Progress, ProgressMeasureLocation, ProgressVariant } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const ProgressOutsideFailure: React.FunctionComponent = () => (
|
|
5
|
+
<Progress
|
|
6
|
+
value={33}
|
|
7
|
+
title="Title"
|
|
8
|
+
measureLocation={ProgressMeasureLocation.outside}
|
|
9
|
+
variant={ProgressVariant.danger}
|
|
10
|
+
/>
|
|
11
|
+
);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Progress, ProgressMeasureLocation } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const ProgressSingleLine: React.FunctionComponent = () => (
|
|
5
|
+
<Progress value={33} measureLocation={ProgressMeasureLocation.outside} aria-label="Title" />
|
|
6
|
+
);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Progress } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const ProgressStepInstruction: React.FunctionComponent = () => (
|
|
5
|
+
<Progress value={2} title="Title" min={0} max={5} label="Step 2: Copying files" valueText="Step 2: Copying files" />
|
|
6
|
+
);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
DescriptionList,
|
|
4
|
+
DescriptionListGroup,
|
|
5
|
+
DescriptionListTerm,
|
|
6
|
+
DescriptionListDescription,
|
|
7
|
+
Progress,
|
|
8
|
+
ProgressMeasureLocation
|
|
9
|
+
} from '@patternfly/react-core';
|
|
10
|
+
|
|
11
|
+
export const ProgressTitleOutsideOfProgressBar: React.FunctionComponent = () => (
|
|
12
|
+
<DescriptionList>
|
|
13
|
+
<DescriptionListGroup>
|
|
14
|
+
<DescriptionListTerm id="title-outside-progress-example-label">Title outside of progress bar</DescriptionListTerm>
|
|
15
|
+
<DescriptionListDescription>
|
|
16
|
+
<Progress
|
|
17
|
+
value={33}
|
|
18
|
+
measureLocation={ProgressMeasureLocation.outside}
|
|
19
|
+
aria-labelledby="title-outside-progress-example-label"
|
|
20
|
+
/>
|
|
21
|
+
</DescriptionListDescription>
|
|
22
|
+
</DescriptionListGroup>
|
|
23
|
+
</DescriptionList>
|
|
24
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Progress } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const ProgressTruncateTitle: React.FunctionComponent = () => (
|
|
5
|
+
<Progress
|
|
6
|
+
value={33}
|
|
7
|
+
title="Very very very very very very very very very very very long title which should be truncated if it does not fit onto one line above the progress bar"
|
|
8
|
+
isTitleTruncated
|
|
9
|
+
/>
|
|
10
|
+
);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Progress, ProgressMeasureLocation } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const ProgressWithoutMeasure: React.FunctionComponent = () => (
|
|
5
|
+
<Progress value={33} title="Title" measureLocation={ProgressMeasureLocation.none} />
|
|
6
|
+
);
|
package/src/demos/JumpLinks.md
CHANGED
|
@@ -10,6 +10,7 @@ import DashboardWrapper from './examples/DashboardWrapper';
|
|
|
10
10
|
JumpLinks has a scrollspy built-in to make your implementation easier. When implementing JumpLinks be sure to:
|
|
11
11
|
|
|
12
12
|
1. Find the correct `scrollableSelector` for your page via [Firefox's debugging scrollable overflow](https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Debug_Scrollable_Overflow) or by adding `hasOverflowScroll` to a [PageSection](/components/page#pagesection) or [PageGroup](/components/page#pagegroup).
|
|
13
|
+
- If you add `hasOverflowScroll` to a Page sub-component you should also add a relevant aria-label to that component as well.
|
|
13
14
|
2. Provide `href`s to your JumpLinksItems which match the `id` of elements you want to spy on. If you wish to scroll to a different item than you're linking to use the `node` prop.
|
|
14
15
|
|
|
15
16
|
### Scrollspy with subsections
|
|
@@ -34,7 +34,12 @@ export const Name = () => {
|
|
|
34
34
|
<Switch label="Always show BackToTopButton" onChange={handleChange} isChecked={isAlwaysVisible} />
|
|
35
35
|
</TextContent>
|
|
36
36
|
</PageSection>
|
|
37
|
-
<PageSection
|
|
37
|
+
<PageSection
|
|
38
|
+
hasOverflowScroll
|
|
39
|
+
name="scrolling-section"
|
|
40
|
+
tabIndex={0}
|
|
41
|
+
aria-label="Scrollable container of demonstration cards with a back to top element"
|
|
42
|
+
>
|
|
38
43
|
<Gallery hasGutter>
|
|
39
44
|
{Array.apply(0, Array(60)).map((_x: any, i: number) => (
|
|
40
45
|
<GalleryItem key={i}>
|