@patternfly/react-core 6.4.0-prerelease.2 → 6.4.0-prerelease.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 +10 -0
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/AboutModal/package.json +1 -1
- package/dist/dynamic/components/Accordion/package.json +1 -1
- package/dist/dynamic/components/ActionList/package.json +1 -1
- package/dist/dynamic/components/Alert/package.json +1 -1
- package/dist/dynamic/components/Avatar/package.json +1 -1
- package/dist/dynamic/components/BackToTop/package.json +1 -1
- package/dist/dynamic/components/Backdrop/package.json +1 -1
- package/dist/dynamic/components/BackgroundImage/package.json +1 -1
- package/dist/dynamic/components/Badge/package.json +1 -1
- package/dist/dynamic/components/Banner/package.json +1 -1
- package/dist/dynamic/components/Brand/package.json +1 -1
- package/dist/dynamic/components/Breadcrumb/package.json +1 -1
- package/dist/dynamic/components/Button/package.json +1 -1
- package/dist/dynamic/components/CalendarMonth/package.json +1 -1
- package/dist/dynamic/components/Card/package.json +1 -1
- package/dist/dynamic/components/Checkbox/package.json +1 -1
- package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/Content/package.json +1 -1
- package/dist/dynamic/components/DataList/package.json +1 -1
- package/dist/dynamic/components/DatePicker/package.json +1 -1
- package/dist/dynamic/components/DescriptionList/package.json +1 -1
- package/dist/dynamic/components/Divider/package.json +1 -1
- package/dist/dynamic/components/Drawer/package.json +1 -1
- package/dist/dynamic/components/Dropdown/package.json +1 -1
- package/dist/dynamic/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/components/EmptyState/package.json +1 -1
- package/dist/dynamic/components/ExpandableSection/package.json +1 -1
- package/dist/dynamic/components/FileUpload/package.json +1 -1
- package/dist/dynamic/components/Form/package.json +1 -1
- package/dist/dynamic/components/FormSelect/package.json +1 -1
- package/dist/dynamic/components/HelperText/package.json +1 -1
- package/dist/dynamic/components/Hint/package.json +1 -1
- package/dist/dynamic/components/Icon/package.json +1 -1
- package/dist/dynamic/components/InputGroup/package.json +1 -1
- package/dist/dynamic/components/JumpLinks/package.json +1 -1
- package/dist/dynamic/components/Label/package.json +1 -1
- package/dist/dynamic/components/List/package.json +1 -1
- package/dist/dynamic/components/LoginPage/package.json +1 -1
- package/dist/dynamic/components/Masthead/package.json +1 -1
- package/dist/dynamic/components/Menu/package.json +1 -1
- package/dist/dynamic/components/MenuToggle/package.json +1 -1
- package/dist/dynamic/components/Modal/package.json +1 -1
- package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
- package/dist/dynamic/components/Nav/package.json +1 -1
- package/dist/dynamic/components/NotificationBadge/package.json +1 -1
- package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
- package/dist/dynamic/components/NumberInput/package.json +1 -1
- package/dist/dynamic/components/OverflowMenu/package.json +1 -1
- package/dist/dynamic/components/Page/package.json +1 -1
- package/dist/dynamic/components/Pagination/package.json +1 -1
- package/dist/dynamic/components/Panel/package.json +1 -1
- package/dist/dynamic/components/Popover/package.json +1 -1
- package/dist/dynamic/components/Progress/package.json +1 -1
- package/dist/dynamic/components/ProgressStepper/package.json +1 -1
- package/dist/dynamic/components/Radio/package.json +1 -1
- package/dist/dynamic/components/SearchInput/package.json +1 -1
- package/dist/dynamic/components/Select/package.json +1 -1
- package/dist/dynamic/components/Sidebar/package.json +1 -1
- package/dist/dynamic/components/SimpleList/package.json +1 -1
- package/dist/dynamic/components/Skeleton/package.json +1 -1
- package/dist/dynamic/components/SkipToContent/package.json +1 -1
- package/dist/dynamic/components/Slider/package.json +1 -1
- package/dist/dynamic/components/Spinner/package.json +1 -1
- package/dist/dynamic/components/Switch/package.json +1 -1
- package/dist/dynamic/components/Tabs/package.json +1 -1
- package/dist/dynamic/components/TextArea/package.json +1 -1
- package/dist/dynamic/components/TextInput/package.json +1 -1
- package/dist/dynamic/components/TextInputGroup/package.json +1 -1
- package/dist/dynamic/components/TimePicker/package.json +1 -1
- package/dist/dynamic/components/Timestamp/package.json +1 -1
- package/dist/dynamic/components/Title/package.json +1 -1
- package/dist/dynamic/components/ToggleGroup/package.json +1 -1
- package/dist/dynamic/components/Toolbar/package.json +1 -1
- package/dist/dynamic/components/Tooltip/package.json +1 -1
- package/dist/dynamic/components/TreeView/package.json +1 -1
- package/dist/dynamic/components/Truncate/package.json +1 -1
- package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
- package/dist/dynamic/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
- package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
- package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
- package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
- package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/dynamic/helpers/AnimationsProvider/AnimationsProvider/package.json +1 -1
- package/dist/dynamic/helpers/AnimationsProvider/package.json +1 -1
- package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
- package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
- package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
- package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
- package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
- package/dist/dynamic/helpers/constants/package.json +1 -1
- package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
- package/dist/dynamic/helpers/fileUtils/package.json +1 -1
- package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
- package/dist/dynamic/helpers/package.json +1 -1
- package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
- package/dist/dynamic/helpers/typeUtils/package.json +1 -1
- package/dist/dynamic/helpers/useInterval/package.json +1 -1
- package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
- package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
- package/dist/dynamic/helpers/util/package.json +1 -1
- package/dist/dynamic/layouts/Bullseye/package.json +1 -1
- package/dist/dynamic/layouts/Flex/package.json +1 -1
- package/dist/dynamic/layouts/Gallery/package.json +1 -1
- package/dist/dynamic/layouts/Grid/package.json +1 -1
- package/dist/dynamic/layouts/Level/package.json +1 -1
- package/dist/dynamic/layouts/Split/package.json +1 -1
- package/dist/dynamic/layouts/Stack/package.json +1 -1
- package/dist/dynamic/styles/package.json +1 -1
- package/dist/umd/assets/{output-DCSggaDi.css → output-TaAEjSvZ.css} +20228 -20228
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +2 -2
- package/src/components/Alert/examples/AlertDynamicLiveRegion.tsx +18 -12
- package/src/components/Alert/examples/AlertGroupMultipleDynamic.tsx +6 -6
- package/src/components/Alert/examples/AlertGroupSingularDynamic.tsx +10 -10
- package/src/components/Alert/examples/AlertGroupSingularDynamicOverflow.tsx +10 -10
- package/src/components/Alert/examples/AlertGroupToast.tsx +10 -10
- package/src/components/Alert/examples/AlertGroupToastOverflowCapture.tsx +10 -10
- package/src/components/Menu/examples/MenuFilterDrilldown.tsx +1 -0
- package/src/components/Menu/examples/MenuFilteringWithSearchInput.tsx +1 -0
- package/src/components/Toolbar/examples/ToolbarContentWrap.tsx +10 -3
- package/src/components/Toolbar/examples/ToolbarItems.tsx +11 -4
- package/src/components/Toolbar/examples/ToolbarSticky.tsx +8 -2
- package/src/demos/CustomMenus/examples/InlineSearchFilterMenuDemo.tsx +4 -0
- package/src/demos/DataList/examples/DataListExpandableControlInToolbar.tsx +7 -1
- package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +11 -1
package/helpers/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.4.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.4.0-prerelease.3","private":true}
|
package/layouts/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.4.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.4.0-prerelease.3","private":true}
|
package/next/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.4.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.4.0-prerelease.3","private":true}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "6.4.0-prerelease.
|
|
3
|
+
"version": "6.4.0-prerelease.4",
|
|
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",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"react": "^17 || ^18 || ^19",
|
|
64
64
|
"react-dom": "^17 || ^18 || ^19"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "299d9d2d4df6d9a2868c6f367201655398ea6bae"
|
|
67
67
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, useState } from 'react';
|
|
2
|
-
import { Alert, AlertGroup, AlertVariant,
|
|
2
|
+
import { Alert, AlertGroup, AlertVariant, Flex, FlexItem } from '@patternfly/react-core';
|
|
3
3
|
import buttonStyles from '@patternfly/react-styles/css/components/Button/button';
|
|
4
4
|
|
|
5
5
|
interface AlertInfo {
|
|
@@ -41,17 +41,23 @@ export const DynamicLiveRegionAlert: React.FunctionComponent = () => {
|
|
|
41
41
|
|
|
42
42
|
return (
|
|
43
43
|
<Fragment>
|
|
44
|
-
<
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
<Flex gap={{ default: 'gapXs' }} style={{ marginBottom: '16px' }}>
|
|
45
|
+
<FlexItem>
|
|
46
|
+
<button onClick={addSuccessAlert} type="button" className={btnClasses}>
|
|
47
|
+
Add single success alert
|
|
48
|
+
</button>
|
|
49
|
+
</FlexItem>
|
|
50
|
+
<FlexItem>
|
|
51
|
+
<button onClick={addInfoAlert} type="button" className={btnClasses}>
|
|
52
|
+
Add single info alert
|
|
53
|
+
</button>
|
|
54
|
+
</FlexItem>
|
|
55
|
+
<FlexItem>
|
|
56
|
+
<button onClick={addDangerAlert} type="button" className={btnClasses}>
|
|
57
|
+
Add single danger alert
|
|
58
|
+
</button>
|
|
59
|
+
</FlexItem>
|
|
60
|
+
</Flex>
|
|
55
61
|
<AlertGroup hasAnimations isLiveRegion aria-live="polite" aria-relevant="additions text" aria-atomic="false">
|
|
56
62
|
{alerts.map(({ title, variant, key }) => (
|
|
57
63
|
<Alert variant={variant} title={title} key={key} />
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
AlertGroup,
|
|
6
6
|
AlertActionCloseButton,
|
|
7
7
|
AlertVariant,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Flex,
|
|
9
|
+
FlexItem
|
|
10
10
|
} from '@patternfly/react-core';
|
|
11
11
|
import buttonStyles from '@patternfly/react-styles/css/components/Button/button';
|
|
12
12
|
|
|
@@ -35,13 +35,13 @@ export const AlertGroupMultipleDynamic: React.FunctionComponent = () => {
|
|
|
35
35
|
|
|
36
36
|
return (
|
|
37
37
|
<Fragment>
|
|
38
|
-
<
|
|
39
|
-
<
|
|
38
|
+
<Flex gap={{ default: 'gapXs' }}>
|
|
39
|
+
<FlexItem>
|
|
40
40
|
<button onClick={addAlertCollection} type="button" className={btnClasses}>
|
|
41
41
|
Add alert collection
|
|
42
42
|
</button>
|
|
43
|
-
</
|
|
44
|
-
</
|
|
43
|
+
</FlexItem>
|
|
44
|
+
</Flex>
|
|
45
45
|
<AlertGroup hasAnimations isToast isLiveRegion>
|
|
46
46
|
{alerts.map(({ title, variant, key }) => (
|
|
47
47
|
<Alert
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
AlertGroup,
|
|
6
6
|
AlertActionCloseButton,
|
|
7
7
|
AlertVariant,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Flex,
|
|
9
|
+
FlexItem
|
|
10
10
|
} from '@patternfly/react-core';
|
|
11
11
|
import buttonStyles from '@patternfly/react-styles/css/components/Button/button';
|
|
12
12
|
|
|
@@ -39,23 +39,23 @@ export const AlertGroupSingularDynamic: React.FunctionComponent = () => {
|
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
41
|
<Fragment>
|
|
42
|
-
<
|
|
43
|
-
<
|
|
42
|
+
<Flex gap={{ default: 'gapXs' }} style={{ marginBottom: '16px' }}>
|
|
43
|
+
<FlexItem>
|
|
44
44
|
<button onClick={addSuccessAlert} type="button" className={btnClasses}>
|
|
45
45
|
Add single success alert
|
|
46
46
|
</button>
|
|
47
|
-
</
|
|
48
|
-
<
|
|
47
|
+
</FlexItem>
|
|
48
|
+
<FlexItem>
|
|
49
49
|
<button onClick={addDangerAlert} type="button" className={btnClasses}>
|
|
50
50
|
Add single danger alert
|
|
51
51
|
</button>
|
|
52
|
-
</
|
|
53
|
-
<
|
|
52
|
+
</FlexItem>
|
|
53
|
+
<FlexItem>
|
|
54
54
|
<button onClick={addInfoAlert} type="button" className={btnClasses}>
|
|
55
55
|
Add single info alert
|
|
56
56
|
</button>
|
|
57
|
-
</
|
|
58
|
-
</
|
|
57
|
+
</FlexItem>
|
|
58
|
+
</Flex>
|
|
59
59
|
<AlertGroup hasAnimations isLiveRegion>
|
|
60
60
|
{alerts.map(({ title, variant, key }) => (
|
|
61
61
|
<Alert
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
AlertGroup,
|
|
6
6
|
AlertActionCloseButton,
|
|
7
7
|
AlertVariant,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Flex,
|
|
9
|
+
FlexItem
|
|
10
10
|
} from '@patternfly/react-core';
|
|
11
11
|
import buttonStyles from '@patternfly/react-styles/css/components/Button/button';
|
|
12
12
|
|
|
@@ -58,23 +58,23 @@ export const AlertGroupSingularDynamicOverflow: React.FunctionComponent = () =>
|
|
|
58
58
|
|
|
59
59
|
return (
|
|
60
60
|
<Fragment>
|
|
61
|
-
<
|
|
62
|
-
<
|
|
61
|
+
<Flex gap={{ default: 'gapXs' }} style={{ marginBottom: '16px' }}>
|
|
62
|
+
<FlexItem>
|
|
63
63
|
<button onClick={addSuccessAlert} type="button" className={btnClasses}>
|
|
64
64
|
Add single success alert
|
|
65
65
|
</button>
|
|
66
|
-
</
|
|
67
|
-
<
|
|
66
|
+
</FlexItem>
|
|
67
|
+
<FlexItem>
|
|
68
68
|
<button onClick={addDangerAlert} type="button" className={btnClasses}>
|
|
69
69
|
Add single danger alert
|
|
70
70
|
</button>
|
|
71
|
-
</
|
|
72
|
-
<
|
|
71
|
+
</FlexItem>
|
|
72
|
+
<FlexItem>
|
|
73
73
|
<button onClick={addInfoAlert} type="button" className={btnClasses}>
|
|
74
74
|
Add single info alert
|
|
75
75
|
</button>
|
|
76
|
-
</
|
|
77
|
-
</
|
|
76
|
+
</FlexItem>
|
|
77
|
+
</Flex>
|
|
78
78
|
<AlertGroup hasAnimations isLiveRegion onOverflowClick={onOverflowClick} overflowMessage={overflowMessage}>
|
|
79
79
|
{alerts.slice(0, maxDisplayed).map(({ key, variant, title }) => (
|
|
80
80
|
<Alert
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
AlertGroup,
|
|
6
6
|
AlertActionCloseButton,
|
|
7
7
|
AlertVariant,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Flex,
|
|
9
|
+
FlexItem
|
|
10
10
|
} from '@patternfly/react-core';
|
|
11
11
|
import buttonStyles from '@patternfly/react-styles/css/components/Button/button';
|
|
12
12
|
|
|
@@ -39,23 +39,23 @@ export const AlertGroupToast: React.FunctionComponent = () => {
|
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
41
|
<Fragment>
|
|
42
|
-
<
|
|
43
|
-
<
|
|
42
|
+
<Flex gap={{ default: 'gapXs' }}>
|
|
43
|
+
<FlexItem>
|
|
44
44
|
<button onClick={addSuccessAlert} type="button" className={btnClasses}>
|
|
45
45
|
Add toast success alert
|
|
46
46
|
</button>
|
|
47
|
-
</
|
|
48
|
-
<
|
|
47
|
+
</FlexItem>
|
|
48
|
+
<FlexItem>
|
|
49
49
|
<button onClick={addDangerAlert} type="button" className={btnClasses}>
|
|
50
50
|
Add toast danger alert
|
|
51
51
|
</button>
|
|
52
|
-
</
|
|
53
|
-
<
|
|
52
|
+
</FlexItem>
|
|
53
|
+
<FlexItem>
|
|
54
54
|
<button onClick={addInfoAlert} type="button" className={btnClasses}>
|
|
55
55
|
Add toast info alert
|
|
56
56
|
</button>
|
|
57
|
-
</
|
|
58
|
-
</
|
|
57
|
+
</FlexItem>
|
|
58
|
+
</Flex>
|
|
59
59
|
<AlertGroup hasAnimations isToast isLiveRegion>
|
|
60
60
|
{alerts.map(({ key, variant, title }) => (
|
|
61
61
|
<Alert
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
AlertGroup,
|
|
6
6
|
AlertActionCloseButton,
|
|
7
7
|
AlertVariant,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Flex,
|
|
9
|
+
FlexItem
|
|
10
10
|
} from '@patternfly/react-core';
|
|
11
11
|
import buttonStyles from '@patternfly/react-styles/css/components/Button/button';
|
|
12
12
|
|
|
@@ -58,23 +58,23 @@ export const AlertGroupToastOverflowCapture: React.FunctionComponent = () => {
|
|
|
58
58
|
|
|
59
59
|
return (
|
|
60
60
|
<Fragment>
|
|
61
|
-
<
|
|
62
|
-
<
|
|
61
|
+
<Flex gap={{ default: 'gapXs' }} style={{ marginBottom: '16px' }}>
|
|
62
|
+
<FlexItem>
|
|
63
63
|
<button onClick={addSuccessAlert} type="button" className={btnClasses}>
|
|
64
64
|
Add toast success alert
|
|
65
65
|
</button>
|
|
66
|
-
</
|
|
67
|
-
<
|
|
66
|
+
</FlexItem>
|
|
67
|
+
<FlexItem>
|
|
68
68
|
<button onClick={addDangerAlert} type="button" className={btnClasses}>
|
|
69
69
|
Add toast danger alert
|
|
70
70
|
</button>
|
|
71
|
-
</
|
|
72
|
-
<
|
|
71
|
+
</FlexItem>
|
|
72
|
+
<FlexItem>
|
|
73
73
|
<button onClick={addInfoAlert} type="button" className={btnClasses}>
|
|
74
74
|
Add toast info alert
|
|
75
75
|
</button>
|
|
76
|
-
</
|
|
77
|
-
</
|
|
76
|
+
</FlexItem>
|
|
77
|
+
</Flex>
|
|
78
78
|
<AlertGroup
|
|
79
79
|
hasAnimations
|
|
80
80
|
isToast
|
|
@@ -110,6 +110,7 @@ export const MenuWithDrilldown: React.FunctionComponent = () => {
|
|
|
110
110
|
value={startInput}
|
|
111
111
|
aria-label="Filter menu items"
|
|
112
112
|
onChange={(_event, value) => handleStartTextInputChange(value)}
|
|
113
|
+
onClear={() => handleStartTextInputChange('')}
|
|
113
114
|
/>
|
|
114
115
|
</MenuSearchInput>
|
|
115
116
|
</MenuSearch>
|
|
@@ -49,6 +49,7 @@ export const MenuFilteringWithSearchInput: React.FunctionComponent = () => {
|
|
|
49
49
|
value={input}
|
|
50
50
|
aria-label="Filter menu items"
|
|
51
51
|
onChange={(_event, value) => handleTextInputChange(value)}
|
|
52
|
+
onClear={() => handleTextInputChange('')}
|
|
52
53
|
/>
|
|
53
54
|
</MenuSearchInput>
|
|
54
55
|
</MenuSearch>
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import { Fragment } from 'react';
|
|
1
|
+
import { Fragment, useState } from 'react';
|
|
2
2
|
import { Toolbar, ToolbarItem, ToolbarContent } from '@patternfly/react-core';
|
|
3
3
|
import { Button, SearchInput } from '@patternfly/react-core';
|
|
4
4
|
|
|
5
|
-
export const ToolbarItems
|
|
5
|
+
export const ToolbarItems = () => {
|
|
6
|
+
const [searchValue, setSearchValue] = useState('');
|
|
7
|
+
|
|
6
8
|
const items = (
|
|
7
9
|
<Fragment>
|
|
8
10
|
<ToolbarItem>
|
|
9
|
-
<SearchInput
|
|
11
|
+
<SearchInput
|
|
12
|
+
aria-label="Items example search input"
|
|
13
|
+
value={searchValue}
|
|
14
|
+
onChange={(_event, value) => setSearchValue(value)}
|
|
15
|
+
onClear={() => setSearchValue('')}
|
|
16
|
+
/>
|
|
10
17
|
</ToolbarItem>
|
|
11
18
|
<ToolbarItem>
|
|
12
19
|
<Button variant="secondary">Action</Button>
|
|
@@ -1,19 +1,26 @@
|
|
|
1
|
-
import { Fragment } from 'react';
|
|
1
|
+
import { Fragment, useState } from 'react';
|
|
2
2
|
import { Toolbar, ToolbarItem, ToolbarContent } from '@patternfly/react-core';
|
|
3
3
|
import { Button, SearchInput } from '@patternfly/react-core';
|
|
4
4
|
|
|
5
|
-
export const ToolbarItems
|
|
5
|
+
export const ToolbarItems = () => {
|
|
6
|
+
const [searchValue, setSearchValue] = useState('');
|
|
7
|
+
|
|
6
8
|
const items = (
|
|
7
9
|
<Fragment>
|
|
8
10
|
<ToolbarItem>
|
|
9
|
-
<SearchInput
|
|
11
|
+
<SearchInput
|
|
12
|
+
aria-label="Items example search input"
|
|
13
|
+
value={searchValue}
|
|
14
|
+
onChange={(_event, value) => setSearchValue(value)}
|
|
15
|
+
onClear={() => setSearchValue('')}
|
|
16
|
+
/>
|
|
10
17
|
</ToolbarItem>
|
|
11
18
|
<ToolbarItem>
|
|
12
19
|
<Button variant="secondary">Action</Button>
|
|
13
20
|
</ToolbarItem>
|
|
14
21
|
<ToolbarItem variant="separator" />
|
|
15
22
|
<ToolbarItem>
|
|
16
|
-
<Button variant="primary">
|
|
23
|
+
<Button variant="primary">Action2</Button>
|
|
17
24
|
</ToolbarItem>
|
|
18
25
|
</Fragment>
|
|
19
26
|
);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Fragment, useState } from 'react';
|
|
2
2
|
import { Toolbar, ToolbarItem, ToolbarContent, SearchInput, Checkbox } from '@patternfly/react-core';
|
|
3
3
|
|
|
4
|
-
export const ToolbarSticky
|
|
4
|
+
export const ToolbarSticky = () => {
|
|
5
5
|
const [isSticky, setIsSticky] = useState(true);
|
|
6
6
|
const [showEvenOnly, setShowEvenOnly] = useState(true);
|
|
7
|
+
const [searchValue, setSearchValue] = useState('');
|
|
7
8
|
const array = Array.from(Array(30), (_, x) => x); // create array of numbers from 1-30 for demo purposes
|
|
8
9
|
const numbers = showEvenOnly ? array.filter((number) => number % 2 === 0) : array;
|
|
9
10
|
|
|
@@ -13,7 +14,12 @@ export const ToolbarSticky: React.FunctionComponent = () => {
|
|
|
13
14
|
<Toolbar id="toolbar-sticky" inset={{ default: 'insetNone' }} isSticky={isSticky}>
|
|
14
15
|
<ToolbarContent>
|
|
15
16
|
<ToolbarItem>
|
|
16
|
-
<SearchInput
|
|
17
|
+
<SearchInput
|
|
18
|
+
aria-label="Sticky example search input"
|
|
19
|
+
value={searchValue}
|
|
20
|
+
onChange={(_event, value) => setSearchValue(value)}
|
|
21
|
+
onClear={() => setSearchValue('')}
|
|
22
|
+
/>
|
|
17
23
|
</ToolbarItem>
|
|
18
24
|
<ToolbarItem alignSelf="center">
|
|
19
25
|
<Checkbox
|
|
@@ -78,6 +78,10 @@ export const InlineSearchFilterMenuDemo: React.FunctionComponent = () => {
|
|
|
78
78
|
value={input}
|
|
79
79
|
aria-label="Filter menu items"
|
|
80
80
|
onChange={(_event, value) => handleTextInputChange(value)}
|
|
81
|
+
onClear={(event) => {
|
|
82
|
+
event.stopPropagation();
|
|
83
|
+
handleTextInputChange('');
|
|
84
|
+
}}
|
|
81
85
|
/>
|
|
82
86
|
</MenuSearchInput>
|
|
83
87
|
</MenuSearch>
|
|
@@ -38,6 +38,7 @@ export const DataListExpandableControlInToolbar: React.FunctionComponent = () =>
|
|
|
38
38
|
const [isOpen2, setIsOpen2] = useState(false);
|
|
39
39
|
const [isOpen3, setIsOpen3] = useState(false);
|
|
40
40
|
const [allExpanded, setAllExpanded] = useState(false);
|
|
41
|
+
const [searchValue, setSearchValue] = useState('');
|
|
41
42
|
|
|
42
43
|
const onToggleAll = () => {
|
|
43
44
|
setAllExpanded((prevAllExpanded) => !prevAllExpanded);
|
|
@@ -103,7 +104,12 @@ export const DataListExpandableControlInToolbar: React.FunctionComponent = () =>
|
|
|
103
104
|
</Tooltip>
|
|
104
105
|
</ToolbarItem>
|
|
105
106
|
<ToolbarItem>
|
|
106
|
-
<SearchInput
|
|
107
|
+
<SearchInput
|
|
108
|
+
aria-label="search input example"
|
|
109
|
+
value={searchValue}
|
|
110
|
+
onChange={(_event, value) => setSearchValue(value)}
|
|
111
|
+
onClear={() => setSearchValue('')}
|
|
112
|
+
/>
|
|
107
113
|
</ToolbarItem>
|
|
108
114
|
<ToolbarItem>
|
|
109
115
|
<Button variant="secondary">Action</Button>
|
|
@@ -74,6 +74,7 @@ export const MastheadWithUtilitiesAndUserDropdownMenu: React.FunctionComponent =
|
|
|
74
74
|
const [refFullOptions, setRefFullOptions] = useState<Element[]>();
|
|
75
75
|
const [favorites, setFavorites] = useState<string[]>([]);
|
|
76
76
|
const [filteredIds, setFilteredIds] = useState<string[]>(['*']);
|
|
77
|
+
const [searchValue, setSearchValue] = useState('');
|
|
77
78
|
const menuRef = useRef<HTMLDivElement>(null);
|
|
78
79
|
const toggleRef = useRef<HTMLButtonElement>(null);
|
|
79
80
|
|
|
@@ -297,6 +298,7 @@ export const MastheadWithUtilitiesAndUserDropdownMenu: React.FunctionComponent =
|
|
|
297
298
|
};
|
|
298
299
|
|
|
299
300
|
const onTextChange = (textValue: string) => {
|
|
301
|
+
setSearchValue(textValue);
|
|
300
302
|
if (textValue === '') {
|
|
301
303
|
setFilteredIds(['*']);
|
|
302
304
|
return;
|
|
@@ -331,7 +333,15 @@ export const MastheadWithUtilitiesAndUserDropdownMenu: React.FunctionComponent =
|
|
|
331
333
|
// eslint-disable-next-line no-console
|
|
332
334
|
<Menu ref={menuRef} onActionClick={onFavorite} onSelect={(_ev, itemId) => console.log('selected', itemId)}>
|
|
333
335
|
<MenuSearchInput>
|
|
334
|
-
<SearchInput
|
|
336
|
+
<SearchInput
|
|
337
|
+
aria-label="Filter menu items"
|
|
338
|
+
value={searchValue}
|
|
339
|
+
onChange={(_event, value) => onTextChange(value)}
|
|
340
|
+
onClear={(event) => {
|
|
341
|
+
event.stopPropagation();
|
|
342
|
+
onTextChange('');
|
|
343
|
+
}}
|
|
344
|
+
/>
|
|
335
345
|
</MenuSearchInput>
|
|
336
346
|
<Divider />
|
|
337
347
|
<MenuContent>
|