@patternfly/react-core 4.224.9 → 4.224.12
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 +24 -0
- package/dist/esm/components/ContextSelector/ContextSelector.d.ts +2 -0
- package/dist/esm/components/ContextSelector/ContextSelector.d.ts.map +1 -1
- package/dist/esm/components/ContextSelector/ContextSelector.js +8 -11
- package/dist/esm/components/ContextSelector/ContextSelector.js.map +1 -1
- package/dist/esm/components/ContextSelector/ContextSelectorMenuList.d.ts.map +1 -1
- package/dist/esm/components/ContextSelector/ContextSelectorMenuList.js +2 -1
- package/dist/esm/components/ContextSelector/ContextSelectorMenuList.js.map +1 -1
- package/dist/esm/components/DragDrop/DragDrop.d.ts +1 -1
- package/dist/esm/components/DragDrop/DragDrop.d.ts.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelector.d.ts.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelector.js +6 -6
- package/dist/esm/components/DualListSelector/DualListSelector.js.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelectorControlsWrapper.js +1 -1
- package/dist/esm/components/DualListSelector/DualListSelectorControlsWrapper.js.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelectorList.d.ts +1 -0
- package/dist/esm/components/DualListSelector/DualListSelectorList.d.ts.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelectorList.js +7 -1
- package/dist/esm/components/DualListSelector/DualListSelectorList.js.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelectorTree.d.ts +3 -2
- package/dist/esm/components/DualListSelector/DualListSelectorTree.d.ts.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelectorTree.js.map +1 -1
- package/dist/esm/components/SearchInput/SearchInput.d.ts +7 -0
- package/dist/esm/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/esm/components/SearchInput/SearchInput.js +9 -4
- package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/js/components/ContextSelector/ContextSelector.d.ts +2 -0
- package/dist/js/components/ContextSelector/ContextSelector.d.ts.map +1 -1
- package/dist/js/components/ContextSelector/ContextSelector.js +7 -10
- package/dist/js/components/ContextSelector/ContextSelector.js.map +1 -1
- package/dist/js/components/ContextSelector/ContextSelectorMenuList.d.ts.map +1 -1
- package/dist/js/components/ContextSelector/ContextSelectorMenuList.js +2 -1
- package/dist/js/components/ContextSelector/ContextSelectorMenuList.js.map +1 -1
- package/dist/js/components/DragDrop/DragDrop.d.ts +1 -1
- package/dist/js/components/DragDrop/DragDrop.d.ts.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelector.d.ts.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelector.js +5 -5
- package/dist/js/components/DualListSelector/DualListSelector.js.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelectorControlsWrapper.js +1 -1
- package/dist/js/components/DualListSelector/DualListSelectorControlsWrapper.js.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelectorList.d.ts +1 -0
- package/dist/js/components/DualListSelector/DualListSelectorList.d.ts.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelectorList.js +7 -1
- package/dist/js/components/DualListSelector/DualListSelectorList.js.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelectorTree.d.ts +3 -2
- package/dist/js/components/DualListSelector/DualListSelectorTree.d.ts.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelectorTree.js.map +1 -1
- package/dist/js/components/SearchInput/SearchInput.d.ts +7 -0
- package/dist/js/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/js/components/SearchInput/SearchInput.js +9 -4
- package/dist/js/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/styles/base-no-reset.css +10 -10
- package/dist/styles/base.css +10 -10
- package/dist/umd/react-core.css +39 -209
- package/dist/umd/react-core.js +709 -726
- package/dist/umd/react-core.min.css +141 -311
- package/dist/umd/react-core.min.js +4 -4
- package/package.json +6 -6
- package/src/components/Accordion/examples/AccordionBordered.tsx +21 -21
- package/src/components/Accordion/examples/AccordionDefinitionList.tsx +21 -21
- package/src/components/ActionList/__tests__/ActionList.test.tsx +46 -11
- package/src/components/ActionList/__tests__/ActionListGroup.test.tsx +34 -7
- package/src/components/ActionList/__tests__/ActionListItem.test.tsx +34 -7
- package/src/components/ActionList/__tests__/__snapshots__/ActionList.test.tsx.snap +1 -11
- package/src/components/ActionList/__tests__/__snapshots__/ActionListGroup.test.tsx.snap +1 -1
- package/src/components/ActionList/__tests__/__snapshots__/ActionListItem.test.tsx.snap +1 -1
- package/src/components/ActionList/examples/ActionListMultipleGroups.tsx +4 -4
- package/src/components/ActionList/examples/ActionListSingleGroup.tsx +4 -4
- package/src/components/ActionList/examples/ActionListWithCancelButton.tsx +5 -5
- package/src/components/ActionList/examples/ActionListWithIcons.tsx +2 -2
- package/src/components/Card/examples/CardSelectableA11yHighlight.tsx +4 -4
- package/src/components/CodeBlock/examples/CodeBlockBasic.tsx +1 -1
- package/src/components/CodeBlock/examples/CodeBlockExpandable.tsx +1 -1
- package/src/components/ContextSelector/ContextSelector.tsx +11 -10
- package/src/components/ContextSelector/ContextSelectorMenuList.tsx +2 -1
- package/src/components/ContextSelector/__tests__/ContextSelector.test.tsx +2 -2
- package/src/components/ContextSelector/__tests__/__snapshots__/ContextSelector.test.tsx.snap +11 -7
- package/src/components/ContextSelector/__tests__/__snapshots__/ContextSelectorMenuList.test.tsx.snap +10 -0
- package/src/components/DataList/examples/DataListCompact.tsx +4 -4
- package/src/components/DataList/examples/DataListControllingText.tsx +3 -3
- package/src/components/DataList/examples/DataListDraggable.tsx +14 -7
- package/src/components/DataList/examples/DataListExpandable.tsx +3 -3
- package/src/components/DataList/examples/DataListSmGridBreakpoint.tsx +3 -3
- package/src/components/DragDrop/DragDrop.tsx +1 -1
- package/src/components/DualListSelector/DualListSelector.tsx +93 -89
- package/src/components/DualListSelector/DualListSelectorControlsWrapper.tsx +1 -1
- package/src/components/DualListSelector/DualListSelectorList.tsx +10 -4
- package/src/components/DualListSelector/DualListSelectorTree.tsx +3 -2
- package/src/components/DualListSelector/__tests__/__snapshots__/DualListSelector.test.tsx.snap +6 -20
- package/src/components/DualListSelector/examples/DualListSelector.md +3 -1
- package/src/components/DualListSelector/examples/DualListSelectorComposable.tsx +1 -1
- package/src/components/DualListSelector/examples/DualListSelectorComposableDragDrop.tsx +1 -1
- package/src/components/DualListSelector/examples/DualListSelectorComposableTree.tsx +1 -1
- package/src/components/DualListSelector/examples/{DualListSelectorTree.tsx → DualListSelectorTreeExample.tsx} +1 -1
- package/src/components/FileUpload/examples/FileUploadCustomUpload.tsx +1 -1
- package/src/components/FileUpload/examples/FileUploadSimpleText.tsx +1 -1
- package/src/components/FileUpload/examples/FileUploadTextWithEdits.tsx +1 -1
- package/src/components/FileUpload/examples/FileUploadTextWithRestrictions.tsx +2 -2
- package/src/components/InputGroup/examples/InputGroupBasic.tsx +3 -3
- package/src/components/InputGroup/examples/InputGroupWithDropdown.tsx +1 -1
- package/src/components/InputGroup/examples/InputGroupWithPopover.tsx +12 -2
- package/src/components/InputGroup/examples/InputGroupWithSiblings.tsx +7 -2
- package/src/components/InputGroup/examples/InputGroupWithTextarea.tsx +1 -1
- package/src/components/LoginPage/examples/LoginPage.md +2 -325
- package/src/components/LoginPage/examples/LoginPageBasic.tsx +144 -0
- package/src/components/LoginPage/examples/LoginPageShowHidePassword.tsx +145 -0
- package/src/components/NotificationDrawer/examples/NotificationDrawer.md +69 -68
- package/src/components/SearchInput/SearchInput.tsx +32 -5
- package/src/components/SearchInput/__tests__/SearchInput.test.tsx +37 -0
- package/src/components/SearchInput/__tests__/__snapshots__/SearchInput.test.tsx.snap +193 -4
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { DualListSelectorListContext } from './DualListSelectorContext';
|
|
6
6
|
|
|
7
7
|
export interface DualListSelectorListProps extends React.HTMLProps<HTMLUListElement> {
|
|
8
|
+
/** Content rendered inside the dual list selector list */
|
|
8
9
|
children?: React.ReactNode;
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -31,13 +32,18 @@ export const DualListSelectorList: React.FunctionComponent<DualListSelectorListP
|
|
|
31
32
|
onOptionSelect(e, index, id);
|
|
32
33
|
};
|
|
33
34
|
|
|
35
|
+
const hasOptions = () =>
|
|
36
|
+
options.length !== 0 || (children !== undefined && (children as React.ReactNode[]).length !== 0);
|
|
37
|
+
|
|
34
38
|
return (
|
|
35
39
|
<ul
|
|
36
40
|
className={css(styles.dualListSelectorList)}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
{...(hasOptions() && {
|
|
42
|
+
role: isTree ? 'tree' : 'listbox',
|
|
43
|
+
'aria-multiselectable': true,
|
|
44
|
+
'aria-labelledby': ariaLabelledBy,
|
|
45
|
+
'aria-activedescendant': focusedOption
|
|
46
|
+
})}
|
|
41
47
|
aria-disabled={isDisabled ? 'true' : undefined}
|
|
42
48
|
{...props}
|
|
43
49
|
>
|
|
@@ -35,7 +35,7 @@ export interface DualListSelectorTreeItemData {
|
|
|
35
35
|
isDisabled?: boolean;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
export interface DualListSelectorTreeProps {
|
|
38
|
+
export interface DualListSelectorTreeProps extends Omit<React.HTMLProps<HTMLUListElement>, 'data'> {
|
|
39
39
|
/** Data of the tree view */
|
|
40
40
|
data: DualListSelectorTreeItemData[] | (() => DualListSelectorTreeItemData[]);
|
|
41
41
|
/** ID of the tree view */
|
|
@@ -46,8 +46,9 @@ export interface DualListSelectorTreeProps {
|
|
|
46
46
|
hasBadges?: boolean;
|
|
47
47
|
/** Sets the default expanded behavior */
|
|
48
48
|
defaultAllExpanded?: boolean;
|
|
49
|
-
/**
|
|
49
|
+
/** Flag indicating if the dual list selector tree is in the disabled state */
|
|
50
50
|
isDisabled?: boolean;
|
|
51
|
+
/** Callback fired when an option is checked */
|
|
51
52
|
onOptionCheck?: (
|
|
52
53
|
event: React.MouseEvent | React.ChangeEvent<HTMLInputElement> | React.KeyboardEvent,
|
|
53
54
|
isChecked: boolean,
|
package/src/components/DualListSelector/__tests__/__snapshots__/DualListSelector.test.tsx.snap
CHANGED
|
@@ -99,6 +99,7 @@ exports[`DualListSelector basic 1`] = `
|
|
|
99
99
|
<div
|
|
100
100
|
aria-label="Selector controls"
|
|
101
101
|
class="pf-c-dual-list-selector__controls"
|
|
102
|
+
role="group"
|
|
102
103
|
tabindex="0"
|
|
103
104
|
>
|
|
104
105
|
<div
|
|
@@ -248,11 +249,7 @@ exports[`DualListSelector basic 1`] = `
|
|
|
248
249
|
tabindex="0"
|
|
249
250
|
>
|
|
250
251
|
<ul
|
|
251
|
-
aria-activedescendant=""
|
|
252
|
-
aria-labelledby="firstTest-chosen-pane-status"
|
|
253
|
-
aria-multiselectable="true"
|
|
254
252
|
class="pf-c-dual-list-selector__list"
|
|
255
|
-
role="listbox"
|
|
256
253
|
/>
|
|
257
254
|
</div>
|
|
258
255
|
</div>
|
|
@@ -360,6 +357,7 @@ exports[`DualListSelector basic with disabled controls 1`] = `
|
|
|
360
357
|
<div
|
|
361
358
|
aria-label="Selector controls"
|
|
362
359
|
class="pf-c-dual-list-selector__controls"
|
|
360
|
+
role="group"
|
|
363
361
|
tabindex="0"
|
|
364
362
|
>
|
|
365
363
|
<div
|
|
@@ -510,12 +508,8 @@ exports[`DualListSelector basic with disabled controls 1`] = `
|
|
|
510
508
|
tabindex="0"
|
|
511
509
|
>
|
|
512
510
|
<ul
|
|
513
|
-
aria-activedescendant=""
|
|
514
511
|
aria-disabled="true"
|
|
515
|
-
aria-labelledby="disabledTest-chosen-pane-status"
|
|
516
|
-
aria-multiselectable="true"
|
|
517
512
|
class="pf-c-dual-list-selector__list"
|
|
518
|
-
role="listbox"
|
|
519
513
|
/>
|
|
520
514
|
</div>
|
|
521
515
|
</div>
|
|
@@ -633,6 +627,7 @@ exports[`DualListSelector with actions 1`] = `
|
|
|
633
627
|
<div
|
|
634
628
|
aria-label="Selector controls"
|
|
635
629
|
class="pf-c-dual-list-selector__controls"
|
|
630
|
+
role="group"
|
|
636
631
|
tabindex="0"
|
|
637
632
|
>
|
|
638
633
|
<div
|
|
@@ -954,6 +949,7 @@ exports[`DualListSelector with custom status 1`] = `
|
|
|
954
949
|
<div
|
|
955
950
|
aria-label="Selector controls"
|
|
956
951
|
class="pf-c-dual-list-selector__controls"
|
|
952
|
+
role="group"
|
|
957
953
|
tabindex="0"
|
|
958
954
|
>
|
|
959
955
|
<div
|
|
@@ -1103,11 +1099,7 @@ exports[`DualListSelector with custom status 1`] = `
|
|
|
1103
1099
|
tabindex="0"
|
|
1104
1100
|
>
|
|
1105
1101
|
<ul
|
|
1106
|
-
aria-activedescendant=""
|
|
1107
|
-
aria-labelledby="thirdTest-chosen-pane-status"
|
|
1108
|
-
aria-multiselectable="true"
|
|
1109
1102
|
class="pf-c-dual-list-selector__list"
|
|
1110
|
-
role="listbox"
|
|
1111
1103
|
/>
|
|
1112
1104
|
</div>
|
|
1113
1105
|
</div>
|
|
@@ -1227,6 +1219,7 @@ exports[`DualListSelector with search inputs 1`] = `
|
|
|
1227
1219
|
<div
|
|
1228
1220
|
aria-label="Selector controls"
|
|
1229
1221
|
class="pf-c-dual-list-selector__controls"
|
|
1222
|
+
role="group"
|
|
1230
1223
|
tabindex="0"
|
|
1231
1224
|
>
|
|
1232
1225
|
<div
|
|
@@ -1389,11 +1382,7 @@ exports[`DualListSelector with search inputs 1`] = `
|
|
|
1389
1382
|
tabindex="0"
|
|
1390
1383
|
>
|
|
1391
1384
|
<ul
|
|
1392
|
-
aria-activedescendant=""
|
|
1393
|
-
aria-labelledby="secondTest-chosen-pane-status"
|
|
1394
|
-
aria-multiselectable="true"
|
|
1395
1385
|
class="pf-c-dual-list-selector__list"
|
|
1396
|
-
role="listbox"
|
|
1397
1386
|
/>
|
|
1398
1387
|
</div>
|
|
1399
1388
|
</div>
|
|
@@ -1577,6 +1566,7 @@ exports[`DualListSelector with tree 1`] = `
|
|
|
1577
1566
|
<div
|
|
1578
1567
|
aria-label="Selector controls"
|
|
1579
1568
|
class="pf-c-dual-list-selector__controls"
|
|
1569
|
+
role="group"
|
|
1580
1570
|
tabindex="0"
|
|
1581
1571
|
>
|
|
1582
1572
|
<div
|
|
@@ -1726,11 +1716,7 @@ exports[`DualListSelector with tree 1`] = `
|
|
|
1726
1716
|
tabindex="0"
|
|
1727
1717
|
>
|
|
1728
1718
|
<ul
|
|
1729
|
-
aria-activedescendant=""
|
|
1730
|
-
aria-labelledby="tree-test-chosen-pane-status"
|
|
1731
|
-
aria-multiselectable="true"
|
|
1732
1719
|
class="pf-c-dual-list-selector__list"
|
|
1733
|
-
role="tree"
|
|
1734
1720
|
/>
|
|
1735
1721
|
</div>
|
|
1736
1722
|
</div>
|
|
@@ -8,6 +8,8 @@ propComponents:
|
|
|
8
8
|
'DualListSelectorPane',
|
|
9
9
|
'DualListSelectorControl',
|
|
10
10
|
'DualListSelectorControlsWrapper',
|
|
11
|
+
'DualListSelectorList',
|
|
12
|
+
'DualListSelectorListItem',
|
|
11
13
|
'DualListSelectorTree',
|
|
12
14
|
'DualListSelectorTreeItemData',
|
|
13
15
|
]
|
|
@@ -44,7 +46,7 @@ import PficonSortCommonAscIcon from '@patternfly/react-icons/dist/esm/icons/pfic
|
|
|
44
46
|
|
|
45
47
|
### With tree
|
|
46
48
|
|
|
47
|
-
```ts file="./
|
|
49
|
+
```ts file="./DualListSelectorTreeExample.tsx"
|
|
48
50
|
```
|
|
49
51
|
|
|
50
52
|
### Composable dual list selector
|
|
@@ -151,7 +151,7 @@ export const DualListSelectorComposable: React.FunctionComponent = () => {
|
|
|
151
151
|
)}
|
|
152
152
|
</DualListSelectorList>
|
|
153
153
|
</DualListSelectorPane>
|
|
154
|
-
<DualListSelectorControlsWrapper
|
|
154
|
+
<DualListSelectorControlsWrapper>
|
|
155
155
|
<DualListSelectorControl
|
|
156
156
|
isDisabled={!availableOptions.some(option => option.selected)}
|
|
157
157
|
onClick={() => moveSelected(true)}
|
|
@@ -121,7 +121,7 @@ export const DualListSelectorComposableDragDrop: React.FunctionComponent = () =>
|
|
|
121
121
|
)}
|
|
122
122
|
</DualListSelectorList>
|
|
123
123
|
</DualListSelectorPane>
|
|
124
|
-
<DualListSelectorControlsWrapper
|
|
124
|
+
<DualListSelectorControlsWrapper>
|
|
125
125
|
<DualListSelectorControl
|
|
126
126
|
isDisabled={!availableOptions.some(option => option.selected)}
|
|
127
127
|
onClick={() => moveSelected(true)}
|
|
@@ -255,7 +255,7 @@ export const DualListSelectorComposableTree: React.FunctionComponent<ExampleProp
|
|
|
255
255
|
return (
|
|
256
256
|
<DualListSelector isTree>
|
|
257
257
|
{buildPane(false)}
|
|
258
|
-
<DualListSelectorControlsWrapper
|
|
258
|
+
<DualListSelectorControlsWrapper>
|
|
259
259
|
<DualListSelectorControl
|
|
260
260
|
isDisabled={!checkedLeafIds.filter(x => !chosenLeafIds.includes(x)).length}
|
|
261
261
|
onClick={() => moveChecked(true)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DualListSelector } from '@patternfly/react-core';
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const DualListSelectorTreeExample: React.FunctionComponent = () => {
|
|
5
5
|
const [availableOptions, setAvailableOptions] = React.useState<React.ReactNode[]>([
|
|
6
6
|
{
|
|
7
7
|
id: 'F1',
|
|
@@ -39,13 +39,13 @@ export const TextFileUploadWithRestrictions: React.FunctionComponent = () => {
|
|
|
39
39
|
return (
|
|
40
40
|
<Form>
|
|
41
41
|
<FormGroup
|
|
42
|
-
fieldId="text-file-with-restrictions"
|
|
42
|
+
fieldId="text-file-with-restrictions-example"
|
|
43
43
|
helperText="Upload a CSV file"
|
|
44
44
|
helperTextInvalid="Must be a CSV file no larger than 1 KB"
|
|
45
45
|
validated={isRejected ? 'error' : 'default'}
|
|
46
46
|
>
|
|
47
47
|
<FileUpload
|
|
48
|
-
id="text-file-with-restrictions"
|
|
48
|
+
id="text-file-with-restrictions-example"
|
|
49
49
|
type="text"
|
|
50
50
|
value={value}
|
|
51
51
|
filename={filename}
|
|
@@ -5,7 +5,7 @@ import { InputGroup, InputGroupText, InputGroupTextVariant, TextInput, Validated
|
|
|
5
5
|
export const InputGroupBasic: React.FunctionComponent = () => (
|
|
6
6
|
<React.Fragment>
|
|
7
7
|
<InputGroup>
|
|
8
|
-
<TextInput id="
|
|
8
|
+
<TextInput id="textInput-basic-1" type="email" aria-label="email input field" />
|
|
9
9
|
<InputGroupText id="email-example">@example.com</InputGroupText>
|
|
10
10
|
</InputGroup>
|
|
11
11
|
<br />
|
|
@@ -15,14 +15,14 @@ export const InputGroupBasic: React.FunctionComponent = () => (
|
|
|
15
15
|
</InputGroupText>
|
|
16
16
|
<TextInput
|
|
17
17
|
validated={ValidatedOptions.error}
|
|
18
|
-
id="
|
|
18
|
+
id="textInput-basic-2"
|
|
19
19
|
type="email"
|
|
20
20
|
aria-label="Error state username example"
|
|
21
21
|
/>
|
|
22
22
|
</InputGroup>
|
|
23
23
|
<br />
|
|
24
24
|
<InputGroup>
|
|
25
|
-
<TextInput name="
|
|
25
|
+
<TextInput name="textInput-basic-3" id="textInput-basic-3" type="text" aria-label="percentage" />
|
|
26
26
|
<InputGroupText id="plain-example" variant={InputGroupTextVariant.plain}>
|
|
27
27
|
%
|
|
28
28
|
</InputGroupText>
|
|
@@ -33,7 +33,7 @@ export const InputGroupWithDropdown: React.FunctionComponent = () => {
|
|
|
33
33
|
isOpen={isOpen}
|
|
34
34
|
dropdownItems={dropdownItems}
|
|
35
35
|
/>
|
|
36
|
-
<TextInput id="
|
|
36
|
+
<TextInput id="textInput-with-dropdown" aria-label="input with dropdown and button" />
|
|
37
37
|
<Button id="inputDropdownButton1" variant="control">
|
|
38
38
|
Button
|
|
39
39
|
</Button>
|
|
@@ -5,7 +5,12 @@ import { Button, InputGroup, TextInput, Popover, PopoverPosition } from '@patter
|
|
|
5
5
|
export const InputGroupWithPopover: React.FunctionComponent = () => (
|
|
6
6
|
<React.Fragment>
|
|
7
7
|
<InputGroup>
|
|
8
|
-
<TextInput
|
|
8
|
+
<TextInput
|
|
9
|
+
name="textInput-with-popover-1"
|
|
10
|
+
id="textInput-with-popover-1"
|
|
11
|
+
type="text"
|
|
12
|
+
aria-label="first input example with popover"
|
|
13
|
+
/>
|
|
9
14
|
<Popover
|
|
10
15
|
aria-label="popover example"
|
|
11
16
|
position={PopoverPosition.top}
|
|
@@ -18,7 +23,12 @@ export const InputGroupWithPopover: React.FunctionComponent = () => (
|
|
|
18
23
|
</InputGroup>
|
|
19
24
|
<br />
|
|
20
25
|
<InputGroup>
|
|
21
|
-
<TextInput
|
|
26
|
+
<TextInput
|
|
27
|
+
name="textInput-with-popover-2"
|
|
28
|
+
id="textInput-with-popover-2"
|
|
29
|
+
type="text"
|
|
30
|
+
aria-label="second input example with popover"
|
|
31
|
+
/>
|
|
22
32
|
<Popover
|
|
23
33
|
aria-label="popover example"
|
|
24
34
|
position={PopoverPosition.top}
|
|
@@ -17,7 +17,7 @@ export const InputGroupWithSiblings: React.FunctionComponent = () => (
|
|
|
17
17
|
Button
|
|
18
18
|
</Button>
|
|
19
19
|
<Button variant="control">Button</Button>
|
|
20
|
-
<TextArea name="
|
|
20
|
+
<TextArea name="textarea2" id="textarea2" aria-label="textarea with 3 buttons" />
|
|
21
21
|
<Button variant="control">Button</Button>
|
|
22
22
|
</InputGroup>
|
|
23
23
|
<br />
|
|
@@ -25,7 +25,12 @@ export const InputGroupWithSiblings: React.FunctionComponent = () => (
|
|
|
25
25
|
<InputGroupText>
|
|
26
26
|
<DollarSignIcon />
|
|
27
27
|
</InputGroupText>
|
|
28
|
-
<TextInput
|
|
28
|
+
<TextInput
|
|
29
|
+
id="textInput-with-siblings"
|
|
30
|
+
name="textInput-with-siblings"
|
|
31
|
+
type="number"
|
|
32
|
+
aria-label="Dollar amount input example"
|
|
33
|
+
/>
|
|
29
34
|
<InputGroupText>.00</InputGroupText>
|
|
30
35
|
</InputGroup>
|
|
31
36
|
</React.Fragment>
|
|
@@ -4,7 +4,7 @@ import { Button, TextArea, InputGroup } from '@patternfly/react-core';
|
|
|
4
4
|
export const InputGroupWithTextarea: React.FunctionComponent = () => (
|
|
5
5
|
<React.Fragment>
|
|
6
6
|
<InputGroup>
|
|
7
|
-
<TextArea name="
|
|
7
|
+
<TextArea name="inputGroup-with-textarea" id="inputGroup-with-textarea" aria-label="textarea with button" />
|
|
8
8
|
<Button id="textAreaButton2" variant="control">
|
|
9
9
|
Button
|
|
10
10
|
</Button>
|