@patternfly/react-core 4.261.0 → 4.262.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/umd/react-core.min.css +1044 -1044
- package/package.json +2 -2
- package/src/components/Menu/examples/Menu.md +2 -2
- package/src/components/Menu/examples/{MenuFilteringWithTextInput.tsx → MenuFilteringWithSearchInput.tsx} +3 -4
- package/src/demos/ComposableMenu/examples/ComposableApplicationLauncher.tsx +2 -7
- package/src/demos/ComposableMenu/examples/ComposableContextSelector.tsx +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.262.0",
|
|
4
4
|
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"react": "^16.8 || ^17 || ^18",
|
|
71
71
|
"react-dom": "^16.8 || ^17 || ^18"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "441c5d2ff327a5c9b97eaa299c1c8b9b929f38e1"
|
|
74
74
|
}
|
|
@@ -38,9 +38,9 @@ import AngleLeftIcon from '@patternfly/react-icons/dist/esm/icons/angle-left-ico
|
|
|
38
38
|
```ts file="./MenuWithCheckbox.tsx"
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
### Filtering with
|
|
41
|
+
### Filtering with search input
|
|
42
42
|
|
|
43
|
-
```ts file="
|
|
43
|
+
```ts file="MenuFilteringWithSearchInput.tsx"
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
### With links
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Menu, MenuList, MenuItem, MenuContent, MenuInput,
|
|
2
|
+
import { Menu, MenuList, MenuItem, MenuContent, MenuInput, Divider, SearchInput } from '@patternfly/react-core';
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const MenuFilteringWithSearchInput: React.FunctionComponent = () => {
|
|
5
5
|
const [activeItem, setActiveItem] = React.useState(0);
|
|
6
6
|
const [input, setInput] = React.useState('');
|
|
7
7
|
|
|
@@ -35,10 +35,9 @@ export const MenuFilteringWithTextInput: React.FunctionComponent = () => {
|
|
|
35
35
|
return (
|
|
36
36
|
<Menu onSelect={onSelect} activeItemId={activeItem}>
|
|
37
37
|
<MenuInput>
|
|
38
|
-
<
|
|
38
|
+
<SearchInput
|
|
39
39
|
value={input}
|
|
40
40
|
aria-label="Filter menu items"
|
|
41
|
-
iconVariant="search"
|
|
42
41
|
type="search"
|
|
43
42
|
onChange={value => handleTextInputChange(value)}
|
|
44
43
|
/>
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
Popper,
|
|
11
11
|
Tooltip,
|
|
12
12
|
Divider,
|
|
13
|
-
|
|
13
|
+
SearchInput
|
|
14
14
|
} from '@patternfly/react-core';
|
|
15
15
|
import { Link } from '@reach/router';
|
|
16
16
|
import ThIcon from '@patternfly/react-icons/dist/js/icons/th-icon';
|
|
@@ -250,12 +250,7 @@ export const ComposableApplicationLauncher: React.FunctionComponent = () => {
|
|
|
250
250
|
// eslint-disable-next-line no-console
|
|
251
251
|
<Menu ref={menuRef} onActionClick={onFavorite} onSelect={(_ev, itemId) => console.log('selected', itemId)}>
|
|
252
252
|
<MenuInput>
|
|
253
|
-
<
|
|
254
|
-
aria-label="Filter menu items"
|
|
255
|
-
iconVariant="search"
|
|
256
|
-
type="search"
|
|
257
|
-
onChange={value => onTextChange(value)}
|
|
258
|
-
/>
|
|
253
|
+
<SearchInput aria-label="Filter menu items" type="search" onChange={value => onTextChange(value)} />
|
|
259
254
|
</MenuInput>
|
|
260
255
|
<Divider />
|
|
261
256
|
<MenuContent>
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
MenuInput,
|
|
10
10
|
Popper,
|
|
11
11
|
Divider,
|
|
12
|
-
TextInput,
|
|
13
12
|
InputGroup,
|
|
14
13
|
Button,
|
|
15
|
-
ButtonVariant
|
|
14
|
+
ButtonVariant,
|
|
15
|
+
SearchInput
|
|
16
16
|
} from '@patternfly/react-core';
|
|
17
17
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
18
18
|
|
|
@@ -160,7 +160,7 @@ export const ComposableContextSelector: React.FunctionComponent = () => {
|
|
|
160
160
|
>
|
|
161
161
|
<MenuInput>
|
|
162
162
|
<InputGroup>
|
|
163
|
-
<
|
|
163
|
+
<SearchInput
|
|
164
164
|
value={searchInputValue}
|
|
165
165
|
type="search"
|
|
166
166
|
placeholder="Search"
|