@patternfly/react-core 4.255.1 → 4.256.0
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 +19 -0
- package/dist/esm/components/Card/Card.d.ts +2 -2
- package/dist/esm/components/Card/Card.d.ts.map +1 -1
- package/dist/esm/components/DataList/DataList.d.ts +1 -1
- package/dist/esm/components/DataList/DataList.d.ts.map +1 -1
- package/dist/esm/components/DataList/DataListItem.d.ts +1 -1
- package/dist/esm/components/DataList/DataListItem.d.ts.map +1 -1
- package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts +2 -0
- package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts.map +1 -1
- package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.js +7 -1
- package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.js.map +1 -1
- package/dist/esm/components/Popover/Popover.d.ts +3 -3
- package/dist/esm/components/Popover/Popover.d.ts.map +1 -1
- package/dist/esm/components/Wizard/Wizard.d.ts +4 -4
- package/dist/esm/components/Wizard/Wizard.d.ts.map +1 -1
- package/dist/esm/components/Wizard/WizardToggle.d.ts +2 -2
- package/dist/esm/components/Wizard/WizardToggle.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/Wizard.d.ts +1 -3
- package/dist/esm/next/components/Wizard/Wizard.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/Wizard.js +36 -45
- package/dist/esm/next/components/Wizard/Wizard.js.map +1 -1
- package/dist/esm/next/components/Wizard/WizardBody.d.ts +2 -2
- package/dist/esm/next/components/Wizard/WizardBody.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/WizardBody.js +2 -2
- package/dist/esm/next/components/Wizard/WizardBody.js.map +1 -1
- package/dist/esm/next/components/Wizard/WizardContext.d.ts +2 -7
- package/dist/esm/next/components/Wizard/WizardContext.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/WizardContext.js +18 -39
- package/dist/esm/next/components/Wizard/WizardContext.js.map +1 -1
- package/dist/esm/next/components/Wizard/WizardFooter.d.ts +3 -3
- package/dist/esm/next/components/Wizard/WizardFooter.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/WizardFooter.js +3 -3
- package/dist/esm/next/components/Wizard/WizardFooter.js.map +1 -1
- package/dist/esm/next/components/Wizard/WizardNavInternal.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/WizardNavInternal.js +12 -12
- package/dist/esm/next/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/esm/next/components/Wizard/WizardStep.d.ts +1 -3
- package/dist/esm/next/components/Wizard/WizardStep.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/WizardStep.js +10 -18
- package/dist/esm/next/components/Wizard/WizardStep.js.map +1 -1
- package/dist/esm/next/components/Wizard/WizardToggle.d.ts +2 -4
- package/dist/esm/next/components/Wizard/WizardToggle.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/WizardToggle.js +19 -16
- package/dist/esm/next/components/Wizard/WizardToggle.js.map +1 -1
- package/dist/esm/next/components/Wizard/hooks/useWizardFooter.js +3 -3
- package/dist/esm/next/components/Wizard/hooks/useWizardFooter.js.map +1 -1
- package/dist/esm/next/components/Wizard/types.d.ts +5 -3
- package/dist/esm/next/components/Wizard/types.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/types.js.map +1 -1
- package/dist/esm/next/components/Wizard/utils.d.ts +3 -3
- package/dist/esm/next/components/Wizard/utils.d.ts.map +1 -1
- package/dist/esm/next/components/Wizard/utils.js +14 -11
- package/dist/esm/next/components/Wizard/utils.js.map +1 -1
- package/dist/js/components/Card/Card.d.ts +2 -2
- package/dist/js/components/Card/Card.d.ts.map +1 -1
- package/dist/js/components/DataList/DataList.d.ts +1 -1
- package/dist/js/components/DataList/DataList.d.ts.map +1 -1
- package/dist/js/components/DataList/DataListItem.d.ts +1 -1
- package/dist/js/components/DataList/DataListItem.d.ts.map +1 -1
- package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts +2 -0
- package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts.map +1 -1
- package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.js +7 -1
- package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.js.map +1 -1
- package/dist/js/components/Popover/Popover.d.ts +3 -3
- package/dist/js/components/Popover/Popover.d.ts.map +1 -1
- package/dist/js/components/Wizard/Wizard.d.ts +4 -4
- package/dist/js/components/Wizard/Wizard.d.ts.map +1 -1
- package/dist/js/components/Wizard/WizardToggle.d.ts +2 -2
- package/dist/js/components/Wizard/WizardToggle.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/Wizard.d.ts +1 -3
- package/dist/js/next/components/Wizard/Wizard.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/Wizard.js +36 -45
- package/dist/js/next/components/Wizard/Wizard.js.map +1 -1
- package/dist/js/next/components/Wizard/WizardBody.d.ts +2 -2
- package/dist/js/next/components/Wizard/WizardBody.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/WizardBody.js +2 -2
- package/dist/js/next/components/Wizard/WizardBody.js.map +1 -1
- package/dist/js/next/components/Wizard/WizardContext.d.ts +2 -7
- package/dist/js/next/components/Wizard/WizardContext.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/WizardContext.js +15 -37
- package/dist/js/next/components/Wizard/WizardContext.js.map +1 -1
- package/dist/js/next/components/Wizard/WizardFooter.d.ts +3 -3
- package/dist/js/next/components/Wizard/WizardFooter.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/WizardFooter.js +3 -3
- package/dist/js/next/components/Wizard/WizardFooter.js.map +1 -1
- package/dist/js/next/components/Wizard/WizardNavInternal.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/WizardNavInternal.js +12 -12
- package/dist/js/next/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/js/next/components/Wizard/WizardStep.d.ts +1 -3
- package/dist/js/next/components/Wizard/WizardStep.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/WizardStep.js +9 -18
- package/dist/js/next/components/Wizard/WizardStep.js.map +1 -1
- package/dist/js/next/components/Wizard/WizardToggle.d.ts +2 -4
- package/dist/js/next/components/Wizard/WizardToggle.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/WizardToggle.js +18 -16
- package/dist/js/next/components/Wizard/WizardToggle.js.map +1 -1
- package/dist/js/next/components/Wizard/hooks/useWizardFooter.js +3 -3
- package/dist/js/next/components/Wizard/hooks/useWizardFooter.js.map +1 -1
- package/dist/js/next/components/Wizard/types.d.ts +5 -3
- package/dist/js/next/components/Wizard/types.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/types.js.map +1 -1
- package/dist/js/next/components/Wizard/utils.d.ts +3 -3
- package/dist/js/next/components/Wizard/utils.d.ts.map +1 -1
- package/dist/js/next/components/Wizard/utils.js +16 -13
- package/dist/js/next/components/Wizard/utils.js.map +1 -1
- package/dist/umd/react-core.min.css +137 -137
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +2 -2
- package/src/components/AlertGroup/examples/AlertGroup.md +2 -2
- package/src/components/CalendarMonth/examples/CalendarMonth.md +0 -1
- package/src/components/Card/Card.tsx +2 -2
- package/src/components/DataList/DataList.tsx +1 -1
- package/src/components/DataList/DataListItem.tsx +1 -1
- package/src/components/DualListSelector/examples/DualListSelector.md +0 -1
- package/src/components/LabelGroup/examples/LabelGroup.md +2 -3
- package/src/components/Masthead/examples/Masthead.md +0 -1
- package/src/components/Menu/examples/Menu.md +1 -1
- package/src/components/MenuToggle/examples/MenuToggle.md +0 -1
- package/src/components/MultipleFileUpload/MultipleFileUploadStatusItem.tsx +10 -0
- package/src/components/MultipleFileUpload/__tests__/MultipleFileUploadStatusItem.test.tsx +33 -1
- package/src/components/MultipleFileUpload/__tests__/__snapshots__/MultipleFileUploadStatusItem.test.tsx.snap +269 -3
- package/src/components/MultipleFileUpload/examples/MultipleFileUpload.md +0 -1
- package/src/components/NotificationDrawer/examples/NotificationDrawer.md +0 -1
- package/src/components/Panel/examples/Panel.md +0 -1
- package/src/components/Popover/Popover.tsx +3 -3
- package/src/components/Popover/examples/Popover.md +2 -2
- package/src/components/Select/examples/Select.md +2 -2
- package/src/components/Slider/examples/Slider.md +0 -1
- package/src/components/TextArea/examples/TextArea.md +1 -1
- package/src/components/TextInput/examples/TextInput.md +1 -1
- package/src/components/TreeView/examples/TreeView.md +0 -1
- package/src/components/Wizard/Wizard.tsx +4 -4
- package/src/components/Wizard/WizardToggle.tsx +2 -2
- package/src/components/Wizard/examples/Wizard.md +12 -8
- package/src/demos/MultipleFileUploadDemos.md +0 -1
- package/src/demos/NotificationDrawer/NotificationDrawer.md +0 -1
- package/src/next/components/Wizard/Wizard.tsx +35 -54
- package/src/next/components/Wizard/WizardBody.tsx +3 -3
- package/src/next/components/Wizard/WizardContext.tsx +29 -61
- package/src/next/components/Wizard/WizardFooter.tsx +6 -6
- package/src/next/components/Wizard/WizardNavInternal.tsx +18 -17
- package/src/next/components/Wizard/WizardStep.tsx +19 -30
- package/src/next/components/Wizard/WizardToggle.tsx +22 -24
- package/src/next/components/Wizard/__tests__/Wizard.test.tsx +1 -21
- package/src/next/components/Wizard/__tests__/WizardBody.test.tsx +2 -2
- package/src/next/components/Wizard/__tests__/WizardFooter.test.tsx +5 -5
- package/src/next/components/Wizard/__tests__/WizardStep.test.tsx +22 -76
- package/src/next/components/Wizard/__tests__/WizardToggle.test.tsx +7 -11
- package/src/next/components/Wizard/__tests__/utils.test.tsx +3 -3
- package/src/next/components/Wizard/examples/Wizard.md +4 -4
- package/src/next/components/Wizard/examples/WizardCustomNav.tsx +4 -4
- package/src/next/components/Wizard/examples/WizardKitchenSink.tsx +74 -85
- package/src/next/components/Wizard/hooks/__tests__/useWizardFooter.test.tsx +4 -4
- package/src/next/components/Wizard/hooks/useWizardFooter.tsx +3 -3
- package/src/next/components/Wizard/types.tsx +5 -3
- package/src/next/components/Wizard/utils.ts +35 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.256.0",
|
|
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",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"react": "^16.8 || ^17 || ^18",
|
|
71
71
|
"react-dom": "^16.8 || ^17 || ^18"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "b7e13a9702cfe902e190000f1cfe059c830cf881"
|
|
74
74
|
}
|
|
@@ -45,7 +45,7 @@ When an overflow message appears in an `AlertGroup` using the `isLiveRegion` pro
|
|
|
45
45
|
|
|
46
46
|
Users navigating via keyboard or another assistive technology will need a way to navigate to and reveal hidden alerts before they disappear. Alternatively, there should be a place where notifications or alerts are collected to be viewed or read later.
|
|
47
47
|
|
|
48
|
-
```ts file="AlertGroupToastOverflowCapture.tsx"
|
|
48
|
+
```ts file="AlertGroupToastOverflowCapture.tsx"
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
### Asynchronous alert groups
|
|
@@ -68,7 +68,7 @@ Click the buttons in the example below to add dynamic alerts to a group.
|
|
|
68
68
|
|
|
69
69
|
In the following example, there can be a maximum of 4 alerts shown at once.
|
|
70
70
|
|
|
71
|
-
```ts file="AlertGroupSingularDynamicOverflow.tsx"
|
|
71
|
+
```ts file="AlertGroupSingularDynamicOverflow.tsx"
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
### Multiple dynamic alert groups
|
|
@@ -18,11 +18,11 @@ export interface CardProps extends React.HTMLProps<HTMLElement>, OUIAProps {
|
|
|
18
18
|
isCompact?: boolean;
|
|
19
19
|
/** Modifies the card to include selectable styling */
|
|
20
20
|
isSelectable?: boolean;
|
|
21
|
-
/**
|
|
21
|
+
/** Specifies the card is selectable, and applies the new raised styling on hover and select */
|
|
22
22
|
isSelectableRaised?: boolean;
|
|
23
23
|
/** Modifies the card to include selected styling */
|
|
24
24
|
isSelected?: boolean;
|
|
25
|
-
/**
|
|
25
|
+
/** Modifies a raised selectable card to have disabled styling */
|
|
26
26
|
isDisabledRaised?: boolean;
|
|
27
27
|
/** Modifies the card to include flat styling */
|
|
28
28
|
isFlat?: boolean;
|
|
@@ -52,7 +52,7 @@ export interface DataListProps extends Omit<React.HTMLProps<HTMLUListElement>, '
|
|
|
52
52
|
wrapModifier?: DataListWrapModifier | 'nowrap' | 'truncate' | 'breakWord';
|
|
53
53
|
/** @deprecated Order of items in a draggable DataList */
|
|
54
54
|
itemOrder?: string[];
|
|
55
|
-
/**
|
|
55
|
+
/** Object that causes the data list to render hidden inputs which improve selectable item a11y */
|
|
56
56
|
selectableRow?: SelectableRowObject;
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -16,7 +16,7 @@ export interface DataListItemProps extends Omit<React.HTMLProps<HTMLLIElement>,
|
|
|
16
16
|
'aria-labelledby': string;
|
|
17
17
|
/** Unique id for the DataList item */
|
|
18
18
|
id?: string;
|
|
19
|
-
/**
|
|
19
|
+
/** Aria label to apply to the selectable input if one is rendered */
|
|
20
20
|
selectableInputAriaLabel?: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -3,7 +3,6 @@ id: Label group
|
|
|
3
3
|
section: components
|
|
4
4
|
cssPrefix: pf-c-label
|
|
5
5
|
propComponents: ['LabelGroup', 'Label']
|
|
6
|
-
beta: true
|
|
7
6
|
ouia: true
|
|
8
7
|
---
|
|
9
8
|
|
|
@@ -38,12 +37,12 @@ import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-i
|
|
|
38
37
|
|
|
39
38
|
### Editable labels
|
|
40
39
|
|
|
41
|
-
```ts file="LabelGroupEditableLabels.tsx"
|
|
40
|
+
```ts isBeta file="LabelGroupEditableLabels.tsx"
|
|
42
41
|
```
|
|
43
42
|
|
|
44
43
|
### Editable labels with add button
|
|
45
44
|
|
|
46
45
|
For additional documentation that showcases adding a new label, see [label group demos](/components/label-group/react-demos).
|
|
47
46
|
|
|
48
|
-
```ts file="LabelGroupEditableAdd.tsx"
|
|
47
|
+
```ts isBeta file="LabelGroupEditableAdd.tsx"
|
|
49
48
|
```
|
|
@@ -50,6 +50,8 @@ export interface MultipleFileUploadStatusItemProps extends React.HTMLProps<HTMLL
|
|
|
50
50
|
progressAriaLabel?: string;
|
|
51
51
|
/** Associates the progress bar with it's label for accessibility purposes. Required when title not used */
|
|
52
52
|
progressAriaLabelledBy?: string;
|
|
53
|
+
/** Modifies the text announced by assistive technologies when the progress bar updates. */
|
|
54
|
+
progressAriaLiveMessage?: string | ((loadPercentage: number) => string);
|
|
53
55
|
/** Unique identifier for progress. Generated if not specified. */
|
|
54
56
|
progressId?: string;
|
|
55
57
|
}
|
|
@@ -71,6 +73,7 @@ export const MultipleFileUploadStatusItem: React.FunctionComponent<MultipleFileU
|
|
|
71
73
|
progressAriaLabel,
|
|
72
74
|
progressAriaLabelledBy,
|
|
73
75
|
progressId,
|
|
76
|
+
progressAriaLiveMessage,
|
|
74
77
|
buttonAriaLabel = 'Remove from list',
|
|
75
78
|
...props
|
|
76
79
|
}: MultipleFileUploadStatusItemProps) => {
|
|
@@ -139,6 +142,13 @@ export const MultipleFileUploadStatusItem: React.FunctionComponent<MultipleFileU
|
|
|
139
142
|
<li className={css(styles.multipleFileUploadStatusItem, className)} {...props}>
|
|
140
143
|
<div className={styles.multipleFileUploadStatusItemIcon}>{fileIcon || <FileIcon />}</div>
|
|
141
144
|
<div className={styles.multipleFileUploadStatusItemMain}>
|
|
145
|
+
<div className="pf-screen-reader" aria-live="polite">
|
|
146
|
+
{progressAriaLiveMessage &&
|
|
147
|
+
typeof progressAriaLiveMessage === 'function' &&
|
|
148
|
+
progressAriaLiveMessage(+loadPercentage.toFixed(2))}
|
|
149
|
+
{progressAriaLiveMessage && typeof progressAriaLiveMessage === 'string' && progressAriaLiveMessage}
|
|
150
|
+
{!progressAriaLiveMessage && `Progress value is ${progressValue || Math.floor(loadPercentage)}%.`}
|
|
151
|
+
</div>
|
|
142
152
|
<Progress
|
|
143
153
|
title={title}
|
|
144
154
|
value={progressValue || loadPercentage}
|
|
@@ -23,7 +23,39 @@ describe('MultipleFileUploadStatusItem', () => {
|
|
|
23
23
|
expect(asFragment()).toMatchSnapshot();
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
test('renders custom file name/size/icon when passed', () => {
|
|
26
|
+
test('renders custom file name/size/icon/progressAriaLiveMessage when passed', () => {
|
|
27
|
+
const testFile = new File(['foo'], 'testFile.txt');
|
|
28
|
+
const { asFragment } = render(
|
|
29
|
+
<MultipleFileUploadStatusItem
|
|
30
|
+
file={testFile}
|
|
31
|
+
fileIcon={<FileImageIcon />}
|
|
32
|
+
fileName="testCustomFileName.txt"
|
|
33
|
+
fileSize={42}
|
|
34
|
+
progressId="test-progress-id"
|
|
35
|
+
progressAriaLiveMessage="test message"
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
expect(asFragment()).toMatchSnapshot();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test('renders custom function progressAriaLiveMessage when passed', () => {
|
|
43
|
+
const testFile = new File(['foo'], 'testFile.txt');
|
|
44
|
+
const { asFragment } = render(
|
|
45
|
+
<MultipleFileUploadStatusItem
|
|
46
|
+
file={testFile}
|
|
47
|
+
fileIcon={<FileImageIcon />}
|
|
48
|
+
fileName="testCustomFileName.txt"
|
|
49
|
+
fileSize={42}
|
|
50
|
+
progressId="test-progress-id"
|
|
51
|
+
progressAriaLiveMessage={loadPercentage => `test message ${loadPercentage}`}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
expect(asFragment()).toMatchSnapshot();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
test('rendersdefault progressAriaLiveMessage when nothing is passed', () => {
|
|
27
59
|
const testFile = new File(['foo'], 'testFile.txt');
|
|
28
60
|
const { asFragment } = render(
|
|
29
61
|
<MultipleFileUploadStatusItem
|
|
@@ -25,6 +25,12 @@ exports[`MultipleFileUploadStatusItem renders custom aria labels 1`] = `
|
|
|
25
25
|
<div
|
|
26
26
|
class="pf-c-multiple-file-upload__status-item-main"
|
|
27
27
|
>
|
|
28
|
+
<div
|
|
29
|
+
aria-live="polite"
|
|
30
|
+
class="pf-screen-reader"
|
|
31
|
+
>
|
|
32
|
+
Progress value is 0%.
|
|
33
|
+
</div>
|
|
28
34
|
<div
|
|
29
35
|
class="pf-c-progress"
|
|
30
36
|
id="test-progress-id"
|
|
@@ -86,7 +92,7 @@ exports[`MultipleFileUploadStatusItem renders custom aria labels 1`] = `
|
|
|
86
92
|
aria-disabled="false"
|
|
87
93
|
aria-label="buttonAriaLabel"
|
|
88
94
|
class="pf-c-button pf-m-plain"
|
|
89
|
-
data-ouia-component-id="OUIA-Generated-Button-plain-
|
|
95
|
+
data-ouia-component-id="OUIA-Generated-Button-plain-8"
|
|
90
96
|
data-ouia-component-type="PF4/Button"
|
|
91
97
|
data-ouia-safe="true"
|
|
92
98
|
type="button"
|
|
@@ -135,6 +141,12 @@ exports[`MultipleFileUploadStatusItem renders custom class names 1`] = `
|
|
|
135
141
|
<div
|
|
136
142
|
class="pf-c-multiple-file-upload__status-item-main"
|
|
137
143
|
>
|
|
144
|
+
<div
|
|
145
|
+
aria-live="polite"
|
|
146
|
+
class="pf-screen-reader"
|
|
147
|
+
>
|
|
148
|
+
Progress value is 0%.
|
|
149
|
+
</div>
|
|
138
150
|
<div
|
|
139
151
|
class="pf-c-progress"
|
|
140
152
|
id="test-progress-id"
|
|
@@ -217,7 +229,7 @@ exports[`MultipleFileUploadStatusItem renders custom class names 1`] = `
|
|
|
217
229
|
</DocumentFragment>
|
|
218
230
|
`;
|
|
219
231
|
|
|
220
|
-
exports[`MultipleFileUploadStatusItem renders custom file name/size/icon when passed 1`] = `
|
|
232
|
+
exports[`MultipleFileUploadStatusItem renders custom file name/size/icon/progressAriaLiveMessage when passed 1`] = `
|
|
221
233
|
<DocumentFragment>
|
|
222
234
|
<li
|
|
223
235
|
class="pf-c-multiple-file-upload__status-item"
|
|
@@ -242,6 +254,12 @@ exports[`MultipleFileUploadStatusItem renders custom file name/size/icon when pa
|
|
|
242
254
|
<div
|
|
243
255
|
class="pf-c-multiple-file-upload__status-item-main"
|
|
244
256
|
>
|
|
257
|
+
<div
|
|
258
|
+
aria-live="polite"
|
|
259
|
+
class="pf-screen-reader"
|
|
260
|
+
>
|
|
261
|
+
test message
|
|
262
|
+
</div>
|
|
245
263
|
<div
|
|
246
264
|
class="pf-c-progress"
|
|
247
265
|
id="test-progress-id"
|
|
@@ -326,6 +344,121 @@ exports[`MultipleFileUploadStatusItem renders custom file name/size/icon when pa
|
|
|
326
344
|
</DocumentFragment>
|
|
327
345
|
`;
|
|
328
346
|
|
|
347
|
+
exports[`MultipleFileUploadStatusItem renders custom function progressAriaLiveMessage when passed 1`] = `
|
|
348
|
+
<DocumentFragment>
|
|
349
|
+
<li
|
|
350
|
+
class="pf-c-multiple-file-upload__status-item"
|
|
351
|
+
>
|
|
352
|
+
<div
|
|
353
|
+
class="pf-c-multiple-file-upload__status-item-icon"
|
|
354
|
+
>
|
|
355
|
+
<svg
|
|
356
|
+
aria-hidden="true"
|
|
357
|
+
fill="currentColor"
|
|
358
|
+
height="1em"
|
|
359
|
+
role="img"
|
|
360
|
+
style="vertical-align: -0.125em;"
|
|
361
|
+
viewBox="0 0 384 512"
|
|
362
|
+
width="1em"
|
|
363
|
+
>
|
|
364
|
+
<path
|
|
365
|
+
d="M384 121.941V128H256V0h6.059a24 24 0 0 1 16.97 7.029l97.941 97.941a24.002 24.002 0 0 1 7.03 16.971zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zm-135.455 16c26.51 0 48 21.49 48 48s-21.49 48-48 48-48-21.49-48-48 21.491-48 48-48zm208 240h-256l.485-48.485L104.545 328c4.686-4.686 11.799-4.201 16.485.485L160.545 368 264.06 264.485c4.686-4.686 12.284-4.686 16.971 0L320.545 304v112z"
|
|
366
|
+
/>
|
|
367
|
+
</svg>
|
|
368
|
+
</div>
|
|
369
|
+
<div
|
|
370
|
+
class="pf-c-multiple-file-upload__status-item-main"
|
|
371
|
+
>
|
|
372
|
+
<div
|
|
373
|
+
aria-live="polite"
|
|
374
|
+
class="pf-screen-reader"
|
|
375
|
+
>
|
|
376
|
+
test message 0
|
|
377
|
+
</div>
|
|
378
|
+
<div
|
|
379
|
+
class="pf-c-progress"
|
|
380
|
+
id="test-progress-id"
|
|
381
|
+
>
|
|
382
|
+
<div
|
|
383
|
+
aria-hidden="true"
|
|
384
|
+
class="pf-c-progress__description"
|
|
385
|
+
id="test-progress-id-description"
|
|
386
|
+
>
|
|
387
|
+
<span
|
|
388
|
+
class="pf-c-multiple-file-upload__status-item-progress"
|
|
389
|
+
>
|
|
390
|
+
<span
|
|
391
|
+
class="pf-c-multiple-file-upload__status-item-progress-text"
|
|
392
|
+
>
|
|
393
|
+
testCustomFileName.txt
|
|
394
|
+
</span>
|
|
395
|
+
<span
|
|
396
|
+
class="pf-c-multiple-file-upload__status-item-progress-size"
|
|
397
|
+
>
|
|
398
|
+
42
|
|
399
|
+
</span>
|
|
400
|
+
</span>
|
|
401
|
+
</div>
|
|
402
|
+
<div
|
|
403
|
+
aria-hidden="true"
|
|
404
|
+
class="pf-c-progress__status"
|
|
405
|
+
>
|
|
406
|
+
<span
|
|
407
|
+
class="pf-c-progress__measure"
|
|
408
|
+
>
|
|
409
|
+
0%
|
|
410
|
+
</span>
|
|
411
|
+
</div>
|
|
412
|
+
<div
|
|
413
|
+
aria-labelledby="test-progress-id-description"
|
|
414
|
+
aria-valuemax="100"
|
|
415
|
+
aria-valuemin="0"
|
|
416
|
+
aria-valuenow="0"
|
|
417
|
+
class="pf-c-progress__bar"
|
|
418
|
+
role="progressbar"
|
|
419
|
+
>
|
|
420
|
+
<div
|
|
421
|
+
class="pf-c-progress__indicator"
|
|
422
|
+
style="width: 0%;"
|
|
423
|
+
>
|
|
424
|
+
<span
|
|
425
|
+
class="pf-c-progress__measure"
|
|
426
|
+
/>
|
|
427
|
+
</div>
|
|
428
|
+
</div>
|
|
429
|
+
</div>
|
|
430
|
+
</div>
|
|
431
|
+
<div
|
|
432
|
+
class="pf-c-multiple-file-upload__status-item-close"
|
|
433
|
+
>
|
|
434
|
+
<button
|
|
435
|
+
aria-disabled="false"
|
|
436
|
+
aria-label="Remove from list"
|
|
437
|
+
class="pf-c-button pf-m-plain"
|
|
438
|
+
data-ouia-component-id="OUIA-Generated-Button-plain-5"
|
|
439
|
+
data-ouia-component-type="PF4/Button"
|
|
440
|
+
data-ouia-safe="true"
|
|
441
|
+
type="button"
|
|
442
|
+
>
|
|
443
|
+
<svg
|
|
444
|
+
aria-hidden="true"
|
|
445
|
+
fill="currentColor"
|
|
446
|
+
height="1em"
|
|
447
|
+
role="img"
|
|
448
|
+
style="vertical-align: -0.125em;"
|
|
449
|
+
viewBox="0 0 512 512"
|
|
450
|
+
width="1em"
|
|
451
|
+
>
|
|
452
|
+
<path
|
|
453
|
+
d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"
|
|
454
|
+
/>
|
|
455
|
+
</svg>
|
|
456
|
+
</button>
|
|
457
|
+
</div>
|
|
458
|
+
</li>
|
|
459
|
+
</DocumentFragment>
|
|
460
|
+
`;
|
|
461
|
+
|
|
329
462
|
exports[`MultipleFileUploadStatusItem renders custom progress value/variant when passed 1`] = `
|
|
330
463
|
<DocumentFragment>
|
|
331
464
|
<li
|
|
@@ -351,6 +484,12 @@ exports[`MultipleFileUploadStatusItem renders custom progress value/variant when
|
|
|
351
484
|
<div
|
|
352
485
|
class="pf-c-multiple-file-upload__status-item-main"
|
|
353
486
|
>
|
|
487
|
+
<div
|
|
488
|
+
aria-live="polite"
|
|
489
|
+
class="pf-screen-reader"
|
|
490
|
+
>
|
|
491
|
+
Progress value is 42%.
|
|
492
|
+
</div>
|
|
354
493
|
<div
|
|
355
494
|
class="pf-c-progress pf-m-warning"
|
|
356
495
|
id="test-progress-id"
|
|
@@ -428,7 +567,7 @@ exports[`MultipleFileUploadStatusItem renders custom progress value/variant when
|
|
|
428
567
|
aria-disabled="false"
|
|
429
568
|
aria-label="Remove from list"
|
|
430
569
|
class="pf-c-button pf-m-plain"
|
|
431
|
-
data-ouia-component-id="OUIA-Generated-Button-plain-
|
|
570
|
+
data-ouia-component-id="OUIA-Generated-Button-plain-7"
|
|
432
571
|
data-ouia-component-type="PF4/Button"
|
|
433
572
|
data-ouia-safe="true"
|
|
434
573
|
type="button"
|
|
@@ -477,6 +616,12 @@ exports[`MultipleFileUploadStatusItem renders expected values from a passed file
|
|
|
477
616
|
<div
|
|
478
617
|
class="pf-c-multiple-file-upload__status-item-main"
|
|
479
618
|
>
|
|
619
|
+
<div
|
|
620
|
+
aria-live="polite"
|
|
621
|
+
class="pf-screen-reader"
|
|
622
|
+
>
|
|
623
|
+
Progress value is 0%.
|
|
624
|
+
</div>
|
|
480
625
|
<div
|
|
481
626
|
class="pf-c-progress"
|
|
482
627
|
id="test-progress-id"
|
|
@@ -586,6 +731,12 @@ exports[`MultipleFileUploadStatusItem renders with expected class names 1`] = `
|
|
|
586
731
|
<div
|
|
587
732
|
class="pf-c-multiple-file-upload__status-item-main"
|
|
588
733
|
>
|
|
734
|
+
<div
|
|
735
|
+
aria-live="polite"
|
|
736
|
+
class="pf-screen-reader"
|
|
737
|
+
>
|
|
738
|
+
Progress value is 0%.
|
|
739
|
+
</div>
|
|
589
740
|
<div
|
|
590
741
|
class="pf-c-progress"
|
|
591
742
|
id="test-progress-id"
|
|
@@ -667,3 +818,118 @@ exports[`MultipleFileUploadStatusItem renders with expected class names 1`] = `
|
|
|
667
818
|
</li>
|
|
668
819
|
</DocumentFragment>
|
|
669
820
|
`;
|
|
821
|
+
|
|
822
|
+
exports[`MultipleFileUploadStatusItem rendersdefault progressAriaLiveMessage when nothing is passed 1`] = `
|
|
823
|
+
<DocumentFragment>
|
|
824
|
+
<li
|
|
825
|
+
class="pf-c-multiple-file-upload__status-item"
|
|
826
|
+
>
|
|
827
|
+
<div
|
|
828
|
+
class="pf-c-multiple-file-upload__status-item-icon"
|
|
829
|
+
>
|
|
830
|
+
<svg
|
|
831
|
+
aria-hidden="true"
|
|
832
|
+
fill="currentColor"
|
|
833
|
+
height="1em"
|
|
834
|
+
role="img"
|
|
835
|
+
style="vertical-align: -0.125em;"
|
|
836
|
+
viewBox="0 0 384 512"
|
|
837
|
+
width="1em"
|
|
838
|
+
>
|
|
839
|
+
<path
|
|
840
|
+
d="M384 121.941V128H256V0h6.059a24 24 0 0 1 16.97 7.029l97.941 97.941a24.002 24.002 0 0 1 7.03 16.971zM248 160c-13.2 0-24-10.8-24-24V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248zm-135.455 16c26.51 0 48 21.49 48 48s-21.49 48-48 48-48-21.49-48-48 21.491-48 48-48zm208 240h-256l.485-48.485L104.545 328c4.686-4.686 11.799-4.201 16.485.485L160.545 368 264.06 264.485c4.686-4.686 12.284-4.686 16.971 0L320.545 304v112z"
|
|
841
|
+
/>
|
|
842
|
+
</svg>
|
|
843
|
+
</div>
|
|
844
|
+
<div
|
|
845
|
+
class="pf-c-multiple-file-upload__status-item-main"
|
|
846
|
+
>
|
|
847
|
+
<div
|
|
848
|
+
aria-live="polite"
|
|
849
|
+
class="pf-screen-reader"
|
|
850
|
+
>
|
|
851
|
+
Progress value is 0%.
|
|
852
|
+
</div>
|
|
853
|
+
<div
|
|
854
|
+
class="pf-c-progress"
|
|
855
|
+
id="test-progress-id"
|
|
856
|
+
>
|
|
857
|
+
<div
|
|
858
|
+
aria-hidden="true"
|
|
859
|
+
class="pf-c-progress__description"
|
|
860
|
+
id="test-progress-id-description"
|
|
861
|
+
>
|
|
862
|
+
<span
|
|
863
|
+
class="pf-c-multiple-file-upload__status-item-progress"
|
|
864
|
+
>
|
|
865
|
+
<span
|
|
866
|
+
class="pf-c-multiple-file-upload__status-item-progress-text"
|
|
867
|
+
>
|
|
868
|
+
testCustomFileName.txt
|
|
869
|
+
</span>
|
|
870
|
+
<span
|
|
871
|
+
class="pf-c-multiple-file-upload__status-item-progress-size"
|
|
872
|
+
>
|
|
873
|
+
42
|
|
874
|
+
</span>
|
|
875
|
+
</span>
|
|
876
|
+
</div>
|
|
877
|
+
<div
|
|
878
|
+
aria-hidden="true"
|
|
879
|
+
class="pf-c-progress__status"
|
|
880
|
+
>
|
|
881
|
+
<span
|
|
882
|
+
class="pf-c-progress__measure"
|
|
883
|
+
>
|
|
884
|
+
0%
|
|
885
|
+
</span>
|
|
886
|
+
</div>
|
|
887
|
+
<div
|
|
888
|
+
aria-labelledby="test-progress-id-description"
|
|
889
|
+
aria-valuemax="100"
|
|
890
|
+
aria-valuemin="0"
|
|
891
|
+
aria-valuenow="0"
|
|
892
|
+
class="pf-c-progress__bar"
|
|
893
|
+
role="progressbar"
|
|
894
|
+
>
|
|
895
|
+
<div
|
|
896
|
+
class="pf-c-progress__indicator"
|
|
897
|
+
style="width: 0%;"
|
|
898
|
+
>
|
|
899
|
+
<span
|
|
900
|
+
class="pf-c-progress__measure"
|
|
901
|
+
/>
|
|
902
|
+
</div>
|
|
903
|
+
</div>
|
|
904
|
+
</div>
|
|
905
|
+
</div>
|
|
906
|
+
<div
|
|
907
|
+
class="pf-c-multiple-file-upload__status-item-close"
|
|
908
|
+
>
|
|
909
|
+
<button
|
|
910
|
+
aria-disabled="false"
|
|
911
|
+
aria-label="Remove from list"
|
|
912
|
+
class="pf-c-button pf-m-plain"
|
|
913
|
+
data-ouia-component-id="OUIA-Generated-Button-plain-6"
|
|
914
|
+
data-ouia-component-type="PF4/Button"
|
|
915
|
+
data-ouia-safe="true"
|
|
916
|
+
type="button"
|
|
917
|
+
>
|
|
918
|
+
<svg
|
|
919
|
+
aria-hidden="true"
|
|
920
|
+
fill="currentColor"
|
|
921
|
+
height="1em"
|
|
922
|
+
role="img"
|
|
923
|
+
style="vertical-align: -0.125em;"
|
|
924
|
+
viewBox="0 0 512 512"
|
|
925
|
+
width="1em"
|
|
926
|
+
>
|
|
927
|
+
<path
|
|
928
|
+
d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"
|
|
929
|
+
/>
|
|
930
|
+
</svg>
|
|
931
|
+
</button>
|
|
932
|
+
</div>
|
|
933
|
+
</li>
|
|
934
|
+
</DocumentFragment>
|
|
935
|
+
`;
|
|
@@ -4,7 +4,6 @@ section: components
|
|
|
4
4
|
cssPrefix: pf-c-multiple-file-upload
|
|
5
5
|
propComponents:
|
|
6
6
|
['MultipleFileUpload', 'MultipleFileUploadMain', 'MultipleFileUploadStatus', 'MultipleFileUploadStatusItem']
|
|
7
|
-
beta: true
|
|
8
7
|
---
|
|
9
8
|
|
|
10
9
|
import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon';
|
|
@@ -39,11 +39,11 @@ export enum PopoverPosition {
|
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
41
|
export interface PopoverProps {
|
|
42
|
-
/**
|
|
42
|
+
/** Text announced by screen reader when alert severity variant is set to indicate
|
|
43
43
|
* severity level.
|
|
44
44
|
*/
|
|
45
45
|
alertSeverityScreenReaderText?: string;
|
|
46
|
-
/**
|
|
46
|
+
/** Severity variants for an alert popover. This modifies the color of the header to
|
|
47
47
|
* match the severity.
|
|
48
48
|
*/
|
|
49
49
|
alertSeverityVariant?: 'default' | 'info' | 'warning' | 'success' | 'danger';
|
|
@@ -128,7 +128,7 @@ export interface PopoverProps {
|
|
|
128
128
|
* popover, i.e. headerContent={hide => <Button onClick={() => hide()}>Close</Button>}
|
|
129
129
|
*/
|
|
130
130
|
headerContent?: React.ReactNode | ((hide: () => void) => React.ReactNode);
|
|
131
|
-
/**
|
|
131
|
+
/** Icon to be displayed in the popover header. **/
|
|
132
132
|
headerIcon?: React.ReactNode;
|
|
133
133
|
/** Hides the popover when a click occurs outside (only works if isVisible is not controlled
|
|
134
134
|
* by the user).
|
|
@@ -58,10 +58,10 @@ Note: If you use the isVisible prop, either refer to the example above or if you
|
|
|
58
58
|
|
|
59
59
|
### Popover with icon in the title
|
|
60
60
|
|
|
61
|
-
```ts file="./PopoverWithIconInTheTitle.tsx"
|
|
61
|
+
```ts file="./PopoverWithIconInTheTitle.tsx"
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
### Alert popover
|
|
65
65
|
|
|
66
|
-
```ts file="./PopoverAlert.tsx"
|
|
66
|
+
```ts file="./PopoverAlert.tsx"
|
|
67
67
|
```
|
|
@@ -2613,7 +2613,7 @@ class SelectWithFooterCheckbox extends React.Component {
|
|
|
2613
2613
|
|
|
2614
2614
|
### View more
|
|
2615
2615
|
|
|
2616
|
-
```js
|
|
2616
|
+
```js
|
|
2617
2617
|
import React from 'react';
|
|
2618
2618
|
import { Select, SelectOption, SelectVariant } from '@patternfly/react-core';
|
|
2619
2619
|
|
|
@@ -2708,7 +2708,7 @@ class SelectViewMore extends React.Component {
|
|
|
2708
2708
|
|
|
2709
2709
|
### View more with checkboxes
|
|
2710
2710
|
|
|
2711
|
-
```js
|
|
2711
|
+
```js
|
|
2712
2712
|
import React from 'react';
|
|
2713
2713
|
import { Select, SelectOption, SelectVariant } from '@patternfly/react-core';
|
|
2714
2714
|
|
|
@@ -266,7 +266,7 @@ import { TextArea } from '@patternfly/react-core';
|
|
|
266
266
|
|
|
267
267
|
**Note:** The icons for the success, invalid, calendar, etc. variations in form control elements are applied as background images to the form element. By default, the image URLs for these icons are data URIs. However, there may be cases where data URIs are not ideal, such as in an application with a content security policy that disallows data URIs for security reasons. The `isIconSprite` variation changes the icon source to an external SVG file that serves as a sprite for all of the supported icons.
|
|
268
268
|
|
|
269
|
-
```js
|
|
269
|
+
```js
|
|
270
270
|
import React from 'react';
|
|
271
271
|
import { TextArea } from '@patternfly/react-core';
|
|
272
272
|
|
|
@@ -46,5 +46,5 @@ propComponents: ['TextInput']
|
|
|
46
46
|
|
|
47
47
|
**Note:** The icons for the success, invalid, calendar, etc. variations in form control elements are applied as background images to the form element. By default, the image URLs for these icons are data URIs. However, there may be cases where data URIs are not ideal, such as in an application with a content security policy that disallows data URIs for security reasons. The `isIconSprite` variation changes the icon source to an external SVG file that serves as a sprite for all of the supported icons.
|
|
48
48
|
|
|
49
|
-
```ts
|
|
49
|
+
```ts file="./TextInputIconSprite.tsx"
|
|
50
50
|
```
|