@patternfly/react-core 6.3.0-prerelease.1 → 6.3.0-prerelease.11

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 (232) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/components/package.json +1 -1
  3. package/deprecated/package.json +1 -1
  4. package/dist/dynamic/components/AboutModal/package.json +1 -1
  5. package/dist/dynamic/components/Accordion/package.json +1 -1
  6. package/dist/dynamic/components/ActionList/package.json +1 -1
  7. package/dist/dynamic/components/Alert/package.json +1 -1
  8. package/dist/dynamic/components/Avatar/package.json +1 -1
  9. package/dist/dynamic/components/BackToTop/package.json +1 -1
  10. package/dist/dynamic/components/Backdrop/package.json +1 -1
  11. package/dist/dynamic/components/BackgroundImage/package.json +1 -1
  12. package/dist/dynamic/components/Badge/package.json +1 -1
  13. package/dist/dynamic/components/Banner/package.json +1 -1
  14. package/dist/dynamic/components/Brand/package.json +1 -1
  15. package/dist/dynamic/components/Breadcrumb/package.json +1 -1
  16. package/dist/dynamic/components/Button/package.json +1 -1
  17. package/dist/dynamic/components/CalendarMonth/package.json +1 -1
  18. package/dist/dynamic/components/Card/package.json +1 -1
  19. package/dist/dynamic/components/Checkbox/package.json +1 -1
  20. package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
  21. package/dist/dynamic/components/CodeBlock/package.json +1 -1
  22. package/dist/dynamic/components/Content/package.json +1 -1
  23. package/dist/dynamic/components/DataList/package.json +1 -1
  24. package/dist/dynamic/components/DatePicker/package.json +1 -1
  25. package/dist/dynamic/components/DescriptionList/package.json +1 -1
  26. package/dist/dynamic/components/Divider/package.json +1 -1
  27. package/dist/dynamic/components/Drawer/package.json +1 -1
  28. package/dist/dynamic/components/Dropdown/package.json +1 -1
  29. package/dist/dynamic/components/DualListSelector/package.json +1 -1
  30. package/dist/dynamic/components/EmptyState/package.json +1 -1
  31. package/dist/dynamic/components/ExpandableSection/package.json +1 -1
  32. package/dist/dynamic/components/FileUpload/package.json +1 -1
  33. package/dist/dynamic/components/Form/package.json +1 -1
  34. package/dist/dynamic/components/FormSelect/package.json +1 -1
  35. package/dist/dynamic/components/HelperText/package.json +1 -1
  36. package/dist/dynamic/components/Hint/package.json +1 -1
  37. package/dist/dynamic/components/Icon/package.json +1 -1
  38. package/dist/dynamic/components/InputGroup/package.json +1 -1
  39. package/dist/dynamic/components/JumpLinks/package.json +1 -1
  40. package/dist/dynamic/components/Label/package.json +1 -1
  41. package/dist/dynamic/components/List/package.json +1 -1
  42. package/dist/dynamic/components/LoginPage/package.json +1 -1
  43. package/dist/dynamic/components/Masthead/package.json +1 -1
  44. package/dist/dynamic/components/Menu/package.json +1 -1
  45. package/dist/dynamic/components/MenuToggle/package.json +1 -1
  46. package/dist/dynamic/components/Modal/package.json +1 -1
  47. package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
  48. package/dist/dynamic/components/Nav/package.json +1 -1
  49. package/dist/dynamic/components/NotificationBadge/package.json +1 -1
  50. package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
  51. package/dist/dynamic/components/NumberInput/package.json +1 -1
  52. package/dist/dynamic/components/OverflowMenu/package.json +1 -1
  53. package/dist/dynamic/components/Page/package.json +1 -1
  54. package/dist/dynamic/components/Pagination/package.json +1 -1
  55. package/dist/dynamic/components/Panel/package.json +1 -1
  56. package/dist/dynamic/components/Popover/package.json +1 -1
  57. package/dist/dynamic/components/Progress/package.json +1 -1
  58. package/dist/dynamic/components/ProgressStepper/package.json +1 -1
  59. package/dist/dynamic/components/Radio/package.json +1 -1
  60. package/dist/dynamic/components/SearchInput/package.json +1 -1
  61. package/dist/dynamic/components/Select/package.json +1 -1
  62. package/dist/dynamic/components/Sidebar/package.json +1 -1
  63. package/dist/dynamic/components/SimpleList/package.json +1 -1
  64. package/dist/dynamic/components/Skeleton/package.json +1 -1
  65. package/dist/dynamic/components/SkipToContent/package.json +1 -1
  66. package/dist/dynamic/components/Slider/package.json +1 -1
  67. package/dist/dynamic/components/Spinner/package.json +1 -1
  68. package/dist/dynamic/components/Switch/package.json +1 -1
  69. package/dist/dynamic/components/Tabs/package.json +1 -1
  70. package/dist/dynamic/components/TextArea/package.json +1 -1
  71. package/dist/dynamic/components/TextInput/package.json +1 -1
  72. package/dist/dynamic/components/TextInputGroup/package.json +1 -1
  73. package/dist/dynamic/components/TimePicker/package.json +1 -1
  74. package/dist/dynamic/components/Timestamp/package.json +1 -1
  75. package/dist/dynamic/components/Title/package.json +1 -1
  76. package/dist/dynamic/components/ToggleGroup/package.json +1 -1
  77. package/dist/dynamic/components/Toolbar/package.json +1 -1
  78. package/dist/dynamic/components/Tooltip/package.json +1 -1
  79. package/dist/dynamic/components/TreeView/package.json +1 -1
  80. package/dist/dynamic/components/Truncate/package.json +1 -1
  81. package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
  82. package/dist/dynamic/components/Wizard/package.json +1 -1
  83. package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
  84. package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
  85. package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
  86. package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
  87. package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
  88. package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
  89. package/dist/dynamic/deprecated/components/package.json +1 -1
  90. package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
  91. package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
  92. package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
  93. package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
  94. package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
  95. package/dist/dynamic/helpers/constants/package.json +1 -1
  96. package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
  97. package/dist/dynamic/helpers/fileUtils/package.json +1 -1
  98. package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
  99. package/dist/dynamic/helpers/package.json +1 -1
  100. package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
  101. package/dist/dynamic/helpers/typeUtils/package.json +1 -1
  102. package/dist/dynamic/helpers/useInterval/package.json +1 -1
  103. package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
  104. package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
  105. package/dist/dynamic/helpers/util/package.json +1 -1
  106. package/dist/dynamic/layouts/Bullseye/package.json +1 -1
  107. package/dist/dynamic/layouts/Flex/package.json +1 -1
  108. package/dist/dynamic/layouts/Gallery/package.json +1 -1
  109. package/dist/dynamic/layouts/Grid/package.json +1 -1
  110. package/dist/dynamic/layouts/Level/package.json +1 -1
  111. package/dist/dynamic/layouts/Split/package.json +1 -1
  112. package/dist/dynamic/layouts/Stack/package.json +1 -1
  113. package/dist/dynamic/styles/package.json +1 -1
  114. package/dist/esm/components/Form/FormGroupLabelHelp.js +2 -2
  115. package/dist/esm/components/Form/FormGroupLabelHelp.js.map +1 -1
  116. package/dist/esm/components/Nav/NavExpandable.d.ts.map +1 -1
  117. package/dist/esm/components/Nav/NavExpandable.js +1 -1
  118. package/dist/esm/components/Nav/NavExpandable.js.map +1 -1
  119. package/dist/esm/components/Truncate/Truncate.d.ts.map +1 -1
  120. package/dist/esm/components/Truncate/Truncate.js +6 -3
  121. package/dist/esm/components/Truncate/Truncate.js.map +1 -1
  122. package/dist/esm/demos/sampleData.d.ts.map +1 -1
  123. package/dist/esm/demos/sampleData.js +225 -226
  124. package/dist/esm/demos/sampleData.js.map +1 -1
  125. package/dist/esm/demos/sampleDataRTL.d.ts +7 -0
  126. package/dist/esm/demos/sampleDataRTL.d.ts.map +1 -0
  127. package/dist/esm/demos/sampleDataRTL.js +128 -0
  128. package/dist/esm/demos/sampleDataRTL.js.map +1 -0
  129. package/dist/js/components/Form/FormGroupLabelHelp.js +2 -2
  130. package/dist/js/components/Form/FormGroupLabelHelp.js.map +1 -1
  131. package/dist/js/components/Nav/NavExpandable.d.ts.map +1 -1
  132. package/dist/js/components/Nav/NavExpandable.js +1 -1
  133. package/dist/js/components/Nav/NavExpandable.js.map +1 -1
  134. package/dist/js/components/Truncate/Truncate.d.ts.map +1 -1
  135. package/dist/js/components/Truncate/Truncate.js +6 -3
  136. package/dist/js/components/Truncate/Truncate.js.map +1 -1
  137. package/dist/js/demos/sampleData.d.ts.map +1 -1
  138. package/dist/js/demos/sampleData.js +225 -226
  139. package/dist/js/demos/sampleData.js.map +1 -1
  140. package/dist/js/demos/sampleDataRTL.d.ts +7 -0
  141. package/dist/js/demos/sampleDataRTL.d.ts.map +1 -0
  142. package/dist/js/demos/sampleDataRTL.js +131 -0
  143. package/dist/js/demos/sampleDataRTL.js.map +1 -0
  144. package/dist/umd/assets/{output-ZyJGbFvY.css → output-6ExHwErv.css} +16177 -16177
  145. package/dist/umd/react-core.min.js +3 -3
  146. package/helpers/package.json +1 -1
  147. package/layouts/package.json +1 -1
  148. package/next/package.json +1 -1
  149. package/package.json +2 -2
  150. package/src/components/Form/FormGroupLabelHelp.tsx +2 -2
  151. package/src/components/LoginPage/examples/LoginPageBasic.tsx +1 -1
  152. package/src/components/LoginPage/examples/LoginPageLanguageSelect.tsx +1 -1
  153. package/src/components/LoginPage/examples/LoginPageShowHidePassword.tsx +1 -1
  154. package/src/components/Nav/NavExpandable.tsx +6 -1
  155. package/src/components/Nav/__tests__/Generated/__snapshots__/NavExpandable.test.tsx.snap +1 -0
  156. package/src/components/Nav/__tests__/NavExpandable.test.tsx +15 -0
  157. package/src/components/Nav/__tests__/__snapshots__/Nav.test.tsx.snap +3 -0
  158. package/src/components/Page/examples/Page.md +1 -1
  159. package/src/components/Page/examples/PageCenteredSection.tsx +3 -4
  160. package/src/components/Page/examples/PageGroupSection.tsx +9 -3
  161. package/src/components/Page/examples/PageHorizontalNav.tsx +9 -3
  162. package/src/components/Page/examples/PageMainSectionPadding.tsx +12 -4
  163. package/src/components/Page/examples/PageMainSectionVariations.tsx +6 -6
  164. package/src/components/Page/examples/PageMultipleSidebarBody.tsx +9 -3
  165. package/src/components/Page/examples/PageUncontrolledNav.tsx +9 -3
  166. package/src/components/Page/examples/PageVerticalNav.tsx +9 -3
  167. package/src/components/Page/examples/PageWithOrWithoutFill.tsx +8 -4
  168. package/src/components/Select/examples/Select.md +3 -26
  169. package/src/components/Skeleton/examples/SkeletonText.tsx +0 -1
  170. package/src/components/Timestamp/examples/TimestampBasicFormats.tsx +1 -1
  171. package/src/components/Timestamp/examples/TimestampDefaultTooltip.tsx +1 -1
  172. package/src/components/Truncate/Truncate.tsx +8 -3
  173. package/src/components/Truncate/__tests__/Truncate.test.tsx +4 -2
  174. package/src/components/Truncate/__tests__/__snapshots__/Truncate.test.tsx.snap +2 -2
  175. package/src/demos/Banner.md +6 -6
  176. package/src/demos/CardDemos.md +1 -1
  177. package/src/demos/CardView/examples/CardView.tsx +9 -4
  178. package/src/demos/DataList/examples/DataListActionable.tsx +5 -3
  179. package/src/demos/DataList/examples/DataListBasic.tsx +2 -2
  180. package/src/demos/DataList/examples/DataListExpandableControlInToolbar.tsx +2 -2
  181. package/src/demos/DataList/examples/DataListStaticBottomPagination.tsx +4 -2
  182. package/src/demos/DescriptionList/examples/DescriptionListBasic.tsx +4 -4
  183. package/src/demos/DescriptionList/examples/DescriptionListInDrawer.tsx +5 -3
  184. package/src/demos/JumpLinks.md +5 -5
  185. package/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +3 -3
  186. package/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +3 -3
  187. package/src/demos/PasswordGenerator.md +1 -1
  188. package/src/demos/RTL/RTL.md +1 -0
  189. package/src/demos/RTL/examples/PaginatedTable.tsx +18 -46
  190. package/src/demos/Tabs.md +6 -6
  191. package/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx +6 -6
  192. package/src/demos/examples/BackToTop/BackToTopNameDemo.tsx +2 -2
  193. package/src/demos/examples/Card/CardAggregateStatus.tsx +2 -6
  194. package/src/demos/examples/Card/CardDetails.tsx +2 -3
  195. package/src/demos/examples/Card/CardEventsView.tsx +2 -3
  196. package/src/demos/examples/Card/CardLogView.tsx +2 -3
  197. package/src/demos/examples/Card/CardStatus.tsx +0 -1
  198. package/src/demos/examples/Card/CardUtilizationDemo3.tsx +0 -1
  199. package/src/demos/examples/Masthead/MastheadWithHorizontalNav.tsx +5 -3
  200. package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +3 -3
  201. package/src/demos/examples/Nav/NavDefault.tsx +3 -3
  202. package/src/demos/examples/Nav/NavDrilldown.tsx +1 -1
  203. package/src/demos/examples/Nav/NavExpandable.tsx +3 -3
  204. package/src/demos/examples/Nav/NavFlyout.tsx +9 -3
  205. package/src/demos/examples/Nav/NavGrouped.tsx +14 -6
  206. package/src/demos/examples/Nav/NavHorizontal.tsx +3 -3
  207. package/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx +5 -5
  208. package/src/demos/examples/Nav/NavManual.tsx +3 -3
  209. package/src/demos/examples/Nav/NavWithSubnav.tsx +5 -5
  210. package/src/demos/examples/Page/PageContextSelector.tsx +5 -3
  211. package/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +3 -3
  212. package/src/demos/examples/Page/PageStickySectionGroup.tsx +3 -3
  213. package/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +3 -3
  214. package/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx +5 -4
  215. package/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx +3 -3
  216. package/src/demos/examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx +3 -3
  217. package/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx +3 -3
  218. package/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx +3 -3
  219. package/src/demos/examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx +3 -3
  220. package/src/demos/examples/Skeleton/SkeletonCard.tsx +5 -3
  221. package/src/demos/examples/Tabs/ModalTabs.tsx +3 -3
  222. package/src/demos/examples/Tabs/NestedTabs.tsx +2 -2
  223. package/src/demos/examples/Tabs/NestedUnindentedTabs.tsx +2 -2
  224. package/src/demos/examples/Tabs/TabsAndTable.tsx +3 -3
  225. package/src/demos/examples/Toolbar/ConsoleLogViewerToolbar.tsx +1 -1
  226. package/src/demos/examples/Wizard/InModal.tsx +1 -1
  227. package/src/demos/examples/Wizard/InPage.tsx +1 -1
  228. package/src/demos/examples/Wizard/InPageWithDrawer.tsx +3 -3
  229. package/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx +3 -3
  230. package/src/demos/sampleData.tsx +225 -227
  231. package/src/demos/sampleDataRTL.tsx +133 -0
  232. package/src/demos/RTL/examples/PaginatedTable.jsx +0 -504
@@ -69,9 +69,9 @@ export const DataListBasic: React.FunctionComponent = () => {
69
69
  return (
70
70
  <Fragment>
71
71
  <DashboardWrapper mainContainerId="main-content-datalist-view-default-nav" breadcrumb={null}>
72
- <PageSection>
72
+ <PageSection aria-labelledby="projects">
73
73
  <Content>
74
- <h1>Projects</h1>
74
+ <h1 id="projects">Projects</h1>
75
75
  <p>This is a demo that showcases PatternFly data list</p>
76
76
  </Content>
77
77
  </PageSection>
@@ -133,9 +133,9 @@ export const DataListExpandableControlInToolbar: React.FunctionComponent = () =>
133
133
  return (
134
134
  <Fragment>
135
135
  <DashboardWrapper mainContainerId="main-content-datalist-view-default-nav" breadcrumb={null}>
136
- <PageSection>
136
+ <PageSection aria-labelledby="projects">
137
137
  <Content>
138
- <h1>Projects</h1>
138
+ <h1 id="projects">Projects</h1>
139
139
  <p>This is a demo that showcases PatternFly data list</p>
140
140
  </Content>
141
141
  </PageSection>
@@ -113,9 +113,11 @@ export const DataListStaticBottomPagination: React.FunctionComponent = () => {
113
113
 
114
114
  return (
115
115
  <DashboardWrapper mainContainerId="main-content-datalist-view-pagination" breadcrumb={null}>
116
- <PageSection>
116
+ <PageSection aria-labelledby="projects">
117
117
  <Content>
118
- <Content component="h1">Projects</Content>
118
+ <Content component="h1" id="projects">
119
+ Projects
120
+ </Content>
119
121
  <Content component="p">This is a demo that showcases PatternFly Data List</Content>
120
122
  </Content>
121
123
  </PageSection>
@@ -18,16 +18,16 @@ import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/Dashboard
18
18
 
19
19
  export const DescriptionListBasic: React.FunctionComponent = () => (
20
20
  <DashboardWrapper>
21
- <PageSection>
21
+ <PageSection aria-labelledby="projects">
22
22
  <Content>
23
- <Content component="h1">Projects</Content>
23
+ <h1 id="projects">Projects</h1>
24
24
  <Content component="p">This is a full page demo</Content>
25
25
  </Content>
26
26
  </PageSection>
27
- <PageSection>
27
+ <PageSection aria-labelledby="details">
28
28
  <Card>
29
29
  <CardHeader>
30
- <Title headingLevel="h2" size="lg">
30
+ <Title headingLevel="h2" size="lg" id="details">
31
31
  Details
32
32
  </Title>
33
33
  </CardHeader>
@@ -150,13 +150,15 @@ export const DescriptionListInDrawer: React.FunctionComponent = () => {
150
150
  isNotificationDrawerExpanded={isExpanded}
151
151
  onNotificationDrawerExpand={onExpand}
152
152
  >
153
- <PageSection>
153
+ <PageSection aria-labelledby="main-title">
154
154
  <Content>
155
- <Content component="h1">Main title</Content>
155
+ <Content component="h1" id="main-title">
156
+ Main title
157
+ </Content>
156
158
  <Content component="p">This is a full page demo.</Content>
157
159
  </Content>
158
160
  </PageSection>
159
- <PageSection>{drawerContent}</PageSection>
161
+ <PageSection aria-label="Drawer Content">{drawerContent}</PageSection>
160
162
  </DashboardWrapper>
161
163
  );
162
164
  };
@@ -79,8 +79,8 @@ ScrollspyH2 = () => {
79
79
 
80
80
  return (
81
81
  <DashboardWrapper breadcrumb={null} mainContainerId="scrollable-element">
82
- <PageSection>
83
- <Title headingLevel="h1" size="2xl">
82
+ <PageSection aria-labelledby='main-title'>
83
+ <Title headingLevel="h1" size="2xl" id='main-title'>
84
84
  Main title
85
85
  </Title>
86
86
  <Switch
@@ -90,10 +90,10 @@ ScrollspyH2 = () => {
90
90
  onChange={(_event, check) => setIsVertical(check)}
91
91
  />
92
92
  </PageSection>
93
- <PageSection padding={{ default: 'noPadding' }}>
93
+ <PageSection padding={{ default: 'noPadding' }} >
94
94
  <Sidebar hasGutter orientation={!isVertical && 'stack'}>
95
95
  <SidebarPanel variant="sticky">
96
- <PageSection>
96
+ <PageSection aria-label='Jump links navigation'>
97
97
  <JumpLinks
98
98
  isVertical={isVertical}
99
99
  isCentered={!isVertical}
@@ -113,7 +113,7 @@ ScrollspyH2 = () => {
113
113
  </PageSection>
114
114
  </SidebarPanel>
115
115
  <SidebarContent hasNoBackground>
116
- <PageSection>
116
+ <PageSection aria-label='Main content'>
117
117
  <Content>
118
118
  {headings.map(i => (
119
119
  <div key={i} style={{ maxWidth: '800px', marginBottom: '32px' }}>
@@ -535,16 +535,16 @@ export const NotificationDrawerBasic: React.FunctionComponent = () => {
535
535
  breadcrumb={PageBreadcrumb}
536
536
  mainContainerId={pageId}
537
537
  >
538
- <PageSection>
538
+ <PageSection aria-labelledby="main-title">
539
539
  <Content>
540
- <h1>Main title</h1>
540
+ <h1 id="main-title">Main title</h1>
541
541
  <p>
542
542
  Body text should be Red Hat Text at 1rem(16px). It should have leading of 1.5rem(24px) because <br />
543
543
  of its relative line height of 1.5.
544
544
  </p>
545
545
  </Content>
546
546
  </PageSection>
547
- <PageSection>Panel section content</PageSection>
547
+ <PageSection aria-label="Panel section">Panel section content</PageSection>
548
548
  </Page>
549
549
  </Fragment>
550
550
  );
@@ -770,16 +770,16 @@ export const NotificationDrawerGrouped: React.FunctionComponent = () => {
770
770
  breadcrumb={PageBreadcrumb}
771
771
  mainContainerId={pageId}
772
772
  >
773
- <PageSection>
773
+ <PageSection aria-labelledby="main-title">
774
774
  <Content>
775
- <h1>Main title</h1>
775
+ <h1 id="main-title">Main title</h1>
776
776
  <p>
777
777
  Body text should be Red Hat Text at 1rem(16px). It should have leading of 1.5rem(24px) because <br />
778
778
  of its relative line height of 1.5.
779
779
  </p>
780
780
  </Content>
781
781
  </PageSection>
782
- <PageSection>Panel section content</PageSection>
782
+ <PageSection aria-label="Panel section">Panel section content</PageSection>
783
783
  </Page>
784
784
  </Fragment>
785
785
  );
@@ -45,7 +45,7 @@ const PasswordGenerator: React.FunctionComponent = () => {
45
45
  const [isAutocompleteOpen, setIsAutocompleteOpen] = useState<boolean>(false);
46
46
  const [passwordHidden, setPasswordHidden] = useState<boolean>(true);
47
47
  const searchInputRef = useRef(null);
48
- const autocompleteRef = .useRef(null);
48
+ const autocompleteRef = useRef(null);
49
49
 
50
50
  useEffect(() => {
51
51
  window.addEventListener('keydown', handleMenuKeys);
@@ -18,6 +18,7 @@ import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
18
18
  import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
19
19
  import HandPaperIcon from '@patternfly/react-icons/dist/esm/icons/hand-paper-icon';
20
20
  import imgAvatar from '@patternfly/react-core/src/components/assets/avatarImg.svg';
21
+ import { rows } from '@patternfly/react-core/dist/esm/demos/sampleDataRTL';
21
22
 
22
23
  import './examples/PaginatedTable.css';
23
24
 
@@ -55,6 +55,7 @@ import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
55
55
  import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
56
56
  import HandPaperIcon from '@patternfly/react-icons/dist/esm/icons/hand-paper-icon';
57
57
  import imgAvatar from '@patternfly/react-core/src/components/assets/avatarImg.svg';
58
+ import { rows } from '@patternfly/react-core/dist/esm/demos/sampleDataRTL';
58
59
 
59
60
  interface Row {
60
61
  name: string;
@@ -81,45 +82,15 @@ export const PaginatedTableAction: React.FunctionComponent = () => {
81
82
  translation.table.columns.url
82
83
  ];
83
84
 
84
- const numRows: number = 25;
85
- const getRandomInteger = (min: number, max: number) => Math.floor(Math.random() * (max - min + 1)) + min;
86
- const createRows = () => {
87
- const rows: Row[] = [];
88
- for (let i = 0; i < numRows; i++) {
89
- const num = i + 1;
90
- const rowObj: Row = {
91
- name: translation.table.rows.node + num,
92
- status: [
93
- translation.table.rows.status.stopped,
94
- translation.table.rows.status.running,
95
- translation.table.rows.status.down,
96
- translation.table.rows.status.needsMaintenance
97
- ][getRandomInteger(0, 3)],
98
- location: [
99
- translation.table.rows.locations.raleigh,
100
- translation.table.rows.locations.boston,
101
- translation.table.rows.locations.atlanta,
102
- translation.table.rows.locations.sanFrancisco
103
- ][getRandomInteger(0, 3)],
104
- lastModified: [
105
- translation.table.rows.lastModified.oneHr,
106
- translation.table.rows.lastModified.threeHrs,
107
- translation.table.rows.lastModified.fiveHrs,
108
- translation.table.rows.lastModified.sevenMins,
109
- translation.table.rows.lastModified.fortyTwoMins,
110
- translation.table.rows.lastModified.twoDays,
111
- translation.table.rows.lastModified.oneMonth
112
- ][getRandomInteger(0, 6)],
113
- url: 'http://www.redhat.com/en/office-locations/node' + num
114
- };
115
- rows.push(rowObj);
116
- }
117
-
118
- return rows;
119
- };
85
+ const generateRowsFromTranslation = (translation: Translation): Row[] =>
86
+ rows.map((row, index) => ({
87
+ name: `${translation.table.rows.node}${index + 1}`,
88
+ status: translation.table.rows.status[row.status],
89
+ location: translation.table.rows.locations[row.location],
90
+ lastModified: translation.table.rows.lastModified[row.lastModified],
91
+ url: `http://www.redhat.com/en/office-locations/node${index + 1}`
92
+ }));
120
93
 
121
- const rows = createRows();
122
- const [managedRows, setManagedRows] = useState(rows);
123
94
  const [paginatedRows, setPaginatedRows] = useState<Row[]>(rows.slice(0, 10));
124
95
  const [isDirRTL, setIsDirRTL] = useState<boolean>(false);
125
96
 
@@ -131,9 +102,8 @@ export const PaginatedTableAction: React.FunctionComponent = () => {
131
102
  };
132
103
 
133
104
  useEffect(() => {
134
- const newRows = createRows();
135
- setManagedRows(newRows);
136
- setPaginatedRows(newRows.slice((page - 1) * perPage, page * perPage));
105
+ const fullRows = generateRowsFromTranslation(translation);
106
+ setPaginatedRows(fullRows.slice((page - 1) * perPage, page * perPage));
137
107
  }, [translation]);
138
108
 
139
109
  useEffect(() => {
@@ -150,7 +120,8 @@ export const PaginatedTableAction: React.FunctionComponent = () => {
150
120
  startIdx: number | undefined,
151
121
  endIdx: number | undefined
152
122
  ) => {
153
- setPaginatedRows(managedRows.slice(startIdx, endIdx));
123
+ const fullRows = generateRowsFromTranslation(translation);
124
+ setPaginatedRows(fullRows.slice(startIdx, endIdx));
154
125
  setPage(newPage);
155
126
  };
156
127
 
@@ -161,7 +132,8 @@ export const PaginatedTableAction: React.FunctionComponent = () => {
161
132
  startIdx: number | undefined,
162
133
  endIdx: number | undefined
163
134
  ) => {
164
- setPaginatedRows(managedRows.slice(startIdx, endIdx));
135
+ const fullRows = generateRowsFromTranslation(translation);
136
+ setPaginatedRows(fullRows.slice(startIdx, endIdx));
165
137
  setPerPage(newPerPage);
166
138
  };
167
139
 
@@ -170,7 +142,7 @@ export const PaginatedTableAction: React.FunctionComponent = () => {
170
142
 
171
143
  return (
172
144
  <Pagination
173
- itemCount={managedRows.length}
145
+ itemCount={rows.length}
174
146
  page={page}
175
147
  perPage={perPage}
176
148
  onSetPage={handleSetPage}
@@ -470,9 +442,9 @@ export const PaginatedTableAction: React.FunctionComponent = () => {
470
442
  ))}
471
443
  </Breadcrumb>
472
444
  </PageBreadcrumb>
473
- <PageSection variant="light">
445
+ <PageSection variant="light" aria-labelledby="main-title">
474
446
  <Content>
475
- <h1>{translation.title}</h1>
447
+ <h1 id="main-title">{translation.title}</h1>
476
448
  <p>{translation.body}</p>
477
449
  </Content>
478
450
  </PageSection>
package/src/demos/Tabs.md CHANGED
@@ -159,7 +159,7 @@ TabsOpenDemo = () => {
159
159
  return (
160
160
  <DashboardWrapper hasNoBreadcrumb>
161
161
  {tabsBreadcrumb}
162
- <PageSection isWidthLimited>
162
+ <PageSection isWidthLimited aria-label='Pod header'>
163
163
  <Flex
164
164
  spaceItems={{ default: 'spaceItemsMd' }}
165
165
  alignItems={{ default: 'alignItemsFlexStart' }}
@@ -178,7 +178,7 @@ TabsOpenDemo = () => {
178
178
  </FlexItem>
179
179
  </Flex>
180
180
  </PageSection>
181
- <PageSection type="tabs" isWidthLimited>
181
+ <PageSection type="tabs" isWidthLimited aria-label='Pod navigation tabs'>
182
182
  <Tabs activeKey={activeTabKey} onSelect={handleTabClick} usePageInsets id="open-tabs-example-tabs-list">
183
183
  <Tab eventKey={0} title={<TabTitleText>Details</TabTitleText>} tabContentId={`tabContent${0}`} />
184
184
  <Tab eventKey={1} title={<TabTitleText>YAML</TabTitleText>} tabContentId={`tabContent${1}`} />
@@ -187,7 +187,7 @@ TabsOpenDemo = () => {
187
187
  <Tab eventKey={4} title={<TabTitleText>Terminal</TabTitleText>} tabContentId={`tabContent${4}`} />
188
188
  </Tabs>
189
189
  </PageSection>
190
- <PageSection isWidthLimited>
190
+ <PageSection isWidthLimited aria-label='Pod content'>
191
191
  <TabContent key={0} eventKey={0} id={`tabContent${0}`} activeKey={activeTabKey} hidden={0 !== activeTabKey}>
192
192
  <TabContentBody>{tabContent}</TabContentBody>
193
193
  </TabContent>
@@ -355,7 +355,7 @@ TabsOpenWithSecondaryTabsDemo = () => {
355
355
  return (
356
356
  <DashboardWrapper hasNoBreadcrumb>
357
357
  {tabsBreadcrumb}
358
- <PageSection isWidthLimited>
358
+ <PageSection isWidthLimited aria-label='Pod header'>
359
359
  <Flex
360
360
  spaceItems={{ default: 'spaceItemsMd' }}
361
361
  alignItems={{ default: 'alignItemsFlexStart' }}
@@ -374,7 +374,7 @@ TabsOpenWithSecondaryTabsDemo = () => {
374
374
  </FlexItem>
375
375
  </Flex>
376
376
  </PageSection>
377
- <PageSection type="tabs" isWidthLimited>
377
+ <PageSection type="tabs" isWidthLimited aria-label='Pod navigation tabs'>
378
378
  <Tabs activeKey={activeTabKey} onSelect={handleTabClick} usePageInsets id="open-tabs-example-tabs-list">
379
379
  <Tab eventKey={0} title={<TabTitleText>Details</TabTitleText>} tabContentId={`tabContent${0}`} />
380
380
  <Tab eventKey={1} title={<TabTitleText>YAML</TabTitleText>} tabContentId={`tabContent${1}`} />
@@ -383,7 +383,7 @@ TabsOpenWithSecondaryTabsDemo = () => {
383
383
  <Tab eventKey={4} title={<TabTitleText>Terminal</TabTitleText>} tabContentId={`tabContent${4}`} />
384
384
  </Tabs>
385
385
  </PageSection>
386
- <PageSection isWidthLimited padding={{ default: 'noPadding' }}>
386
+ <PageSection isWidthLimited padding={{ default: 'noPadding' }} aria-label='Pod content'>
387
387
  <TabContent key={0} eventKey={0} id={`tabContent${0}`} activeKey={activeTabKey} hidden={0 !== activeTabKey}>
388
388
  <TabContentBody>
389
389
  <Tabs
@@ -312,9 +312,9 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
312
312
  notificationDrawer={notificationDrawer}
313
313
  isNotificationDrawerExpanded={isDrawerExpanded}
314
314
  >
315
- <PageSection>
315
+ <PageSection aria-labelledby="alert-group-title">
316
316
  <Content>
317
- <h1>Alert group with notification drawer demo</h1>
317
+ <h1 id="alert-group-title">Alert group with notification drawer demo</h1>
318
318
  <p>
319
319
  New alerts can be added with the following buttons. Each alert has a timeout of 7 seconds, however, even
320
320
  after the timeout expires, all alerts are still visible in the notification drawer. By default, only 3
@@ -324,7 +324,7 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
324
324
  </Content>
325
325
  </PageSection>
326
326
 
327
- <PageSection>
327
+ <PageSection aria-label="Alert Buttons">
328
328
  <Button variant="secondary" onClick={() => addNewNotification('success')} style={alertButtonStyle}>
329
329
  Add toast success alert
330
330
  </Button>
@@ -344,10 +344,10 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
344
344
  </Button>
345
345
  </PageSection>
346
346
 
347
- <PageSection>
347
+ <PageSection aria-labelledby="max-displayed-alerts-title">
348
348
  <Content>
349
349
  <br />
350
- <h2>Max displayed alerts</h2>
350
+ <h2 id="max-displayed-alerts-title">Max displayed alerts</h2>
351
351
  <p>Adjust the maximum number of displayed alerts.</p>
352
352
  </Content>
353
353
  <NumberInput
@@ -364,7 +364,7 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
364
364
  style={{ margin: '12px 0' }}
365
365
  />
366
366
  </PageSection>
367
- <PageSection>
367
+ <PageSection component="div">
368
368
  <AlertGroup
369
369
  hasAnimations
370
370
  isToast
@@ -11,9 +11,9 @@ export const Name = () => {
11
11
 
12
12
  return (
13
13
  <DashboardWrapper breadcrumb={null}>
14
- <PageSection>
14
+ <PageSection aria-labelledby="main-title">
15
15
  <Content>
16
- <h1>Main title</h1>
16
+ <h1 id="main-title">Main title</h1>
17
17
  <p>
18
18
  Body text should be Red Hat Text at 1rem(16px). It should have leading of 1.5rem(24px) because <br />
19
19
  of it’s relative line height of 1.5.
@@ -1,4 +1,3 @@
1
- /* eslint-disable camelcase */
2
1
  import { Fragment } from 'react';
3
2
  import {
4
3
  Card,
@@ -16,7 +15,7 @@ import {
16
15
  import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
17
16
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
18
17
  import ExclamationTriangleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-triangle-icon';
19
- import l_gallery_GridTemplateColumns_min from '@patternfly/react-tokens/dist/esm/l_gallery_GridTemplateColumns_min';
18
+ import cssGridTemplateColumnsMin from '@patternfly/react-tokens/dist/esm/l_gallery_GridTemplateColumns_min';
20
19
 
21
20
  interface ContentType {
22
21
  icon?: React.ReactNode;
@@ -283,10 +282,7 @@ export const CardAggregateStatus: React.FunctionComponent = () => {
283
282
  }
284
283
  return (
285
284
  <GridItem key={groupIndex}>
286
- <Gallery
287
- hasGutter
288
- style={{ [l_gallery_GridTemplateColumns_min.name]: galleryWidth } as React.CSSProperties}
289
- >
285
+ <Gallery hasGutter style={{ [cssGridTemplateColumnsMin.name]: galleryWidth } as React.CSSProperties}>
290
286
  {cardData[cardGroup].map(({ title, content, layout }, cardIndex: number) => (
291
287
  <Card
292
288
  style={{ textAlign: cardAlign } as React.CSSProperties}
@@ -1,4 +1,3 @@
1
- /* eslint-disable camelcase */
2
1
  import {
3
2
  Card,
4
3
  CardTitle,
@@ -12,10 +11,10 @@ import {
12
11
  DescriptionListDescription,
13
12
  Divider
14
13
  } from '@patternfly/react-core';
15
- import l_gallery_GridTemplateColumns_min from '@patternfly/react-tokens/dist/esm/l_gallery_GridTemplateColumns_min';
14
+ import cssGridTemplateColumnsMin from '@patternfly/react-tokens/dist/esm/l_gallery_GridTemplateColumns_min';
16
15
 
17
16
  export const CardDetailsDemo: React.FunctionComponent = () => (
18
- <Gallery hasGutter style={{ [l_gallery_GridTemplateColumns_min.name]: '260px' } as React.CSSProperties}>
17
+ <Gallery hasGutter style={{ [cssGridTemplateColumnsMin.name]: '260px' } as React.CSSProperties}>
19
18
  <Card>
20
19
  <CardTitle>
21
20
  <Title headingLevel="h4" size="xl">
@@ -1,5 +1,4 @@
1
1
  import { Fragment, useState } from 'react';
2
- /* eslint-disable camelcase */
3
2
  import {
4
3
  Card,
5
4
  CardHeader,
@@ -26,7 +25,7 @@ import {
26
25
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
27
26
  import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon';
28
27
  import flex from '@patternfly/react-styles/css/utilities/Flex/flex';
29
- import l_gallery_GridTemplateColumns_min from '@patternfly/react-tokens/dist/esm/l_gallery_GridTemplateColumns_min';
28
+ import cssGridTemplateColumnsMin from '@patternfly/react-tokens/dist/esm/l_gallery_GridTemplateColumns_min';
30
29
 
31
30
  export const CardEventsView: React.FunctionComponent = () => {
32
31
  const [isOpen, setIsOpen] = useState(false);
@@ -62,7 +61,7 @@ export const CardEventsView: React.FunctionComponent = () => {
62
61
  <code>baseline</code> alignment.
63
62
  <br />
64
63
  <br />
65
- <Gallery hasGutter style={{ [l_gallery_GridTemplateColumns_min.name]: '360px' } as React.CSSProperties}>
64
+ <Gallery hasGutter style={{ [cssGridTemplateColumnsMin.name]: '360px' } as React.CSSProperties}>
66
65
  <Card id="card-events-view-example">
67
66
  <CardHeader className={flex.alignItemsFlexStart} actions={{ actions: headerActions, hasNoOffset: true }}>
68
67
  <CardTitle>
@@ -1,5 +1,4 @@
1
1
  import { Fragment, useState } from 'react';
2
- /* eslint-disable camelcase */
3
2
  import {
4
3
  Card,
5
4
  CardHeader,
@@ -21,7 +20,7 @@ import {
21
20
  Title
22
21
  } from '@patternfly/react-core';
23
22
  import flex from '@patternfly/react-styles/css/utilities/Flex/flex';
24
- import l_gallery_GridTemplateColumns_min from '@patternfly/react-tokens/dist/esm/l_gallery_GridTemplateColumns_min';
23
+ import cssGridTemplateColumnsMin from '@patternfly/react-tokens/dist/esm/l_gallery_GridTemplateColumns_min';
25
24
 
26
25
  export const CardLogView: React.FunctionComponent = () => {
27
26
  const [isOpen, setIsOpen] = useState(false);
@@ -61,7 +60,7 @@ export const CardLogView: React.FunctionComponent = () => {
61
60
  <code>baseline</code> alignment.
62
61
  <br />
63
62
  <br />
64
- <Gallery hasGutter style={{ [l_gallery_GridTemplateColumns_min.name]: '360px' } as React.CSSProperties}>
63
+ <Gallery hasGutter style={{ [cssGridTemplateColumnsMin.name]: '360px' } as React.CSSProperties}>
65
64
  <Card id="card-log-view-example">
66
65
  <CardHeader className={flex.alignItemsFlexStart} actions={{ actions: headerActions, hasNoOffset: true }}>
67
66
  <CardTitle>
@@ -1,5 +1,4 @@
1
1
  import { useState } from 'react';
2
- /* eslint-disable camelcase */
3
2
  import {
4
3
  Alert,
5
4
  Card,
@@ -1,5 +1,4 @@
1
1
  import { Fragment, useState } from 'react';
2
- /* eslint-disable camelcase */
3
2
  import {
4
3
  Card,
5
4
  CardTitle,
@@ -308,15 +308,17 @@ export const MastheadWithHorizontalNav: React.FunctionComponent = () => {
308
308
  isBreadcrumbWidthLimited
309
309
  isBreadcrumbGrouped
310
310
  additionalGroupedContent={
311
- <PageSection>
311
+ <PageSection aria-labelledby="main-title">
312
312
  <Content>
313
- <Content component="h1">Main title</Content>
313
+ <Content component="h1" id="main-title">
314
+ Main title
315
+ </Content>
314
316
  <Content component="p">This is a full page demo.</Content>
315
317
  </Content>
316
318
  </PageSection>
317
319
  }
318
320
  >
319
- <PageSection>
321
+ <PageSection aria-label="Card gallery">
320
322
  <Gallery hasGutter>
321
323
  {Array.from({ length: 10 }).map((_value, index) => (
322
324
  <GalleryItem key={index}>
@@ -544,15 +544,15 @@ export const MastheadWithUtilitiesAndUserDropdownMenu: React.FunctionComponent =
544
544
  isBreadcrumbWidthLimited
545
545
  isBreadcrumbGrouped
546
546
  additionalGroupedContent={
547
- <PageSection>
547
+ <PageSection aria-labelledby="main-title">
548
548
  <Content>
549
- <h1>Main title</h1>
549
+ <h1 id="main-title">Main title</h1>
550
550
  <p>This is a full page demo.</p>
551
551
  </Content>
552
552
  </PageSection>
553
553
  }
554
554
  >
555
- <PageSection>
555
+ <PageSection aria-label="Card gallery">
556
556
  <Gallery hasGutter>
557
557
  {Array.from({ length: 10 }).map((_value, index) => (
558
558
  <GalleryItem key={index}>
@@ -84,16 +84,16 @@ export const NavDefault: React.FunctionComponent = () => {
84
84
  breadcrumb={DashboardBreadcrumb}
85
85
  mainContainerId={pageId}
86
86
  >
87
- <PageSection>
87
+ <PageSection aria-labelledby="main-title">
88
88
  <Content>
89
- <h1>Main title</h1>
89
+ <h1 id="main-title">Main title</h1>
90
90
  <p>
91
91
  Body text should be Red Hat Text at 1rem(16px). It should have leading of 1.5rem(24px) because <br />
92
92
  of its relative line height of 1.5.
93
93
  </p>
94
94
  </Content>
95
95
  </PageSection>
96
- <PageSection>
96
+ <PageSection aria-label="Card gallery">
97
97
  <Gallery hasGutter>
98
98
  {Array.from({ length: 10 }).map((_value, index) => (
99
99
  <GalleryItem key={index}>
@@ -129,7 +129,7 @@ export const NavDrilldown: React.FunctionComponent = () => {
129
129
 
130
130
  return (
131
131
  <Page masthead={<DashboardHeader />} sidebar={sidebar}>
132
- <PageSection>
132
+ <PageSection aria-label="Navigation layer">
133
133
  <strong>Nav Layer: </strong>
134
134
  {navLayer}
135
135
  </PageSection>
@@ -110,16 +110,16 @@ export const NavExpandableDemo: React.FunctionComponent = () => {
110
110
  breadcrumb={DashboardBreadcrumb}
111
111
  mainContainerId={pageId}
112
112
  >
113
- <PageSection>
113
+ <PageSection aria-labelledby="main-title">
114
114
  <Content>
115
- <h1>Main title</h1>
115
+ <h1 id="main-title">Main title</h1>
116
116
  <p>
117
117
  Body text should be Red Hat Text at 1rem(16px). It should have leading of 1.5rem(24px) because <br />
118
118
  of its relative line height of 1.5.
119
119
  </p>
120
120
  </Content>
121
121
  </PageSection>
122
- <PageSection>
122
+ <PageSection aria-label="Card gallery">
123
123
  <Gallery hasGutter>
124
124
  {Array.from({ length: 10 }).map((_value, index) => (
125
125
  <GalleryItem key={index}>
@@ -284,9 +284,15 @@ export const NavFlyout: React.FunctionComponent = () => {
284
284
  skipToContent={PageSkipToContent}
285
285
  mainContainerId={pageId}
286
286
  >
287
- <PageSection>Section 1</PageSection>
288
- <PageSection>Section 2</PageSection>
289
- <PageSection>Section 3</PageSection>
287
+ <PageSection aria-labelledby="section-1">
288
+ <h2 id="section-1">Section 1</h2>
289
+ </PageSection>
290
+ <PageSection aria-labelledby="section-2">
291
+ <h2 id="section-2">Section 2</h2>
292
+ </PageSection>
293
+ <PageSection aria-labelledby="section-3">
294
+ <h2 id="section-3">Section 3</h2>
295
+ </PageSection>
290
296
  </Page>
291
297
  );
292
298
  };