@patternfly/react-core 4.224.6 → 4.224.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 (36) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/esm/components/NotificationDrawer/NotificationDrawerGroup.d.ts +2 -0
  3. package/dist/esm/components/NotificationDrawer/NotificationDrawerGroup.d.ts.map +1 -1
  4. package/dist/esm/components/NotificationDrawer/NotificationDrawerGroup.js +2 -2
  5. package/dist/esm/components/NotificationDrawer/NotificationDrawerGroup.js.map +1 -1
  6. package/dist/esm/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts +2 -0
  7. package/dist/esm/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts.map +1 -1
  8. package/dist/esm/components/NotificationDrawer/NotificationDrawerListItemHeader.js +2 -2
  9. package/dist/esm/components/NotificationDrawer/NotificationDrawerListItemHeader.js.map +1 -1
  10. package/dist/js/components/NotificationDrawer/NotificationDrawerGroup.d.ts +2 -0
  11. package/dist/js/components/NotificationDrawer/NotificationDrawerGroup.d.ts.map +1 -1
  12. package/dist/js/components/NotificationDrawer/NotificationDrawerGroup.js +2 -2
  13. package/dist/js/components/NotificationDrawer/NotificationDrawerGroup.js.map +1 -1
  14. package/dist/js/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts +2 -0
  15. package/dist/js/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts.map +1 -1
  16. package/dist/js/components/NotificationDrawer/NotificationDrawerListItemHeader.js +2 -2
  17. package/dist/js/components/NotificationDrawer/NotificationDrawerListItemHeader.js.map +1 -1
  18. package/dist/umd/react-core.js +4 -4
  19. package/dist/umd/react-core.min.css +102 -102
  20. package/dist/umd/react-core.min.js +1 -1
  21. package/package.json +6 -6
  22. package/src/components/NotificationDrawer/NotificationDrawerGroup.tsx +5 -2
  23. package/src/components/NotificationDrawer/NotificationDrawerListItemHeader.tsx +5 -2
  24. package/src/components/NotificationDrawer/__tests__/NotificationDrawerGroup.test.tsx +5 -0
  25. package/src/components/NotificationDrawer/__tests__/NotificationDrawerListItemHeader.test.tsx +5 -0
  26. package/src/components/NotificationDrawer/__tests__/__snapshots__/NotificationDrawerGroup.test.tsx.snap +47 -0
  27. package/src/components/NotificationDrawer/__tests__/__snapshots__/NotificationDrawerListItemHeader.test.tsx.snap +31 -0
  28. package/src/components/Tabs/examples/Tabs.md +131 -111
  29. package/src/components/Tabs/examples/TabsDynamic.tsx +1 -0
  30. package/src/components/Toolbar/examples/Toolbar.md +2 -2
  31. package/src/components/Toolbar/examples/ToolbarCustomChipGroupContent.tsx +1 -1
  32. package/src/components/Wizard/examples/Wizard.md +11 -11
  33. package/src/demos/CardDemos.md +27 -26
  34. package/src/demos/Masthead.md +1 -1
  35. package/src/demos/TileDemo.md +8 -8
  36. package/src/layouts/Grid/examples/Grid.md +1 -1
@@ -52,6 +52,7 @@ export const TabsDynamic: React.FunctionComponent = () => {
52
52
  <Tab
53
53
  key={index}
54
54
  eventKey={index}
55
+ aria-label={`Dynamic ${tab}`}
55
56
  title={<TabTitleText>{tab}</TabTitleText>}
56
57
  closeButtonAriaLabel={`Close ${tab}`}
57
58
  isCloseDisabled={tabs.length === 1}
@@ -218,7 +218,7 @@ class ToolbarSpacers extends React.Component {
218
218
 
219
219
  return (
220
220
  <Toolbar
221
- id="toolbar-spacers"
221
+ id="toolbar-insets"
222
222
  inset={{
223
223
  default: 'insetNone',
224
224
  md: 'insetSm',
@@ -249,7 +249,7 @@ const ToolbarItems = () => {
249
249
  return (
250
250
  <React.Fragment>
251
251
  <div style={{ overflowY: 'scroll', height: '200px' }}>
252
- <Toolbar id="toolbar-spacers" inset={{ default: 'insetNone' }} isSticky={isSticky}>
252
+ <Toolbar id="toolbar-sticky" inset={{ default: 'insetNone' }} isSticky={isSticky}>
253
253
  <ToolbarContent>
254
254
  <ToolbarItem>
255
255
  <SearchInput aria-label="search input example" />
@@ -155,7 +155,7 @@ export const ToolbarCustomChipGroupContent: React.FunctionComponent = () => {
155
155
 
156
156
  return (
157
157
  <Toolbar
158
- id="toolbar-with-filter"
158
+ id="toolbar-with-custom-chip-group"
159
159
  className="pf-m-toggle-group-container"
160
160
  collapseListedFiltersBreakpoint="xl"
161
161
  customChipGroupContent={customChipGroupContent}
@@ -119,12 +119,12 @@ class IncrementallyEnabledStepsWizard extends React.Component {
119
119
  const { stepIdReached } = this.state;
120
120
 
121
121
  const steps = [
122
- { id: 1, name: 'First step', component: <p>Step 1 content</p> },
123
- { id: 2, name: 'Second step', component: <p>Step 2 content</p>, canJumpTo: stepIdReached >= 2 },
124
- { id: 3, name: 'Third step', component: <p>Step 3 content</p>, canJumpTo: stepIdReached >= 3 },
125
- { id: 4, name: 'Fourth step', component: <p>Step 4 content</p>, canJumpTo: stepIdReached >= 4 },
122
+ { id: 'incrementally-enabled-1', name: 'First step', component: <p>Step 1 content</p> },
123
+ { id: 'incrementally-enabled-2', name: 'Second step', component: <p>Step 2 content</p>, canJumpTo: stepIdReached >= 2 },
124
+ { id: 'incrementally-enabled-3', name: 'Third step', component: <p>Step 3 content</p>, canJumpTo: stepIdReached >= 3 },
125
+ { id: 'incrementally-enabled-4', name: 'Fourth step', component: <p>Step 4 content</p>, canJumpTo: stepIdReached >= 4 },
126
126
  {
127
- id: 5,
127
+ id: 'incrementally-enabled-5',
128
128
  name: 'Review',
129
129
  component: <p>Review step content</p>,
130
130
  nextButtonText: 'Finish',
@@ -177,7 +177,7 @@ class SimpleWizard extends React.Component {
177
177
  { name: 'Fourth step', component: <p>Step 4 content</p> },
178
178
  { name: 'Review', component: <p>Review step content</p>, nextButtonText: 'Finish' }
179
179
  ];
180
- const title = 'Basic wizard';
180
+ const title = 'Expandable wizard';
181
181
  return (
182
182
  <Wizard
183
183
  navAriaLabel={`${title} steps`}
@@ -296,29 +296,29 @@ class ValidationWizard extends React.Component {
296
296
  const { isFormValid, formValue, allStepsValid, stepIdReached } = this.state;
297
297
 
298
298
  const steps = [
299
- { id: 1, name: 'Information', component: <p>Step 1 content</p> },
299
+ { id: 'validated-1', name: 'Information', component: <p>Step 1 content</p> },
300
300
  {
301
301
  name: 'Configuration',
302
302
  steps: [
303
303
  {
304
- id: 2,
304
+ id: 'validated-2',
305
305
  name: 'Substep A with validation',
306
306
  component: <SampleForm formValue={formValue} isFormValid={isFormValid} onChange={this.onFormChange} />,
307
307
  enableNext: isFormValid,
308
308
  canJumpTo: stepIdReached >= 2
309
309
  },
310
- { id: 3, name: 'Substep B', component: <p>Substep B</p>, canJumpTo: stepIdReached >= 3 }
310
+ { id: 'validated-3', name: 'Substep B', component: <p>Substep B</p>, canJumpTo: stepIdReached >= 3 }
311
311
  ]
312
312
  },
313
313
  {
314
- id: 4,
314
+ id: 'validated-4',
315
315
  name: 'Additional',
316
316
  component: <p>Step 3 content</p>,
317
317
  enableNext: allStepsValid,
318
318
  canJumpTo: stepIdReached >= 4
319
319
  },
320
320
  {
321
- id: 5,
321
+ id: 'validated-5',
322
322
  name: 'Review',
323
323
  component: <p>Step 4 content</p>,
324
324
  nextButtonText: 'Close',
@@ -320,7 +320,7 @@ CardDetailsDemo = () => {
320
320
  <Gallery hasGutter style={{ '--pf-l-gallery--GridTemplateColumns--min': '260px' }}>
321
321
  <Card>
322
322
  <CardTitle>
323
- <Title headingLevel="h2" size="xl">
323
+ <Title headingLevel="h4" size="xl">
324
324
  Details
325
325
  </Title>
326
326
  </CardTitle>
@@ -357,7 +357,7 @@ CardDetailsDemo = () => {
357
357
  </Card>
358
358
  <Card>
359
359
  <CardTitle>
360
- <Title headingLevel="h2" size="xl">
360
+ <Title headingLevel="h4" size="xl">
361
361
  Details
362
362
  </Title>
363
363
  </CardTitle>
@@ -668,7 +668,7 @@ const StatusPlain: React.FunctionComponent = () => {
668
668
 
669
669
  const header = (
670
670
  <CardHeader>
671
- <Title headingLevel="h2" size="lg">
671
+ <Title headingLevel="h4" size="lg">
672
672
  Status
673
673
  </Title>
674
674
  </CardHeader>
@@ -794,7 +794,7 @@ const StatusPlain: React.FunctionComponent = () => {
794
794
  <a href="#">Operators</a>
795
795
  </FlexItem>
796
796
  <FlexItem>
797
- <span style={{ color: 'var(--pf-global--Color--400)' }}>1 degraded</span>
797
+ <span style={{ color: 'var(--pf-global--Color--200)' }}>1 degraded</span>
798
798
  </FlexItem>
799
799
  </Flex>
800
800
  </Flex>
@@ -809,7 +809,7 @@ const StatusPlain: React.FunctionComponent = () => {
809
809
  <a href="#">Image Vulnerabilities</a>
810
810
  </FlexItem>
811
811
  <FlexItem>
812
- <span style={{ color: '#8a8d90' }}>0 vulnerabilities</span>
812
+ <span style={{ color: 'var(--pf-global--Color--200)' }}>0 vulnerabilities</span>
813
813
  </FlexItem>
814
814
  </Flex>
815
815
  </Flex>
@@ -849,16 +849,17 @@ const StatusPlain: React.FunctionComponent = () => {
849
849
  onExpand={handleDrawerToggleClick}
850
850
  isExpanded={drawerExpanded}
851
851
  title={drawerTitle}
852
+ headingLevel="h4"
852
853
  >
853
854
  <NotificationDrawerList isHidden={!drawerExpanded}>
854
855
  <NotificationDrawerListItem variant="danger">
855
- <NotificationDrawerListItemHeader variant="danger" title="Critical alert regarding control plane" />
856
+ <NotificationDrawerListItemHeader variant="danger" headingLevel="h5" title="Critical alert regarding control plane" />
856
857
  <NotificationDrawerListItemBody>
857
858
  This is a long description to show how the title will wrap if it is long and wraps to multiple lines.
858
859
  </NotificationDrawerListItemBody>
859
860
  </NotificationDrawerListItem>
860
861
  <NotificationDrawerListItem variant="warning">
861
- <NotificationDrawerListItemHeader variant="warning" title="Warning alert" />
862
+ <NotificationDrawerListItemHeader variant="warning" headingLevel="h5" title="Warning alert" />
862
863
  <NotificationDrawerListItemBody>
863
864
  This is a warning notification description.
864
865
  </NotificationDrawerListItemBody>
@@ -947,7 +948,7 @@ const Status: React.FunctionComponent = () => {
947
948
  <Flex>
948
949
  <FlexItem>{icon}</FlexItem>
949
950
  <FlexItem>
950
- <Title headingLevel="h3" size="md">
951
+ <Title headingLevel="h4" size="md">
951
952
  {status}
952
953
  </Title>
953
954
  </FlexItem>
@@ -966,7 +967,7 @@ const Status: React.FunctionComponent = () => {
966
967
  <>
967
968
  <Card>
968
969
  <CardHeader>
969
- <Title headingLevel="h2" size="lg">
970
+ <Title headingLevel="h4" size="lg">
970
971
  Status
971
972
  </Title>
972
973
  </CardHeader>
@@ -1023,9 +1024,9 @@ import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartVoronoiContaine
1023
1024
 
1024
1025
  <Gallery hasGutter minWidths={{ default: '360px' }}>
1025
1026
  <GalleryItem>
1026
- <Card id="utilization-card-1" component="div">
1027
+ <Card id="utilization-card-1-card" component="div">
1027
1028
  <CardTitle>
1028
- <Title headingLevel="h2" size="lg">
1029
+ <Title headingLevel="h4" size="lg">
1029
1030
  Top Utilized Clusters
1030
1031
  </Title>
1031
1032
  </CardTitle>
@@ -1136,9 +1137,9 @@ import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartVoronoiContaine
1136
1137
 
1137
1138
  <Gallery hasGutter minWidths={{ default: '360px' }}>
1138
1139
  <GalleryItem>
1139
- <Card id="utilization-card-2" component="div">
1140
+ <Card id="utilization-card-2-card" component="div">
1140
1141
  <CardTitle>
1141
- <Title headingLevel="h2" size="lg">
1142
+ <Title headingLevel="h4" size="lg">
1142
1143
  Top Utilized Clusters
1143
1144
  </Title>
1144
1145
  </CardTitle>
@@ -1268,10 +1269,10 @@ const UtilizationCard3: React.FunctionComponent = () => {
1268
1269
  <br />
1269
1270
  <Gallery hasGutter minWidths={{ default: '360px' }}>
1270
1271
  <GalleryItem>
1271
- <Card id="utilization-card-1" component="div">
1272
+ <Card id="utilization-card-3-card" component="div">
1272
1273
  <CardHeader className="pf-u-align-items-flex-start">
1273
1274
  <CardTitle>
1274
- <Title headingLevel="h2" size="lg" style={{ paddingTop: '3px' }}>
1275
+ <Title headingLevel="h4" size="lg" style={{ paddingTop: '3px' }}>
1275
1276
  Recommendations
1276
1277
  </Title>
1277
1278
  </CardTitle>
@@ -1397,9 +1398,9 @@ import { ChartDonutThreshold, ChartDonutUtilization } from '@patternfly/react-ch
1397
1398
 
1398
1399
  <Gallery hasGutter minWidths={{ default: '360px' }}>
1399
1400
  <GalleryItem>
1400
- <Card id="utilization-card-1" component="div">
1401
+ <Card id="utilization-card-4-card" component="div">
1401
1402
  <CardTitle>
1402
- <Title headingLevel="h2" size="lg">
1403
+ <Title headingLevel="h4" size="lg">
1403
1404
  CPU Usage
1404
1405
  </Title>
1405
1406
  </CardTitle>
@@ -1478,10 +1479,10 @@ CardNestedDemo = () => {
1478
1479
  onChange={checked => onCheckClick(!isToggleOnRight)}
1479
1480
  />
1480
1481
  </div>
1481
- <Card id="nested-cards">
1482
+ <Card id="nested-cards-card">
1482
1483
  <CardHeader>
1483
1484
  <CardTitle id="nested-cards-toggle-title">
1484
- <Title headingLevel="h2" size="lg">
1485
+ <Title headingLevel="h4" size="lg">
1485
1486
  {' '}
1486
1487
  Hardware Monitor{' '}
1487
1488
  </Title>
@@ -2005,7 +2006,7 @@ const AccordionCard: React.FunctionComponent = () => {
2005
2006
  <Card>
2006
2007
  <CardHeader>
2007
2008
  <CardTitle>
2008
- <Title headingLevel="h2" size="lg">
2009
+ <Title headingLevel="h4" size="lg">
2009
2010
  Hardware Monitor
2010
2011
  </Title>
2011
2012
  </CardTitle>
@@ -2531,12 +2532,12 @@ const TrendCard1: React.FunctionComponent = () => {
2531
2532
  <br />
2532
2533
  <Gallery hasGutter minWidths={{ default: '360px' }}>
2533
2534
  <GalleryItem>
2534
- <Card id="trend-card-1" component="div">
2535
+ <Card id="trend-card-1-card" component="div">
2535
2536
  <CardHeader>
2536
2537
  <Flex direction={{ default: 'column' }} spaceItems={{ default: 'spaceItemsNone' }}>
2537
2538
  <FlexItem>
2538
2539
  <CardTitle>
2539
- <Title headingLevel="h1">1,050,765 IOPS</Title>
2540
+ <Title headingLevel="h4" size="lg">1,050,765 IOPS</Title>
2540
2541
  </CardTitle>
2541
2542
  </FlexItem>
2542
2543
  <FlexItem>
@@ -2608,14 +2609,14 @@ import { ChartArea, ChartContainer, ChartGroup, ChartLabel, ChartVoronoiContaine
2608
2609
 
2609
2610
  <Gallery hasGutter minWidths={{ default: '360px' }}>
2610
2611
  <GalleryItem>
2611
- <Card id="trend-card-2" component="div">
2612
+ <Card id="trend-card-2-card" component="div">
2612
2613
  <CardHeader>
2613
2614
  <Flex alignItems={{ default: 'alignItemsCenter' }}>
2614
2615
  <FlexItem flex={{ default: 'flexNone' }}>
2615
2616
  <Flex direction={{ default: 'column' }} spaceItems={{ default: 'spaceItemsNone' }}>
2616
2617
  <FlexItem>
2617
2618
  <CardTitle>
2618
- <Title headingLevel="h1" size="2xl">
2619
+ <Title headingLevel="h4" size="2xl">
2619
2620
  842 TB
2620
2621
  </Title>
2621
2622
  </CardTitle>
@@ -2729,7 +2730,7 @@ CardLogViewDemo = () => {
2729
2730
  </Select>
2730
2731
  </CardActions>
2731
2732
  <CardTitle>
2732
- <Title headingLevel="h2" size="xl" style={{ paddingTop: '3px' }}>
2733
+ <Title headingLevel="h4" size="xl" style={{ paddingTop: '3px' }}>
2733
2734
  Activity
2734
2735
  </Title>
2735
2736
  </CardTitle>
@@ -2848,7 +2849,7 @@ CardEventViewDemo = () => {
2848
2849
  </Select>
2849
2850
  </CardActions>
2850
2851
  <CardTitle>
2851
- <Title headingLevel="h2" size="xl" style={{ paddingTop: '3px' }}>
2852
+ <Title headingLevel="h4" size="xl" style={{ paddingTop: '3px' }}>
2852
2853
  Events
2853
2854
  </Title>
2854
2855
  </CardTitle>
@@ -138,7 +138,7 @@ class BasicMasthead extends React.Component {
138
138
  ];
139
139
 
140
140
  return (
141
- <Masthead id="basic">
141
+ <Masthead id="basic-demo">
142
142
  <MastheadToggle>
143
143
  <Button variant="plain" onClick={() => {}} aria-label="Global navigation">
144
144
  <BarsIcon />
@@ -27,10 +27,10 @@ const TileSingleSelect: React.FunctionComponent = () => {
27
27
 
28
28
  return (
29
29
  <div role="listbox" aria-label="Single selection tiles">
30
- <Tile title="Tile 1" id="tile-1" onClick={onSelect} onKeyDown={onKeyDown} isSelected={selectedId === 'tile-1'} />
31
- <Tile title="Tile 2" id="tile-2" onClick={onSelect} onKeyDown={onKeyDown} isSelected={selectedId === 'tile-2'} />
32
- <Tile title="Tile 3" id="tile-3" isDisabled isSelected={selectedId === 'tile-3'} />
33
- <Tile title="Tile 4" id="tile-4" onClick={onSelect} onKeyDown={onKeyDown} isSelected={selectedId === 'tile-4'} />
30
+ <Tile title="Tile 1" id="single-select-tile-1" onClick={onSelect} onKeyDown={onKeyDown} isSelected={selectedId === 'tile-1'} />
31
+ <Tile title="Tile 2" id="single-select-tile-2" onClick={onSelect} onKeyDown={onKeyDown} isSelected={selectedId === 'tile-2'} />
32
+ <Tile title="Tile 3" id="single-select-tile-3" isDisabled isSelected={selectedId === 'tile-3'} />
33
+ <Tile title="Tile 4" id="single-select-tile-4" onClick={onSelect} onKeyDown={onKeyDown} isSelected={selectedId === 'tile-4'} />
34
34
  </div>
35
35
  );
36
36
  };
@@ -68,22 +68,22 @@ const TileMultiSelect: React.FunctionComponent = () => {
68
68
  <div role="listbox" aria-multiselectable={true} aria-label="Multiselectable tiles">
69
69
  <Tile
70
70
  title="Tile 1"
71
- id="tile-1"
71
+ id="multiselect-tile-1"
72
72
  onClick={onSelect}
73
73
  onKeyDown={onKeyDown}
74
74
  isSelected={selectedIds.includes('tile-1')}
75
75
  />
76
76
  <Tile
77
77
  title="Tile 2"
78
- id="tile-2"
78
+ id="multiselect-tile-2"
79
79
  onClick={onSelect}
80
80
  onKeyDown={onKeyDown}
81
81
  isSelected={selectedIds.includes('tile-2')}
82
82
  />
83
- <Tile title="Tile 3" id="tile-3" isDisabled />
83
+ <Tile title="Tile 3" id="multiselect-tile-3" isDisabled />
84
84
  <Tile
85
85
  title="Tile 4"
86
- id="tile-4"
86
+ id="multiselect-tile-4"
87
87
  onClick={onSelect}
88
88
  onKeyDown={onKeyDown}
89
89
  isSelected={selectedIds.includes('tile-4')}
@@ -82,7 +82,7 @@ import { Grid, GridItem } from '@patternfly/react-core';
82
82
 
83
83
  ## Ordering
84
84
 
85
- ### Ordering
85
+ ### Standard ordering
86
86
 
87
87
  ```js
88
88
  import React from 'react';