@patternfly/react-core 4.202.16 → 4.202.19
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/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/esm/components/CalendarMonth/CalendarMonth.js +12 -4
- package/dist/esm/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.js +12 -4
- package/dist/js/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/umd/react-core.js +12 -4
- package/dist/umd/react-core.min.css +460 -460
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +5 -5
- package/src/components/CalendarMonth/CalendarMonth.tsx +10 -4
- package/src/components/CalendarMonth/examples/CalendarMonth.md +9 -0
- package/src/components/CalendarMonth/examples/CalendarMonthDateRange.tsx +10 -0
- package/src/components/ContextSelector/examples/ContextSelector.md +3 -279
- package/src/components/ContextSelector/examples/ContextSelectorBasic.tsx +84 -0
- package/src/components/ContextSelector/examples/ContextSelectorPlainText.tsx +85 -0
- package/src/components/ContextSelector/examples/ContextSelectorWithFooter.tsx +91 -0
- package/src/components/DescriptionList/examples/DescriptionList.md +22 -930
- package/src/components/DescriptionList/examples/DescriptionListAutoFitBasic.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthModified.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthResponsive.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListBasic.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListColumnFill.tsx +42 -0
- package/src/components/DescriptionList/examples/DescriptionListCompact.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListCompactHorizontal.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListDefaultAutoColumn.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListDefaultInlineGrid.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListDefaultResponsiveColumns.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListDefaultThreeColLg.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListDefaultTwoCol.tsx +44 -0
- package/src/components/DescriptionList/examples/DescriptionListFluidHorizontal.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListHorizontal.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListHorizontalAutoColumn.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListHorizontalCustomTermWidth.tsx +50 -0
- package/src/components/DescriptionList/examples/DescriptionListHorizontalResponsiveColumns.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListHorizontalThreeColLg.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListHorizontalTwoCol.tsx +40 -0
- package/src/components/DescriptionList/examples/DescriptionListIconsOnTerms.tsx +45 -0
- package/src/components/DescriptionList/examples/DescriptionListResponsiveHoriVertGroup.tsx +48 -0
- package/src/components/DescriptionList/examples/DescriptionListWithTermHelpText.tsx +62 -0
- package/src/components/Divider/examples/Divider.md +15 -68
- package/src/components/Divider/examples/DividerInsetMedium.tsx +4 -0
- package/src/components/Divider/examples/DividerInsetVariousBreakpoints.tsx +13 -0
- package/src/components/Divider/examples/DividerUsingDiv.tsx +4 -0
- package/src/components/Divider/examples/DividerUsingHr.tsx +4 -0
- package/src/components/Divider/examples/DividerUsingLi.tsx +10 -0
- package/src/components/Divider/examples/DividerVerticalFlex.tsx +10 -0
- package/src/components/Divider/examples/DividerVerticalFlexInsetMedium.tsx +10 -0
- package/src/components/Divider/examples/DividerVerticalFlexInsetVariousBreakpoints.tsx +18 -0
- package/src/components/FormSelect/__tests__/FormSelect.test.tsx +0 -1
- package/src/components/List/__tests__/List.test.tsx +33 -33
- package/src/components/List/__tests__/__snapshots__/List.test.tsx.snap +33 -64
- package/src/components/Menu/__tests__/Menu.test.tsx +37 -33
- package/src/components/Menu/__tests__/__snapshots__/Menu.test.tsx.snap +3 -36
- package/src/components/Modal/__tests__/Modal.test.tsx +65 -67
- package/src/components/Modal/__tests__/ModalBoxCloseButton.test.tsx +13 -10
- package/src/components/Nav/__tests__/Nav.test.tsx +185 -214
- package/src/components/Nav/__tests__/__snapshots__/Nav.test.tsx.snap +877 -1729
- package/src/components/NotificationDrawer/__tests__/NotificationDrawer.test.tsx +13 -15
- package/src/components/NotificationDrawer/__tests__/NotificationDrawerBody.test.tsx +13 -15
- package/src/components/NotificationDrawer/__tests__/NotificationDrawerGroup.test.tsx +21 -27
- package/src/components/NotificationDrawer/__tests__/NotificationDrawerGroupList.test.tsx +13 -15
- package/src/components/NotificationDrawer/__tests__/NotificationDrawerHeader.test.tsx +25 -27
- package/src/components/NotificationDrawer/__tests__/NotificationDrawerList.test.tsx +17 -19
- package/src/components/NotificationDrawer/__tests__/NotificationDrawerListItem.test.tsx +20 -27
- package/src/components/NotificationDrawer/__tests__/NotificationDrawerListItemBody.test.tsx +17 -13
- package/src/components/NotificationDrawer/__tests__/NotificationDrawerListItemHeader.test.tsx +30 -25
- package/src/components/NotificationDrawer/__tests__/__snapshots__/NotificationDrawer.test.tsx.snap +3 -5
- package/src/components/NotificationDrawer/__tests__/__snapshots__/NotificationDrawerBody.test.tsx.snap +3 -5
- package/src/components/NotificationDrawer/__tests__/__snapshots__/NotificationDrawerGroup.test.tsx.snap +9 -11
- package/src/components/NotificationDrawer/__tests__/__snapshots__/NotificationDrawerGroupList.test.tsx.snap +3 -5
- package/src/components/NotificationDrawer/__tests__/__snapshots__/NotificationDrawerHeader.test.tsx.snap +16 -18
- package/src/components/NotificationDrawer/__tests__/__snapshots__/NotificationDrawerList.test.tsx.snap +7 -8
- package/src/components/NotificationDrawer/__tests__/__snapshots__/NotificationDrawerListItem.test.tsx.snap +3 -5
- package/src/components/NotificationDrawer/__tests__/__snapshots__/NotificationDrawerListItemBody.test.tsx.snap +6 -8
- package/src/components/NotificationDrawer/__tests__/__snapshots__/NotificationDrawerListItemHeader.test.tsx.snap +12 -14
- package/src/components/OverflowMenu/__tests__/OverflowMenu.test.tsx +15 -12
- package/src/components/OverflowMenu/__tests__/OverflowMenuControl.test.tsx +9 -8
- package/src/components/OverflowMenu/__tests__/OverflowMenuGroup.test.tsx +17 -18
- package/src/components/OverflowMenu/__tests__/OverflowMenuItem.test.tsx +10 -9
- package/src/components/OverflowMenu/__tests__/__snapshots__/OverflowMenu.test.tsx.snap +6 -16
- package/src/components/OverflowMenu/__tests__/__snapshots__/OverflowMenuControl.test.tsx.snap +3 -15
- package/src/components/OverflowMenu/__tests__/__snapshots__/OverflowMenuItem.test.tsx.snap +3 -17
- package/src/components/Modal/__tests__/__snapshots__/ModalBoxCloseButton.test.tsx.snap +0 -16
- package/src/components/OverflowMenu/__tests__/__snapshots__/OverflowMenuGroup.test.tsx.snap +0 -33
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
DescriptionList,
|
|
5
|
+
DescriptionListTerm,
|
|
6
|
+
DescriptionListGroup,
|
|
7
|
+
DescriptionListDescription
|
|
8
|
+
} from '@patternfly/react-core';
|
|
9
|
+
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
|
|
10
|
+
|
|
11
|
+
export const DescriptionListHorizontalCustomTermWidth: React.FunctionComponent = () => (
|
|
12
|
+
<DescriptionList
|
|
13
|
+
isHorizontal
|
|
14
|
+
horizontalTermWidthModifier={{
|
|
15
|
+
default: '12ch',
|
|
16
|
+
sm: '15ch',
|
|
17
|
+
md: '20ch',
|
|
18
|
+
lg: '28ch',
|
|
19
|
+
xl: '30ch',
|
|
20
|
+
'2xl': '35ch'
|
|
21
|
+
}}
|
|
22
|
+
>
|
|
23
|
+
<DescriptionListGroup>
|
|
24
|
+
<DescriptionListTerm>Name longer than the default term width</DescriptionListTerm>
|
|
25
|
+
<DescriptionListDescription>Example</DescriptionListDescription>
|
|
26
|
+
</DescriptionListGroup>
|
|
27
|
+
<DescriptionListGroup>
|
|
28
|
+
<DescriptionListTerm>Namespace</DescriptionListTerm>
|
|
29
|
+
<DescriptionListDescription>
|
|
30
|
+
<a href="#">mary-test</a>
|
|
31
|
+
</DescriptionListDescription>
|
|
32
|
+
</DescriptionListGroup>
|
|
33
|
+
<DescriptionListGroup>
|
|
34
|
+
<DescriptionListTerm>Labels</DescriptionListTerm>
|
|
35
|
+
<DescriptionListDescription>example</DescriptionListDescription>
|
|
36
|
+
</DescriptionListGroup>
|
|
37
|
+
<DescriptionListGroup>
|
|
38
|
+
<DescriptionListTerm>Pod selector</DescriptionListTerm>
|
|
39
|
+
<DescriptionListDescription>
|
|
40
|
+
<Button variant="link" isInline icon={<PlusCircleIcon />}>
|
|
41
|
+
app=MyApp
|
|
42
|
+
</Button>
|
|
43
|
+
</DescriptionListDescription>
|
|
44
|
+
</DescriptionListGroup>
|
|
45
|
+
<DescriptionListGroup>
|
|
46
|
+
<DescriptionListTerm>Annotation</DescriptionListTerm>
|
|
47
|
+
<DescriptionListDescription>2 Annotations</DescriptionListDescription>
|
|
48
|
+
</DescriptionListGroup>
|
|
49
|
+
</DescriptionList>
|
|
50
|
+
);
|
package/src/components/DescriptionList/examples/DescriptionListHorizontalResponsiveColumns.tsx
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
DescriptionList,
|
|
5
|
+
DescriptionListTerm,
|
|
6
|
+
DescriptionListGroup,
|
|
7
|
+
DescriptionListDescription
|
|
8
|
+
} from '@patternfly/react-core';
|
|
9
|
+
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
|
|
10
|
+
|
|
11
|
+
export const DescriptionListHorizontalResponsiveColumns: React.FunctionComponent = () => (
|
|
12
|
+
<DescriptionList isHorizontal columnModifier={{ lg: '2Col', xl: '3Col' }}>
|
|
13
|
+
<DescriptionListGroup>
|
|
14
|
+
<DescriptionListTerm>Name</DescriptionListTerm>
|
|
15
|
+
<DescriptionListDescription>Example</DescriptionListDescription>
|
|
16
|
+
</DescriptionListGroup>
|
|
17
|
+
<DescriptionListGroup>
|
|
18
|
+
<DescriptionListTerm>Namespace</DescriptionListTerm>
|
|
19
|
+
<DescriptionListDescription>
|
|
20
|
+
<a href="#">mary-test</a>
|
|
21
|
+
</DescriptionListDescription>
|
|
22
|
+
</DescriptionListGroup>
|
|
23
|
+
<DescriptionListGroup>
|
|
24
|
+
<DescriptionListTerm>Labels</DescriptionListTerm>
|
|
25
|
+
<DescriptionListDescription>example</DescriptionListDescription>
|
|
26
|
+
</DescriptionListGroup>
|
|
27
|
+
<DescriptionListGroup>
|
|
28
|
+
<DescriptionListTerm>Pod selector</DescriptionListTerm>
|
|
29
|
+
<DescriptionListDescription>
|
|
30
|
+
<Button variant="link" isInline icon={<PlusCircleIcon />}>
|
|
31
|
+
app=MyApp
|
|
32
|
+
</Button>
|
|
33
|
+
</DescriptionListDescription>
|
|
34
|
+
</DescriptionListGroup>
|
|
35
|
+
<DescriptionListGroup>
|
|
36
|
+
<DescriptionListTerm>Annotation</DescriptionListTerm>
|
|
37
|
+
<DescriptionListDescription>2 Annotations</DescriptionListDescription>
|
|
38
|
+
</DescriptionListGroup>
|
|
39
|
+
</DescriptionList>
|
|
40
|
+
);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
DescriptionList,
|
|
5
|
+
DescriptionListTerm,
|
|
6
|
+
DescriptionListGroup,
|
|
7
|
+
DescriptionListDescription
|
|
8
|
+
} from '@patternfly/react-core';
|
|
9
|
+
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
|
|
10
|
+
|
|
11
|
+
export const DescriptionListHorizontalThreeColLg: React.FunctionComponent = () => (
|
|
12
|
+
<DescriptionList isHorizontal columnModifier={{ lg: '3Col' }}>
|
|
13
|
+
<DescriptionListGroup>
|
|
14
|
+
<DescriptionListTerm>Name</DescriptionListTerm>
|
|
15
|
+
<DescriptionListDescription>Example</DescriptionListDescription>
|
|
16
|
+
</DescriptionListGroup>
|
|
17
|
+
<DescriptionListGroup>
|
|
18
|
+
<DescriptionListTerm>Namespace</DescriptionListTerm>
|
|
19
|
+
<DescriptionListDescription>
|
|
20
|
+
<a href="#">mary-test</a>
|
|
21
|
+
</DescriptionListDescription>
|
|
22
|
+
</DescriptionListGroup>
|
|
23
|
+
<DescriptionListGroup>
|
|
24
|
+
<DescriptionListTerm>Labels</DescriptionListTerm>
|
|
25
|
+
<DescriptionListDescription>example</DescriptionListDescription>
|
|
26
|
+
</DescriptionListGroup>
|
|
27
|
+
<DescriptionListGroup>
|
|
28
|
+
<DescriptionListTerm>Pod selector</DescriptionListTerm>
|
|
29
|
+
<DescriptionListDescription>
|
|
30
|
+
<Button variant="link" isInline icon={<PlusCircleIcon />}>
|
|
31
|
+
app=MyApp
|
|
32
|
+
</Button>
|
|
33
|
+
</DescriptionListDescription>
|
|
34
|
+
</DescriptionListGroup>
|
|
35
|
+
<DescriptionListGroup>
|
|
36
|
+
<DescriptionListTerm>Annotation</DescriptionListTerm>
|
|
37
|
+
<DescriptionListDescription>2 Annotations</DescriptionListDescription>
|
|
38
|
+
</DescriptionListGroup>
|
|
39
|
+
</DescriptionList>
|
|
40
|
+
);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
DescriptionList,
|
|
5
|
+
DescriptionListTerm,
|
|
6
|
+
DescriptionListGroup,
|
|
7
|
+
DescriptionListDescription
|
|
8
|
+
} from '@patternfly/react-core';
|
|
9
|
+
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
|
|
10
|
+
|
|
11
|
+
export const DescriptionListHorizontalTwoCol: React.FunctionComponent = () => (
|
|
12
|
+
<DescriptionList isHorizontal columnModifier={{ default: '2Col' }}>
|
|
13
|
+
<DescriptionListGroup>
|
|
14
|
+
<DescriptionListTerm>Name</DescriptionListTerm>
|
|
15
|
+
<DescriptionListDescription>Example</DescriptionListDescription>
|
|
16
|
+
</DescriptionListGroup>
|
|
17
|
+
<DescriptionListGroup>
|
|
18
|
+
<DescriptionListTerm>Namespace</DescriptionListTerm>
|
|
19
|
+
<DescriptionListDescription>
|
|
20
|
+
<a href="#">mary-test</a>
|
|
21
|
+
</DescriptionListDescription>
|
|
22
|
+
</DescriptionListGroup>
|
|
23
|
+
<DescriptionListGroup>
|
|
24
|
+
<DescriptionListTerm>Labels</DescriptionListTerm>
|
|
25
|
+
<DescriptionListDescription>example</DescriptionListDescription>
|
|
26
|
+
</DescriptionListGroup>
|
|
27
|
+
<DescriptionListGroup>
|
|
28
|
+
<DescriptionListTerm>Pod selector</DescriptionListTerm>
|
|
29
|
+
<DescriptionListDescription>
|
|
30
|
+
<Button variant="link" isInline icon={<PlusCircleIcon />}>
|
|
31
|
+
app=MyApp
|
|
32
|
+
</Button>
|
|
33
|
+
</DescriptionListDescription>
|
|
34
|
+
</DescriptionListGroup>
|
|
35
|
+
<DescriptionListGroup>
|
|
36
|
+
<DescriptionListTerm>Annotation</DescriptionListTerm>
|
|
37
|
+
<DescriptionListDescription>2 Annotations</DescriptionListDescription>
|
|
38
|
+
</DescriptionListGroup>
|
|
39
|
+
</DescriptionList>
|
|
40
|
+
);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
DescriptionList,
|
|
5
|
+
DescriptionListTerm,
|
|
6
|
+
DescriptionListGroup,
|
|
7
|
+
DescriptionListDescription
|
|
8
|
+
} from '@patternfly/react-core';
|
|
9
|
+
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
|
|
10
|
+
import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
|
|
11
|
+
import BookIcon from '@patternfly/react-icons/dist/esm/icons/book-icon';
|
|
12
|
+
import KeyIcon from '@patternfly/react-icons/dist/esm/icons/key-icon';
|
|
13
|
+
import GlobeIcon from '@patternfly/react-icons/dist/esm/icons/globe-icon';
|
|
14
|
+
import FlagIcon from '@patternfly/react-icons/dist/esm/icons/flag-icon';
|
|
15
|
+
|
|
16
|
+
export const DescriptionListIconsOnTerms: React.FunctionComponent = () => (
|
|
17
|
+
<DescriptionList>
|
|
18
|
+
<DescriptionListGroup>
|
|
19
|
+
<DescriptionListTerm icon={<CubeIcon />}>Name</DescriptionListTerm>
|
|
20
|
+
<DescriptionListDescription>Example</DescriptionListDescription>
|
|
21
|
+
</DescriptionListGroup>
|
|
22
|
+
<DescriptionListGroup>
|
|
23
|
+
<DescriptionListTerm icon={<BookIcon />}>Namespace</DescriptionListTerm>
|
|
24
|
+
<DescriptionListDescription>
|
|
25
|
+
<a href="#">mary-test</a>
|
|
26
|
+
</DescriptionListDescription>
|
|
27
|
+
</DescriptionListGroup>
|
|
28
|
+
<DescriptionListGroup>
|
|
29
|
+
<DescriptionListTerm icon={<KeyIcon />}>Labels</DescriptionListTerm>
|
|
30
|
+
<DescriptionListDescription>example</DescriptionListDescription>
|
|
31
|
+
</DescriptionListGroup>
|
|
32
|
+
<DescriptionListGroup>
|
|
33
|
+
<DescriptionListTerm icon={<GlobeIcon />}>Pod selector</DescriptionListTerm>
|
|
34
|
+
<DescriptionListDescription>
|
|
35
|
+
<Button variant="link" isInline icon={<PlusCircleIcon />}>
|
|
36
|
+
app=MyApp
|
|
37
|
+
</Button>
|
|
38
|
+
</DescriptionListDescription>
|
|
39
|
+
</DescriptionListGroup>
|
|
40
|
+
<DescriptionListGroup>
|
|
41
|
+
<DescriptionListTerm icon={<FlagIcon />}>Annotation</DescriptionListTerm>
|
|
42
|
+
<DescriptionListDescription>2 Annotations</DescriptionListDescription>
|
|
43
|
+
</DescriptionListGroup>
|
|
44
|
+
</DescriptionList>
|
|
45
|
+
);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
DescriptionList,
|
|
5
|
+
DescriptionListTerm,
|
|
6
|
+
DescriptionListGroup,
|
|
7
|
+
DescriptionListDescription
|
|
8
|
+
} from '@patternfly/react-core';
|
|
9
|
+
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
|
|
10
|
+
|
|
11
|
+
export const DescriptionListResponsiveHoriVertGroup: React.FunctionComponent = () => (
|
|
12
|
+
<DescriptionList
|
|
13
|
+
isHorizontal
|
|
14
|
+
orientation={{
|
|
15
|
+
md: 'vertical',
|
|
16
|
+
lg: 'horizontal',
|
|
17
|
+
xl: 'vertical',
|
|
18
|
+
'2xl': 'horizontal'
|
|
19
|
+
}}
|
|
20
|
+
>
|
|
21
|
+
<DescriptionListGroup>
|
|
22
|
+
<DescriptionListTerm>Name</DescriptionListTerm>
|
|
23
|
+
<DescriptionListDescription>Example</DescriptionListDescription>
|
|
24
|
+
</DescriptionListGroup>
|
|
25
|
+
<DescriptionListGroup>
|
|
26
|
+
<DescriptionListTerm>Namespace</DescriptionListTerm>
|
|
27
|
+
<DescriptionListDescription>
|
|
28
|
+
<a href="#">mary-test</a>
|
|
29
|
+
</DescriptionListDescription>
|
|
30
|
+
</DescriptionListGroup>
|
|
31
|
+
<DescriptionListGroup>
|
|
32
|
+
<DescriptionListTerm>Labels</DescriptionListTerm>
|
|
33
|
+
<DescriptionListDescription>example</DescriptionListDescription>
|
|
34
|
+
</DescriptionListGroup>
|
|
35
|
+
<DescriptionListGroup>
|
|
36
|
+
<DescriptionListTerm>Pod selector</DescriptionListTerm>
|
|
37
|
+
<DescriptionListDescription>
|
|
38
|
+
<Button variant="link" isInline icon={<PlusCircleIcon />}>
|
|
39
|
+
app=MyApp
|
|
40
|
+
</Button>
|
|
41
|
+
</DescriptionListDescription>
|
|
42
|
+
</DescriptionListGroup>
|
|
43
|
+
<DescriptionListGroup>
|
|
44
|
+
<DescriptionListTerm>Annotation</DescriptionListTerm>
|
|
45
|
+
<DescriptionListDescription>2 Annotations</DescriptionListDescription>
|
|
46
|
+
</DescriptionListGroup>
|
|
47
|
+
</DescriptionList>
|
|
48
|
+
);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
DescriptionList,
|
|
5
|
+
DescriptionListGroup,
|
|
6
|
+
DescriptionListDescription,
|
|
7
|
+
DescriptionListTermHelpText,
|
|
8
|
+
DescriptionListTermHelpTextButton,
|
|
9
|
+
Popover
|
|
10
|
+
} from '@patternfly/react-core';
|
|
11
|
+
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
|
|
12
|
+
|
|
13
|
+
export const DescriptionListWithTermHelpText: React.FunctionComponent = () => (
|
|
14
|
+
<DescriptionList>
|
|
15
|
+
<DescriptionListGroup>
|
|
16
|
+
<DescriptionListTermHelpText>
|
|
17
|
+
<Popover headerContent={<div>Name</div>} bodyContent={<div>Additional name info</div>}>
|
|
18
|
+
<DescriptionListTermHelpTextButton> Name </DescriptionListTermHelpTextButton>
|
|
19
|
+
</Popover>
|
|
20
|
+
</DescriptionListTermHelpText>
|
|
21
|
+
<DescriptionListDescription>Example</DescriptionListDescription>
|
|
22
|
+
</DescriptionListGroup>
|
|
23
|
+
<DescriptionListGroup>
|
|
24
|
+
<DescriptionListTermHelpText>
|
|
25
|
+
<Popover headerContent={<div>Namespace</div>} bodyContent={<div>Additional namespace info</div>}>
|
|
26
|
+
<DescriptionListTermHelpTextButton> Namespace </DescriptionListTermHelpTextButton>
|
|
27
|
+
</Popover>
|
|
28
|
+
</DescriptionListTermHelpText>
|
|
29
|
+
<DescriptionListDescription>
|
|
30
|
+
<a href="#">mary-test</a>
|
|
31
|
+
</DescriptionListDescription>
|
|
32
|
+
</DescriptionListGroup>
|
|
33
|
+
<DescriptionListGroup>
|
|
34
|
+
<DescriptionListTermHelpText>
|
|
35
|
+
<Popover headerContent={<div>Labels</div>} bodyContent={<div>Additional labels info</div>}>
|
|
36
|
+
<DescriptionListTermHelpTextButton> Labels </DescriptionListTermHelpTextButton>
|
|
37
|
+
</Popover>
|
|
38
|
+
</DescriptionListTermHelpText>
|
|
39
|
+
<DescriptionListDescription>example</DescriptionListDescription>
|
|
40
|
+
</DescriptionListGroup>
|
|
41
|
+
<DescriptionListGroup>
|
|
42
|
+
<DescriptionListTermHelpText>
|
|
43
|
+
<Popover headerContent={<div>Pod selector</div>} bodyContent={<div>Additional pod selector info</div>}>
|
|
44
|
+
<DescriptionListTermHelpTextButton> Pod selector </DescriptionListTermHelpTextButton>
|
|
45
|
+
</Popover>
|
|
46
|
+
</DescriptionListTermHelpText>
|
|
47
|
+
<DescriptionListDescription>
|
|
48
|
+
<Button variant="link" isInline icon={<PlusCircleIcon />}>
|
|
49
|
+
app=MyApp
|
|
50
|
+
</Button>
|
|
51
|
+
</DescriptionListDescription>
|
|
52
|
+
</DescriptionListGroup>
|
|
53
|
+
<DescriptionListGroup>
|
|
54
|
+
<DescriptionListTermHelpText>
|
|
55
|
+
<Popover headerContent={<div>Annotation</div>} bodyContent={<div>Additional annotation info</div>}>
|
|
56
|
+
<DescriptionListTermHelpTextButton> Annotation </DescriptionListTermHelpTextButton>
|
|
57
|
+
</Popover>
|
|
58
|
+
</DescriptionListTermHelpText>
|
|
59
|
+
<DescriptionListDescription>2 Annotations</DescriptionListDescription>
|
|
60
|
+
</DescriptionListGroup>
|
|
61
|
+
</DescriptionList>
|
|
62
|
+
);
|
|
@@ -6,96 +6,43 @@ propComponents: ['Divider']
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
## Examples
|
|
9
|
+
|
|
9
10
|
### Using hr
|
|
10
|
-
```js
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import { Divider } from '@patternfly/react-core';
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
```ts file='./DividerUsingHr.tsx'
|
|
15
13
|
```
|
|
16
14
|
|
|
17
15
|
### Using li
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import { Divider } from '@patternfly/react-core/dist';
|
|
21
|
-
|
|
22
|
-
<ul>
|
|
23
|
-
<li>List item one</li>
|
|
24
|
-
<Divider component="li"/>
|
|
25
|
-
<li>List item two</li>
|
|
26
|
-
</ul>
|
|
16
|
+
|
|
17
|
+
```ts file='./DividerUsingLi.tsx'
|
|
27
18
|
```
|
|
28
19
|
|
|
29
20
|
### Using div
|
|
30
|
-
```js
|
|
31
|
-
import React from 'react';
|
|
32
|
-
import { Divider } from '@patternfly/react-core';
|
|
33
21
|
|
|
34
|
-
|
|
22
|
+
```ts file='./DividerUsingDiv.tsx'
|
|
35
23
|
```
|
|
36
24
|
|
|
37
25
|
### Inset medium
|
|
38
|
-
```js
|
|
39
|
-
import React from 'react';
|
|
40
|
-
import { Divider } from '@patternfly/react-core';
|
|
41
26
|
|
|
42
|
-
|
|
27
|
+
```ts file='./DividerInsetMedium.tsx'
|
|
43
28
|
```
|
|
44
29
|
|
|
45
30
|
### Inset at various breakpoints
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
import { Divider } from '@patternfly/react-core';
|
|
49
|
-
|
|
50
|
-
<Divider
|
|
51
|
-
inset={{
|
|
52
|
-
default: 'insetMd',
|
|
53
|
-
md: 'insetNone',
|
|
54
|
-
lg: 'inset3xl',
|
|
55
|
-
xl: 'insetLg'
|
|
56
|
-
}}
|
|
57
|
-
/>
|
|
31
|
+
|
|
32
|
+
```ts file='./DividerInsetVariousBreakpoints.tsx'
|
|
58
33
|
```
|
|
59
34
|
|
|
60
35
|
### Vertical in flex layout
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
import { Divider, Flex, FlexItem } from '@patternfly/react-core';
|
|
64
|
-
|
|
65
|
-
<Flex>
|
|
66
|
-
<FlexItem>first item</FlexItem>
|
|
67
|
-
<Divider isVertical/>
|
|
68
|
-
<FlexItem>second item</FlexItem>
|
|
69
|
-
</Flex>
|
|
36
|
+
|
|
37
|
+
```ts file='./DividerVerticalFlex.tsx'
|
|
70
38
|
```
|
|
71
39
|
|
|
72
|
-
### Vertical
|
|
73
|
-
```js
|
|
74
|
-
import React from 'react';
|
|
75
|
-
import { Divider, Flex, FlexItem } from '@patternfly/react-core';
|
|
40
|
+
### Vertical in flex layout, inset medium
|
|
76
41
|
|
|
77
|
-
|
|
78
|
-
<FlexItem>first item</FlexItem>
|
|
79
|
-
<Divider isVertical inset={{default: 'insetMd'}}/>
|
|
80
|
-
<FlexItem>second item</FlexItem>
|
|
81
|
-
</Flex>
|
|
42
|
+
```ts file='./DividerVerticalFlexInsetMedium.tsx'
|
|
82
43
|
```
|
|
83
44
|
|
|
84
|
-
### Vertical, inset at various breakpoints
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
import { Divider, Flex, FlexItem } from '@patternfly/react-core';
|
|
88
|
-
|
|
89
|
-
<Flex>
|
|
90
|
-
<FlexItem>first item</FlexItem>
|
|
91
|
-
<Divider isVertical
|
|
92
|
-
inset={{
|
|
93
|
-
default: 'insetMd',
|
|
94
|
-
md: 'insetNone',
|
|
95
|
-
lg: 'insetSm',
|
|
96
|
-
xl: 'insetXs'
|
|
97
|
-
}}
|
|
98
|
-
/>
|
|
99
|
-
<FlexItem>first item</FlexItem>
|
|
100
|
-
</Flex>
|
|
45
|
+
### Vertical in flex layout, inset at various breakpoints
|
|
46
|
+
|
|
47
|
+
```ts file='./DividerVerticalFlexInsetVariousBreakpoints.tsx'
|
|
101
48
|
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Divider } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const DividerInsetVariousBreakpoints: React.FunctionComponent = () => (
|
|
5
|
+
<Divider
|
|
6
|
+
inset={{
|
|
7
|
+
default: 'insetMd',
|
|
8
|
+
md: 'insetNone',
|
|
9
|
+
lg: 'inset3xl',
|
|
10
|
+
xl: 'insetLg'
|
|
11
|
+
}}
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Divider, Flex, FlexItem } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const DividerVerticalFlex: React.FunctionComponent = () => (
|
|
5
|
+
<Flex>
|
|
6
|
+
<FlexItem>first item</FlexItem>
|
|
7
|
+
<Divider isVertical />
|
|
8
|
+
<FlexItem>second item</FlexItem>
|
|
9
|
+
</Flex>
|
|
10
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Divider, Flex, FlexItem } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const DividerVerticalFlexInsetMedium: React.FunctionComponent = () => (
|
|
5
|
+
<Flex>
|
|
6
|
+
<FlexItem>first item</FlexItem>
|
|
7
|
+
<Divider isVertical inset={{ default: 'insetMd' }} />
|
|
8
|
+
<FlexItem>second item</FlexItem>
|
|
9
|
+
</Flex>
|
|
10
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Divider, Flex, FlexItem } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const DividerVerticalFlexInsetVariousBreakpoints: React.FunctionComponent = () => (
|
|
5
|
+
<Flex>
|
|
6
|
+
<FlexItem>first item</FlexItem>
|
|
7
|
+
<Divider
|
|
8
|
+
isVertical
|
|
9
|
+
inset={{
|
|
10
|
+
default: 'insetMd',
|
|
11
|
+
md: 'insetNone',
|
|
12
|
+
lg: 'insetSm',
|
|
13
|
+
xl: 'insetXs'
|
|
14
|
+
}}
|
|
15
|
+
/>
|
|
16
|
+
<FlexItem>first item</FlexItem>
|
|
17
|
+
</Flex>
|
|
18
|
+
);
|
|
@@ -4,7 +4,6 @@ import { render, screen } from '@testing-library/react';
|
|
|
4
4
|
import userEvent from '@testing-library/user-event';
|
|
5
5
|
import '@testing-library/jest-dom';
|
|
6
6
|
|
|
7
|
-
import { Form } from '../../Form';
|
|
8
7
|
import { FormSelect } from '../FormSelect';
|
|
9
8
|
import { FormSelectOption } from '../FormSelectOption';
|
|
10
9
|
import { FormSelectOptionGroup } from '../FormSelectOptionGroup';
|