@patternfly/react-core 4.232.6 → 4.232.9

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.
Files changed (94) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/esm/components/Page/Page.d.ts +1 -1
  3. package/dist/esm/components/Page/Page.d.ts.map +1 -1
  4. package/dist/esm/components/Page/PageBreadcrumb.d.ts +3 -1
  5. package/dist/esm/components/Page/PageBreadcrumb.d.ts.map +1 -1
  6. package/dist/esm/components/Page/PageBreadcrumb.js +8 -2
  7. package/dist/esm/components/Page/PageBreadcrumb.js.map +1 -1
  8. package/dist/esm/components/Page/PageGroup.d.ts +3 -1
  9. package/dist/esm/components/Page/PageGroup.d.ts.map +1 -1
  10. package/dist/esm/components/Page/PageGroup.js +8 -2
  11. package/dist/esm/components/Page/PageGroup.js.map +1 -1
  12. package/dist/esm/components/Page/PageNavigation.d.ts +3 -1
  13. package/dist/esm/components/Page/PageNavigation.d.ts.map +1 -1
  14. package/dist/esm/components/Page/PageNavigation.js +8 -2
  15. package/dist/esm/components/Page/PageNavigation.js.map +1 -1
  16. package/dist/esm/components/Page/PageSection.d.ts +4 -0
  17. package/dist/esm/components/Page/PageSection.d.ts.map +1 -1
  18. package/dist/esm/components/Page/PageSection.js +8 -2
  19. package/dist/esm/components/Page/PageSection.js.map +1 -1
  20. package/dist/js/components/Page/Page.d.ts +1 -1
  21. package/dist/js/components/Page/Page.d.ts.map +1 -1
  22. package/dist/js/components/Page/PageBreadcrumb.d.ts +3 -1
  23. package/dist/js/components/Page/PageBreadcrumb.d.ts.map +1 -1
  24. package/dist/js/components/Page/PageBreadcrumb.js +8 -2
  25. package/dist/js/components/Page/PageBreadcrumb.js.map +1 -1
  26. package/dist/js/components/Page/PageGroup.d.ts +3 -1
  27. package/dist/js/components/Page/PageGroup.d.ts.map +1 -1
  28. package/dist/js/components/Page/PageGroup.js +8 -2
  29. package/dist/js/components/Page/PageGroup.js.map +1 -1
  30. package/dist/js/components/Page/PageNavigation.d.ts +3 -1
  31. package/dist/js/components/Page/PageNavigation.d.ts.map +1 -1
  32. package/dist/js/components/Page/PageNavigation.js +8 -2
  33. package/dist/js/components/Page/PageNavigation.js.map +1 -1
  34. package/dist/js/components/Page/PageSection.d.ts +4 -0
  35. package/dist/js/components/Page/PageSection.d.ts.map +1 -1
  36. package/dist/js/components/Page/PageSection.js +8 -2
  37. package/dist/js/components/Page/PageSection.js.map +1 -1
  38. package/dist/styles/base-no-reset.css +1 -1
  39. package/dist/styles/base.css +1 -1
  40. package/dist/umd/react-core.css +83 -83
  41. package/dist/umd/react-core.js +32 -8
  42. package/dist/umd/react-core.min.js +1 -1
  43. package/package.json +7 -7
  44. package/src/components/Nav/examples/Nav.md +10 -626
  45. package/src/components/Nav/examples/NavDefault.tsx +29 -0
  46. package/src/components/Nav/examples/NavDrilldown.tsx +20 -15
  47. package/src/components/Nav/examples/NavExpandable.tsx +119 -0
  48. package/src/components/Nav/examples/NavExpandableThirdLevel.tsx +115 -0
  49. package/src/components/Nav/examples/NavFlyout.tsx +102 -0
  50. package/src/components/Nav/examples/NavGrouped.tsx +67 -0
  51. package/src/components/Nav/examples/NavHorizontalPageHeader.tsx +34 -0
  52. package/src/components/Nav/examples/NavHorizontalSubNav.tsx +32 -0
  53. package/src/components/Nav/examples/NavLegacyTertiary.tsx +32 -0
  54. package/src/components/Nav/examples/NavMixed.tsx +101 -0
  55. package/src/components/Page/Page.tsx +1 -1
  56. package/src/components/Page/PageBreadcrumb.tsx +11 -0
  57. package/src/components/Page/PageGroup.tsx +11 -0
  58. package/src/components/Page/PageNavigation.tsx +11 -0
  59. package/src/components/Page/PageSection.tsx +13 -0
  60. package/src/components/Page/__tests__/PageBreadcrumb.test.tsx +41 -1
  61. package/src/components/Page/__tests__/PageGroup.test.tsx +41 -1
  62. package/src/components/Page/__tests__/PageNavigation.test.tsx +41 -1
  63. package/src/components/Page/__tests__/PageSection.test.tsx +41 -1
  64. package/src/components/Popover/examples/Popover.md +10 -293
  65. package/src/components/Popover/examples/PopoverAdvanced.tsx +79 -0
  66. package/src/components/Popover/examples/PopoverAlert.tsx +47 -0
  67. package/src/components/Popover/examples/PopoverBasic.tsx +15 -0
  68. package/src/components/Popover/examples/PopoverCloseControlled.tsx +29 -0
  69. package/src/components/Popover/examples/PopoverCloseUncontrolled.tsx +25 -0
  70. package/src/components/Popover/examples/PopoverReactRef.tsx +23 -0
  71. package/src/components/Popover/examples/PopoverSelectorRef.tsx +19 -0
  72. package/src/components/Popover/examples/PopoverWidthAuto.tsx +14 -0
  73. package/src/components/Popover/examples/PopoverWithIconInTheTitle.tsx +17 -0
  74. package/src/components/Popover/examples/PopoverWithoutHeaderFooterCloseNoPadding.tsx +21 -0
  75. package/src/components/Progress/examples/Progress.md +18 -117
  76. package/src/components/Progress/examples/ProgressBasic.tsx +4 -0
  77. package/src/components/Progress/examples/ProgressFailure.tsx +6 -0
  78. package/src/components/Progress/examples/ProgressFailureWithoutMeasure.tsx +6 -0
  79. package/src/components/Progress/examples/ProgressFiniteStep.tsx +14 -0
  80. package/src/components/Progress/examples/ProgressInside.tsx +6 -0
  81. package/src/components/Progress/examples/ProgressInsideSuccess.tsx +11 -0
  82. package/src/components/Progress/examples/ProgressLarge.tsx +6 -0
  83. package/src/components/Progress/examples/ProgressOutside.tsx +6 -0
  84. package/src/components/Progress/examples/ProgressOutsideFailure.tsx +11 -0
  85. package/src/components/Progress/examples/ProgressSingleLine.tsx +6 -0
  86. package/src/components/Progress/examples/ProgressSmall.tsx +6 -0
  87. package/src/components/Progress/examples/ProgressStepInstruction.tsx +6 -0
  88. package/src/components/Progress/examples/ProgressSuccess.tsx +6 -0
  89. package/src/components/Progress/examples/ProgressTitleOutsideOfProgressBar.tsx +24 -0
  90. package/src/components/Progress/examples/ProgressTruncateTitle.tsx +10 -0
  91. package/src/components/Progress/examples/ProgressWarning.tsx +6 -0
  92. package/src/components/Progress/examples/ProgressWithoutMeasure.tsx +6 -0
  93. package/src/demos/JumpLinks.md +1 -0
  94. 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 (step instruction)
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,4 @@
1
+ import React from 'react';
2
+ import { Progress } from '@patternfly/react-core';
3
+
4
+ export const ProgressBasic: React.FunctionComponent = () => <Progress value={33} title="Title" />;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { Progress, ProgressVariant } from '@patternfly/react-core';
3
+
4
+ export const ProgressFailure: React.FunctionComponent = () => (
5
+ <Progress value={33} title="Title" variant={ProgressVariant.danger} />
6
+ );
@@ -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,6 @@
1
+ import React from 'react';
2
+ import { Progress, ProgressMeasureLocation } from '@patternfly/react-core';
3
+
4
+ export const ProgressInside: React.FunctionComponent = () => (
5
+ <Progress value={33} title="Title" measureLocation={ProgressMeasureLocation.inside} />
6
+ );
@@ -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,6 @@
1
+ import React from 'react';
2
+ import { Progress, ProgressSize } from '@patternfly/react-core';
3
+
4
+ export const ProgressLarge: React.FunctionComponent = () => (
5
+ <Progress value={33} title="Title" size={ProgressSize.lg} />
6
+ );
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { Progress, ProgressMeasureLocation } from '@patternfly/react-core';
3
+
4
+ export const ProgressOutside: React.FunctionComponent = () => (
5
+ <Progress value={33} title="Title" measureLocation={ProgressMeasureLocation.outside} />
6
+ );
@@ -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, ProgressSize } from '@patternfly/react-core';
3
+
4
+ export const ProgressSmall: React.FunctionComponent = () => (
5
+ <Progress value={33} title="Title" size={ProgressSize.sm} />
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,6 @@
1
+ import React from 'react';
2
+ import { Progress, ProgressVariant } from '@patternfly/react-core';
3
+
4
+ export const ProgressSuccess: React.FunctionComponent = () => (
5
+ <Progress value={100} title="Title" variant={ProgressVariant.success} />
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, ProgressVariant } from '@patternfly/react-core';
3
+
4
+ export const ProgressWarning: React.FunctionComponent = () => (
5
+ <Progress value={90} title="Title" variant={ProgressVariant.warning} />
6
+ );
@@ -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
+ );
@@ -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 hasOverflowScroll name="scrolling-section" tabIndex={0}>
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}>