@patternfly/react-core 4.164.1 → 4.168.4
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 +145 -0
- package/README.md +1 -1
- package/dist/esm/components/Dropdown/DropdownToggle.d.ts +1 -1
- package/dist/esm/components/Dropdown/DropdownToggle.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/KebabToggle.d.ts +1 -1
- package/dist/esm/components/Dropdown/KebabToggle.d.ts.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelector.d.ts +1 -0
- package/dist/esm/components/DualListSelector/DualListSelector.d.ts.map +1 -1
- package/dist/esm/components/DualListSelector/DualListSelector.js +23 -10
- package/dist/esm/components/DualListSelector/DualListSelector.js.map +1 -1
- package/dist/esm/components/Label/Label.d.ts +2 -0
- package/dist/esm/components/Label/Label.d.ts.map +1 -1
- package/dist/esm/components/Label/Label.js +2 -2
- package/dist/esm/components/Label/Label.js.map +1 -1
- package/dist/esm/components/LabelGroup/LabelGroup.d.ts +2 -0
- package/dist/esm/components/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/dist/esm/components/LabelGroup/LabelGroup.js +5 -3
- package/dist/esm/components/LabelGroup/LabelGroup.js.map +1 -1
- package/dist/esm/components/ProgressStepper/ProgressStep.d.ts +5 -1
- package/dist/esm/components/ProgressStepper/ProgressStep.d.ts.map +1 -1
- package/dist/esm/components/ProgressStepper/ProgressStep.js +7 -3
- package/dist/esm/components/ProgressStepper/ProgressStep.js.map +1 -1
- package/dist/esm/components/Select/SelectOption.d.ts +1 -1
- package/dist/esm/components/Select/SelectOption.d.ts.map +1 -1
- package/dist/esm/components/Tabs/TabContentBody.d.ts +11 -0
- package/dist/esm/components/Tabs/TabContentBody.d.ts.map +1 -0
- package/dist/esm/components/Tabs/TabContentBody.js +10 -0
- package/dist/esm/components/Tabs/TabContentBody.js.map +1 -0
- package/dist/esm/components/Tabs/index.d.ts +1 -0
- package/dist/esm/components/Tabs/index.d.ts.map +1 -1
- package/dist/esm/components/Tabs/index.js +1 -0
- package/dist/esm/components/Tabs/index.js.map +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroup.d.ts +9 -0
- package/dist/esm/components/TextInputGroup/TextInputGroup.d.ts.map +1 -0
- package/dist/esm/components/TextInputGroup/TextInputGroup.js +10 -0
- package/dist/esm/components/TextInputGroup/TextInputGroup.js.map +1 -0
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.d.ts +15 -0
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.d.ts.map +1 -0
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.js +15 -0
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.js.map +1 -0
- package/dist/esm/components/TextInputGroup/TextInputGroupUtilities.d.ts +9 -0
- package/dist/esm/components/TextInputGroup/TextInputGroupUtilities.d.ts.map +1 -0
- package/dist/esm/components/TextInputGroup/TextInputGroupUtilities.js +10 -0
- package/dist/esm/components/TextInputGroup/TextInputGroupUtilities.js.map +1 -0
- package/dist/esm/components/TextInputGroup/index.d.ts +4 -0
- package/dist/esm/components/TextInputGroup/index.d.ts.map +1 -0
- package/dist/esm/components/TextInputGroup/index.js +4 -0
- package/dist/esm/components/TextInputGroup/index.js.map +1 -0
- package/dist/esm/components/Toolbar/Toolbar.d.ts +2 -0
- package/dist/esm/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.js +2 -2
- package/dist/esm/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/js/components/Dropdown/DropdownToggle.d.ts +1 -1
- package/dist/js/components/Dropdown/DropdownToggle.d.ts.map +1 -1
- package/dist/js/components/Dropdown/KebabToggle.d.ts +1 -1
- package/dist/js/components/Dropdown/KebabToggle.d.ts.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelector.d.ts +1 -0
- package/dist/js/components/DualListSelector/DualListSelector.d.ts.map +1 -1
- package/dist/js/components/DualListSelector/DualListSelector.js +23 -10
- package/dist/js/components/DualListSelector/DualListSelector.js.map +1 -1
- package/dist/js/components/Label/Label.d.ts +2 -0
- package/dist/js/components/Label/Label.d.ts.map +1 -1
- package/dist/js/components/Label/Label.js +2 -2
- package/dist/js/components/Label/Label.js.map +1 -1
- package/dist/js/components/LabelGroup/LabelGroup.d.ts +2 -0
- package/dist/js/components/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/dist/js/components/LabelGroup/LabelGroup.js +5 -3
- package/dist/js/components/LabelGroup/LabelGroup.js.map +1 -1
- package/dist/js/components/ProgressStepper/ProgressStep.d.ts +5 -1
- package/dist/js/components/ProgressStepper/ProgressStep.d.ts.map +1 -1
- package/dist/js/components/ProgressStepper/ProgressStep.js +7 -4
- package/dist/js/components/ProgressStepper/ProgressStep.js.map +1 -1
- package/dist/js/components/Select/SelectOption.d.ts +1 -1
- package/dist/js/components/Select/SelectOption.d.ts.map +1 -1
- package/dist/js/components/Tabs/TabContentBody.d.ts +11 -0
- package/dist/js/components/Tabs/TabContentBody.d.ts.map +1 -0
- package/dist/js/components/Tabs/TabContentBody.js +14 -0
- package/dist/js/components/Tabs/TabContentBody.js.map +1 -0
- package/dist/js/components/Tabs/index.d.ts +1 -0
- package/dist/js/components/Tabs/index.d.ts.map +1 -1
- package/dist/js/components/Tabs/index.js +1 -0
- package/dist/js/components/Tabs/index.js.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroup.d.ts +9 -0
- package/dist/js/components/TextInputGroup/TextInputGroup.d.ts.map +1 -0
- package/dist/js/components/TextInputGroup/TextInputGroup.js +14 -0
- package/dist/js/components/TextInputGroup/TextInputGroup.js.map +1 -0
- package/dist/js/components/TextInputGroup/TextInputGroupMain.d.ts +15 -0
- package/dist/js/components/TextInputGroup/TextInputGroupMain.d.ts.map +1 -0
- package/dist/js/components/TextInputGroup/TextInputGroupMain.js +19 -0
- package/dist/js/components/TextInputGroup/TextInputGroupMain.js.map +1 -0
- package/dist/js/components/TextInputGroup/TextInputGroupUtilities.d.ts +9 -0
- package/dist/js/components/TextInputGroup/TextInputGroupUtilities.d.ts.map +1 -0
- package/dist/js/components/TextInputGroup/TextInputGroupUtilities.js +14 -0
- package/dist/js/components/TextInputGroup/TextInputGroupUtilities.js.map +1 -0
- package/dist/js/components/TextInputGroup/index.d.ts +4 -0
- package/dist/js/components/TextInputGroup/index.d.ts.map +1 -0
- package/dist/js/components/TextInputGroup/index.js +7 -0
- package/dist/js/components/TextInputGroup/index.js.map +1 -0
- package/dist/js/components/Toolbar/Toolbar.d.ts +2 -0
- package/dist/js/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.js +2 -2
- package/dist/js/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/js/components/index.d.ts +1 -0
- package/dist/js/components/index.d.ts.map +1 -1
- package/dist/js/components/index.js +1 -0
- package/dist/js/components/index.js.map +1 -1
- package/dist/styles/assets/pficon/pficon.woff +0 -0
- package/dist/styles/assets/pficon/pficon.woff2 +0 -0
- package/dist/umd/react-core.css +360 -17
- package/dist/umd/react-core.js +970 -890
- package/dist/umd/react-core.min.css +360 -17
- package/dist/umd/react-core.min.js +3 -3
- package/package.json +6 -6
- package/src/components/Dropdown/DropdownToggle.tsx +1 -1
- package/src/components/Dropdown/KebabToggle.tsx +1 -1
- package/src/components/DualListSelector/DualListSelector.tsx +25 -23
- package/src/components/Label/Label.tsx +4 -0
- package/src/components/Label/__tests__/Generated/__snapshots__/Label.test.tsx.snap +0 -1
- package/src/components/Label/examples/Label.md +72 -42
- package/src/components/LabelGroup/LabelGroup.tsx +10 -1
- package/src/components/LabelGroup/__tests__/LabelGroup.test.tsx +12 -0
- package/src/components/LabelGroup/__tests__/__snapshots__/LabelGroup.test.tsx.snap +8 -0
- package/src/components/Modal/__tests__/ModalBox.test.tsx +11 -21
- package/src/components/Modal/__tests__/ModalBoxDescription.test.tsx +12 -0
- package/src/components/Modal/__tests__/ModalBoxTitle.test.tsx +59 -0
- package/src/components/Modal/__tests__/ModalContent.test.tsx +15 -10
- package/src/components/Modal/__tests__/__snapshots__/ModalBox.test.tsx.snap +12 -30
- package/src/components/Modal/__tests__/__snapshots__/ModalBoxDescription.test.tsx.snap +10 -0
- package/src/components/Modal/__tests__/__snapshots__/ModalBoxTitle.test.tsx.snap +158 -0
- package/src/components/Modal/__tests__/__snapshots__/ModalContent.test.tsx.snap +53 -22
- package/src/components/ProgressStepper/ProgressStep.tsx +18 -4
- package/src/components/ProgressStepper/__tests__/ProgressStepper.test.tsx +5 -0
- package/src/components/ProgressStepper/__tests__/__snapshots__/ProgressStepper.test.tsx.snap +680 -517
- package/src/components/ProgressStepper/examples/ProgressStepper.md +78 -0
- package/src/components/Select/SelectOption.tsx +1 -1
- package/src/components/Tabs/TabContentBody.tsx +24 -0
- package/src/components/Tabs/__tests__/Tabs.test.tsx +4 -3
- package/src/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +10 -2
- package/src/components/Tabs/examples/Tabs.md +40 -0
- package/src/components/Tabs/index.ts +1 -0
- package/src/components/TextInputGroup/TextInputGroup.tsx +22 -0
- package/src/components/TextInputGroup/TextInputGroupMain.tsx +43 -0
- package/src/components/TextInputGroup/TextInputGroupUtilities.tsx +22 -0
- package/src/components/TextInputGroup/__tests__/TextInputGroup.test.tsx +77 -0
- package/src/components/TextInputGroup/__tests__/__snapshots__/TextInputGroup.test.tsx.snap +211 -0
- package/src/components/TextInputGroup/examples/TextInputGroup.md +138 -0
- package/src/components/TextInputGroup/index.ts +3 -0
- package/src/components/Toolbar/Toolbar.tsx +4 -0
- package/src/components/Wizard/examples/Wizard.md +17 -1
- package/src/components/index.ts +1 -0
- package/src/demos/CardDemos.md +5 -5
- package/src/demos/ProgressDemo.md +82 -0
- package/src/demos/Tabs.md +439 -0
- package/src/demos/examples/DashboardWrapper.js +16 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { shallow } from 'enzyme';
|
|
3
|
+
|
|
4
|
+
import { ModalBoxTitle } from '../ModalBoxTitle';
|
|
5
|
+
import BullhornIcon from '@patternfly/react-icons/dist/esm/icons/bullhorn-icon';
|
|
6
|
+
|
|
7
|
+
test('ModalBoxTitle alert variant', () => {
|
|
8
|
+
const view = shallow(
|
|
9
|
+
<ModalBoxTitle title="Test Modal Box warning" id="boxId" titleIconVariant="warning">
|
|
10
|
+
content
|
|
11
|
+
</ModalBoxTitle>
|
|
12
|
+
);
|
|
13
|
+
expect(view).toMatchSnapshot();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
test('ModalBoxTitle info variant', () => {
|
|
17
|
+
const view = shallow(
|
|
18
|
+
<ModalBoxTitle title="Test Modal Box info" id="boxId" titleIconVariant="info">
|
|
19
|
+
content
|
|
20
|
+
</ModalBoxTitle>
|
|
21
|
+
);
|
|
22
|
+
expect(view).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
test('ModalBoxTitle danger variant', () => {
|
|
26
|
+
const view = shallow(
|
|
27
|
+
<ModalBoxTitle title="Test Modal Box danger" id="boxId" titleIconVariant="danger">
|
|
28
|
+
content
|
|
29
|
+
</ModalBoxTitle>
|
|
30
|
+
);
|
|
31
|
+
expect(view).toMatchSnapshot();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test('ModalBoxTitle default variant', () => {
|
|
35
|
+
const view = shallow(
|
|
36
|
+
<ModalBoxTitle title="Test Modal Box warning" id="boxId" titleIconVariant="default">
|
|
37
|
+
content
|
|
38
|
+
</ModalBoxTitle>
|
|
39
|
+
);
|
|
40
|
+
expect(view).toMatchSnapshot();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
test('ModalBoxTitle success variant', () => {
|
|
44
|
+
const view = shallow(
|
|
45
|
+
<ModalBoxTitle title="Test Modal Box success" id="boxId" titleIconVariant="success">
|
|
46
|
+
content
|
|
47
|
+
</ModalBoxTitle>
|
|
48
|
+
);
|
|
49
|
+
expect(view).toMatchSnapshot();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
test('ModalBoxTitle custom icon variant', () => {
|
|
53
|
+
const view = shallow(
|
|
54
|
+
<ModalBoxTitle title="Test Modal Box custom" id="boxId" titleIconVariant={BullhornIcon}>
|
|
55
|
+
content
|
|
56
|
+
</ModalBoxTitle>
|
|
57
|
+
);
|
|
58
|
+
expect(view).toMatchSnapshot();
|
|
59
|
+
});
|
|
@@ -3,9 +3,14 @@ import { shallow } from 'enzyme';
|
|
|
3
3
|
|
|
4
4
|
import { ModalContent } from '../ModalContent';
|
|
5
5
|
|
|
6
|
+
const modalContentProps = {
|
|
7
|
+
boxId: "boxId",
|
|
8
|
+
labelId: "labelId",
|
|
9
|
+
descriptorId: "descriptorId"
|
|
10
|
+
}
|
|
6
11
|
test('Modal Content Test only body', () => {
|
|
7
12
|
const view = shallow(
|
|
8
|
-
<ModalContent title="Test Modal Content title"
|
|
13
|
+
<ModalContent title="Test Modal Content title" isOpen {...modalContentProps}>
|
|
9
14
|
This is a ModalBox header
|
|
10
15
|
</ModalContent>
|
|
11
16
|
);
|
|
@@ -14,7 +19,7 @@ test('Modal Content Test only body', () => {
|
|
|
14
19
|
|
|
15
20
|
test('Modal Content Test isOpen', () => {
|
|
16
21
|
const view = shallow(
|
|
17
|
-
<ModalContent title="Test Modal Content title"
|
|
22
|
+
<ModalContent title="Test Modal Content title" isOpen {...modalContentProps}>
|
|
18
23
|
This is a ModalBox header
|
|
19
24
|
</ModalContent>
|
|
20
25
|
);
|
|
@@ -23,7 +28,7 @@ test('Modal Content Test isOpen', () => {
|
|
|
23
28
|
|
|
24
29
|
test('Modal Content Test description', () => {
|
|
25
30
|
const view = shallow(
|
|
26
|
-
<ModalContent title="Test Modal Content title"
|
|
31
|
+
<ModalContent title="Test Modal Content title" isOpen description="This is a test description." {...modalContentProps}>
|
|
27
32
|
This is a ModalBox header
|
|
28
33
|
</ModalContent>
|
|
29
34
|
);
|
|
@@ -32,7 +37,7 @@ test('Modal Content Test description', () => {
|
|
|
32
37
|
|
|
33
38
|
test('Modal Content Test with footer', () => {
|
|
34
39
|
const view = shallow(
|
|
35
|
-
<ModalContent title="Test Modal Content title"
|
|
40
|
+
<ModalContent title="Test Modal Content title" isOpen actions={['Testing']} {...modalContentProps}>
|
|
36
41
|
This is a ModalBox header
|
|
37
42
|
</ModalContent>
|
|
38
43
|
);
|
|
@@ -41,7 +46,7 @@ test('Modal Content Test with footer', () => {
|
|
|
41
46
|
|
|
42
47
|
test('Modal Content test without footer', () => {
|
|
43
48
|
const view = shallow(
|
|
44
|
-
<ModalContent title="Test Modal Content title"
|
|
49
|
+
<ModalContent title="Test Modal Content title" isOpen {...modalContentProps}>
|
|
45
50
|
This is a ModalBox header
|
|
46
51
|
</ModalContent>
|
|
47
52
|
);
|
|
@@ -53,10 +58,10 @@ test('Modal Content Test with onclose', () => {
|
|
|
53
58
|
<ModalContent
|
|
54
59
|
title="Test Modal Content title"
|
|
55
60
|
actions={['Testing footer']}
|
|
56
|
-
|
|
61
|
+
variant="large"
|
|
57
62
|
onClose={() => undefined}
|
|
58
|
-
id="id"
|
|
59
63
|
isOpen
|
|
64
|
+
{...modalContentProps}
|
|
60
65
|
>
|
|
61
66
|
This is a ModalBox header
|
|
62
67
|
</ModalContent>
|
|
@@ -72,10 +77,10 @@ test('Modal Test with custom header', () => {
|
|
|
72
77
|
header={header}
|
|
73
78
|
title="test-custom-header-modal"
|
|
74
79
|
actions={['Testing footer']}
|
|
75
|
-
|
|
80
|
+
variant="large"
|
|
76
81
|
onClose={() => undefined}
|
|
77
|
-
id="id"
|
|
78
82
|
isOpen
|
|
83
|
+
{...modalContentProps}
|
|
79
84
|
>
|
|
80
85
|
This is a ModalBox header
|
|
81
86
|
</ModalContent>
|
|
@@ -87,7 +92,7 @@ test('Modal Test with custom footer', () => {
|
|
|
87
92
|
const footer = <span id="test-custom-footer">TEST</span>;
|
|
88
93
|
|
|
89
94
|
const view = shallow(
|
|
90
|
-
<ModalContent footer={footer} title="Test Modal Custom Footer"
|
|
95
|
+
<ModalContent footer={footer} title="Test Modal Custom Footer" variant="large" onClose={() => undefined} isOpen {...modalContentProps}>
|
|
91
96
|
This is a ModalBox header
|
|
92
97
|
</ModalContent>
|
|
93
98
|
);
|
|
@@ -2,73 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`ModalBox Test 1`] = `
|
|
4
4
|
<div
|
|
5
|
+
aria-describedby="Test Modal Box"
|
|
5
6
|
aria-label={null}
|
|
6
7
|
aria-labelledby={null}
|
|
7
8
|
aria-modal="true"
|
|
8
9
|
className="pf-c-modal-box"
|
|
9
10
|
id="boxId"
|
|
10
11
|
role="dialog"
|
|
11
|
-
title="Test Modal Box"
|
|
12
12
|
>
|
|
13
13
|
This is a ModalBox
|
|
14
14
|
</div>
|
|
15
15
|
`;
|
|
16
16
|
|
|
17
|
-
exports[`ModalBox Test
|
|
17
|
+
exports[`ModalBox Test large 1`] = `
|
|
18
18
|
<div
|
|
19
|
+
aria-describedby="Test Modal Box"
|
|
19
20
|
aria-label={null}
|
|
20
21
|
aria-labelledby={null}
|
|
21
22
|
aria-modal="true"
|
|
22
|
-
className="pf-c-modal-box"
|
|
23
|
+
className="pf-c-modal-box pf-m-lg"
|
|
23
24
|
id="boxId"
|
|
24
25
|
role="dialog"
|
|
25
|
-
title="Test Modal Box"
|
|
26
|
-
titleIconVariant="warning"
|
|
27
26
|
>
|
|
28
27
|
This is a ModalBox
|
|
29
28
|
</div>
|
|
30
29
|
`;
|
|
31
30
|
|
|
32
|
-
exports[`ModalBox Test
|
|
31
|
+
exports[`ModalBox Test medium 1`] = `
|
|
33
32
|
<div
|
|
33
|
+
aria-describedby="Test Modal Box"
|
|
34
34
|
aria-label={null}
|
|
35
35
|
aria-labelledby={null}
|
|
36
36
|
aria-modal="true"
|
|
37
|
-
className="pf-c-modal-box"
|
|
37
|
+
className="pf-c-modal-box pf-m-md"
|
|
38
38
|
id="boxId"
|
|
39
39
|
role="dialog"
|
|
40
|
-
title="Test Modal Box"
|
|
41
|
-
titleIconVariant={[Function]}
|
|
42
40
|
>
|
|
43
41
|
This is a ModalBox
|
|
44
42
|
</div>
|
|
45
43
|
`;
|
|
46
44
|
|
|
47
|
-
exports[`ModalBox Test
|
|
45
|
+
exports[`ModalBox Test small 1`] = `
|
|
48
46
|
<div
|
|
47
|
+
aria-describedby="Test Modal Box"
|
|
49
48
|
aria-label={null}
|
|
50
49
|
aria-labelledby={null}
|
|
51
50
|
aria-modal="true"
|
|
52
|
-
className="pf-c-modal-box"
|
|
53
|
-
id="boxId"
|
|
54
|
-
isLarge={true}
|
|
55
|
-
role="dialog"
|
|
56
|
-
title="Test Modal Box"
|
|
57
|
-
>
|
|
58
|
-
This is a ModalBox
|
|
59
|
-
</div>
|
|
60
|
-
`;
|
|
61
|
-
|
|
62
|
-
exports[`ModalBox Test isSmall 1`] = `
|
|
63
|
-
<div
|
|
64
|
-
aria-label={null}
|
|
65
|
-
aria-labelledby={null}
|
|
66
|
-
aria-modal="true"
|
|
67
|
-
className="pf-c-modal-box"
|
|
51
|
+
className="pf-c-modal-box pf-m-sm"
|
|
68
52
|
id="boxId"
|
|
69
|
-
isSmall={true}
|
|
70
53
|
role="dialog"
|
|
71
|
-
title="Test Modal Box"
|
|
72
54
|
>
|
|
73
55
|
This is a ModalBox
|
|
74
56
|
</div>
|
|
@@ -76,13 +58,13 @@ exports[`ModalBox Test isSmall 1`] = `
|
|
|
76
58
|
|
|
77
59
|
exports[`ModalBox Test top aligned 1`] = `
|
|
78
60
|
<div
|
|
61
|
+
aria-describedby="Test Modal Box"
|
|
79
62
|
aria-label={null}
|
|
80
63
|
aria-labelledby={null}
|
|
81
64
|
aria-modal="true"
|
|
82
65
|
className="pf-c-modal-box pf-m-align-top"
|
|
83
66
|
id="boxId"
|
|
84
67
|
role="dialog"
|
|
85
|
-
title="Test Modal Box"
|
|
86
68
|
>
|
|
87
69
|
This is a ModalBox
|
|
88
70
|
</div>
|
|
@@ -90,6 +72,7 @@ exports[`ModalBox Test top aligned 1`] = `
|
|
|
90
72
|
|
|
91
73
|
exports[`ModalBox Test top aligned distance 1`] = `
|
|
92
74
|
<div
|
|
75
|
+
aria-describedby="Test Modal Box"
|
|
93
76
|
aria-label={null}
|
|
94
77
|
aria-labelledby={null}
|
|
95
78
|
aria-modal="true"
|
|
@@ -101,7 +84,6 @@ exports[`ModalBox Test top aligned distance 1`] = `
|
|
|
101
84
|
"--pf-c-modal-box--m-align-top--spacer": "50px",
|
|
102
85
|
}
|
|
103
86
|
}
|
|
104
|
-
title="Test Modal Box"
|
|
105
87
|
>
|
|
106
88
|
This is a ModalBox
|
|
107
89
|
</div>
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`ModalBoxTitle alert variant 1`] = `
|
|
4
|
+
<h1
|
|
5
|
+
className="pf-c-modal-box__title pf-m-icon"
|
|
6
|
+
id="boxId"
|
|
7
|
+
>
|
|
8
|
+
<span
|
|
9
|
+
className="pf-c-modal-box__title-icon"
|
|
10
|
+
>
|
|
11
|
+
<ExclamationTriangleIcon
|
|
12
|
+
color="currentColor"
|
|
13
|
+
noVerticalAlign={false}
|
|
14
|
+
size="sm"
|
|
15
|
+
/>
|
|
16
|
+
</span>
|
|
17
|
+
<span
|
|
18
|
+
className="pf-u-screen-reader"
|
|
19
|
+
>
|
|
20
|
+
Warning alert:
|
|
21
|
+
</span>
|
|
22
|
+
<span
|
|
23
|
+
className="pf-c-modal-box__title-text"
|
|
24
|
+
>
|
|
25
|
+
Test Modal Box warning
|
|
26
|
+
</span>
|
|
27
|
+
</h1>
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
exports[`ModalBoxTitle custom icon variant 1`] = `
|
|
31
|
+
<h1
|
|
32
|
+
className="pf-c-modal-box__title pf-m-icon"
|
|
33
|
+
id="boxId"
|
|
34
|
+
>
|
|
35
|
+
<span
|
|
36
|
+
className="pf-c-modal-box__title-icon"
|
|
37
|
+
>
|
|
38
|
+
<BullhornIcon
|
|
39
|
+
color="currentColor"
|
|
40
|
+
noVerticalAlign={false}
|
|
41
|
+
size="sm"
|
|
42
|
+
/>
|
|
43
|
+
</span>
|
|
44
|
+
<span
|
|
45
|
+
className="pf-c-modal-box__title-text"
|
|
46
|
+
>
|
|
47
|
+
Test Modal Box custom
|
|
48
|
+
</span>
|
|
49
|
+
</h1>
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
exports[`ModalBoxTitle danger variant 1`] = `
|
|
53
|
+
<h1
|
|
54
|
+
className="pf-c-modal-box__title pf-m-icon"
|
|
55
|
+
id="boxId"
|
|
56
|
+
>
|
|
57
|
+
<span
|
|
58
|
+
className="pf-c-modal-box__title-icon"
|
|
59
|
+
>
|
|
60
|
+
<ExclamationCircleIcon
|
|
61
|
+
color="currentColor"
|
|
62
|
+
noVerticalAlign={false}
|
|
63
|
+
size="sm"
|
|
64
|
+
/>
|
|
65
|
+
</span>
|
|
66
|
+
<span
|
|
67
|
+
className="pf-u-screen-reader"
|
|
68
|
+
>
|
|
69
|
+
Danger alert:
|
|
70
|
+
</span>
|
|
71
|
+
<span
|
|
72
|
+
className="pf-c-modal-box__title-text"
|
|
73
|
+
>
|
|
74
|
+
Test Modal Box danger
|
|
75
|
+
</span>
|
|
76
|
+
</h1>
|
|
77
|
+
`;
|
|
78
|
+
|
|
79
|
+
exports[`ModalBoxTitle default variant 1`] = `
|
|
80
|
+
<h1
|
|
81
|
+
className="pf-c-modal-box__title pf-m-icon"
|
|
82
|
+
id="boxId"
|
|
83
|
+
>
|
|
84
|
+
<span
|
|
85
|
+
className="pf-c-modal-box__title-icon"
|
|
86
|
+
>
|
|
87
|
+
<BellIcon
|
|
88
|
+
color="currentColor"
|
|
89
|
+
noVerticalAlign={false}
|
|
90
|
+
size="sm"
|
|
91
|
+
/>
|
|
92
|
+
</span>
|
|
93
|
+
<span
|
|
94
|
+
className="pf-u-screen-reader"
|
|
95
|
+
>
|
|
96
|
+
Default alert:
|
|
97
|
+
</span>
|
|
98
|
+
<span
|
|
99
|
+
className="pf-c-modal-box__title-text"
|
|
100
|
+
>
|
|
101
|
+
Test Modal Box warning
|
|
102
|
+
</span>
|
|
103
|
+
</h1>
|
|
104
|
+
`;
|
|
105
|
+
|
|
106
|
+
exports[`ModalBoxTitle info variant 1`] = `
|
|
107
|
+
<h1
|
|
108
|
+
className="pf-c-modal-box__title pf-m-icon"
|
|
109
|
+
id="boxId"
|
|
110
|
+
>
|
|
111
|
+
<span
|
|
112
|
+
className="pf-c-modal-box__title-icon"
|
|
113
|
+
>
|
|
114
|
+
<InfoCircleIcon
|
|
115
|
+
color="currentColor"
|
|
116
|
+
noVerticalAlign={false}
|
|
117
|
+
size="sm"
|
|
118
|
+
/>
|
|
119
|
+
</span>
|
|
120
|
+
<span
|
|
121
|
+
className="pf-u-screen-reader"
|
|
122
|
+
>
|
|
123
|
+
Info alert:
|
|
124
|
+
</span>
|
|
125
|
+
<span
|
|
126
|
+
className="pf-c-modal-box__title-text"
|
|
127
|
+
>
|
|
128
|
+
Test Modal Box info
|
|
129
|
+
</span>
|
|
130
|
+
</h1>
|
|
131
|
+
`;
|
|
132
|
+
|
|
133
|
+
exports[`ModalBoxTitle success variant 1`] = `
|
|
134
|
+
<h1
|
|
135
|
+
className="pf-c-modal-box__title pf-m-icon"
|
|
136
|
+
id="boxId"
|
|
137
|
+
>
|
|
138
|
+
<span
|
|
139
|
+
className="pf-c-modal-box__title-icon"
|
|
140
|
+
>
|
|
141
|
+
<CheckCircleIcon
|
|
142
|
+
color="currentColor"
|
|
143
|
+
noVerticalAlign={false}
|
|
144
|
+
size="sm"
|
|
145
|
+
/>
|
|
146
|
+
</span>
|
|
147
|
+
<span
|
|
148
|
+
className="pf-u-screen-reader"
|
|
149
|
+
>
|
|
150
|
+
Success alert:
|
|
151
|
+
</span>
|
|
152
|
+
<span
|
|
153
|
+
className="pf-c-modal-box__title-text"
|
|
154
|
+
>
|
|
155
|
+
Test Modal Box success
|
|
156
|
+
</span>
|
|
157
|
+
</h1>
|
|
158
|
+
`;
|
|
@@ -14,11 +14,13 @@ exports[`Modal Content Test description 1`] = `
|
|
|
14
14
|
preventScrollOnDeactivate={false}
|
|
15
15
|
>
|
|
16
16
|
<ModalBox
|
|
17
|
+
aria-describedby="descriptorId"
|
|
17
18
|
aria-label=""
|
|
18
|
-
aria-labelledby=""
|
|
19
|
+
aria-labelledby="labelId"
|
|
19
20
|
className=""
|
|
20
21
|
data-ouia-component-type="PF4/ModalContent"
|
|
21
22
|
data-ouia-safe={true}
|
|
23
|
+
id="boxId"
|
|
22
24
|
style={Object {}}
|
|
23
25
|
variant="default"
|
|
24
26
|
>
|
|
@@ -29,17 +31,18 @@ exports[`Modal Content Test description 1`] = `
|
|
|
29
31
|
help={null}
|
|
30
32
|
>
|
|
31
33
|
<ModalBoxTitle
|
|
34
|
+
id="labelId"
|
|
32
35
|
title="Test Modal Content title"
|
|
33
36
|
titleIconVariant={null}
|
|
34
37
|
titleLabel=""
|
|
35
38
|
/>
|
|
36
|
-
<ModalBoxDescription
|
|
39
|
+
<ModalBoxDescription
|
|
40
|
+
id="descriptorId"
|
|
41
|
+
>
|
|
37
42
|
This is a test description.
|
|
38
43
|
</ModalBoxDescription>
|
|
39
44
|
</ModalBoxHeader>
|
|
40
|
-
<ModalBoxBody
|
|
41
|
-
id="id"
|
|
42
|
-
>
|
|
45
|
+
<ModalBoxBody>
|
|
43
46
|
This is a ModalBox header
|
|
44
47
|
</ModalBoxBody>
|
|
45
48
|
</ModalBox>
|
|
@@ -61,11 +64,13 @@ exports[`Modal Content Test isOpen 1`] = `
|
|
|
61
64
|
preventScrollOnDeactivate={false}
|
|
62
65
|
>
|
|
63
66
|
<ModalBox
|
|
67
|
+
aria-describedby="descriptorId"
|
|
64
68
|
aria-label=""
|
|
65
|
-
aria-labelledby=""
|
|
69
|
+
aria-labelledby="labelId"
|
|
66
70
|
className=""
|
|
67
71
|
data-ouia-component-type="PF4/ModalContent"
|
|
68
72
|
data-ouia-safe={true}
|
|
73
|
+
id="boxId"
|
|
69
74
|
style={Object {}}
|
|
70
75
|
variant="default"
|
|
71
76
|
>
|
|
@@ -76,12 +81,15 @@ exports[`Modal Content Test isOpen 1`] = `
|
|
|
76
81
|
help={null}
|
|
77
82
|
>
|
|
78
83
|
<ModalBoxTitle
|
|
84
|
+
id="labelId"
|
|
79
85
|
title="Test Modal Content title"
|
|
80
86
|
titleIconVariant={null}
|
|
81
87
|
titleLabel=""
|
|
82
88
|
/>
|
|
83
89
|
</ModalBoxHeader>
|
|
84
|
-
<ModalBoxBody
|
|
90
|
+
<ModalBoxBody
|
|
91
|
+
id="descriptorId"
|
|
92
|
+
>
|
|
85
93
|
This is a ModalBox header
|
|
86
94
|
</ModalBoxBody>
|
|
87
95
|
</ModalBox>
|
|
@@ -103,11 +111,13 @@ exports[`Modal Content Test only body 1`] = `
|
|
|
103
111
|
preventScrollOnDeactivate={false}
|
|
104
112
|
>
|
|
105
113
|
<ModalBox
|
|
114
|
+
aria-describedby="descriptorId"
|
|
106
115
|
aria-label=""
|
|
107
|
-
aria-labelledby=""
|
|
116
|
+
aria-labelledby="labelId"
|
|
108
117
|
className=""
|
|
109
118
|
data-ouia-component-type="PF4/ModalContent"
|
|
110
119
|
data-ouia-safe={true}
|
|
120
|
+
id="boxId"
|
|
111
121
|
style={Object {}}
|
|
112
122
|
variant="default"
|
|
113
123
|
>
|
|
@@ -118,12 +128,15 @@ exports[`Modal Content Test only body 1`] = `
|
|
|
118
128
|
help={null}
|
|
119
129
|
>
|
|
120
130
|
<ModalBoxTitle
|
|
131
|
+
id="labelId"
|
|
121
132
|
title="Test Modal Content title"
|
|
122
133
|
titleIconVariant={null}
|
|
123
134
|
titleLabel=""
|
|
124
135
|
/>
|
|
125
136
|
</ModalBoxHeader>
|
|
126
|
-
<ModalBoxBody
|
|
137
|
+
<ModalBoxBody
|
|
138
|
+
id="descriptorId"
|
|
139
|
+
>
|
|
127
140
|
This is a ModalBox header
|
|
128
141
|
</ModalBoxBody>
|
|
129
142
|
</ModalBox>
|
|
@@ -145,11 +158,13 @@ exports[`Modal Content Test with footer 1`] = `
|
|
|
145
158
|
preventScrollOnDeactivate={false}
|
|
146
159
|
>
|
|
147
160
|
<ModalBox
|
|
161
|
+
aria-describedby="descriptorId"
|
|
148
162
|
aria-label=""
|
|
149
|
-
aria-labelledby=""
|
|
163
|
+
aria-labelledby="labelId"
|
|
150
164
|
className=""
|
|
151
165
|
data-ouia-component-type="PF4/ModalContent"
|
|
152
166
|
data-ouia-safe={true}
|
|
167
|
+
id="boxId"
|
|
153
168
|
style={Object {}}
|
|
154
169
|
variant="default"
|
|
155
170
|
>
|
|
@@ -160,12 +175,15 @@ exports[`Modal Content Test with footer 1`] = `
|
|
|
160
175
|
help={null}
|
|
161
176
|
>
|
|
162
177
|
<ModalBoxTitle
|
|
178
|
+
id="labelId"
|
|
163
179
|
title="Test Modal Content title"
|
|
164
180
|
titleIconVariant={null}
|
|
165
181
|
titleLabel=""
|
|
166
182
|
/>
|
|
167
183
|
</ModalBoxHeader>
|
|
168
|
-
<ModalBoxBody
|
|
184
|
+
<ModalBoxBody
|
|
185
|
+
id="descriptorId"
|
|
186
|
+
>
|
|
169
187
|
This is a ModalBox header
|
|
170
188
|
</ModalBoxBody>
|
|
171
189
|
<ModalBoxFooter>
|
|
@@ -190,13 +208,15 @@ exports[`Modal Content Test with onclose 1`] = `
|
|
|
190
208
|
preventScrollOnDeactivate={false}
|
|
191
209
|
>
|
|
192
210
|
<ModalBox
|
|
211
|
+
aria-describedby="descriptorId"
|
|
193
212
|
aria-label=""
|
|
194
|
-
aria-labelledby=""
|
|
213
|
+
aria-labelledby="labelId"
|
|
195
214
|
className=""
|
|
196
215
|
data-ouia-component-type="PF4/ModalContent"
|
|
197
216
|
data-ouia-safe={true}
|
|
217
|
+
id="boxId"
|
|
198
218
|
style={Object {}}
|
|
199
|
-
variant="
|
|
219
|
+
variant="large"
|
|
200
220
|
>
|
|
201
221
|
<ModalBoxCloseButton
|
|
202
222
|
onClose={[Function]}
|
|
@@ -205,13 +225,14 @@ exports[`Modal Content Test with onclose 1`] = `
|
|
|
205
225
|
help={null}
|
|
206
226
|
>
|
|
207
227
|
<ModalBoxTitle
|
|
228
|
+
id="labelId"
|
|
208
229
|
title="Test Modal Content title"
|
|
209
230
|
titleIconVariant={null}
|
|
210
231
|
titleLabel=""
|
|
211
232
|
/>
|
|
212
233
|
</ModalBoxHeader>
|
|
213
234
|
<ModalBoxBody
|
|
214
|
-
|
|
235
|
+
id="descriptorId"
|
|
215
236
|
>
|
|
216
237
|
This is a ModalBox header
|
|
217
238
|
</ModalBoxBody>
|
|
@@ -237,11 +258,13 @@ exports[`Modal Content test without footer 1`] = `
|
|
|
237
258
|
preventScrollOnDeactivate={false}
|
|
238
259
|
>
|
|
239
260
|
<ModalBox
|
|
261
|
+
aria-describedby="descriptorId"
|
|
240
262
|
aria-label=""
|
|
241
|
-
aria-labelledby=""
|
|
263
|
+
aria-labelledby="labelId"
|
|
242
264
|
className=""
|
|
243
265
|
data-ouia-component-type="PF4/ModalContent"
|
|
244
266
|
data-ouia-safe={true}
|
|
267
|
+
id="boxId"
|
|
245
268
|
style={Object {}}
|
|
246
269
|
variant="default"
|
|
247
270
|
>
|
|
@@ -252,12 +275,15 @@ exports[`Modal Content test without footer 1`] = `
|
|
|
252
275
|
help={null}
|
|
253
276
|
>
|
|
254
277
|
<ModalBoxTitle
|
|
278
|
+
id="labelId"
|
|
255
279
|
title="Test Modal Content title"
|
|
256
280
|
titleIconVariant={null}
|
|
257
281
|
titleLabel=""
|
|
258
282
|
/>
|
|
259
283
|
</ModalBoxHeader>
|
|
260
|
-
<ModalBoxBody
|
|
284
|
+
<ModalBoxBody
|
|
285
|
+
id="descriptorId"
|
|
286
|
+
>
|
|
261
287
|
This is a ModalBox header
|
|
262
288
|
</ModalBoxBody>
|
|
263
289
|
</ModalBox>
|
|
@@ -279,13 +305,15 @@ exports[`Modal Test with custom footer 1`] = `
|
|
|
279
305
|
preventScrollOnDeactivate={false}
|
|
280
306
|
>
|
|
281
307
|
<ModalBox
|
|
308
|
+
aria-describedby="descriptorId"
|
|
282
309
|
aria-label=""
|
|
283
|
-
aria-labelledby=""
|
|
310
|
+
aria-labelledby="labelId"
|
|
284
311
|
className=""
|
|
285
312
|
data-ouia-component-type="PF4/ModalContent"
|
|
286
313
|
data-ouia-safe={true}
|
|
314
|
+
id="boxId"
|
|
287
315
|
style={Object {}}
|
|
288
|
-
variant="
|
|
316
|
+
variant="large"
|
|
289
317
|
>
|
|
290
318
|
<ModalBoxCloseButton
|
|
291
319
|
onClose={[Function]}
|
|
@@ -294,13 +322,14 @@ exports[`Modal Test with custom footer 1`] = `
|
|
|
294
322
|
help={null}
|
|
295
323
|
>
|
|
296
324
|
<ModalBoxTitle
|
|
325
|
+
id="labelId"
|
|
297
326
|
title="Test Modal Custom Footer"
|
|
298
327
|
titleIconVariant={null}
|
|
299
328
|
titleLabel=""
|
|
300
329
|
/>
|
|
301
330
|
</ModalBoxHeader>
|
|
302
331
|
<ModalBoxBody
|
|
303
|
-
|
|
332
|
+
id="descriptorId"
|
|
304
333
|
>
|
|
305
334
|
This is a ModalBox header
|
|
306
335
|
</ModalBoxBody>
|
|
@@ -330,13 +359,15 @@ exports[`Modal Test with custom header 1`] = `
|
|
|
330
359
|
preventScrollOnDeactivate={false}
|
|
331
360
|
>
|
|
332
361
|
<ModalBox
|
|
362
|
+
aria-describedby="descriptorId"
|
|
333
363
|
aria-label=""
|
|
334
|
-
aria-labelledby=""
|
|
364
|
+
aria-labelledby="labelId"
|
|
335
365
|
className=""
|
|
336
366
|
data-ouia-component-type="PF4/ModalContent"
|
|
337
367
|
data-ouia-safe={true}
|
|
368
|
+
id="boxId"
|
|
338
369
|
style={Object {}}
|
|
339
|
-
variant="
|
|
370
|
+
variant="large"
|
|
340
371
|
>
|
|
341
372
|
<ModalBoxCloseButton
|
|
342
373
|
onClose={[Function]}
|
|
@@ -351,7 +382,7 @@ exports[`Modal Test with custom header 1`] = `
|
|
|
351
382
|
</span>
|
|
352
383
|
</ModalBoxHeader>
|
|
353
384
|
<ModalBoxBody
|
|
354
|
-
|
|
385
|
+
id="descriptorId"
|
|
355
386
|
>
|
|
356
387
|
This is a ModalBox header
|
|
357
388
|
</ModalBoxBody>
|