@patternfly/react-core 6.0.0-alpha.78 → 6.0.0-alpha.79
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 +6 -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/Tile/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/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/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/dynamic-modules.json +2 -2
- package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.js +6 -4
- package/dist/esm/components/ExpandableSection/ExpandableSection.js.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.d.ts +5 -5
- package/dist/esm/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.js +6 -6
- package/dist/esm/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarContent.d.ts +1 -1
- package/dist/esm/components/Toolbar/ToolbarContent.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarContent.js +2 -2
- package/dist/esm/components/Toolbar/ToolbarContent.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarExpandableContent.d.ts +2 -2
- package/dist/esm/components/Toolbar/ToolbarExpandableContent.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarExpandableContent.js +7 -7
- package/dist/esm/components/Toolbar/ToolbarExpandableContent.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarFilter.d.ts +21 -21
- package/dist/esm/components/Toolbar/ToolbarFilter.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarFilter.js +15 -15
- package/dist/esm/components/Toolbar/ToolbarFilter.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.d.ts +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarItem.d.ts +2 -2
- package/dist/esm/components/Toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarItem.js +2 -2
- package/dist/esm/components/Toolbar/ToolbarItem.js.map +1 -1
- package/dist/esm/components/Toolbar/{ToolbarChipGroupContent.d.ts → ToolbarLabelGroupContent.d.ts} +10 -10
- package/dist/esm/components/Toolbar/ToolbarLabelGroupContent.d.ts.map +1 -0
- package/dist/esm/components/Toolbar/{ToolbarChipGroupContent.js → ToolbarLabelGroupContent.js} +11 -11
- package/dist/esm/components/Toolbar/ToolbarLabelGroupContent.js.map +1 -0
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.d.ts +2 -2
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.js +4 -4
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarUtils.d.ts +3 -3
- package/dist/esm/components/Toolbar/ToolbarUtils.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarUtils.js +2 -2
- package/dist/esm/components/Toolbar/ToolbarUtils.js.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.js +6 -4
- package/dist/js/components/ExpandableSection/ExpandableSection.js.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.d.ts +5 -5
- package/dist/js/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.js +6 -6
- package/dist/js/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarContent.d.ts +1 -1
- package/dist/js/components/Toolbar/ToolbarContent.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarContent.js +2 -2
- package/dist/js/components/Toolbar/ToolbarContent.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarExpandableContent.d.ts +2 -2
- package/dist/js/components/Toolbar/ToolbarExpandableContent.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarExpandableContent.js +7 -7
- package/dist/js/components/Toolbar/ToolbarExpandableContent.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarFilter.d.ts +21 -21
- package/dist/js/components/Toolbar/ToolbarFilter.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarFilter.js +15 -15
- package/dist/js/components/Toolbar/ToolbarFilter.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarGroup.d.ts +1 -1
- package/dist/js/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarItem.d.ts +2 -2
- package/dist/js/components/Toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarItem.js +2 -2
- package/dist/js/components/Toolbar/ToolbarItem.js.map +1 -1
- package/dist/js/components/Toolbar/{ToolbarChipGroupContent.d.ts → ToolbarLabelGroupContent.d.ts} +10 -10
- package/dist/js/components/Toolbar/ToolbarLabelGroupContent.d.ts.map +1 -0
- package/dist/js/components/Toolbar/{ToolbarChipGroupContent.js → ToolbarLabelGroupContent.js} +12 -12
- package/dist/js/components/Toolbar/ToolbarLabelGroupContent.js.map +1 -0
- package/dist/js/components/Toolbar/ToolbarToggleGroup.d.ts +2 -2
- package/dist/js/components/Toolbar/ToolbarToggleGroup.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarToggleGroup.js +4 -4
- package/dist/js/components/Toolbar/ToolbarToggleGroup.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarUtils.d.ts +3 -3
- package/dist/js/components/Toolbar/ToolbarUtils.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarUtils.js +2 -2
- package/dist/js/components/Toolbar/ToolbarUtils.js.map +1 -1
- package/dist/umd/assets/{output-Dt8Et40Q.css → output-Rz4e1DgY.css} +2800 -2800
- package/dist/umd/react-core.min.js +1 -1
- 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/ExpandableSection/ExpandableSection.tsx +6 -4
- package/src/components/Toolbar/Toolbar.tsx +12 -12
- package/src/components/Toolbar/ToolbarContent.tsx +2 -2
- package/src/components/Toolbar/ToolbarExpandableContent.tsx +9 -9
- package/src/components/Toolbar/ToolbarFilter.tsx +51 -51
- package/src/components/Toolbar/ToolbarGroup.tsx +1 -1
- package/src/components/Toolbar/ToolbarItem.tsx +3 -3
- package/src/components/Toolbar/{ToolbarChipGroupContent.tsx → ToolbarLabelGroupContent.tsx} +17 -17
- package/src/components/Toolbar/ToolbarToggleGroup.tsx +7 -7
- package/src/components/Toolbar/ToolbarUtils.tsx +5 -5
- package/src/components/Toolbar/__tests__/Generated/ToolbarChipGroupContent.test.tsx +4 -4
- package/src/components/Toolbar/__tests__/Generated/ToolbarExpandableContent.test.tsx +1 -1
- package/src/components/Toolbar/__tests__/Generated/__snapshots__/ToolbarChipGroupContent.test.tsx.snap +1 -1
- package/src/components/Toolbar/__tests__/Toolbar.test.tsx +6 -6
- package/src/components/Toolbar/__tests__/__snapshots__/Toolbar.test.tsx.snap +2 -2
- package/src/components/Toolbar/examples/Toolbar.md +5 -5
- package/src/components/Toolbar/examples/{ToolbarCustomChipGroupContent.tsx → ToolbarCustomLabelGroupContent.tsx} +10 -10
- package/src/components/Toolbar/examples/ToolbarWithFilters.tsx +5 -5
- package/src/demos/CardView/examples/CardView.tsx +2 -2
- package/src/demos/Filters/examples/FilterAttributeSearch.tsx +9 -9
- package/src/demos/Filters/examples/FilterCheckboxSelect.tsx +3 -3
- package/src/demos/Filters/examples/FilterFaceted.tsx +9 -9
- package/src/demos/Filters/examples/FilterMixedSelectGroup.tsx +6 -6
- package/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx +2 -2
- package/dist/esm/components/Toolbar/ToolbarChipGroupContent.d.ts.map +0 -1
- package/dist/esm/components/Toolbar/ToolbarChipGroupContent.js.map +0 -1
- package/dist/js/components/Toolbar/ToolbarChipGroupContent.d.ts.map +0 -1
- package/dist/js/components/Toolbar/ToolbarChipGroupContent.js.map +0 -1
|
@@ -13,7 +13,7 @@ it('ToolbarExpandableContent should match snapshot (auto-generated)', () => {
|
|
|
13
13
|
className={'string'}
|
|
14
14
|
isExpanded={false}
|
|
15
15
|
expandableContentRef={{ current: document.createElement('div') }}
|
|
16
|
-
|
|
16
|
+
labelContainerRef={{ current: document.createElement('div') }}
|
|
17
17
|
clearAllFilters={() => undefined as void}
|
|
18
18
|
clearFiltersButtonText={"'Clear all filters'"}
|
|
19
19
|
showClearFiltersButton={true}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`
|
|
3
|
+
exports[`ToolbarLabelGroupContent should match snapshot (auto-generated) 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<div
|
|
6
6
|
class="pf-v6-c-toolbar__content pf-m-hidden string"
|
|
@@ -62,15 +62,15 @@ describe('Toolbar', () => {
|
|
|
62
62
|
expect(asFragment()).toMatchSnapshot();
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
it('should render with custom
|
|
65
|
+
it('should render with custom label content', () => {
|
|
66
66
|
const items = (
|
|
67
67
|
<React.Fragment>
|
|
68
68
|
<ToolbarToggleGroup toggleIcon={<React.Fragment />} breakpoint="xl">
|
|
69
69
|
<ToolbarGroup variant="filter-group">
|
|
70
70
|
<ToolbarFilter
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
labels={['New', 'Pending']}
|
|
72
|
+
deleteLabel={(_category, _label) => {}}
|
|
73
|
+
deleteLabelGroup={(_category) => {}}
|
|
74
74
|
categoryName="Status"
|
|
75
75
|
>
|
|
76
76
|
test content
|
|
@@ -80,7 +80,7 @@ describe('Toolbar', () => {
|
|
|
80
80
|
</React.Fragment>
|
|
81
81
|
);
|
|
82
82
|
|
|
83
|
-
const
|
|
83
|
+
const customLabelGroupContent = (
|
|
84
84
|
<React.Fragment>
|
|
85
85
|
<ToolbarItem>
|
|
86
86
|
<Button variant="link" onClick={() => {}} isInline>
|
|
@@ -100,7 +100,7 @@ describe('Toolbar', () => {
|
|
|
100
100
|
id="toolbar-with-filter"
|
|
101
101
|
className="pf-m-toggle-group-container"
|
|
102
102
|
collapseListedFiltersBreakpoint="xl"
|
|
103
|
-
|
|
103
|
+
customLabelGroupContent={customLabelGroupContent}
|
|
104
104
|
>
|
|
105
105
|
<ToolbarContent>{items}</ToolbarContent>
|
|
106
106
|
</Toolbar>
|
|
@@ -47,7 +47,7 @@ exports[`Toolbar should render inset 1`] = `
|
|
|
47
47
|
</DocumentFragment>
|
|
48
48
|
`;
|
|
49
49
|
|
|
50
|
-
exports[`Toolbar should render with custom
|
|
50
|
+
exports[`Toolbar should render with custom label content 1`] = `
|
|
51
51
|
<DocumentFragment>
|
|
52
52
|
<div
|
|
53
53
|
class="pf-v6-c-toolbar pf-m-toggle-group-container"
|
|
@@ -104,7 +104,7 @@ exports[`Toolbar should render with custom chip content 1`] = `
|
|
|
104
104
|
hidden=""
|
|
105
105
|
>
|
|
106
106
|
<div
|
|
107
|
-
class="pf-v6-c-toolbar__item pf-m-label-group"
|
|
107
|
+
class="pf-v6-c-toolbar__item pf-m-label-group pf-m-label-group"
|
|
108
108
|
>
|
|
109
109
|
<div
|
|
110
110
|
class="pf-v6-c-label-group pf-m-category"
|
|
@@ -89,19 +89,19 @@ Note: The toggle group is aware of the consumer provided breakpoint, the expanda
|
|
|
89
89
|
|
|
90
90
|
### With filters
|
|
91
91
|
|
|
92
|
-
You can add filters to a toolbar to let users filter the content that a toolbar manages. When a toolbar is filtered, it will expand in height to make space for a row of filter
|
|
92
|
+
You can add filters to a toolbar to let users filter the content that a toolbar manages. When a toolbar is filtered, it will expand in height to make space for a row of filter labels and a "Clear all filters" button. Upon clearing the applied filters, the toolbar will return to its default height.
|
|
93
93
|
|
|
94
|
-
The `<ToolbarFilter>` component expects applied filters and a delete
|
|
94
|
+
The `<ToolbarFilter>` component expects applied filters and a delete label handler to be passed in as properties. Pass in a `deleteLabelGroup` property to close the entire label group. Once close, the rendering of labels will be handled responsively by the toolbar.
|
|
95
95
|
|
|
96
96
|
```ts file="./ToolbarWithFilters.tsx"
|
|
97
97
|
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
### With custom
|
|
100
|
+
### With custom label group content
|
|
101
101
|
|
|
102
|
-
To customize the
|
|
102
|
+
To customize the label groups generated by toolbar filters, use the `customLabelGroupContent` property on the `<Toolbar>`. This property will remove the default `clear all filters` button.
|
|
103
103
|
|
|
104
|
-
```ts file="./
|
|
104
|
+
```ts file="./ToolbarCustomLabelGroupContent.tsx"
|
|
105
105
|
|
|
106
106
|
```
|
|
107
107
|
|
|
@@ -19,7 +19,7 @@ import EditIcon from '@patternfly/react-icons/dist/esm/icons/edit-icon';
|
|
|
19
19
|
import CloneIcon from '@patternfly/react-icons/dist/esm/icons/clone-icon';
|
|
20
20
|
import SyncIcon from '@patternfly/react-icons/dist/esm/icons/sync-icon';
|
|
21
21
|
|
|
22
|
-
export const
|
|
22
|
+
export const ToolbarCustomLabelGroupContent: React.FunctionComponent = () => {
|
|
23
23
|
const [statusIsExpanded, setStatusIsExpanded] = React.useState<boolean>(false);
|
|
24
24
|
const [riskIsExpanded, setRiskIsExpanded] = React.useState<boolean>(false);
|
|
25
25
|
const [filters, setFilters] = React.useState({
|
|
@@ -100,9 +100,9 @@ export const ToolbarCustomChipGroupContent: React.FunctionComponent = () => {
|
|
|
100
100
|
<React.Fragment>
|
|
101
101
|
<ToolbarGroup variant="filter-group">
|
|
102
102
|
<ToolbarFilter
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
labels={filters.status}
|
|
104
|
+
deleteLabel={(category, label) => onDelete(category as string, label as string)}
|
|
105
|
+
deleteLabelGroup={(category) => onDeleteGroup(category as string)}
|
|
106
106
|
categoryName="Status"
|
|
107
107
|
>
|
|
108
108
|
<Select
|
|
@@ -132,9 +132,9 @@ export const ToolbarCustomChipGroupContent: React.FunctionComponent = () => {
|
|
|
132
132
|
</Select>
|
|
133
133
|
</ToolbarFilter>
|
|
134
134
|
<ToolbarFilter
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
labels={filters.risk}
|
|
136
|
+
deleteLabel={(category, label) => onDelete(category as string, label as string)}
|
|
137
|
+
deleteLabelGroup={(category) => onDeleteGroup(category as string)}
|
|
138
138
|
categoryName="Risk"
|
|
139
139
|
>
|
|
140
140
|
<Select
|
|
@@ -186,7 +186,7 @@ export const ToolbarCustomChipGroupContent: React.FunctionComponent = () => {
|
|
|
186
186
|
</React.Fragment>
|
|
187
187
|
);
|
|
188
188
|
|
|
189
|
-
const
|
|
189
|
+
const customLabelGroupContent = (
|
|
190
190
|
<React.Fragment>
|
|
191
191
|
<ToolbarItem>
|
|
192
192
|
<Button variant="link" onClick={() => {}} isInline>
|
|
@@ -203,10 +203,10 @@ export const ToolbarCustomChipGroupContent: React.FunctionComponent = () => {
|
|
|
203
203
|
|
|
204
204
|
return (
|
|
205
205
|
<Toolbar
|
|
206
|
-
id="toolbar-with-custom-
|
|
206
|
+
id="toolbar-with-custom-label-group"
|
|
207
207
|
className="pf-m-toggle-group-container"
|
|
208
208
|
collapseListedFiltersBreakpoint="xl"
|
|
209
|
-
|
|
209
|
+
customLabelGroupContent={customLabelGroupContent}
|
|
210
210
|
>
|
|
211
211
|
<ToolbarContent>{toolbarItems}</ToolbarContent>
|
|
212
212
|
</Toolbar>
|
|
@@ -137,9 +137,9 @@ export const ToolbarWithFilters: React.FunctionComponent = () => {
|
|
|
137
137
|
</ToolbarItem>
|
|
138
138
|
<ToolbarGroup variant="filter-group">
|
|
139
139
|
<ToolbarFilter
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
labels={filters.status}
|
|
141
|
+
deleteLabel={(category, label) => onDelete(category as string, label as string)}
|
|
142
|
+
deleteLabelGroup={(category) => onDeleteGroup(category as string)}
|
|
143
143
|
categoryName="Status"
|
|
144
144
|
>
|
|
145
145
|
<Select
|
|
@@ -169,8 +169,8 @@ export const ToolbarWithFilters: React.FunctionComponent = () => {
|
|
|
169
169
|
</Select>
|
|
170
170
|
</ToolbarFilter>
|
|
171
171
|
<ToolbarFilter
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
labels={filters.risk}
|
|
173
|
+
deleteLabel={(category, label) => onDelete(category as string, label as string)}
|
|
174
174
|
categoryName="Risk"
|
|
175
175
|
>
|
|
176
176
|
<Select
|
|
@@ -364,8 +364,8 @@ export const CardViewBasic: React.FunctionComponent = () => {
|
|
|
364
364
|
return (
|
|
365
365
|
<ToolbarFilter
|
|
366
366
|
categoryName="Products"
|
|
367
|
-
|
|
368
|
-
|
|
367
|
+
labels={filters.products}
|
|
368
|
+
deleteLabel={(type, id) => onDelete(type as string, id as string)}
|
|
369
369
|
>
|
|
370
370
|
<Select
|
|
371
371
|
aria-label="Products"
|
|
@@ -589,27 +589,27 @@ export const FilterAttributeSearch: React.FunctionComponent = () => {
|
|
|
589
589
|
<ToolbarGroup variant="filter-group">
|
|
590
590
|
<ToolbarItem>{attributeDropdown}</ToolbarItem>
|
|
591
591
|
<ToolbarFilter
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
592
|
+
labels={searchValue !== '' ? [searchValue] : ([] as string[])}
|
|
593
|
+
deleteLabel={() => setSearchValue('')}
|
|
594
|
+
deleteLabelGroup={() => setSearchValue('')}
|
|
595
595
|
categoryName="Name"
|
|
596
596
|
showToolbarItem={activeAttributeMenu === 'Servers'}
|
|
597
597
|
>
|
|
598
598
|
{searchInput}
|
|
599
599
|
</ToolbarFilter>
|
|
600
600
|
<ToolbarFilter
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
601
|
+
labels={statusSelection !== '' ? [statusSelection] : ([] as string[])}
|
|
602
|
+
deleteLabel={() => setStatusSelection('')}
|
|
603
|
+
deleteLabelGroup={() => setStatusSelection('')}
|
|
604
604
|
categoryName="Status"
|
|
605
605
|
showToolbarItem={activeAttributeMenu === 'Status'}
|
|
606
606
|
>
|
|
607
607
|
{statusSelect}
|
|
608
608
|
</ToolbarFilter>
|
|
609
609
|
<ToolbarFilter
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
610
|
+
labels={locationSelections}
|
|
611
|
+
deleteLabel={(category, label) => onLocationMenuSelect(undefined, label as string)}
|
|
612
|
+
deleteLabelGroup={() => setLocationSelections([])}
|
|
613
613
|
categoryName="Location"
|
|
614
614
|
showToolbarItem={activeAttributeMenu === 'Location'}
|
|
615
615
|
>
|
|
@@ -358,9 +358,9 @@ export const FilterCheckboxSelect: React.FunctionComponent = () => {
|
|
|
358
358
|
<ToolbarItem>{toolbarBulkSelect}</ToolbarItem>
|
|
359
359
|
<ToolbarGroup variant="filter-group">
|
|
360
360
|
<ToolbarFilter
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
361
|
+
labels={selections}
|
|
362
|
+
deleteLabel={(category, label) => onSelect(undefined, label as string)}
|
|
363
|
+
deleteLabelGroup={() => setSelections([])}
|
|
364
364
|
categoryName="Location"
|
|
365
365
|
>
|
|
366
366
|
{select}
|
|
@@ -304,11 +304,11 @@ export const FilterFaceted: React.FunctionComponent = () => {
|
|
|
304
304
|
}
|
|
305
305
|
};
|
|
306
306
|
|
|
307
|
-
const
|
|
307
|
+
const onLabelDelete = (category: string, label: string) => {
|
|
308
308
|
if (category === 'status') {
|
|
309
|
-
setStatusSelections(statusSelections.filter((selection) => selection !==
|
|
309
|
+
setStatusSelections(statusSelections.filter((selection) => selection !== label));
|
|
310
310
|
} else {
|
|
311
|
-
setLocationSelections(locationSelections.filter((selection) => selection !==
|
|
311
|
+
setLocationSelections(locationSelections.filter((selection) => selection !== label));
|
|
312
312
|
}
|
|
313
313
|
};
|
|
314
314
|
|
|
@@ -417,18 +417,18 @@ export const FilterFaceted: React.FunctionComponent = () => {
|
|
|
417
417
|
<ToolbarItem>{toolbarBulkSelect}</ToolbarItem>
|
|
418
418
|
<ToolbarToggleGroup toggleIcon={<FilterIcon />} breakpoint="xl">
|
|
419
419
|
<ToolbarFilter
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
420
|
+
labels={statusSelections}
|
|
421
|
+
deleteLabel={(category, label) => onLabelDelete(category as string, label as string)}
|
|
422
|
+
deleteLabelGroup={() => setStatusSelections([])}
|
|
423
423
|
categoryName="Status"
|
|
424
424
|
showToolbarItem={false}
|
|
425
425
|
>
|
|
426
426
|
<div />
|
|
427
427
|
</ToolbarFilter>
|
|
428
428
|
<ToolbarFilter
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
429
|
+
labels={locationSelections}
|
|
430
|
+
deleteLabel={(category, label) => onLabelDelete(category as string, label as string)}
|
|
431
|
+
deleteLabelGroup={() => setLocationSelections([])}
|
|
432
432
|
categoryName="Location"
|
|
433
433
|
>
|
|
434
434
|
{select}
|
|
@@ -468,17 +468,17 @@ export const FilterMixedSelectGroup: React.FunctionComponent = () => {
|
|
|
468
468
|
<ToolbarItem>{toolbarBulkSelect}</ToolbarItem>
|
|
469
469
|
<ToolbarToggleGroup toggleIcon={<FilterIcon />} breakpoint="xl">
|
|
470
470
|
<ToolbarFilter
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
471
|
+
labels={statusSelection !== '' ? [statusSelection] : ([] as string[])}
|
|
472
|
+
deleteLabel={() => setStatusSelection('')}
|
|
473
|
+
deleteLabelGroup={() => setStatusSelection('')}
|
|
474
474
|
categoryName="Status"
|
|
475
475
|
>
|
|
476
476
|
{statusSelect}
|
|
477
477
|
</ToolbarFilter>
|
|
478
478
|
<ToolbarFilter
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
479
|
+
labels={locationSelections}
|
|
480
|
+
deleteLabel={(category, label) => onLocationMenuSelect(undefined, label as string)}
|
|
481
|
+
deleteLabelGroup={() => setLocationSelections([])}
|
|
482
482
|
categoryName="Location"
|
|
483
483
|
>
|
|
484
484
|
{locationSelect}
|
|
@@ -395,8 +395,8 @@ export const PrimaryDetailCardView: React.FunctionComponent = () => {
|
|
|
395
395
|
return (
|
|
396
396
|
<ToolbarFilter
|
|
397
397
|
categoryName="Products"
|
|
398
|
-
|
|
399
|
-
|
|
398
|
+
labels={filters.products}
|
|
399
|
+
deleteLabel={(type, id) => onDelete(type as string, id as string)}
|
|
400
400
|
>
|
|
401
401
|
<Select
|
|
402
402
|
aria-label="Products"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarChipGroupContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Toolbar/ToolbarChipGroupContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,WAAW,4BAA6B,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;IACnF,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sFAAsF;IACtF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wEAAwE;IACxE,mBAAmB,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACrC,gEAAgE;IAChE,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,0EAA0E;IAC1E,sBAAsB,EAAE,OAAO,CAAC;IAChC,sDAAsD;IACtD,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,0FAA0F;IAC1F,eAAe,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,mBAAmB,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1D,gGAAgG;IAChG,+BAA+B,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IACrE,wNAAwN;IACxN,sBAAsB,CAAC,EAAE,KAAK,C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