@patternfly/react-core 4.202.26 → 4.202.29
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 +27 -0
- package/dist/esm/components/JumpLinks/JumpLinksItem.d.ts.map +1 -1
- package/dist/esm/components/JumpLinks/JumpLinksItem.js +1 -1
- package/dist/esm/components/JumpLinks/JumpLinksItem.js.map +1 -1
- package/dist/esm/components/ProgressStepper/ProgressStep.d.ts +3 -0
- package/dist/esm/components/ProgressStepper/ProgressStep.d.ts.map +1 -1
- package/dist/esm/components/ProgressStepper/ProgressStep.js +2 -2
- package/dist/esm/components/ProgressStepper/ProgressStep.js.map +1 -1
- package/dist/esm/components/Tabs/Tab.d.ts.map +1 -1
- package/dist/esm/components/Tabs/Tab.js +2 -2
- package/dist/esm/components/Tabs/Tab.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.d.ts +1 -1
- package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +1 -1
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/js/components/JumpLinks/JumpLinksItem.d.ts.map +1 -1
- package/dist/js/components/JumpLinks/JumpLinksItem.js +1 -1
- package/dist/js/components/JumpLinks/JumpLinksItem.js.map +1 -1
- package/dist/js/components/ProgressStepper/ProgressStep.d.ts +3 -0
- package/dist/js/components/ProgressStepper/ProgressStep.d.ts.map +1 -1
- package/dist/js/components/ProgressStepper/ProgressStep.js +2 -2
- package/dist/js/components/ProgressStepper/ProgressStep.js.map +1 -1
- package/dist/js/components/Tabs/Tab.d.ts.map +1 -1
- package/dist/js/components/Tabs/Tab.js +2 -2
- package/dist/js/components/Tabs/Tab.js.map +1 -1
- package/dist/js/components/Tabs/Tabs.d.ts +1 -1
- package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/js/components/Tabs/Tabs.js +1 -1
- package/dist/js/components/Tabs/Tabs.js.map +1 -1
- package/dist/umd/react-core.js +6 -6
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +5 -5
- package/src/components/DataList/examples/DataList.md +10 -1193
- package/src/components/DataList/examples/DataListActions.tsx +100 -0
- package/src/components/DataList/examples/DataListBasic.tsx +33 -0
- package/src/components/DataList/examples/DataListCheckboxes.tsx +200 -0
- package/src/components/DataList/examples/DataListCompact.tsx +33 -0
- package/src/components/DataList/examples/DataListControllingText.tsx +29 -0
- package/src/components/DataList/examples/DataListDraggable.tsx +98 -0
- package/src/components/DataList/examples/DataListExpandable.tsx +261 -0
- package/src/components/DataList/examples/DataListSelectableRows.tsx +120 -0
- package/src/components/DataList/examples/DataListSmGridBreakpoint.tsx +22 -0
- package/src/components/DataList/examples/DataListWidthModifiers.tsx +204 -0
- package/src/components/ExpandableSection/examples/ExpandableSection.md +1 -1
- package/src/components/JumpLinks/JumpLinksItem.tsx +5 -1
- package/src/components/JumpLinks/__tests__/__snapshots__/JumpLinks.test.tsx.snap +5 -0
- package/src/components/ProgressStepper/ProgressStep.tsx +6 -0
- package/src/components/ProgressStepper/__tests__/__snapshots__/ProgressStepper.test.tsx.snap +1 -0
- package/src/components/ProgressStepper/examples/ProgressStepper.md +9 -9
- package/src/components/Tabs/Tab.tsx +6 -1
- package/src/components/Tabs/Tabs.tsx +2 -2
- package/src/components/Tabs/__tests__/Generated/__snapshots__/Tabs.test.tsx.snap +1 -0
- package/src/components/Tabs/__tests__/__snapshots__/Tab.test.tsx.snap +3 -0
- package/src/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +135 -0
- package/src/components/Tabs/examples/Tabs.md +32 -26
|
@@ -26,6 +26,9 @@ export interface ProgressStepProps
|
|
|
26
26
|
popover?: React.ReactNode;
|
|
27
27
|
/** @hide Forwarded reference to title container */
|
|
28
28
|
innerRef?: React.Ref<any>;
|
|
29
|
+
/** Accessible label for the progress step. Should communicate all information being communicated by the progress
|
|
30
|
+
* step's icon, including the variant and the completed status. */
|
|
31
|
+
'aria-label'?: string;
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
const variantIcons = {
|
|
@@ -56,6 +59,7 @@ const ProgressStepBase: React.FunctionComponent<ProgressStepProps> = ({
|
|
|
56
59
|
titleId,
|
|
57
60
|
popover,
|
|
58
61
|
innerRef,
|
|
62
|
+
'aria-label': ariaLabel,
|
|
59
63
|
...props
|
|
60
64
|
}: ProgressStepProps) => {
|
|
61
65
|
const _icon = icon !== undefined ? icon : variantIcons[variant];
|
|
@@ -76,6 +80,8 @@ const ProgressStepBase: React.FunctionComponent<ProgressStepProps> = ({
|
|
|
76
80
|
isCurrent && styles.modifiers.current,
|
|
77
81
|
className
|
|
78
82
|
)}
|
|
83
|
+
aria-label={ariaLabel}
|
|
84
|
+
{...(isCurrent && { 'aria-current': 'step' })}
|
|
79
85
|
{...props}
|
|
80
86
|
>
|
|
81
87
|
<div className={css(styles.progressStepperStepConnector)}>
|
|
@@ -33,7 +33,7 @@ import { ProgressStepper, ProgressStep } from '@patternfly/react-core';
|
|
|
33
33
|
isCurrent
|
|
34
34
|
id="basic-step2"
|
|
35
35
|
titleId="basic-step2-title"
|
|
36
|
-
aria-label="
|
|
36
|
+
aria-label="step with info"
|
|
37
37
|
>
|
|
38
38
|
Second step
|
|
39
39
|
</ProgressStep>
|
|
@@ -65,7 +65,7 @@ import { ProgressStepper, ProgressStep } from '@patternfly/react-core';
|
|
|
65
65
|
description="This is the second thing to happen"
|
|
66
66
|
id="basic-desc-step2"
|
|
67
67
|
titleId="basic-desc-step2-title"
|
|
68
|
-
aria-label="
|
|
68
|
+
aria-label="step with info"
|
|
69
69
|
>
|
|
70
70
|
Second step
|
|
71
71
|
</ProgressStep>
|
|
@@ -103,7 +103,7 @@ import { ProgressStepper, ProgressStep } from '@patternfly/react-core';
|
|
|
103
103
|
description="This is the second thing to happen"
|
|
104
104
|
id="center-desc-step2"
|
|
105
105
|
titleId="center-desc-step2-title"
|
|
106
|
-
aria-label="
|
|
106
|
+
aria-label="step with info"
|
|
107
107
|
>
|
|
108
108
|
Second step
|
|
109
109
|
</ProgressStep>
|
|
@@ -141,7 +141,7 @@ import { ProgressStepper, ProgressStep } from '@patternfly/react-core';
|
|
|
141
141
|
description="This is the second thing to happen"
|
|
142
142
|
id="vertical-desc-step2"
|
|
143
143
|
titleId="vertical-desc-step2-title"
|
|
144
|
-
aria-label="
|
|
144
|
+
aria-label="step with info"
|
|
145
145
|
>
|
|
146
146
|
Second step
|
|
147
147
|
</ProgressStep>
|
|
@@ -179,7 +179,7 @@ import { ProgressStepper, ProgressStep } from '@patternfly/react-core';
|
|
|
179
179
|
isCurrent
|
|
180
180
|
id="compact-step2"
|
|
181
181
|
titleId="compact-step2-title"
|
|
182
|
-
aria-label="
|
|
182
|
+
aria-label="step with info"
|
|
183
183
|
>
|
|
184
184
|
Second step
|
|
185
185
|
</ProgressStep>
|
|
@@ -225,7 +225,7 @@ import { ProgressStepper, ProgressStep } from '@patternfly/react-core';
|
|
|
225
225
|
isCurrent
|
|
226
226
|
id="basic-with-issue-step4"
|
|
227
227
|
titleId="basic-with-issue-step4-title"
|
|
228
|
-
aria-label="
|
|
228
|
+
aria-label="step with info"
|
|
229
229
|
>
|
|
230
230
|
Fourth step
|
|
231
231
|
</ProgressStep>
|
|
@@ -276,7 +276,7 @@ import { ProgressStepper, ProgressStep } from '@patternfly/react-core';
|
|
|
276
276
|
isCurrent
|
|
277
277
|
id="basic-with-failure-step4"
|
|
278
278
|
titleId="basic-with-failure-step4-title"
|
|
279
|
-
aria-label="
|
|
279
|
+
aria-label="step with danger"
|
|
280
280
|
>
|
|
281
281
|
Fourth step
|
|
282
282
|
</ProgressStep>
|
|
@@ -313,7 +313,7 @@ import PendingIcon from '@patternfly/react-icons/dist/esm/icons/pending-icon';
|
|
|
313
313
|
icon={<InProgressIcon />}
|
|
314
314
|
id="custom-step2"
|
|
315
315
|
titleId="custom-step2-title"
|
|
316
|
-
aria-label="
|
|
316
|
+
aria-label="in progress"
|
|
317
317
|
>
|
|
318
318
|
In process
|
|
319
319
|
</ProgressStep>
|
|
@@ -384,7 +384,7 @@ PopoverProgressStep = () => {
|
|
|
384
384
|
variant="info"
|
|
385
385
|
id="popover-step3"
|
|
386
386
|
titleId="popover-step3-title"
|
|
387
|
-
aria-label="
|
|
387
|
+
aria-label="step with popover"
|
|
388
388
|
popover={
|
|
389
389
|
<Popover
|
|
390
390
|
aria-label="Third step help"
|
|
@@ -92,6 +92,8 @@ const TabBase: React.FunctionComponent<TabProps> = ({
|
|
|
92
92
|
tabContentRef={tabContentRef}
|
|
93
93
|
ouiaId={childOuiaId}
|
|
94
94
|
href={href}
|
|
95
|
+
role="tab"
|
|
96
|
+
aria-selected={eventKey === localActiveKey}
|
|
95
97
|
{...props}
|
|
96
98
|
>
|
|
97
99
|
{title}
|
|
@@ -99,7 +101,10 @@ const TabBase: React.FunctionComponent<TabProps> = ({
|
|
|
99
101
|
);
|
|
100
102
|
|
|
101
103
|
return (
|
|
102
|
-
<li
|
|
104
|
+
<li
|
|
105
|
+
className={css(styles.tabsItem, eventKey === localActiveKey && styles.modifiers.current, childClassName)}
|
|
106
|
+
role="presentation"
|
|
107
|
+
>
|
|
103
108
|
{tooltip ? <Tooltip {...tooltip.props}>{tabButton}</Tooltip> : tabButton}
|
|
104
109
|
</li>
|
|
105
110
|
);
|
|
@@ -79,7 +79,7 @@ export interface TabsProps extends Omit<React.HTMLProps<HTMLElement | HTMLDivEle
|
|
|
79
79
|
defaultIsExpanded?: boolean;
|
|
80
80
|
/** Text that appears in the expandable toggle */
|
|
81
81
|
toggleText?: string;
|
|
82
|
-
/** Aria-label for the
|
|
82
|
+
/** Aria-label for the expandable toggle */
|
|
83
83
|
toggleAriaLabel?: string;
|
|
84
84
|
/** Callback function to toggle the expandable tabs. */
|
|
85
85
|
onToggle?: (isExpanded: boolean) => void;
|
|
@@ -400,7 +400,7 @@ export class Tabs extends React.Component<TabsProps, TabsState> {
|
|
|
400
400
|
>
|
|
401
401
|
<AngleLeftIcon />
|
|
402
402
|
</button>
|
|
403
|
-
<ul className={css(styles.tabsList)} ref={this.tabList} onScroll={this.handleScrollButtons}>
|
|
403
|
+
<ul className={css(styles.tabsList)} ref={this.tabList} onScroll={this.handleScrollButtons} role="tablist">
|
|
404
404
|
{filteredChildren}
|
|
405
405
|
</ul>
|
|
406
406
|
<button
|
|
@@ -4,13 +4,16 @@ exports[`should not render anything 1`] = `
|
|
|
4
4
|
<div>
|
|
5
5
|
<li
|
|
6
6
|
class="pf-c-tabs__item"
|
|
7
|
+
role="presentation"
|
|
7
8
|
>
|
|
8
9
|
<button
|
|
9
10
|
aria-controls="pf-tab-section-0-"
|
|
11
|
+
aria-selected="false"
|
|
10
12
|
class="pf-c-tabs__link"
|
|
11
13
|
data-ouia-component-type="PF4/TabButton"
|
|
12
14
|
data-ouia-safe="true"
|
|
13
15
|
id="pf-tab-0-"
|
|
16
|
+
role="tab"
|
|
14
17
|
>
|
|
15
18
|
<span
|
|
16
19
|
class="pf-c-tabs__item-text"
|