@patternfly/react-core 4.202.28 → 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 +8 -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/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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "4.202.
|
|
3
|
+
"version": "4.202.29",
|
|
4
4
|
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"generate": "node scripts/copyStyles.js"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@patternfly/react-icons": "^4.53.
|
|
38
|
-
"@patternfly/react-styles": "^4.52.
|
|
39
|
-
"@patternfly/react-tokens": "^4.54.
|
|
37
|
+
"@patternfly/react-icons": "^4.53.29",
|
|
38
|
+
"@patternfly/react-styles": "^4.52.29",
|
|
39
|
+
"@patternfly/react-tokens": "^4.54.29",
|
|
40
40
|
"focus-trap": "6.2.2",
|
|
41
41
|
"react-dropzone": "9.0.0",
|
|
42
42
|
"tippy.js": "5.1.2",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"react": "^16.8.0 || ^17.0.0",
|
|
61
61
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "366d09fa7e0ef107242d13b0b2c850eb3d33703f"
|
|
64
64
|
}
|
|
@@ -33,7 +33,11 @@ export const JumpLinksItem: React.FunctionComponent<JumpLinksItemProps> = ({
|
|
|
33
33
|
children = childrenArr.filter(child => child.type !== JumpLinksList);
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
|
-
<li
|
|
36
|
+
<li
|
|
37
|
+
className={css(styles.jumpLinksItem, isActive && styles.modifiers.current, className)}
|
|
38
|
+
{...(isActive && { 'aria-current': 'location' })}
|
|
39
|
+
{...props}
|
|
40
|
+
>
|
|
37
41
|
<a className={styles.jumpLinksLink} href={href} onClick={onClick}>
|
|
38
42
|
<span className={styles.jumpLinksLinkText}>{children}</span>
|
|
39
43
|
</a>
|
|
@@ -89,6 +89,7 @@ exports[`expandable vertical with subsection 1`] = `
|
|
|
89
89
|
class="pf-c-jump-links__list"
|
|
90
90
|
>
|
|
91
91
|
<li
|
|
92
|
+
aria-current="location"
|
|
92
93
|
class="pf-c-jump-links__item pf-m-current"
|
|
93
94
|
>
|
|
94
95
|
<a
|
|
@@ -189,6 +190,7 @@ exports[`jumplinks centered 1`] = `
|
|
|
189
190
|
</a>
|
|
190
191
|
</li>
|
|
191
192
|
<li
|
|
193
|
+
aria-current="location"
|
|
192
194
|
class="pf-c-jump-links__item pf-m-current"
|
|
193
195
|
>
|
|
194
196
|
<a
|
|
@@ -255,6 +257,7 @@ exports[`jumplinks with label 1`] = `
|
|
|
255
257
|
</a>
|
|
256
258
|
</li>
|
|
257
259
|
<li
|
|
260
|
+
aria-current="location"
|
|
258
261
|
class="pf-c-jump-links__item pf-m-current"
|
|
259
262
|
>
|
|
260
263
|
<a
|
|
@@ -314,6 +317,7 @@ exports[`simple jumplinks 1`] = `
|
|
|
314
317
|
</a>
|
|
315
318
|
</li>
|
|
316
319
|
<li
|
|
320
|
+
aria-current="location"
|
|
317
321
|
class="pf-c-jump-links__item pf-m-current"
|
|
318
322
|
>
|
|
319
323
|
<a
|
|
@@ -380,6 +384,7 @@ exports[`vertical with label 1`] = `
|
|
|
380
384
|
</a>
|
|
381
385
|
</li>
|
|
382
386
|
<li
|
|
387
|
+
aria-current="location"
|
|
383
388
|
class="pf-c-jump-links__item pf-m-current"
|
|
384
389
|
>
|
|
385
390
|
<a
|
|
@@ -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"
|