@patternfly/react-core 4.176.0 → 4.179.1
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 +49 -0
- package/dist/esm/components/Card/Card.d.ts +5 -7
- package/dist/esm/components/Card/Card.d.ts.map +1 -1
- package/dist/esm/components/Card/Card.js +14 -2
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/DragDrop/Droppable.d.ts.map +1 -1
- package/dist/esm/components/DragDrop/Droppable.js +5 -1
- package/dist/esm/components/DragDrop/Droppable.js.map +1 -1
- package/dist/esm/components/Dropdown/DropdownToggle.d.ts +3 -1
- package/dist/esm/components/Dropdown/DropdownToggle.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/DropdownToggle.js +4 -4
- package/dist/esm/components/Dropdown/DropdownToggle.js.map +1 -1
- package/dist/esm/components/Dropdown/Toggle.d.ts +3 -1
- package/dist/esm/components/Dropdown/Toggle.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/Toggle.js +8 -3
- package/dist/esm/components/Dropdown/Toggle.js.map +1 -1
- package/dist/esm/components/MenuToggle/MenuToggle.d.ts +1 -1
- package/dist/esm/components/MenuToggle/MenuToggle.d.ts.map +1 -1
- package/dist/esm/components/MenuToggle/MenuToggle.js +2 -1
- package/dist/esm/components/MenuToggle/MenuToggle.js.map +1 -1
- package/dist/esm/components/Popover/Popover.d.ts.map +1 -1
- package/dist/esm/components/Popover/Popover.js +2 -22
- package/dist/esm/components/Popover/Popover.js.map +1 -1
- package/dist/js/components/Card/Card.d.ts +5 -7
- package/dist/js/components/Card/Card.d.ts.map +1 -1
- package/dist/js/components/Card/Card.js +14 -2
- package/dist/js/components/Card/Card.js.map +1 -1
- package/dist/js/components/DragDrop/Droppable.d.ts.map +1 -1
- package/dist/js/components/DragDrop/Droppable.js +5 -1
- package/dist/js/components/DragDrop/Droppable.js.map +1 -1
- package/dist/js/components/Dropdown/DropdownToggle.d.ts +3 -1
- package/dist/js/components/Dropdown/DropdownToggle.d.ts.map +1 -1
- package/dist/js/components/Dropdown/DropdownToggle.js +4 -4
- package/dist/js/components/Dropdown/DropdownToggle.js.map +1 -1
- package/dist/js/components/Dropdown/Toggle.d.ts +3 -1
- package/dist/js/components/Dropdown/Toggle.d.ts.map +1 -1
- package/dist/js/components/Dropdown/Toggle.js +8 -3
- package/dist/js/components/Dropdown/Toggle.js.map +1 -1
- package/dist/js/components/MenuToggle/MenuToggle.d.ts +1 -1
- package/dist/js/components/MenuToggle/MenuToggle.d.ts.map +1 -1
- package/dist/js/components/MenuToggle/MenuToggle.js +2 -1
- package/dist/js/components/MenuToggle/MenuToggle.js.map +1 -1
- package/dist/js/components/Popover/Popover.d.ts.map +1 -1
- package/dist/js/components/Popover/Popover.js +2 -22
- package/dist/js/components/Popover/Popover.js.map +1 -1
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatDisplay/RedHatDisplay-updated-Black.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatDisplay/RedHatDisplay-updated-BlackItalic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatDisplay/RedHatDisplay-updated-Bold.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatDisplay/RedHatDisplay-updated-BoldItalic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatDisplay/RedHatDisplay-updated-Italic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatDisplay/RedHatDisplay-updated-Light.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatDisplay/RedHatDisplay-updated-LightItalic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatDisplay/RedHatDisplay-updated-Medium.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatDisplay/RedHatDisplay-updated-MediumItalic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatDisplay/RedHatDisplay-updated-Regular.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatDisplay/RedHatDisplayVF-updated-Italic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatDisplay/RedHatDisplayVF-updated.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatMono/RedHatMono-updated-Bold.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatMono/RedHatMono-updated-BoldItalic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatMono/RedHatMono-updated-Italic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatMono/RedHatMono-updated-Light.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatMono/RedHatMono-updated-LightItalic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatMono/RedHatMono-updated-Medium.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatMono/RedHatMono-updated-MediumItalic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatMono/RedHatMono-updated-Regular.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatMono/RedHatMonoVF-updated-Italic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatMono/RedHatMonoVF-updated.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatText/RedHatText-updated-Bold.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatText/RedHatText-updated-BoldItalic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatText/RedHatText-updated-Italic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatText/RedHatText-updated-Light.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatText/RedHatText-updated-LightItalic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatText/RedHatText-updated-Medium.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatText/RedHatText-updated-MediumItalic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatText/RedHatText-updated-Regular.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatText/RedHatTextVF-updated-Italic.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/RedHatText/RedHatTextVF-updated.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/modified/RedHatDisplayVF-updated-ItalicModified.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/modified/RedHatDisplayVFModified-updated.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/modified/RedHatTextVF-updated-ItalicModified.woff2 +0 -0
- package/dist/styles/assets/fonts/RedHatFont-updated/modified/RedHatTextVFModified-updated.woff2 +0 -0
- package/dist/styles/base-no-reset.css +121 -0
- package/dist/styles/base.css +121 -15
- package/dist/umd/react-core.css +183 -12
- package/dist/umd/react-core.js +44 -35
- package/dist/umd/react-core.min.css +4004 -3833
- package/dist/umd/react-core.min.js +2 -2
- package/package.json +6 -6
- package/src/components/Alert/examples/Alert.md +201 -382
- package/src/components/Alert/examples/AlertAsyncLiveRegion.tsx +61 -0
- package/src/components/Alert/examples/AlertDynamicLiveRegion.tsx +61 -0
- package/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap +6 -0
- package/src/components/Card/Card.tsx +23 -17
- package/src/components/Card/__tests__/Card.test.tsx +8 -14
- package/src/components/Card/__tests__/__snapshots__/Card.test.tsx.snap +2 -12
- package/src/components/Card/examples/Card.md +230 -264
- package/src/components/DragDrop/Droppable.tsx +5 -1
- package/src/components/DragDrop/examples/DragDrop.md +2 -0
- package/src/components/Dropdown/DropdownToggle.tsx +6 -1
- package/src/components/Dropdown/Toggle.tsx +11 -1
- package/src/components/Dropdown/__tests__/DropdownToggle.test.tsx +51 -0
- package/src/components/Dropdown/__tests__/__snapshots__/Dropdown.test.tsx.snap +8 -0
- package/src/components/Dropdown/__tests__/__snapshots__/DropdownToggle.test.tsx.snap +346 -4
- package/src/components/Dropdown/__tests__/__snapshots__/Toggle.test.tsx.snap +1 -0
- package/src/components/Dropdown/examples/Dropdown.md +160 -91
- package/src/components/MenuToggle/MenuToggle.tsx +5 -2
- package/src/components/MenuToggle/__tests__/MenuToggle.test.tsx +5 -0
- package/src/components/MenuToggle/__tests__/__snapshots__/MenuToggle.test.tsx.snap +59 -0
- package/src/components/MenuToggle/examples/MenuToggle.md +60 -67
- package/src/components/OptionsMenu/__tests__/__snapshots__/OptionsMenu.test.tsx.snap +7 -0
- package/src/components/Pagination/__tests__/__snapshots__/Pagination.test.tsx.snap +15 -0
- package/src/components/Popover/Popover.tsx +1 -19
- package/src/components/Popover/__tests__/Generated/__snapshots__/Popover.test.tsx.snap +0 -1
- package/src/components/Popover/__tests__/__snapshots__/Popover.test.tsx.snap +0 -4
- package/src/demos/Card/Card.md +47 -23
- package/src/demos/CardDemos.md +65 -91
- package/src/demos/Tabs/NestedTabsDemo.js +151 -0
- package/src/demos/Tabs.md +4 -0
- package/src/demos/TextInputGroupDemo.md +8 -246
- package/src/demos/examples/TextInputGroup/AttributeValueFiltering.js +250 -0
- package/src/demos/examples/TextInputGroup/AutoCompleteSearch.js +230 -0
|
@@ -107,6 +107,57 @@ describe('state', () => {
|
|
|
107
107
|
expect(view).toMatchSnapshot();
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
+
test('button variant - primary', () => {
|
|
111
|
+
const view = mount(
|
|
112
|
+
<DropdownToggle id="Dropdown Toggle" toggleVariant="primary" parentRef={document.createElement('div')}>
|
|
113
|
+
Dropdown
|
|
114
|
+
</DropdownToggle>
|
|
115
|
+
);
|
|
116
|
+
expect(view.find('button').prop('className')).toMatch(/m-primary/);
|
|
117
|
+
expect(view).toMatchSnapshot();
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
test('button variant - secondary', () => {
|
|
121
|
+
const view = mount(
|
|
122
|
+
<DropdownToggle id="Dropdown Toggle" toggleVariant="secondary" parentRef={document.createElement('div')}>
|
|
123
|
+
Dropdown
|
|
124
|
+
</DropdownToggle>
|
|
125
|
+
);
|
|
126
|
+
expect(view.find('button').prop('className')).toMatch(/m-secondary/);
|
|
127
|
+
expect(view).toMatchSnapshot();
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
test('action split button - renders primary variant', () => {
|
|
131
|
+
const view = mount(
|
|
132
|
+
<DropdownToggle
|
|
133
|
+
id="Dropdown Toggle"
|
|
134
|
+
toggleVariant="primary"
|
|
135
|
+
splitButtonItems={[<div key="1">test</div>]}
|
|
136
|
+
splitButtonVariant="action"
|
|
137
|
+
parentRef={document.createElement('div')}
|
|
138
|
+
>
|
|
139
|
+
Dropdown
|
|
140
|
+
</DropdownToggle>
|
|
141
|
+
);
|
|
142
|
+
expect(view.find('.pf-c-dropdown__toggle').prop('className')).toMatch(/m-primary/);
|
|
143
|
+
expect(view).toMatchSnapshot();
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
test('split button - does not render primary variant', () => {
|
|
147
|
+
const view = mount(
|
|
148
|
+
<DropdownToggle
|
|
149
|
+
id="Dropdown Toggle"
|
|
150
|
+
toggleVariant="primary"
|
|
151
|
+
splitButtonItems={[<div key="0">test</div>]}
|
|
152
|
+
parentRef={document.createElement('div')}
|
|
153
|
+
>
|
|
154
|
+
Dropdown
|
|
155
|
+
</DropdownToggle>
|
|
156
|
+
);
|
|
157
|
+
expect(view.find('.pf-c-dropdown__toggle').prop('className')).not.toMatch(/m-primary/);
|
|
158
|
+
expect(view).toMatchSnapshot();
|
|
159
|
+
});
|
|
160
|
+
|
|
110
161
|
test('class changes', () => {
|
|
111
162
|
const view = mount(
|
|
112
163
|
<DropdownContext.Provider
|
|
@@ -4480,6 +4480,7 @@ exports[`dropdown alignment breakpoints 1`] = `
|
|
|
4480
4480
|
</div>,
|
|
4481
4481
|
}
|
|
4482
4482
|
}
|
|
4483
|
+
toggleVariant="default"
|
|
4483
4484
|
>
|
|
4484
4485
|
<button
|
|
4485
4486
|
aria-expanded={true}
|
|
@@ -5039,6 +5040,7 @@ exports[`dropdown basic 1`] = `
|
|
|
5039
5040
|
</div>,
|
|
5040
5041
|
}
|
|
5041
5042
|
}
|
|
5043
|
+
toggleVariant="default"
|
|
5042
5044
|
>
|
|
5043
5045
|
<button
|
|
5044
5046
|
aria-expanded={true}
|
|
@@ -5625,6 +5627,7 @@ exports[`dropdown dropup + right aligned 1`] = `
|
|
|
5625
5627
|
</div>,
|
|
5626
5628
|
}
|
|
5627
5629
|
}
|
|
5630
|
+
toggleVariant="default"
|
|
5628
5631
|
>
|
|
5629
5632
|
<button
|
|
5630
5633
|
aria-expanded={false}
|
|
@@ -6187,6 +6190,7 @@ exports[`dropdown dropup 1`] = `
|
|
|
6187
6190
|
</div>,
|
|
6188
6191
|
}
|
|
6189
6192
|
}
|
|
6193
|
+
toggleVariant="default"
|
|
6190
6194
|
>
|
|
6191
6195
|
<button
|
|
6192
6196
|
aria-expanded={false}
|
|
@@ -6895,6 +6899,7 @@ exports[`dropdown expanded 1`] = `
|
|
|
6895
6899
|
</div>,
|
|
6896
6900
|
}
|
|
6897
6901
|
}
|
|
6902
|
+
toggleVariant="default"
|
|
6898
6903
|
>
|
|
6899
6904
|
<button
|
|
6900
6905
|
aria-expanded={true}
|
|
@@ -7790,6 +7795,7 @@ exports[`dropdown primary 1`] = `
|
|
|
7790
7795
|
</div>,
|
|
7791
7796
|
}
|
|
7792
7797
|
}
|
|
7798
|
+
toggleVariant="default"
|
|
7793
7799
|
>
|
|
7794
7800
|
<button
|
|
7795
7801
|
aria-expanded={false}
|
|
@@ -8351,6 +8357,7 @@ exports[`dropdown regular 1`] = `
|
|
|
8351
8357
|
</div>,
|
|
8352
8358
|
}
|
|
8353
8359
|
}
|
|
8360
|
+
toggleVariant="default"
|
|
8354
8361
|
>
|
|
8355
8362
|
<button
|
|
8356
8363
|
aria-expanded={false}
|
|
@@ -8913,6 +8920,7 @@ exports[`dropdown right aligned 1`] = `
|
|
|
8913
8920
|
</div>,
|
|
8914
8921
|
}
|
|
8915
8922
|
}
|
|
8923
|
+
toggleVariant="default"
|
|
8916
8924
|
>
|
|
8917
8925
|
<button
|
|
8918
8926
|
aria-expanded={false}
|
|
@@ -1,5 +1,99 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`state action split button - renders primary variant 1`] = `
|
|
4
|
+
<DropdownToggle
|
|
5
|
+
id="Dropdown Toggle"
|
|
6
|
+
parentRef={<div />}
|
|
7
|
+
splitButtonItems={
|
|
8
|
+
Array [
|
|
9
|
+
<div>
|
|
10
|
+
test
|
|
11
|
+
</div>,
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
splitButtonVariant="action"
|
|
15
|
+
toggleVariant="primary"
|
|
16
|
+
>
|
|
17
|
+
<div
|
|
18
|
+
className="pf-c-dropdown__toggle pf-m-split-button pf-m-action pf-m-primary"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
key="1"
|
|
22
|
+
>
|
|
23
|
+
test
|
|
24
|
+
</div>
|
|
25
|
+
<Toggle
|
|
26
|
+
aria-label="Select"
|
|
27
|
+
bubbleEvent={false}
|
|
28
|
+
className=""
|
|
29
|
+
data-ouia-component-id="OUIA-Generated-DropdownToggle-10"
|
|
30
|
+
data-ouia-component-type="PF4/DropdownToggle"
|
|
31
|
+
data-ouia-safe={true}
|
|
32
|
+
getMenuRef={null}
|
|
33
|
+
id="Dropdown Toggle"
|
|
34
|
+
isActive={false}
|
|
35
|
+
isDisabled={false}
|
|
36
|
+
isOpen={false}
|
|
37
|
+
isPlain={false}
|
|
38
|
+
isPrimary={false}
|
|
39
|
+
isSplitButton={true}
|
|
40
|
+
onEnter={[Function]}
|
|
41
|
+
onToggle={[Function]}
|
|
42
|
+
parentRef={<div />}
|
|
43
|
+
toggleVariant="primary"
|
|
44
|
+
>
|
|
45
|
+
<button
|
|
46
|
+
aria-expanded={false}
|
|
47
|
+
aria-label="Select"
|
|
48
|
+
className="pf-c-dropdown__toggle-button pf-m-primary"
|
|
49
|
+
data-ouia-component-id="OUIA-Generated-DropdownToggle-10"
|
|
50
|
+
data-ouia-component-type="PF4/DropdownToggle"
|
|
51
|
+
data-ouia-safe={true}
|
|
52
|
+
disabled={false}
|
|
53
|
+
id="Dropdown Toggle"
|
|
54
|
+
onClick={[Function]}
|
|
55
|
+
onKeyDown={[Function]}
|
|
56
|
+
type="button"
|
|
57
|
+
>
|
|
58
|
+
<span
|
|
59
|
+
className=""
|
|
60
|
+
>
|
|
61
|
+
Dropdown
|
|
62
|
+
</span>
|
|
63
|
+
<span
|
|
64
|
+
className=""
|
|
65
|
+
>
|
|
66
|
+
<CaretDownIcon
|
|
67
|
+
color="currentColor"
|
|
68
|
+
noVerticalAlign={false}
|
|
69
|
+
size="sm"
|
|
70
|
+
>
|
|
71
|
+
<svg
|
|
72
|
+
aria-hidden={true}
|
|
73
|
+
aria-labelledby={null}
|
|
74
|
+
fill="currentColor"
|
|
75
|
+
height="1em"
|
|
76
|
+
role="img"
|
|
77
|
+
style={
|
|
78
|
+
Object {
|
|
79
|
+
"verticalAlign": "-0.125em",
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
viewBox="0 0 320 512"
|
|
83
|
+
width="1em"
|
|
84
|
+
>
|
|
85
|
+
<path
|
|
86
|
+
d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
|
|
87
|
+
/>
|
|
88
|
+
</svg>
|
|
89
|
+
</CaretDownIcon>
|
|
90
|
+
</span>
|
|
91
|
+
</button>
|
|
92
|
+
</Toggle>
|
|
93
|
+
</div>
|
|
94
|
+
</DropdownToggle>
|
|
95
|
+
`;
|
|
96
|
+
|
|
3
97
|
exports[`state active 1`] = `
|
|
4
98
|
<DropdownToggle
|
|
5
99
|
id="Dropdown Toggle"
|
|
@@ -23,6 +117,7 @@ exports[`state active 1`] = `
|
|
|
23
117
|
onEnter={[Function]}
|
|
24
118
|
onToggle={[Function]}
|
|
25
119
|
parentRef={<div />}
|
|
120
|
+
toggleVariant="default"
|
|
26
121
|
>
|
|
27
122
|
<button
|
|
28
123
|
aria-expanded={false}
|
|
@@ -74,10 +169,11 @@ exports[`state active 1`] = `
|
|
|
74
169
|
</DropdownToggle>
|
|
75
170
|
`;
|
|
76
171
|
|
|
77
|
-
exports[`state
|
|
172
|
+
exports[`state button variant - primary 1`] = `
|
|
78
173
|
<DropdownToggle
|
|
79
174
|
id="Dropdown Toggle"
|
|
80
175
|
parentRef={<div />}
|
|
176
|
+
toggleVariant="primary"
|
|
81
177
|
>
|
|
82
178
|
<Toggle
|
|
83
179
|
bubbleEvent={false}
|
|
@@ -96,10 +192,11 @@ exports[`state class changes 1`] = `
|
|
|
96
192
|
onEnter={[Function]}
|
|
97
193
|
onToggle={[Function]}
|
|
98
194
|
parentRef={<div />}
|
|
195
|
+
toggleVariant="primary"
|
|
99
196
|
>
|
|
100
197
|
<button
|
|
101
198
|
aria-expanded={false}
|
|
102
|
-
className="pf-c-dropdown__toggle"
|
|
199
|
+
className="pf-c-dropdown__toggle pf-m-primary"
|
|
103
200
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-8"
|
|
104
201
|
data-ouia-component-type="PF4/DropdownToggle"
|
|
105
202
|
data-ouia-safe={true}
|
|
@@ -108,6 +205,155 @@ exports[`state class changes 1`] = `
|
|
|
108
205
|
onClick={[Function]}
|
|
109
206
|
onKeyDown={[Function]}
|
|
110
207
|
type="button"
|
|
208
|
+
>
|
|
209
|
+
<span
|
|
210
|
+
className=""
|
|
211
|
+
>
|
|
212
|
+
Dropdown
|
|
213
|
+
</span>
|
|
214
|
+
<span
|
|
215
|
+
className=""
|
|
216
|
+
>
|
|
217
|
+
<CaretDownIcon
|
|
218
|
+
color="currentColor"
|
|
219
|
+
noVerticalAlign={false}
|
|
220
|
+
size="sm"
|
|
221
|
+
>
|
|
222
|
+
<svg
|
|
223
|
+
aria-hidden={true}
|
|
224
|
+
aria-labelledby={null}
|
|
225
|
+
fill="currentColor"
|
|
226
|
+
height="1em"
|
|
227
|
+
role="img"
|
|
228
|
+
style={
|
|
229
|
+
Object {
|
|
230
|
+
"verticalAlign": "-0.125em",
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
viewBox="0 0 320 512"
|
|
234
|
+
width="1em"
|
|
235
|
+
>
|
|
236
|
+
<path
|
|
237
|
+
d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
|
|
238
|
+
/>
|
|
239
|
+
</svg>
|
|
240
|
+
</CaretDownIcon>
|
|
241
|
+
</span>
|
|
242
|
+
</button>
|
|
243
|
+
</Toggle>
|
|
244
|
+
</DropdownToggle>
|
|
245
|
+
`;
|
|
246
|
+
|
|
247
|
+
exports[`state button variant - secondary 1`] = `
|
|
248
|
+
<DropdownToggle
|
|
249
|
+
id="Dropdown Toggle"
|
|
250
|
+
parentRef={<div />}
|
|
251
|
+
toggleVariant="secondary"
|
|
252
|
+
>
|
|
253
|
+
<Toggle
|
|
254
|
+
bubbleEvent={false}
|
|
255
|
+
className=""
|
|
256
|
+
data-ouia-component-id="OUIA-Generated-DropdownToggle-9"
|
|
257
|
+
data-ouia-component-type="PF4/DropdownToggle"
|
|
258
|
+
data-ouia-safe={true}
|
|
259
|
+
getMenuRef={null}
|
|
260
|
+
id="Dropdown Toggle"
|
|
261
|
+
isActive={false}
|
|
262
|
+
isDisabled={false}
|
|
263
|
+
isOpen={false}
|
|
264
|
+
isPlain={false}
|
|
265
|
+
isPrimary={false}
|
|
266
|
+
isSplitButton={false}
|
|
267
|
+
onEnter={[Function]}
|
|
268
|
+
onToggle={[Function]}
|
|
269
|
+
parentRef={<div />}
|
|
270
|
+
toggleVariant="secondary"
|
|
271
|
+
>
|
|
272
|
+
<button
|
|
273
|
+
aria-expanded={false}
|
|
274
|
+
className="pf-c-dropdown__toggle pf-m-secondary"
|
|
275
|
+
data-ouia-component-id="OUIA-Generated-DropdownToggle-9"
|
|
276
|
+
data-ouia-component-type="PF4/DropdownToggle"
|
|
277
|
+
data-ouia-safe={true}
|
|
278
|
+
disabled={false}
|
|
279
|
+
id="Dropdown Toggle"
|
|
280
|
+
onClick={[Function]}
|
|
281
|
+
onKeyDown={[Function]}
|
|
282
|
+
type="button"
|
|
283
|
+
>
|
|
284
|
+
<span
|
|
285
|
+
className=""
|
|
286
|
+
>
|
|
287
|
+
Dropdown
|
|
288
|
+
</span>
|
|
289
|
+
<span
|
|
290
|
+
className=""
|
|
291
|
+
>
|
|
292
|
+
<CaretDownIcon
|
|
293
|
+
color="currentColor"
|
|
294
|
+
noVerticalAlign={false}
|
|
295
|
+
size="sm"
|
|
296
|
+
>
|
|
297
|
+
<svg
|
|
298
|
+
aria-hidden={true}
|
|
299
|
+
aria-labelledby={null}
|
|
300
|
+
fill="currentColor"
|
|
301
|
+
height="1em"
|
|
302
|
+
role="img"
|
|
303
|
+
style={
|
|
304
|
+
Object {
|
|
305
|
+
"verticalAlign": "-0.125em",
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
viewBox="0 0 320 512"
|
|
309
|
+
width="1em"
|
|
310
|
+
>
|
|
311
|
+
<path
|
|
312
|
+
d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
|
|
313
|
+
/>
|
|
314
|
+
</svg>
|
|
315
|
+
</CaretDownIcon>
|
|
316
|
+
</span>
|
|
317
|
+
</button>
|
|
318
|
+
</Toggle>
|
|
319
|
+
</DropdownToggle>
|
|
320
|
+
`;
|
|
321
|
+
|
|
322
|
+
exports[`state class changes 1`] = `
|
|
323
|
+
<DropdownToggle
|
|
324
|
+
id="Dropdown Toggle"
|
|
325
|
+
parentRef={<div />}
|
|
326
|
+
>
|
|
327
|
+
<Toggle
|
|
328
|
+
bubbleEvent={false}
|
|
329
|
+
className=""
|
|
330
|
+
data-ouia-component-id="OUIA-Generated-DropdownToggle-12"
|
|
331
|
+
data-ouia-component-type="PF4/DropdownToggle"
|
|
332
|
+
data-ouia-safe={true}
|
|
333
|
+
getMenuRef={null}
|
|
334
|
+
id="Dropdown Toggle"
|
|
335
|
+
isActive={false}
|
|
336
|
+
isDisabled={false}
|
|
337
|
+
isOpen={false}
|
|
338
|
+
isPlain={false}
|
|
339
|
+
isPrimary={false}
|
|
340
|
+
isSplitButton={false}
|
|
341
|
+
onEnter={[Function]}
|
|
342
|
+
onToggle={[Function]}
|
|
343
|
+
parentRef={<div />}
|
|
344
|
+
toggleVariant="default"
|
|
345
|
+
>
|
|
346
|
+
<button
|
|
347
|
+
aria-expanded={false}
|
|
348
|
+
className="pf-c-dropdown__toggle"
|
|
349
|
+
data-ouia-component-id="OUIA-Generated-DropdownToggle-12"
|
|
350
|
+
data-ouia-component-type="PF4/DropdownToggle"
|
|
351
|
+
data-ouia-safe={true}
|
|
352
|
+
disabled={false}
|
|
353
|
+
id="Dropdown Toggle"
|
|
354
|
+
onClick={[Function]}
|
|
355
|
+
onKeyDown={[Function]}
|
|
356
|
+
type="button"
|
|
111
357
|
>
|
|
112
358
|
<span
|
|
113
359
|
className="some-test-class"
|
|
@@ -155,7 +401,7 @@ exports[`state class changes 2`] = `
|
|
|
155
401
|
<Toggle
|
|
156
402
|
bubbleEvent={false}
|
|
157
403
|
className=""
|
|
158
|
-
data-ouia-component-id="OUIA-Generated-DropdownToggle-
|
|
404
|
+
data-ouia-component-id="OUIA-Generated-DropdownToggle-13"
|
|
159
405
|
data-ouia-component-type="PF4/DropdownToggle"
|
|
160
406
|
data-ouia-safe={true}
|
|
161
407
|
getMenuRef={null}
|
|
@@ -169,11 +415,12 @@ exports[`state class changes 2`] = `
|
|
|
169
415
|
onEnter={[Function]}
|
|
170
416
|
onToggle={[Function]}
|
|
171
417
|
parentRef={<div />}
|
|
418
|
+
toggleVariant="default"
|
|
172
419
|
>
|
|
173
420
|
<button
|
|
174
421
|
aria-expanded={false}
|
|
175
422
|
className="pf-c-dropdown__toggle"
|
|
176
|
-
data-ouia-component-id="OUIA-Generated-DropdownToggle-
|
|
423
|
+
data-ouia-component-id="OUIA-Generated-DropdownToggle-13"
|
|
177
424
|
data-ouia-component-type="PF4/DropdownToggle"
|
|
178
425
|
data-ouia-safe={true}
|
|
179
426
|
disabled={false}
|
|
@@ -242,6 +489,7 @@ exports[`state focus 1`] = `
|
|
|
242
489
|
onEnter={[Function]}
|
|
243
490
|
onToggle={[Function]}
|
|
244
491
|
parentRef={<div />}
|
|
492
|
+
toggleVariant="default"
|
|
245
493
|
>
|
|
246
494
|
<button
|
|
247
495
|
aria-expanded={false}
|
|
@@ -315,6 +563,7 @@ exports[`state hover 1`] = `
|
|
|
315
563
|
onEnter={[Function]}
|
|
316
564
|
onToggle={[Function]}
|
|
317
565
|
parentRef={<div />}
|
|
566
|
+
toggleVariant="default"
|
|
318
567
|
>
|
|
319
568
|
<button
|
|
320
569
|
aria-expanded={false}
|
|
@@ -365,3 +614,96 @@ exports[`state hover 1`] = `
|
|
|
365
614
|
</Toggle>
|
|
366
615
|
</DropdownToggle>
|
|
367
616
|
`;
|
|
617
|
+
|
|
618
|
+
exports[`state split button - does not render primary variant 1`] = `
|
|
619
|
+
<DropdownToggle
|
|
620
|
+
id="Dropdown Toggle"
|
|
621
|
+
parentRef={<div />}
|
|
622
|
+
splitButtonItems={
|
|
623
|
+
Array [
|
|
624
|
+
<div>
|
|
625
|
+
test
|
|
626
|
+
</div>,
|
|
627
|
+
]
|
|
628
|
+
}
|
|
629
|
+
toggleVariant="primary"
|
|
630
|
+
>
|
|
631
|
+
<div
|
|
632
|
+
className="pf-c-dropdown__toggle pf-m-split-button"
|
|
633
|
+
>
|
|
634
|
+
<div
|
|
635
|
+
key="0"
|
|
636
|
+
>
|
|
637
|
+
test
|
|
638
|
+
</div>
|
|
639
|
+
<Toggle
|
|
640
|
+
aria-label="Select"
|
|
641
|
+
bubbleEvent={false}
|
|
642
|
+
className=""
|
|
643
|
+
data-ouia-component-id="OUIA-Generated-DropdownToggle-11"
|
|
644
|
+
data-ouia-component-type="PF4/DropdownToggle"
|
|
645
|
+
data-ouia-safe={true}
|
|
646
|
+
getMenuRef={null}
|
|
647
|
+
id="Dropdown Toggle"
|
|
648
|
+
isActive={false}
|
|
649
|
+
isDisabled={false}
|
|
650
|
+
isOpen={false}
|
|
651
|
+
isPlain={false}
|
|
652
|
+
isPrimary={false}
|
|
653
|
+
isSplitButton={true}
|
|
654
|
+
onEnter={[Function]}
|
|
655
|
+
onToggle={[Function]}
|
|
656
|
+
parentRef={<div />}
|
|
657
|
+
toggleVariant="primary"
|
|
658
|
+
>
|
|
659
|
+
<button
|
|
660
|
+
aria-expanded={false}
|
|
661
|
+
aria-label="Select"
|
|
662
|
+
className="pf-c-dropdown__toggle-button pf-m-primary"
|
|
663
|
+
data-ouia-component-id="OUIA-Generated-DropdownToggle-11"
|
|
664
|
+
data-ouia-component-type="PF4/DropdownToggle"
|
|
665
|
+
data-ouia-safe={true}
|
|
666
|
+
disabled={false}
|
|
667
|
+
id="Dropdown Toggle"
|
|
668
|
+
onClick={[Function]}
|
|
669
|
+
onKeyDown={[Function]}
|
|
670
|
+
type="button"
|
|
671
|
+
>
|
|
672
|
+
<span
|
|
673
|
+
className=""
|
|
674
|
+
>
|
|
675
|
+
Dropdown
|
|
676
|
+
</span>
|
|
677
|
+
<span
|
|
678
|
+
className=""
|
|
679
|
+
>
|
|
680
|
+
<CaretDownIcon
|
|
681
|
+
color="currentColor"
|
|
682
|
+
noVerticalAlign={false}
|
|
683
|
+
size="sm"
|
|
684
|
+
>
|
|
685
|
+
<svg
|
|
686
|
+
aria-hidden={true}
|
|
687
|
+
aria-labelledby={null}
|
|
688
|
+
fill="currentColor"
|
|
689
|
+
height="1em"
|
|
690
|
+
role="img"
|
|
691
|
+
style={
|
|
692
|
+
Object {
|
|
693
|
+
"verticalAlign": "-0.125em",
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
viewBox="0 0 320 512"
|
|
697
|
+
width="1em"
|
|
698
|
+
>
|
|
699
|
+
<path
|
|
700
|
+
d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
|
|
701
|
+
/>
|
|
702
|
+
</svg>
|
|
703
|
+
</CaretDownIcon>
|
|
704
|
+
</span>
|
|
705
|
+
</button>
|
|
706
|
+
</Toggle>
|
|
707
|
+
</div>
|
|
708
|
+
</DropdownToggle>
|
|
709
|
+
`;
|