@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.
Files changed (222) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/components/package.json +1 -1
  3. package/deprecated/package.json +1 -1
  4. package/dist/dynamic/components/AboutModal/package.json +1 -1
  5. package/dist/dynamic/components/Accordion/package.json +1 -1
  6. package/dist/dynamic/components/ActionList/package.json +1 -1
  7. package/dist/dynamic/components/Alert/package.json +1 -1
  8. package/dist/dynamic/components/Avatar/package.json +1 -1
  9. package/dist/dynamic/components/BackToTop/package.json +1 -1
  10. package/dist/dynamic/components/Backdrop/package.json +1 -1
  11. package/dist/dynamic/components/BackgroundImage/package.json +1 -1
  12. package/dist/dynamic/components/Badge/package.json +1 -1
  13. package/dist/dynamic/components/Banner/package.json +1 -1
  14. package/dist/dynamic/components/Brand/package.json +1 -1
  15. package/dist/dynamic/components/Breadcrumb/package.json +1 -1
  16. package/dist/dynamic/components/Button/package.json +1 -1
  17. package/dist/dynamic/components/CalendarMonth/package.json +1 -1
  18. package/dist/dynamic/components/Card/package.json +1 -1
  19. package/dist/dynamic/components/Checkbox/package.json +1 -1
  20. package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
  21. package/dist/dynamic/components/CodeBlock/package.json +1 -1
  22. package/dist/dynamic/components/Content/package.json +1 -1
  23. package/dist/dynamic/components/DataList/package.json +1 -1
  24. package/dist/dynamic/components/DatePicker/package.json +1 -1
  25. package/dist/dynamic/components/DescriptionList/package.json +1 -1
  26. package/dist/dynamic/components/Divider/package.json +1 -1
  27. package/dist/dynamic/components/Drawer/package.json +1 -1
  28. package/dist/dynamic/components/Dropdown/package.json +1 -1
  29. package/dist/dynamic/components/DualListSelector/package.json +1 -1
  30. package/dist/dynamic/components/EmptyState/package.json +1 -1
  31. package/dist/dynamic/components/ExpandableSection/package.json +1 -1
  32. package/dist/dynamic/components/FileUpload/package.json +1 -1
  33. package/dist/dynamic/components/Form/package.json +1 -1
  34. package/dist/dynamic/components/FormSelect/package.json +1 -1
  35. package/dist/dynamic/components/HelperText/package.json +1 -1
  36. package/dist/dynamic/components/Hint/package.json +1 -1
  37. package/dist/dynamic/components/Icon/package.json +1 -1
  38. package/dist/dynamic/components/InputGroup/package.json +1 -1
  39. package/dist/dynamic/components/JumpLinks/package.json +1 -1
  40. package/dist/dynamic/components/Label/package.json +1 -1
  41. package/dist/dynamic/components/List/package.json +1 -1
  42. package/dist/dynamic/components/LoginPage/package.json +1 -1
  43. package/dist/dynamic/components/Masthead/package.json +1 -1
  44. package/dist/dynamic/components/Menu/package.json +1 -1
  45. package/dist/dynamic/components/MenuToggle/package.json +1 -1
  46. package/dist/dynamic/components/Modal/package.json +1 -1
  47. package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
  48. package/dist/dynamic/components/Nav/package.json +1 -1
  49. package/dist/dynamic/components/NotificationBadge/package.json +1 -1
  50. package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
  51. package/dist/dynamic/components/NumberInput/package.json +1 -1
  52. package/dist/dynamic/components/OverflowMenu/package.json +1 -1
  53. package/dist/dynamic/components/Page/package.json +1 -1
  54. package/dist/dynamic/components/Pagination/package.json +1 -1
  55. package/dist/dynamic/components/Panel/package.json +1 -1
  56. package/dist/dynamic/components/Popover/package.json +1 -1
  57. package/dist/dynamic/components/Progress/package.json +1 -1
  58. package/dist/dynamic/components/ProgressStepper/package.json +1 -1
  59. package/dist/dynamic/components/Radio/package.json +1 -1
  60. package/dist/dynamic/components/SearchInput/package.json +1 -1
  61. package/dist/dynamic/components/Select/package.json +1 -1
  62. package/dist/dynamic/components/Sidebar/package.json +1 -1
  63. package/dist/dynamic/components/SimpleList/package.json +1 -1
  64. package/dist/dynamic/components/Skeleton/package.json +1 -1
  65. package/dist/dynamic/components/SkipToContent/package.json +1 -1
  66. package/dist/dynamic/components/Slider/package.json +1 -1
  67. package/dist/dynamic/components/Spinner/package.json +1 -1
  68. package/dist/dynamic/components/Switch/package.json +1 -1
  69. package/dist/dynamic/components/Tabs/package.json +1 -1
  70. package/dist/dynamic/components/TextArea/package.json +1 -1
  71. package/dist/dynamic/components/TextInput/package.json +1 -1
  72. package/dist/dynamic/components/TextInputGroup/package.json +1 -1
  73. package/dist/dynamic/components/Tile/package.json +1 -1
  74. package/dist/dynamic/components/TimePicker/package.json +1 -1
  75. package/dist/dynamic/components/Timestamp/package.json +1 -1
  76. package/dist/dynamic/components/Title/package.json +1 -1
  77. package/dist/dynamic/components/ToggleGroup/package.json +1 -1
  78. package/dist/dynamic/components/Toolbar/package.json +1 -1
  79. package/dist/dynamic/components/Tooltip/package.json +1 -1
  80. package/dist/dynamic/components/TreeView/package.json +1 -1
  81. package/dist/dynamic/components/Truncate/package.json +1 -1
  82. package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
  83. package/dist/dynamic/components/Wizard/package.json +1 -1
  84. package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
  85. package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
  86. package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
  87. package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
  88. package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
  89. package/dist/dynamic/deprecated/components/package.json +1 -1
  90. package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
  91. package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
  92. package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
  93. package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
  94. package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
  95. package/dist/dynamic/helpers/constants/package.json +1 -1
  96. package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
  97. package/dist/dynamic/helpers/fileUtils/package.json +1 -1
  98. package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
  99. package/dist/dynamic/helpers/package.json +1 -1
  100. package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
  101. package/dist/dynamic/helpers/typeUtils/package.json +1 -1
  102. package/dist/dynamic/helpers/useInterval/package.json +1 -1
  103. package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
  104. package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
  105. package/dist/dynamic/helpers/util/package.json +1 -1
  106. package/dist/dynamic/layouts/Bullseye/package.json +1 -1
  107. package/dist/dynamic/layouts/Flex/package.json +1 -1
  108. package/dist/dynamic/layouts/Gallery/package.json +1 -1
  109. package/dist/dynamic/layouts/Grid/package.json +1 -1
  110. package/dist/dynamic/layouts/Level/package.json +1 -1
  111. package/dist/dynamic/layouts/Split/package.json +1 -1
  112. package/dist/dynamic/layouts/Stack/package.json +1 -1
  113. package/dist/dynamic/styles/package.json +1 -1
  114. package/dist/dynamic-modules.json +2 -2
  115. package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
  116. package/dist/esm/components/ExpandableSection/ExpandableSection.js +6 -4
  117. package/dist/esm/components/ExpandableSection/ExpandableSection.js.map +1 -1
  118. package/dist/esm/components/Toolbar/Toolbar.d.ts +5 -5
  119. package/dist/esm/components/Toolbar/Toolbar.d.ts.map +1 -1
  120. package/dist/esm/components/Toolbar/Toolbar.js +6 -6
  121. package/dist/esm/components/Toolbar/Toolbar.js.map +1 -1
  122. package/dist/esm/components/Toolbar/ToolbarContent.d.ts +1 -1
  123. package/dist/esm/components/Toolbar/ToolbarContent.d.ts.map +1 -1
  124. package/dist/esm/components/Toolbar/ToolbarContent.js +2 -2
  125. package/dist/esm/components/Toolbar/ToolbarContent.js.map +1 -1
  126. package/dist/esm/components/Toolbar/ToolbarExpandableContent.d.ts +2 -2
  127. package/dist/esm/components/Toolbar/ToolbarExpandableContent.d.ts.map +1 -1
  128. package/dist/esm/components/Toolbar/ToolbarExpandableContent.js +7 -7
  129. package/dist/esm/components/Toolbar/ToolbarExpandableContent.js.map +1 -1
  130. package/dist/esm/components/Toolbar/ToolbarFilter.d.ts +21 -21
  131. package/dist/esm/components/Toolbar/ToolbarFilter.d.ts.map +1 -1
  132. package/dist/esm/components/Toolbar/ToolbarFilter.js +15 -15
  133. package/dist/esm/components/Toolbar/ToolbarFilter.js.map +1 -1
  134. package/dist/esm/components/Toolbar/ToolbarGroup.d.ts +1 -1
  135. package/dist/esm/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
  136. package/dist/esm/components/Toolbar/ToolbarItem.d.ts +2 -2
  137. package/dist/esm/components/Toolbar/ToolbarItem.d.ts.map +1 -1
  138. package/dist/esm/components/Toolbar/ToolbarItem.js +2 -2
  139. package/dist/esm/components/Toolbar/ToolbarItem.js.map +1 -1
  140. package/dist/esm/components/Toolbar/{ToolbarChipGroupContent.d.ts → ToolbarLabelGroupContent.d.ts} +10 -10
  141. package/dist/esm/components/Toolbar/ToolbarLabelGroupContent.d.ts.map +1 -0
  142. package/dist/esm/components/Toolbar/{ToolbarChipGroupContent.js → ToolbarLabelGroupContent.js} +11 -11
  143. package/dist/esm/components/Toolbar/ToolbarLabelGroupContent.js.map +1 -0
  144. package/dist/esm/components/Toolbar/ToolbarToggleGroup.d.ts +2 -2
  145. package/dist/esm/components/Toolbar/ToolbarToggleGroup.d.ts.map +1 -1
  146. package/dist/esm/components/Toolbar/ToolbarToggleGroup.js +4 -4
  147. package/dist/esm/components/Toolbar/ToolbarToggleGroup.js.map +1 -1
  148. package/dist/esm/components/Toolbar/ToolbarUtils.d.ts +3 -3
  149. package/dist/esm/components/Toolbar/ToolbarUtils.d.ts.map +1 -1
  150. package/dist/esm/components/Toolbar/ToolbarUtils.js +2 -2
  151. package/dist/esm/components/Toolbar/ToolbarUtils.js.map +1 -1
  152. package/dist/js/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
  153. package/dist/js/components/ExpandableSection/ExpandableSection.js +6 -4
  154. package/dist/js/components/ExpandableSection/ExpandableSection.js.map +1 -1
  155. package/dist/js/components/Toolbar/Toolbar.d.ts +5 -5
  156. package/dist/js/components/Toolbar/Toolbar.d.ts.map +1 -1
  157. package/dist/js/components/Toolbar/Toolbar.js +6 -6
  158. package/dist/js/components/Toolbar/Toolbar.js.map +1 -1
  159. package/dist/js/components/Toolbar/ToolbarContent.d.ts +1 -1
  160. package/dist/js/components/Toolbar/ToolbarContent.d.ts.map +1 -1
  161. package/dist/js/components/Toolbar/ToolbarContent.js +2 -2
  162. package/dist/js/components/Toolbar/ToolbarContent.js.map +1 -1
  163. package/dist/js/components/Toolbar/ToolbarExpandableContent.d.ts +2 -2
  164. package/dist/js/components/Toolbar/ToolbarExpandableContent.d.ts.map +1 -1
  165. package/dist/js/components/Toolbar/ToolbarExpandableContent.js +7 -7
  166. package/dist/js/components/Toolbar/ToolbarExpandableContent.js.map +1 -1
  167. package/dist/js/components/Toolbar/ToolbarFilter.d.ts +21 -21
  168. package/dist/js/components/Toolbar/ToolbarFilter.d.ts.map +1 -1
  169. package/dist/js/components/Toolbar/ToolbarFilter.js +15 -15
  170. package/dist/js/components/Toolbar/ToolbarFilter.js.map +1 -1
  171. package/dist/js/components/Toolbar/ToolbarGroup.d.ts +1 -1
  172. package/dist/js/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
  173. package/dist/js/components/Toolbar/ToolbarItem.d.ts +2 -2
  174. package/dist/js/components/Toolbar/ToolbarItem.d.ts.map +1 -1
  175. package/dist/js/components/Toolbar/ToolbarItem.js +2 -2
  176. package/dist/js/components/Toolbar/ToolbarItem.js.map +1 -1
  177. package/dist/js/components/Toolbar/{ToolbarChipGroupContent.d.ts → ToolbarLabelGroupContent.d.ts} +10 -10
  178. package/dist/js/components/Toolbar/ToolbarLabelGroupContent.d.ts.map +1 -0
  179. package/dist/js/components/Toolbar/{ToolbarChipGroupContent.js → ToolbarLabelGroupContent.js} +12 -12
  180. package/dist/js/components/Toolbar/ToolbarLabelGroupContent.js.map +1 -0
  181. package/dist/js/components/Toolbar/ToolbarToggleGroup.d.ts +2 -2
  182. package/dist/js/components/Toolbar/ToolbarToggleGroup.d.ts.map +1 -1
  183. package/dist/js/components/Toolbar/ToolbarToggleGroup.js +4 -4
  184. package/dist/js/components/Toolbar/ToolbarToggleGroup.js.map +1 -1
  185. package/dist/js/components/Toolbar/ToolbarUtils.d.ts +3 -3
  186. package/dist/js/components/Toolbar/ToolbarUtils.d.ts.map +1 -1
  187. package/dist/js/components/Toolbar/ToolbarUtils.js +2 -2
  188. package/dist/js/components/Toolbar/ToolbarUtils.js.map +1 -1
  189. package/dist/umd/assets/{output-Dt8Et40Q.css → output-Rz4e1DgY.css} +2800 -2800
  190. package/dist/umd/react-core.min.js +1 -1
  191. package/helpers/package.json +1 -1
  192. package/layouts/package.json +1 -1
  193. package/next/package.json +1 -1
  194. package/package.json +2 -2
  195. package/src/components/ExpandableSection/ExpandableSection.tsx +6 -4
  196. package/src/components/Toolbar/Toolbar.tsx +12 -12
  197. package/src/components/Toolbar/ToolbarContent.tsx +2 -2
  198. package/src/components/Toolbar/ToolbarExpandableContent.tsx +9 -9
  199. package/src/components/Toolbar/ToolbarFilter.tsx +51 -51
  200. package/src/components/Toolbar/ToolbarGroup.tsx +1 -1
  201. package/src/components/Toolbar/ToolbarItem.tsx +3 -3
  202. package/src/components/Toolbar/{ToolbarChipGroupContent.tsx → ToolbarLabelGroupContent.tsx} +17 -17
  203. package/src/components/Toolbar/ToolbarToggleGroup.tsx +7 -7
  204. package/src/components/Toolbar/ToolbarUtils.tsx +5 -5
  205. package/src/components/Toolbar/__tests__/Generated/ToolbarChipGroupContent.test.tsx +4 -4
  206. package/src/components/Toolbar/__tests__/Generated/ToolbarExpandableContent.test.tsx +1 -1
  207. package/src/components/Toolbar/__tests__/Generated/__snapshots__/ToolbarChipGroupContent.test.tsx.snap +1 -1
  208. package/src/components/Toolbar/__tests__/Toolbar.test.tsx +6 -6
  209. package/src/components/Toolbar/__tests__/__snapshots__/Toolbar.test.tsx.snap +2 -2
  210. package/src/components/Toolbar/examples/Toolbar.md +5 -5
  211. package/src/components/Toolbar/examples/{ToolbarCustomChipGroupContent.tsx → ToolbarCustomLabelGroupContent.tsx} +10 -10
  212. package/src/components/Toolbar/examples/ToolbarWithFilters.tsx +5 -5
  213. package/src/demos/CardView/examples/CardView.tsx +2 -2
  214. package/src/demos/Filters/examples/FilterAttributeSearch.tsx +9 -9
  215. package/src/demos/Filters/examples/FilterCheckboxSelect.tsx +3 -3
  216. package/src/demos/Filters/examples/FilterFaceted.tsx +9 -9
  217. package/src/demos/Filters/examples/FilterMixedSelectGroup.tsx +6 -6
  218. package/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx +2 -2
  219. package/dist/esm/components/Toolbar/ToolbarChipGroupContent.d.ts.map +0 -1
  220. package/dist/esm/components/Toolbar/ToolbarChipGroupContent.js.map +0 -1
  221. package/dist/js/components/Toolbar/ToolbarChipGroupContent.d.ts.map +0 -1
  222. package/dist/js/components/Toolbar/ToolbarChipGroupContent.js.map +0 -1
@@ -3,6 +3,6 @@
3
3
  "main": "../dist/js/helpers/index.js",
4
4
  "module": "../dist/esm/helpers/index.js",
5
5
  "typings": "../dist/esm/helpers/index.d.ts",
6
- "version": "6.0.0-alpha.77",
6
+ "version": "6.0.0-alpha.78",
7
7
  "private": true
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "main": "../dist/js/layouts/index.js",
4
4
  "module": "../dist/esm/layouts/index.js",
5
5
  "typings": "../dist/esm/layouts/index.d.ts",
6
- "version": "6.0.0-alpha.77",
6
+ "version": "6.0.0-alpha.78",
7
7
  "private": true
8
8
  }
package/next/package.json CHANGED
@@ -3,6 +3,6 @@
3
3
  "main": "../dist/js/next/index.js",
4
4
  "module": "../dist/esm/next/index.js",
5
5
  "typings": "../dist/esm/next/index.d.ts",
6
- "version": "6.0.0-alpha.77",
6
+ "version": "6.0.0-alpha.78",
7
7
  "private": true
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "6.0.0-alpha.78",
3
+ "version": "6.0.0-alpha.79",
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",
@@ -64,5 +64,5 @@
64
64
  "react": "^17 || ^18",
65
65
  "react-dom": "^17 || ^18"
66
66
  },
67
- "gitHead": "4eb47e70a3ba0ce15d70b03b8cf9602f7a7215f3"
67
+ "gitHead": "cb1098099e5ccc766571bcd64adc642ee9687f3b"
68
68
  }
@@ -168,10 +168,12 @@ class ExpandableSection extends React.Component<ExpandableSectionProps, Expandab
168
168
  };
169
169
 
170
170
  resize = () => {
171
- const { offsetWidth } = this.expandableContentRef.current;
172
- if (this.state.previousWidth !== offsetWidth) {
173
- this.setState({ previousWidth: offsetWidth });
174
- this.checkToggleVisibility();
171
+ if (this.expandableContentRef) {
172
+ const { offsetWidth } = this.expandableContentRef.current;
173
+ if (this.state.previousWidth !== offsetWidth) {
174
+ this.setState({ previousWidth: offsetWidth });
175
+ this.checkToggleVisibility();
176
+ }
175
177
  }
176
178
  };
177
179
  handleResize = debounce(this.resize, 250);
@@ -3,7 +3,7 @@ import styles from '@patternfly/react-styles/css/components/Toolbar/toolbar';
3
3
  import { GenerateId } from '../../helpers/GenerateId/GenerateId';
4
4
  import { css } from '@patternfly/react-styles';
5
5
  import { ToolbarContext } from './ToolbarUtils';
6
- import { ToolbarChipGroupContent } from './ToolbarChipGroupContent';
6
+ import { ToolbarLabelGroupContent } from './ToolbarLabelGroupContent';
7
7
  import { formatBreakpointMods, canUseDOM } from '../../helpers/util';
8
8
  import { getDefaultOUIAId, getOUIAProps, OUIAProps } from '../../helpers';
9
9
  import { PageContext } from '../Page/PageContext';
@@ -20,9 +20,9 @@ export interface ToolbarProps extends React.HTMLProps<HTMLDivElement>, OUIAProps
20
20
  clearAllFilters?: () => void;
21
21
  /** Text to display in the clear all filters button */
22
22
  clearFiltersButtonText?: string;
23
- /** Custom content appended to the filter generated chip group. To maintain spacing and styling, each node should be wrapped in a ToolbarItem or ToolbarGroup. This property will remove the default "Clear all filters" button. */
24
- customChipGroupContent?: React.ReactNode;
25
- /** The breakpoint at which the listed filters in chip groups are collapsed down to a summary */
23
+ /** Custom content appended to the filter generated label group. To maintain spacing and styling, each node should be wrapped in a ToolbarItem or ToolbarGroup. This property will remove the default "Clear all filters" button. */
24
+ customLabelGroupContent?: React.ReactNode;
25
+ /** The breakpoint at which the listed filters in label groups are collapsed down to a summary */
26
26
  collapseListedFiltersBreakpoint?: 'all' | 'md' | 'lg' | 'xl' | '2xl';
27
27
  /** Flag indicating if a data toolbar toggle group's expandable content is expanded */
28
28
  isExpanded?: boolean;
@@ -65,7 +65,7 @@ export interface ToolbarState {
65
65
  /** Flag used if the user has opted NOT to manage the 'isExpanded' state of the toggle group.
66
66
  * Indicates whether or not the toggle group is expanded. */
67
67
  isManagedToggleExpanded: boolean;
68
- /** Object managing information about how many chips are in each chip group */
68
+ /** Object managing information about how many labels are in each label group */
69
69
  filterInfo: FilterInfo;
70
70
  /** Used to keep track of window width so we can collapse expanded content when window is resizing */
71
71
  windowWidth: number;
@@ -78,7 +78,7 @@ interface FilterInfo {
78
78
 
79
79
  class Toolbar extends React.Component<ToolbarProps, ToolbarState> {
80
80
  static displayName = 'Toolbar';
81
- chipGroupContentRef = React.createRef<HTMLDivElement>();
81
+ labelGroupContentRef = React.createRef<HTMLDivElement>();
82
82
  staticFilterInfo = {};
83
83
  state = {
84
84
  isManagedToggleExpanded: false,
@@ -144,7 +144,7 @@ class Toolbar extends React.Component<ToolbarProps, ToolbarState> {
144
144
  isSticky,
145
145
  ouiaId,
146
146
  numberOfFiltersText,
147
- customChipGroupContent,
147
+ customLabelGroupContent,
148
148
  colorVariant = ToolbarColorVariant.default,
149
149
  ...props
150
150
  } = this.props;
@@ -180,27 +180,27 @@ class Toolbar extends React.Component<ToolbarProps, ToolbarState> {
180
180
  value={{
181
181
  isExpanded,
182
182
  toggleIsExpanded: isToggleManaged ? this.toggleIsExpanded : toggleIsExpanded,
183
- chipGroupContentRef: this.chipGroupContentRef,
183
+ labelGroupContentRef: this.labelGroupContentRef,
184
184
  updateNumberFilters: this.updateNumberFilters,
185
185
  numberOfFilters,
186
186
  clearAllFilters,
187
187
  clearFiltersButtonText,
188
188
  showClearFiltersButton,
189
189
  toolbarId: randomId,
190
- customChipGroupContent
190
+ customLabelGroupContent
191
191
  }}
192
192
  >
193
193
  {children}
194
- <ToolbarChipGroupContent
194
+ <ToolbarLabelGroupContent
195
195
  isExpanded={isExpanded}
196
- chipGroupContentRef={this.chipGroupContentRef}
196
+ labelGroupContentRef={this.labelGroupContentRef}
197
197
  clearAllFilters={clearAllFilters}
198
198
  showClearFiltersButton={showClearFiltersButton}
199
199
  clearFiltersButtonText={clearFiltersButtonText}
200
200
  numberOfFilters={numberOfFilters}
201
201
  numberOfFiltersText={numberOfFiltersText}
202
202
  collapseListedFiltersBreakpoint={collapseListedFiltersBreakpoint}
203
- customChipGroupContent={customChipGroupContent}
203
+ customLabelGroupContent={customLabelGroupContent}
204
204
  />
205
205
  </ToolbarContext.Provider>
206
206
  </div>
@@ -37,7 +37,7 @@ export interface ToolbarContentProps extends React.HTMLProps<HTMLDivElement> {
37
37
  class ToolbarContent extends React.Component<ToolbarContentProps> {
38
38
  static displayName = 'ToolbarContent';
39
39
  private expandableContentRef = React.createRef<HTMLDivElement>();
40
- private chipContainerRef = React.createRef<HTMLDivElement>();
40
+ private labelContainerRef = React.createRef<HTMLDivElement>();
41
41
  private static currentId = 0;
42
42
 
43
43
  static defaultProps: ToolbarContentProps = {
@@ -88,7 +88,7 @@ class ToolbarContent extends React.Component<ToolbarContentProps> {
88
88
  value={{
89
89
  expandableContentRef: this.expandableContentRef,
90
90
  expandableContentId,
91
- chipContainerRef: this.chipContainerRef,
91
+ labelContainerRef: this.labelContainerRef,
92
92
  isExpanded: isExpanded || isExpandedContext,
93
93
  clearAllFilters: clearAllFilters || clearAllFiltersContext,
94
94
  clearFiltersButtonText: clearFiltersButtonText || clearFiltersButtonContext,
@@ -16,8 +16,8 @@ export interface ToolbarExpandableContentProps extends React.HTMLProps<HTMLDivEl
16
16
  isExpanded?: boolean;
17
17
  /** Expandable content reference for passing to data toolbar children */
18
18
  expandableContentRef?: RefObject<HTMLDivElement>;
19
- /** Chip container reference for passing to data toolbar children */
20
- chipContainerRef?: RefObject<any>;
19
+ /** Label container reference for passing to data toolbar children */
20
+ labelContainerRef?: RefObject<any>;
21
21
  /** optional callback for clearing all filters in the toolbar */
22
22
  clearAllFilters?: () => void;
23
23
  /** Text to display in the clear all filters button */
@@ -40,16 +40,16 @@ class ToolbarExpandableContent extends React.Component<ToolbarExpandableContentP
40
40
  children,
41
41
  className,
42
42
  expandableContentRef,
43
- chipContainerRef,
43
+ labelContainerRef,
44
44
  isExpanded,
45
45
  clearAllFilters,
46
46
  clearFiltersButtonText,
47
47
  showClearFiltersButton,
48
48
  ...props
49
49
  } = this.props;
50
- const { numberOfFilters, customChipGroupContent } = this.context;
50
+ const { numberOfFilters, customLabelGroupContent } = this.context;
51
51
 
52
- const clearChipGroups = () => {
52
+ const clearLabelGroups = () => {
53
53
  clearAllFilters();
54
54
  };
55
55
 
@@ -62,15 +62,15 @@ class ToolbarExpandableContent extends React.Component<ToolbarExpandableContentP
62
62
  <ToolbarGroup>{children}</ToolbarGroup>
63
63
  {numberOfFilters > 0 && (
64
64
  <ToolbarGroup>
65
- <ToolbarGroup ref={chipContainerRef} />
66
- {showClearFiltersButton && !customChipGroupContent && (
65
+ <ToolbarGroup ref={labelContainerRef} />
66
+ {showClearFiltersButton && !customLabelGroupContent && (
67
67
  <ToolbarItem>
68
- <Button variant="link" onClick={clearChipGroups} isInline>
68
+ <Button variant="link" onClick={clearLabelGroups} isInline>
69
69
  {clearFiltersButtonText}
70
70
  </Button>
71
71
  </ToolbarItem>
72
72
  )}
73
- {customChipGroupContent && customChipGroupContent}
73
+ {customLabelGroupContent && customLabelGroupContent}
74
74
  </ToolbarGroup>
75
75
  )}
76
76
  </div>
@@ -5,41 +5,41 @@ import { ToolbarContentContext, ToolbarContext } from './ToolbarUtils';
5
5
  import { PickOptional } from '../../helpers/typeUtils';
6
6
  import { Label, LabelGroup } from '../Label';
7
7
 
8
- export interface ToolbarChipGroup {
9
- /** A unique key to identify this chip group category */
8
+ export interface ToolbarLabelGroup {
9
+ /** A unique key to identify this label group category */
10
10
  key: string;
11
- /** The category name to display for the chip group */
11
+ /** The category name to display for the label group */
12
12
  name: string;
13
13
  }
14
14
 
15
- export interface ToolbarChip {
16
- /** A unique key to identify this chip */
15
+ export interface ToolbarLabel {
16
+ /** A unique key to identify this label */
17
17
  key: string;
18
- /** The ReactNode to display in the chip */
18
+ /** The ReactNode to display in the label */
19
19
  node: React.ReactNode;
20
20
  }
21
21
 
22
22
  export interface ToolbarFilterProps extends ToolbarItemProps {
23
23
  /** Flag indicating when toolbar toggle group is expanded for non-managed toolbar toggle groups. */
24
24
  isExpanded?: boolean;
25
- /** An array of strings to be displayed as chips in the expandable content */
26
- chips?: (string | ToolbarChip)[];
27
- /** Callback passed by consumer used to close the entire chip group */
28
- deleteChipGroup?: (category: string | ToolbarChipGroup) => void;
29
- /** Callback passed by consumer used to delete a chip from the chips[] */
30
- deleteChip?: (category: string | ToolbarChipGroup, chip: ToolbarChip | string) => void;
31
- /** Customizable "Show Less" text string for the chip group */
32
- chipGroupExpandedText?: string;
33
- /** Customizeable template string for the chip group. Use variable "${remaining}" for the overflow chip count. */
34
- chipGroupCollapsedText?: string;
35
- /** Content to be rendered inside the data toolbar item associated with the chip group */
25
+ /** An array of strings to be displayed as labels in the expandable content */
26
+ labels?: (string | ToolbarLabel)[];
27
+ /** Callback passed by consumer used to close the entire label group */
28
+ deleteLabelGroup?: (category: string | ToolbarLabelGroup) => void;
29
+ /** Callback passed by consumer used to delete a label from the labels[] */
30
+ deleteLabel?: (category: string | ToolbarLabelGroup, label: ToolbarLabel | string) => void;
31
+ /** Customizable "Show Less" text string for the label group */
32
+ labelGroupExpandedText?: string;
33
+ /** Customizeable template string for the label group. Use variable "${remaining}" for the overflow label count. */
34
+ labelGroupCollapsedText?: string;
35
+ /** Content to be rendered inside the data toolbar item associated with the label group */
36
36
  children: React.ReactNode;
37
- /** Unique category name to be used as a label for the chip group */
38
- categoryName: string | ToolbarChipGroup;
37
+ /** Unique category name to be used as a label for the label group */
38
+ categoryName: string | ToolbarLabelGroup;
39
39
  /** Flag to show the toolbar item */
40
40
  showToolbarItem?: boolean;
41
- /** Reference to a chip container created with a custom expandable content group, for non-managed multiple toolbar toggle groups. */
42
- expandableChipContainerRef?: React.RefObject<HTMLDivElement>;
41
+ /** Reference to a label container created with a custom expandable content group, for non-managed multiple toolbar toggle groups. */
42
+ expandableLabelContainerRef?: React.RefObject<HTMLDivElement>;
43
43
  }
44
44
 
45
45
  interface ToolbarFilterState {
@@ -51,7 +51,7 @@ class ToolbarFilter extends React.Component<ToolbarFilterProps, ToolbarFilterSta
51
51
  static contextType = ToolbarContext;
52
52
  context!: React.ContextType<typeof ToolbarContext>;
53
53
  static defaultProps: PickOptional<ToolbarFilterProps> = {
54
- chips: [] as (string | ToolbarChip)[],
54
+ labels: [] as (string | ToolbarLabel)[],
55
55
  showToolbarItem: true
56
56
  };
57
57
 
@@ -63,65 +63,65 @@ class ToolbarFilter extends React.Component<ToolbarFilterProps, ToolbarFilterSta
63
63
  }
64
64
 
65
65
  componentDidMount() {
66
- const { categoryName, chips } = this.props;
66
+ const { categoryName, labels } = this.props;
67
67
  this.context.updateNumberFilters(
68
68
  typeof categoryName !== 'string' && categoryName.hasOwnProperty('key')
69
69
  ? categoryName.key
70
70
  : categoryName.toString(),
71
- chips.length
71
+ labels.length
72
72
  );
73
73
  this.setState({ isMounted: true });
74
74
  }
75
75
 
76
76
  componentDidUpdate() {
77
- const { categoryName, chips } = this.props;
77
+ const { categoryName, labels } = this.props;
78
78
  this.context.updateNumberFilters(
79
79
  typeof categoryName !== 'string' && categoryName.hasOwnProperty('key')
80
80
  ? categoryName.key
81
81
  : categoryName.toString(),
82
- chips.length
82
+ labels.length
83
83
  );
84
84
  }
85
85
 
86
86
  render() {
87
87
  const {
88
88
  children,
89
- chips,
90
- deleteChipGroup,
91
- deleteChip,
92
- chipGroupExpandedText,
93
- chipGroupCollapsedText,
89
+ labels,
90
+ deleteLabelGroup,
91
+ deleteLabel,
92
+ labelGroupExpandedText,
93
+ labelGroupCollapsedText,
94
94
  categoryName,
95
95
  showToolbarItem,
96
96
  isExpanded,
97
- expandableChipContainerRef,
97
+ expandableLabelContainerRef,
98
98
  ...props
99
99
  } = this.props;
100
- const { isExpanded: managedIsExpanded, chipGroupContentRef } = this.context;
100
+ const { isExpanded: managedIsExpanded, labelGroupContentRef } = this.context;
101
101
  const _isExpanded = isExpanded !== undefined ? isExpanded : managedIsExpanded;
102
102
  const categoryKey =
103
103
  typeof categoryName !== 'string' && categoryName.hasOwnProperty('key')
104
104
  ? categoryName.key
105
105
  : categoryName.toString();
106
106
 
107
- const chipGroup = chips.length ? (
108
- <ToolbarItem variant="chip-group">
107
+ const labelGroup = labels.length ? (
108
+ <ToolbarItem variant="label-group">
109
109
  <LabelGroup
110
110
  key={categoryKey}
111
111
  categoryName={typeof categoryName === 'string' ? categoryName : categoryName.name}
112
- isClosable={deleteChipGroup !== undefined}
113
- onClick={() => deleteChipGroup(categoryName)}
114
- collapsedText={chipGroupCollapsedText}
115
- expandedText={chipGroupExpandedText}
112
+ isClosable={deleteLabelGroup !== undefined}
113
+ onClick={() => deleteLabelGroup(categoryName)}
114
+ collapsedText={labelGroupCollapsedText}
115
+ expandedText={labelGroupExpandedText}
116
116
  >
117
- {chips.map((chip) =>
118
- typeof chip === 'string' ? (
119
- <Label variant="outline" key={chip} onClose={() => deleteChip(categoryKey, chip)}>
120
- {chip}
117
+ {labels.map((label) =>
118
+ typeof label === 'string' ? (
119
+ <Label variant="outline" key={label} onClose={() => deleteLabel(categoryKey, label)}>
120
+ {label}
121
121
  </Label>
122
122
  ) : (
123
- <Label key={chip.key} onClose={() => deleteChip(categoryKey, chip)}>
124
- {chip.node}
123
+ <Label key={label.key} onClose={() => deleteLabel(categoryKey, label)}>
124
+ {label.node}
125
125
  </Label>
126
126
  )
127
127
  )}
@@ -133,20 +133,20 @@ class ToolbarFilter extends React.Component<ToolbarFilterProps, ToolbarFilterSta
133
133
  return (
134
134
  <React.Fragment>
135
135
  {showToolbarItem && <ToolbarItem {...props}>{children}</ToolbarItem>}
136
- {ReactDOM.createPortal(chipGroup, chipGroupContentRef.current.firstElementChild)}
136
+ {ReactDOM.createPortal(labelGroup, labelGroupContentRef.current.firstElementChild)}
137
137
  </React.Fragment>
138
138
  );
139
139
  }
140
140
 
141
141
  return (
142
142
  <ToolbarContentContext.Consumer>
143
- {({ chipContainerRef }) => (
143
+ {({ labelContainerRef }) => (
144
144
  <React.Fragment>
145
145
  {showToolbarItem && <ToolbarItem {...props}>{children}</ToolbarItem>}
146
- {chipContainerRef.current && ReactDOM.createPortal(chipGroup, chipContainerRef.current)}
147
- {expandableChipContainerRef &&
148
- expandableChipContainerRef.current &&
149
- ReactDOM.createPortal(chipGroup, expandableChipContainerRef.current)}
146
+ {labelContainerRef.current && ReactDOM.createPortal(labelGroup, labelContainerRef.current)}
147
+ {expandableLabelContainerRef &&
148
+ expandableLabelContainerRef.current &&
149
+ ReactDOM.createPortal(labelGroup, expandableLabelContainerRef.current)}
150
150
  </React.Fragment>
151
151
  )}
152
152
  </ToolbarContentContext.Consumer>
@@ -152,7 +152,7 @@ export interface ToolbarGroupProps extends Omit<React.HTMLProps<HTMLDivElement>,
152
152
  children?: React.ReactNode;
153
153
  /** Flag that modifies the toolbar group to hide overflow and respond to available space. Used for horizontal navigation. */
154
154
  isOverflowContainer?: boolean;
155
- /** @hide Reference to pass to this group if it has .pf-m-chip-container modifier */
155
+ /** @hide Reference to pass to this group if it has .pf-m-label-container modifier */
156
156
  innerRef?: React.RefObject<any>;
157
157
  }
158
158
 
@@ -9,7 +9,7 @@ export enum ToolbarItemVariant {
9
9
  separator = 'separator',
10
10
  pagination = 'pagination',
11
11
  label = 'label',
12
- 'chip-group' = 'chip-group',
12
+ 'label-group' = 'label-group',
13
13
  'expand-all' = 'expand-all'
14
14
  }
15
15
 
@@ -17,7 +17,7 @@ export interface ToolbarItemProps extends React.HTMLProps<HTMLDivElement> {
17
17
  /** Classes applied to root element of the data toolbar item */
18
18
  className?: string;
19
19
  /** A type modifier which modifies spacing specifically depending on the type of item */
20
- variant?: ToolbarItemVariant | 'pagination' | 'label' | 'chip-group' | 'separator' | 'expand-all';
20
+ variant?: ToolbarItemVariant | 'pagination' | 'label' | 'label-group' | 'separator' | 'expand-all';
21
21
  /** Visibility at various breakpoints. */
22
22
  visibility?: {
23
23
  default?: 'hidden' | 'visible';
@@ -189,7 +189,7 @@ export const ToolbarItem: React.FunctionComponent<ToolbarItemProps> = ({
189
189
  className={css(
190
190
  styles.toolbarItem,
191
191
  variant && styles.modifiers[toCamel(variant) as 'pagination' | 'label'],
192
- variant === ToolbarItemVariant['chip-group'] && styles.modifiers.labelGroup,
192
+ variant === ToolbarItemVariant['label-group'] && styles.modifiers.labelGroup,
193
193
  isAllExpanded && styles.modifiers.expanded,
194
194
  isOverflowContainer && styles.modifiers.overflowContainer,
195
195
  formatBreakpointMods(visibility, styles, '', getBreakpoint(width)),
@@ -10,13 +10,13 @@ import { ToolbarGroup } from './ToolbarGroup';
10
10
  import { globalBreakpoints } from './ToolbarUtils';
11
11
  import { PickOptional } from '../../helpers/typeUtils';
12
12
 
13
- export interface ToolbarChipGroupContentProps extends React.HTMLProps<HTMLDivElement> {
13
+ export interface ToolbarLabelGroupContentProps extends React.HTMLProps<HTMLDivElement> {
14
14
  /** Classes applied to root element of the data toolbar content row */
15
15
  className?: string;
16
16
  /** Flag indicating if a data toolbar toggle group's expandable content is expanded */
17
17
  isExpanded?: boolean;
18
- /** Chip group content reference for passing to data toolbar children */
19
- chipGroupContentRef?: RefObject<any>;
18
+ /** Label group content reference for passing to data toolbar children */
19
+ labelGroupContentRef?: RefObject<any>;
20
20
  /** optional callback for clearing all filters in the toolbar */
21
21
  clearAllFilters?: () => void;
22
22
  /** Flag indicating that the clear all filters button should be visible */
@@ -27,15 +27,15 @@ export interface ToolbarChipGroupContentProps extends React.HTMLProps<HTMLDivEle
27
27
  numberOfFilters: number;
28
28
  /** Text to display in the total number of applied filters ToolbarFilter */
29
29
  numberOfFiltersText?: (numberOfFilters: number) => string;
30
- /** The breakpoint at which the listed filters in chip groups are collapsed down to a summary */
30
+ /** The breakpoint at which the listed filters in label groups are collapsed down to a summary */
31
31
  collapseListedFiltersBreakpoint?: 'all' | 'md' | 'lg' | 'xl' | '2xl';
32
- /** Custom additional content appended to the generated chips. To maintain spacing and styling, each node should be a ToolbarItem or ToolbarGroup. This property will remove the built in "Clear all filters" button. */
33
- customChipGroupContent?: React.ReactNode;
32
+ /** Custom additional content appended to the generated labels. To maintain spacing and styling, each node should be a ToolbarItem or ToolbarGroup. This property will remove the built in "Clear all filters" button. */
33
+ customLabelGroupContent?: React.ReactNode;
34
34
  }
35
35
 
36
- class ToolbarChipGroupContent extends React.Component<ToolbarChipGroupContentProps> {
37
- static displayName = 'ToolbarChipGroupContent';
38
- static defaultProps: PickOptional<ToolbarChipGroupContentProps> = {
36
+ class ToolbarLabelGroupContent extends React.Component<ToolbarLabelGroupContentProps> {
37
+ static displayName = 'ToolbarLabelGroupContent';
38
+ static defaultProps: PickOptional<ToolbarLabelGroupContentProps> = {
39
39
  clearFiltersButtonText: 'Clear all filters',
40
40
  collapseListedFiltersBreakpoint: 'lg',
41
41
  numberOfFiltersText: (numberOfFilters: number) => `${numberOfFilters} filters applied`
@@ -45,18 +45,18 @@ class ToolbarChipGroupContent extends React.Component<ToolbarChipGroupContentPro
45
45
  const {
46
46
  className,
47
47
  isExpanded,
48
- chipGroupContentRef,
48
+ labelGroupContentRef,
49
49
  clearAllFilters,
50
50
  showClearFiltersButton,
51
51
  clearFiltersButtonText,
52
52
  collapseListedFiltersBreakpoint,
53
53
  numberOfFilters,
54
54
  numberOfFiltersText,
55
- customChipGroupContent,
55
+ customLabelGroupContent,
56
56
  ...props
57
57
  } = this.props;
58
58
 
59
- const clearChipGroups = () => {
59
+ const clearLabelGroups = () => {
60
60
  clearAllFilters();
61
61
  };
62
62
 
@@ -74,7 +74,7 @@ class ToolbarChipGroupContent extends React.Component<ToolbarChipGroupContentPro
74
74
  <div
75
75
  className={css(styles.toolbarContent, isHidden && styles.modifiers.hidden, className)}
76
76
  {...((numberOfFilters === 0 || isExpanded) && { hidden: true })}
77
- ref={chipGroupContentRef}
77
+ ref={labelGroupContentRef}
78
78
  {...props}
79
79
  >
80
80
  <ToolbarGroup
@@ -87,17 +87,17 @@ class ToolbarChipGroupContent extends React.Component<ToolbarChipGroupContentPro
87
87
  <ToolbarItem>{numberOfFiltersText(numberOfFilters)}</ToolbarItem>
88
88
  </ToolbarGroup>
89
89
  )}
90
- {showClearFiltersButton && !isExpanded && !customChipGroupContent && (
90
+ {showClearFiltersButton && !isExpanded && !customLabelGroupContent && (
91
91
  <ToolbarItem>
92
- <Button variant="link" onClick={clearChipGroups} isInline>
92
+ <Button variant="link" onClick={clearLabelGroups} isInline>
93
93
  {clearFiltersButtonText}
94
94
  </Button>
95
95
  </ToolbarItem>
96
96
  )}
97
- {customChipGroupContent && customChipGroupContent}
97
+ {customLabelGroupContent && customLabelGroupContent}
98
98
  </div>
99
99
  );
100
100
  }
101
101
  }
102
102
 
103
- export { ToolbarChipGroupContent };
103
+ export { ToolbarLabelGroupContent };
@@ -149,8 +149,8 @@ export interface ToolbarToggleGroupProps extends ToolbarGroupProps {
149
149
  | 'rowGap_3xl'
150
150
  | 'rowGap_4xl';
151
151
  };
152
- /** Reference to a chip container group for filters inside the toolbar toggle group */
153
- chipContainerRef?: React.RefObject<any>;
152
+ /** Reference to a label container group for filters inside the toolbar toggle group */
153
+ labelContainerRef?: React.RefObject<any>;
154
154
  /** Optional callback for clearing all filters in the toolbar toggle group */
155
155
  clearAllFilters?: () => void;
156
156
  /** Flag indicating that the clear all filters button should be visible in the toolbar toggle group */
@@ -184,7 +184,7 @@ class ToolbarToggleGroup extends React.Component<ToolbarToggleGroupProps> {
184
184
  children,
185
185
  isExpanded,
186
186
  onToggle,
187
- chipContainerRef,
187
+ labelContainerRef,
188
188
  clearAllFilters,
189
189
  showClearFiltersButton,
190
190
  clearFiltersButtonText,
@@ -208,15 +208,15 @@ class ToolbarToggleGroup extends React.Component<ToolbarToggleGroupProps> {
208
208
  {({
209
209
  expandableContentRef,
210
210
  expandableContentId,
211
- chipContainerRef: managedChipContainerRef,
211
+ labelContainerRef: managedLabelContainerRef,
212
212
  isExpanded: managedIsExpanded,
213
213
  clearAllFilters: clearAllFiltersContext,
214
214
  clearFiltersButtonText: clearFiltersButtonContext,
215
215
  showClearFiltersButton: showClearFiltersButtonContext
216
216
  }) => {
217
217
  const _isExpanded = isExpanded !== undefined ? isExpanded : managedIsExpanded;
218
- const _chipContainerRef =
219
- chipContainerRef !== undefined ? chipContainerRef : managedChipContainerRef;
218
+ const _labelContainerRef =
219
+ labelContainerRef !== undefined ? labelContainerRef : managedLabelContainerRef;
220
220
 
221
221
  const breakpointMod: {
222
222
  md?: 'show';
@@ -234,7 +234,7 @@ class ToolbarToggleGroup extends React.Component<ToolbarToggleGroupProps> {
234
234
  clearAllFilters={clearAllFilters || clearAllFiltersContext}
235
235
  showClearFiltersButton={showClearFiltersButton || showClearFiltersButtonContext}
236
236
  clearFiltersButtonText={clearFiltersButtonText || clearFiltersButtonContext}
237
- chipContainerRef={_chipContainerRef}
237
+ labelContainerRef={_labelContainerRef}
238
238
  >
239
239
  {children}
240
240
  </ToolbarExpandableContent>
@@ -8,20 +8,20 @@ import globalBreakpoint2xl from '@patternfly/react-tokens/dist/esm/global_breakp
8
8
  export interface ToolbarContextProps {
9
9
  isExpanded: boolean;
10
10
  toggleIsExpanded: () => void;
11
- chipGroupContentRef: RefObject<HTMLDivElement>;
11
+ labelGroupContentRef: RefObject<HTMLDivElement>;
12
12
  updateNumberFilters: (categoryName: string, numberOfFilters: number) => void;
13
13
  numberOfFilters: number;
14
14
  clearAllFilters?: () => void;
15
15
  clearFiltersButtonText?: string;
16
16
  showClearFiltersButton?: boolean;
17
17
  toolbarId?: string;
18
- customChipGroupContent?: React.ReactNode;
18
+ customLabelGroupContent?: React.ReactNode;
19
19
  }
20
20
 
21
21
  export const ToolbarContext = React.createContext<ToolbarContextProps>({
22
22
  isExpanded: false,
23
23
  toggleIsExpanded: () => {},
24
- chipGroupContentRef: null,
24
+ labelGroupContentRef: null,
25
25
  updateNumberFilters: () => {},
26
26
  numberOfFilters: 0,
27
27
  clearAllFilters: () => {}
@@ -30,7 +30,7 @@ export const ToolbarContext = React.createContext<ToolbarContextProps>({
30
30
  interface ToolbarContentContextProps {
31
31
  expandableContentRef: RefObject<HTMLDivElement>;
32
32
  expandableContentId: string;
33
- chipContainerRef: RefObject<any>;
33
+ labelContainerRef: RefObject<any>;
34
34
  isExpanded?: boolean;
35
35
  clearAllFilters?: () => void;
36
36
  clearFiltersButtonText?: string;
@@ -40,7 +40,7 @@ interface ToolbarContentContextProps {
40
40
  export const ToolbarContentContext = React.createContext<ToolbarContentContextProps>({
41
41
  expandableContentRef: null,
42
42
  expandableContentId: '',
43
- chipContainerRef: null,
43
+ labelContainerRef: null,
44
44
  clearAllFilters: () => {}
45
45
  });
46
46
 
@@ -3,16 +3,16 @@
3
3
  */
4
4
  import * as React from 'react';
5
5
  import { render } from '@testing-library/react';
6
- import { ToolbarChipGroupContent } from '../../ToolbarChipGroupContent';
6
+ import { ToolbarLabelGroupContent } from '../../ToolbarLabelGroupContent';
7
7
  // any missing imports can usually be resolved by adding them here
8
8
  import {} from '../..';
9
9
 
10
- it('ToolbarChipGroupContent should match snapshot (auto-generated)', () => {
10
+ it('ToolbarLabelGroupContent should match snapshot (auto-generated)', () => {
11
11
  const { asFragment } = render(
12
- <ToolbarChipGroupContent
12
+ <ToolbarLabelGroupContent
13
13
  className={'string'}
14
14
  isExpanded={true}
15
- chipGroupContentRef={{ current: document.createElement('div') }}
15
+ labelGroupContentRef={{ current: document.createElement('div') }}
16
16
  clearAllFilters={() => undefined as void}
17
17
  showClearFiltersButton={true}
18
18
  clearFiltersButtonText={"'Clear all filters'"}