@carbon/react 1.90.0-rc.0 → 1.90.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +743 -784
  2. package/es/components/AILabel/index.js +8 -6
  3. package/es/components/Breadcrumb/BreadcrumbItem.js +2 -0
  4. package/es/components/Button/Button.js +3 -0
  5. package/es/components/ChatButton/ChatButton.js +1 -0
  6. package/es/components/CheckboxGroup/CheckboxGroup.js +21 -2
  7. package/es/components/ComboBox/ComboBox.js +17 -1
  8. package/es/components/ComboButton/index.js +1 -0
  9. package/es/components/ComposedModal/ComposedModal.js +4 -1
  10. package/es/components/DataTable/DataTable.js +14 -0
  11. package/es/components/DataTable/Table.js +3 -3
  12. package/es/components/DataTable/TableExpandHeader.js +5 -1
  13. package/es/components/DataTable/TableExpandRow.js +1 -0
  14. package/es/components/DataTable/TableHeader.js +2 -0
  15. package/es/components/DataTable/TableRow.js +5 -0
  16. package/es/components/DataTable/TableSlugRow.js +1 -0
  17. package/es/components/DataTable/TableToolbarMenu.js +3 -0
  18. package/es/components/DataTable/state/sorting.d.ts +3 -1
  19. package/es/components/DataTable/state/sorting.js +2 -0
  20. package/es/components/DataTable/tools/sorting.js +1 -0
  21. package/es/components/DatePicker/DatePicker.js +14 -3
  22. package/es/components/DatePickerInput/DatePickerInput.js +6 -0
  23. package/es/components/Dialog/Dialog.js +10 -2
  24. package/es/components/Dropdown/Dropdown.js +16 -4
  25. package/es/components/ErrorBoundary/ErrorBoundaryContext.js +1 -0
  26. package/es/components/FileUploader/FileUploader.js +9 -2
  27. package/es/components/FileUploader/FileUploaderButton.js +1 -1
  28. package/es/components/FileUploader/FileUploaderDropContainer.js +1 -1
  29. package/es/components/FileUploader/FileUploaderItem.js +3 -0
  30. package/es/components/FluidMultiSelect/FluidMultiSelect.js +2 -0
  31. package/es/components/FluidNumberInput/FluidNumberInput.js +3 -2
  32. package/es/components/FluidSearch/FluidSearch.js +3 -2
  33. package/es/components/FluidSelect/FluidSelect.js +3 -2
  34. package/es/components/FluidTextInput/FluidTextInput.js +3 -2
  35. package/es/components/FluidTimePicker/FluidTimePicker.js +11 -4
  36. package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +3 -2
  37. package/es/components/Grid/CSSGrid.js +5 -0
  38. package/es/components/Grid/Column.js +3 -0
  39. package/es/components/Grid/ColumnHang.js +1 -0
  40. package/es/components/Grid/FlexGrid.js +1 -0
  41. package/es/components/Grid/Row.js +1 -0
  42. package/es/components/Heading/index.js +3 -1
  43. package/es/components/IconButton/index.js +4 -2
  44. package/es/components/IconIndicator/index.js +4 -2
  45. package/es/components/InlineCheckbox/InlineCheckbox.js +3 -2
  46. package/es/components/Layout/index.js +6 -4
  47. package/es/components/LayoutDirection/LayoutDirection.js +2 -0
  48. package/es/components/Link/Link.js +3 -0
  49. package/es/components/ListBox/ListBoxMenuItem.js +4 -1
  50. package/es/components/ListBox/next/ListBoxTrigger.js +3 -2
  51. package/es/components/Menu/Menu.js +6 -9
  52. package/es/components/Menu/MenuContext.js +1 -0
  53. package/es/components/Menu/MenuItem.js +5 -13
  54. package/es/components/MenuButton/index.js +7 -2
  55. package/es/components/Modal/Modal.js +3 -0
  56. package/es/components/ModalWrapper/ModalWrapper.js +2 -0
  57. package/es/components/MultiSelect/FilterableMultiSelect.js +24 -5
  58. package/es/components/MultiSelect/MultiSelect.js +21 -5
  59. package/es/components/Notification/Notification.js +1 -1
  60. package/es/components/NumberInput/NumberInput.js +7 -1
  61. package/es/components/OverflowMenu/OverflowMenu.js +2 -0
  62. package/es/components/OverflowMenu/next/index.js +3 -2
  63. package/es/components/OverflowMenuItem/OverflowMenuItem.js +2 -0
  64. package/es/components/PageHeader/PageHeader.d.ts +3 -3
  65. package/es/components/PageHeader/PageHeader.js +22 -8
  66. package/es/components/Pagination/Pagination.js +6 -2
  67. package/es/components/PaginationNav/PaginationNav.js +2 -5
  68. package/es/components/Popover/index.js +14 -4
  69. package/es/components/ProgressBar/ProgressBar.js +4 -2
  70. package/es/components/RadioTile/RadioTile.js +2 -2
  71. package/es/components/Search/Search.js +2 -2
  72. package/es/components/Select/Select.js +2 -3
  73. package/es/components/ShapeIndicator/index.js +4 -2
  74. package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.d.ts +4 -4
  75. package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +1 -2
  76. package/es/components/SkeletonText/SkeletonText.js +0 -2
  77. package/es/components/Slider/Slider.js +11 -16
  78. package/es/components/Stack/HStack.js +1 -0
  79. package/es/components/Stack/Stack.js +6 -9
  80. package/es/components/Stack/VStack.js +1 -0
  81. package/es/components/StructuredList/StructuredList.js +3 -0
  82. package/es/components/Switch/Switch.js +1 -1
  83. package/es/components/Tabs/Tabs.js +28 -17
  84. package/es/components/Tag/DismissibleTag.js +2 -0
  85. package/es/components/Tag/OperationalTag.js +2 -0
  86. package/es/components/Tag/SelectableTag.js +2 -0
  87. package/es/components/Tag/Tag.js +4 -0
  88. package/es/components/Tag/isEllipsisActive.js +1 -0
  89. package/es/components/Text/Text.js +1 -0
  90. package/es/components/TextInput/ControlledPasswordInput.js +2 -4
  91. package/es/components/TextInput/PasswordInput.js +7 -2
  92. package/es/components/TextInput/TextInput.js +4 -2
  93. package/es/components/Theme/index.js +8 -3
  94. package/es/components/Tile/Tile.js +14 -17
  95. package/es/components/TimePicker/TimePicker.js +1 -0
  96. package/es/components/Toggle/Toggle.js +1 -1
  97. package/es/components/Toggletip/index.js +4 -0
  98. package/es/components/Tooltip/DefinitionTooltip.js +1 -0
  99. package/es/components/Tooltip/Tooltip.js +30 -23
  100. package/es/components/TreeView/TreeNode.js +13 -5
  101. package/es/components/TreeView/TreeView.js +7 -0
  102. package/es/components/UIShell/HeaderContainer.js +3 -1
  103. package/es/components/UIShell/HeaderGlobalAction.js +2 -2
  104. package/es/components/UIShell/HeaderMenu.js +3 -3
  105. package/es/components/UIShell/HeaderPanel.js +2 -2
  106. package/es/components/UIShell/Link.js +2 -0
  107. package/es/components/UIShell/SideNavItems.js +1 -0
  108. package/es/components/UIShell/SideNavMenu.js +2 -2
  109. package/es/components/UIShell/SideNavMenuItem.js +1 -1
  110. package/es/components/UIShell/SideNavSwitcher.js +1 -1
  111. package/es/components/UIShell/Switcher.js +2 -1
  112. package/es/components/UIShell/SwitcherItem.js +4 -2
  113. package/es/internal/FloatingMenu.js +7 -1
  114. package/es/internal/Selection.js +12 -3
  115. package/es/internal/useMergedRefs.js +1 -0
  116. package/es/internal/useNoInteractiveChildren.js +4 -0
  117. package/es/internal/useOutsideClick.js +1 -0
  118. package/es/internal/useOverflowItems.js +6 -0
  119. package/es/internal/useResizeObserver.js +4 -0
  120. package/es/internal/useSavedCallback.js +1 -0
  121. package/es/internal/warning.js +1 -0
  122. package/es/prop-types/isRequiredOneOf.js +4 -1
  123. package/es/tools/events.js +3 -1
  124. package/es/tools/wrapComponent.js +1 -0
  125. package/lib/components/AILabel/index.js +8 -6
  126. package/lib/components/Breadcrumb/BreadcrumbItem.js +2 -0
  127. package/lib/components/Button/Button.js +3 -0
  128. package/lib/components/ChatButton/ChatButton.js +1 -0
  129. package/lib/components/CheckboxGroup/CheckboxGroup.js +20 -1
  130. package/lib/components/ComboBox/ComboBox.js +17 -1
  131. package/lib/components/ComboButton/index.js +1 -0
  132. package/lib/components/ComposedModal/ComposedModal.js +4 -1
  133. package/lib/components/DataTable/DataTable.js +14 -0
  134. package/lib/components/DataTable/Table.js +3 -3
  135. package/lib/components/DataTable/TableExpandHeader.js +5 -1
  136. package/lib/components/DataTable/TableExpandRow.js +1 -0
  137. package/lib/components/DataTable/TableHeader.js +2 -0
  138. package/lib/components/DataTable/TableRow.js +5 -0
  139. package/lib/components/DataTable/TableSlugRow.js +1 -0
  140. package/lib/components/DataTable/TableToolbarMenu.js +3 -0
  141. package/lib/components/DataTable/state/sorting.d.ts +3 -1
  142. package/lib/components/DataTable/state/sorting.js +2 -0
  143. package/lib/components/DataTable/tools/sorting.js +1 -0
  144. package/lib/components/DatePicker/DatePicker.js +14 -3
  145. package/lib/components/DatePickerInput/DatePickerInput.js +6 -0
  146. package/lib/components/Dialog/Dialog.js +10 -2
  147. package/lib/components/Dropdown/Dropdown.js +16 -4
  148. package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +1 -0
  149. package/lib/components/FileUploader/FileUploader.js +9 -2
  150. package/lib/components/FileUploader/FileUploaderButton.js +1 -1
  151. package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -1
  152. package/lib/components/FileUploader/FileUploaderItem.js +3 -0
  153. package/lib/components/FluidMultiSelect/FluidMultiSelect.js +2 -0
  154. package/lib/components/FluidNumberInput/FluidNumberInput.js +3 -2
  155. package/lib/components/FluidSearch/FluidSearch.js +3 -2
  156. package/lib/components/FluidSelect/FluidSelect.js +3 -2
  157. package/lib/components/FluidTextInput/FluidTextInput.js +3 -2
  158. package/lib/components/FluidTimePicker/FluidTimePicker.js +11 -4
  159. package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +3 -2
  160. package/lib/components/Grid/CSSGrid.js +5 -0
  161. package/lib/components/Grid/Column.js +3 -0
  162. package/lib/components/Grid/ColumnHang.js +1 -0
  163. package/lib/components/Grid/FlexGrid.js +1 -0
  164. package/lib/components/Grid/Row.js +1 -0
  165. package/lib/components/Heading/index.js +3 -1
  166. package/lib/components/IconButton/index.js +4 -2
  167. package/lib/components/IconIndicator/index.js +4 -2
  168. package/lib/components/InlineCheckbox/InlineCheckbox.js +3 -2
  169. package/lib/components/Layout/index.js +6 -4
  170. package/lib/components/LayoutDirection/LayoutDirection.js +2 -0
  171. package/lib/components/Link/Link.js +3 -0
  172. package/lib/components/ListBox/ListBoxMenuItem.js +4 -1
  173. package/lib/components/ListBox/next/ListBoxTrigger.js +3 -2
  174. package/lib/components/Menu/Menu.js +6 -9
  175. package/lib/components/Menu/MenuContext.js +1 -0
  176. package/lib/components/Menu/MenuItem.js +5 -13
  177. package/lib/components/MenuButton/index.js +7 -2
  178. package/lib/components/Modal/Modal.js +3 -0
  179. package/lib/components/ModalWrapper/ModalWrapper.js +2 -0
  180. package/lib/components/MultiSelect/FilterableMultiSelect.js +24 -5
  181. package/lib/components/MultiSelect/MultiSelect.js +21 -5
  182. package/lib/components/Notification/Notification.js +1 -1
  183. package/lib/components/NumberInput/NumberInput.js +7 -1
  184. package/lib/components/OverflowMenu/OverflowMenu.js +2 -0
  185. package/lib/components/OverflowMenu/next/index.js +3 -2
  186. package/lib/components/OverflowMenuItem/OverflowMenuItem.js +2 -0
  187. package/lib/components/PageHeader/PageHeader.d.ts +3 -3
  188. package/lib/components/PageHeader/PageHeader.js +22 -8
  189. package/lib/components/Pagination/Pagination.js +6 -2
  190. package/lib/components/PaginationNav/PaginationNav.js +2 -5
  191. package/lib/components/Popover/index.js +14 -4
  192. package/lib/components/ProgressBar/ProgressBar.js +4 -2
  193. package/lib/components/RadioTile/RadioTile.js +2 -2
  194. package/lib/components/Search/Search.js +2 -2
  195. package/lib/components/Select/Select.js +2 -3
  196. package/lib/components/ShapeIndicator/index.js +4 -2
  197. package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.d.ts +4 -4
  198. package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +1 -2
  199. package/lib/components/SkeletonText/SkeletonText.js +0 -2
  200. package/lib/components/Slider/Slider.js +11 -16
  201. package/lib/components/Stack/HStack.js +1 -0
  202. package/lib/components/Stack/Stack.js +6 -9
  203. package/lib/components/Stack/VStack.js +1 -0
  204. package/lib/components/StructuredList/StructuredList.js +3 -0
  205. package/lib/components/Switch/Switch.js +1 -1
  206. package/lib/components/Tabs/Tabs.js +28 -17
  207. package/lib/components/Tag/DismissibleTag.js +2 -0
  208. package/lib/components/Tag/OperationalTag.js +2 -0
  209. package/lib/components/Tag/SelectableTag.js +2 -0
  210. package/lib/components/Tag/Tag.js +4 -0
  211. package/lib/components/Tag/isEllipsisActive.js +1 -0
  212. package/lib/components/Text/Text.js +1 -0
  213. package/lib/components/TextInput/ControlledPasswordInput.js +2 -4
  214. package/lib/components/TextInput/PasswordInput.js +7 -2
  215. package/lib/components/TextInput/TextInput.js +4 -2
  216. package/lib/components/Theme/index.js +8 -3
  217. package/lib/components/Tile/Tile.js +14 -17
  218. package/lib/components/TimePicker/TimePicker.js +1 -0
  219. package/lib/components/Toggle/Toggle.js +1 -1
  220. package/lib/components/Toggletip/index.js +4 -0
  221. package/lib/components/Tooltip/DefinitionTooltip.js +1 -0
  222. package/lib/components/Tooltip/Tooltip.js +30 -23
  223. package/lib/components/TreeView/TreeNode.js +13 -5
  224. package/lib/components/TreeView/TreeView.js +7 -0
  225. package/lib/components/UIShell/HeaderContainer.js +3 -1
  226. package/lib/components/UIShell/HeaderGlobalAction.js +2 -2
  227. package/lib/components/UIShell/HeaderMenu.js +3 -3
  228. package/lib/components/UIShell/HeaderPanel.js +2 -2
  229. package/lib/components/UIShell/Link.js +2 -0
  230. package/lib/components/UIShell/SideNavItems.js +1 -0
  231. package/lib/components/UIShell/SideNavMenu.js +2 -2
  232. package/lib/components/UIShell/SideNavMenuItem.js +1 -1
  233. package/lib/components/UIShell/SideNavSwitcher.js +1 -1
  234. package/lib/components/UIShell/Switcher.js +2 -1
  235. package/lib/components/UIShell/SwitcherItem.js +4 -2
  236. package/lib/internal/FloatingMenu.js +7 -1
  237. package/lib/internal/Selection.js +12 -3
  238. package/lib/internal/useMergedRefs.js +1 -0
  239. package/lib/internal/useNoInteractiveChildren.js +4 -0
  240. package/lib/internal/useOutsideClick.js +1 -0
  241. package/lib/internal/useOverflowItems.js +6 -0
  242. package/lib/internal/useResizeObserver.js +4 -0
  243. package/lib/internal/useSavedCallback.js +1 -0
  244. package/lib/internal/warning.js +1 -0
  245. package/lib/prop-types/isRequiredOneOf.js +4 -1
  246. package/lib/tools/events.js +3 -1
  247. package/lib/tools/wrapComponent.js +1 -0
  248. package/package.json +9 -9
@@ -15,7 +15,7 @@ import { ArrowDown, ArrowUp } from '../../internal/keyboard/keys.js';
15
15
  import { match } from '../../internal/keyboard/match.js';
16
16
  import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
17
17
 
18
- const SwitcherItem = /*#__PURE__*/forwardRef(function SwitcherItem(props, forwardRef) {
18
+ const SwitcherItem = /*#__PURE__*/forwardRef((props, forwardRef) => {
19
19
  const {
20
20
  'aria-label': ariaLabel,
21
21
  'aria-labelledby': ariaLabelledBy,
@@ -68,7 +68,9 @@ const SwitcherItem = /*#__PURE__*/forwardRef(function SwitcherItem(props, forwar
68
68
  },
69
69
  href: href,
70
70
  target: target,
71
- rel: rel,
71
+ rel: rel
72
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
73
+ ,
72
74
  ref: forwardRef
73
75
  }, rest, {
74
76
  className: linkClassName,
@@ -198,6 +198,7 @@ const FloatingMenu = ({
198
198
  }
199
199
  placeInProgressRef.current = false;
200
200
  }
201
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
201
202
  }, [floatingPosition, onPlace]);
202
203
 
203
204
  // Attach a resize listener.
@@ -208,11 +209,13 @@ const FloatingMenu = ({
208
209
  return () => {
209
210
  resizeHandler.remove();
210
211
  };
212
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
211
213
  }, [triggerRef, menuOffset, menuDirection, flipped, target, updateOrientation]);
212
214
 
213
215
  // Update menu position when key props change.
214
216
  useEffect(() => {
215
217
  updateMenuPosition();
218
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
216
219
  }, [menuOffset, menuDirection, flipped, triggerRef, target, updateOrientation]);
217
220
 
218
221
  /**
@@ -274,7 +277,10 @@ const FloatingMenu = ({
274
277
  const focusTrapWithoutSentinels = FeatureFlags.enabled('enable-experimental-focus-wrap-without-sentinels');
275
278
  if (typeof document !== 'undefined') {
276
279
  const portalTarget = target ? target() : document.body;
277
- return /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/React.createElement("div", {
280
+ return /*#__PURE__*/ReactDOM.createPortal(
281
+ /*#__PURE__*/
282
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions -- https://github.com/carbon-design-system/carbon/issues/20071
283
+ React.createElement("div", {
278
284
  onBlur: focusTrap && !focusTrapWithoutSentinels ? handleBlur : undefined,
279
285
  onKeyDown: focusTrapWithoutSentinels ? handleKeyDown : undefined
280
286
  }, !focusTrapWithoutSentinels && /*#__PURE__*/React.createElement("span", {
@@ -42,21 +42,28 @@ const useSelection = ({
42
42
  const savedOnChange = useRef(onChange);
43
43
  const [uncontrolledItems, setUncontrolledItems] = useState(initialSelectedItems);
44
44
  const isControlled = !!controlledItems;
45
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20071
45
46
  const selectedItems = isControlled ? controlledItems : uncontrolledItems;
46
47
  const onItemChange = useCallback(item => {
47
48
  if (disabled) return;
48
49
 
49
50
  // Assert special properties (e.g., `disabled`, `isSelectAll`, etc.) are
50
51
  // `any` since those properties aren’t part of the generic type.
51
- const allSelectableItems = filteredItems.filter(item => !item?.disabled && !item?.isSelectAll);
52
- const disabledItemCount = filteredItems.filter(item => item?.disabled).length;
52
+ const allSelectableItems = filteredItems.filter(
53
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
54
+ item => !item?.disabled && !item?.isSelectAll);
55
+ const disabledItemCount = filteredItems.filter(
56
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
57
+ item => item?.disabled).length;
53
58
  let newSelectedItems;
54
59
 
55
60
  // deselect all on click to All/indeterminate option
61
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
56
62
  if (item?.isSelectAll && selectedItems.length > 0) {
57
63
  newSelectedItems = [];
58
64
  }
59
65
  // select all options
66
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
60
67
  else if (item?.isSelectAll && selectedItems.length === 0) {
61
68
  newSelectedItems = allSelectableItems;
62
69
  } else {
@@ -69,7 +76,9 @@ const useSelection = ({
69
76
  }
70
77
  } else {
71
78
  newSelectedItems = removeAtIndex(selectedItems, selectedIndex);
72
- newSelectedItems = newSelectedItems.filter(item => !item?.isSelectAll);
79
+ newSelectedItems = newSelectedItems.filter(
80
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
81
+ item => !item?.isSelectAll);
73
82
  }
74
83
  }
75
84
  callOnChangeHandler({
@@ -16,6 +16,7 @@ import { useMemo, useCallback } from 'react';
16
16
  * node, assigns that node to every ref in the array.
17
17
  */
18
18
  const useMergedRefs = refs => {
19
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
19
20
  const memoizedRefs = useMemo(() => refs, refs);
20
21
  return useCallback(node => {
21
22
  memoizedRefs.forEach(ref => {
@@ -14,13 +14,16 @@ const useNoInteractiveChildren = (ref, message = 'component should have no inter
14
14
  /*
15
15
  // eslint-disable-next-line react-hooks/rules-of-hooks
16
16
  */
17
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
17
18
  useEffect(() => {
18
19
  const node = ref.current ? getInteractiveContent(ref.current) : false;
19
20
  if (node) {
20
21
  const errorMessage = `Error: ${message}.\n\nInstead found: ${node.outerHTML}`;
22
+ // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
21
23
  console.error(errorMessage);
22
24
  throw new Error(errorMessage);
23
25
  }
26
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
24
27
  }, []);
25
28
  }
26
29
  };
@@ -31,6 +34,7 @@ const useInteractiveChildrenNeedDescription = (ref, message = `interactive child
31
34
  /*
32
35
  // eslint-disable-next-line react-hooks/rules-of-hooks
33
36
  */
37
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
34
38
  useEffect(() => {
35
39
  const node = ref.current ? getInteractiveContent(ref.current) : false;
36
40
  if (node && !node.hasAttribute('aria-describedby')) {
@@ -23,6 +23,7 @@ const useOutsideClick = (ref, callback) => {
23
23
  /*
24
24
  // eslint-disable-next-line react-hooks/rules-of-hooks
25
25
  */
26
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
26
27
  useWindowEvent('click', event => {
27
28
  const {
28
29
  target
@@ -36,6 +36,7 @@ const useOverflowItems = (items, containerRef, offsetRef, maxItems, onChange) =>
36
36
  setMaxWidth(newMax);
37
37
  }
38
38
  };
39
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
39
40
  useResizeObserver({
40
41
  ref: containerRef,
41
42
  onResize: handleResize
@@ -85,14 +86,17 @@ const useOverflowItems = (items, containerRef, offsetRef, maxItems, onChange) =>
85
86
  };
86
87
 
87
88
  // Memoize visible items calculation to avoid recalculating on every render
89
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
88
90
  const visibleItems = useMemo(() => {
89
91
  if (!Array.isArray(items)) {
90
92
  return [];
91
93
  }
92
94
  return getVisibleItems();
95
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
93
96
  }, [items, maxWidth, maxItems]);
94
97
 
95
98
  // Memoize hidden items calculation
99
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
96
100
  const hiddenItems = useMemo(() => {
97
101
  if (!Array.isArray(items)) {
98
102
  return [];
@@ -101,9 +105,11 @@ const useOverflowItems = (items, containerRef, offsetRef, maxItems, onChange) =>
101
105
  }, [items, visibleItems]);
102
106
 
103
107
  // Use previous value to compare and only call onChange when needed
108
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
104
109
  const previousHiddenItems = usePreviousValue(hiddenItems);
105
110
 
106
111
  // Only call onChange if hidden items actually changed
112
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
107
113
  useEffect(() => {
108
114
  }, [hiddenItems, previousHiddenItems, onChange]);
109
115
  return {
@@ -35,6 +35,7 @@ const useResizeObserver = ({
35
35
  return;
36
36
  }
37
37
  getInitialSize();
38
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
38
39
  }, [width, height]);
39
40
  useLayoutEffect(() => {
40
41
  if (!ref?.current) {
@@ -47,6 +48,8 @@ const useResizeObserver = ({
47
48
  const entry = entriesToHandle.current[0];
48
49
  setWidth(entry.contentRect.width);
49
50
  setHeight(entry.contentRect.height);
51
+
52
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20071
50
53
  cb.current && cb.current(entry.contentRect);
51
54
  };
52
55
  const observer = new ResizeObserver(entries => {
@@ -63,6 +66,7 @@ const useResizeObserver = ({
63
66
  return () => {
64
67
  observer.disconnect();
65
68
  };
69
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
66
70
  }, []);
67
71
  return {
68
72
  width,
@@ -15,6 +15,7 @@ import { useRef, useEffect, useCallback } from 'react';
15
15
  *
16
16
  * @param callback - The callback to track.
17
17
  */
18
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
18
19
  const useSavedCallback = callback => {
19
20
  const savedCallback = useRef(callback);
20
21
  useEffect(() => {
@@ -22,6 +22,7 @@ const warning = process.env.NODE_ENV !== 'production' ? (condition, message) =>
22
22
  throw new Error('`warning(condition, message)` requires a warning ' + 'format argument');
23
23
  }
24
24
  if (!condition) {
25
+ // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
25
26
  console.warn('Warning: ' + message);
26
27
  }
27
28
  } : noopFn;
@@ -13,9 +13,12 @@
13
13
  * are the names of the props, and the values are the prop-type validators.
14
14
  * @returns A new object of wrapped prop-type validators.
15
15
  */
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
16
17
  const isRequiredOneOf = propTypes => {
17
18
  const names = Object.keys(propTypes);
18
- const checker = propType => (props, propName, componentName, ...rest) => {
19
+ const checker = propType =>
20
+ // eslint-disable-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
21
+ (props, propName, componentName, ...rest) => {
19
22
  if (process.env.NODE_ENV !== 'production' && names.every(name => typeof props[name] === 'undefined')) {
20
23
  return new Error(`${componentName} requires one of the following props: ${names.join(', ')}`);
21
24
  }
@@ -14,7 +14,9 @@
14
14
  * @param handlers - An array of event handler functions.
15
15
  * @returns A composite event handler.
16
16
  */
17
- const composeEventHandlers = handlers => (event, ...args) => {
17
+ const composeEventHandlers = handlers =>
18
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
19
+ (event, ...args) => {
18
20
  for (const handler of handlers) {
19
21
  if (event.defaultPrevented) {
20
22
  break;
@@ -42,6 +42,7 @@ const wrapComponent = ({
42
42
  Component.propTypes = {
43
43
  className: PropTypes.string
44
44
  };
45
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
45
46
  return Component;
46
47
  };
47
48
 
@@ -21,17 +21,19 @@ var deprecate = require('../../prop-types/deprecate.js');
21
21
  var _Undo;
22
22
  const AILabelContent = /*#__PURE__*/React.forwardRef(function AILabelContent({
23
23
  className,
24
- children,
25
- ...rest
26
- }, ref) {
24
+ children
25
+ }, ref // eslint-disable-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
26
+ ) {
27
27
  const prefix = usePrefix.usePrefix();
28
28
  const hasAILabelActions = React.Children.toArray(children).some(child => {
29
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
29
30
  const item = child;
30
31
  // TODO: Is there supposed to be a `return` here? If so, this issue would
31
32
  // have been caught by ESLint. It's concerning that this code is 7 months
32
33
  // old and no one has noticed any issues with it. It also makes me question
33
34
  // whether the code is necessary.
34
35
  // https://github.com/carbon-design-system/carbon/issues/18991
36
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20071
35
37
  item.type === AILabelActions;
36
38
  });
37
39
  const aiLabelContentClasses = cx(className, {
@@ -55,9 +57,9 @@ AILabelContent.propTypes = {
55
57
  };
56
58
  const AILabelActions = /*#__PURE__*/React.forwardRef(function AILabelActions({
57
59
  className,
58
- children,
59
- ...rest
60
- }, ref) {
60
+ children
61
+ }, ref // eslint-disable-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
62
+ ) {
61
63
  const prefix = usePrefix.usePrefix();
62
64
  const aiLabelActionsClasses = cx(className, {
63
65
  [`${prefix}--ai-label-actions`]: true
@@ -37,6 +37,8 @@ const BreadcrumbItem = frFn((props, ref) => {
37
37
  [`${prefix}--breadcrumb-item--current`]: isCurrentPage && ariaCurrent !== 'page',
38
38
  [customClassName]: !!customClassName
39
39
  });
40
+
41
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
40
42
  const child = children;
41
43
  if (child.type && child.type.displayName !== undefined && child.type.displayName.includes('OverflowMenu')) {
42
44
  const horizontalOverflowIcon = /*#__PURE__*/React.createElement(iconsReact.OverflowMenuHorizontal, {
@@ -25,6 +25,8 @@ function isIconOnlyButton(hasIconOnly, _kind) {
25
25
  }
26
26
  return false;
27
27
  }
28
+
29
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
28
30
  const Button = /*#__PURE__*/React.forwardRef((props, ref) => {
29
31
  const {
30
32
  as,
@@ -47,6 +49,7 @@ const Button = /*#__PURE__*/React.forwardRef((props, ref) => {
47
49
  ...rest
48
50
  } = props;
49
51
  if (ButtonImageElement && !children && !iconDescription) {
52
+ // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
50
53
  console.error('Button: renderIcon property specified without also providing an iconDescription property. ' + 'This may impact accessibility for screen reader users.');
51
54
  }
52
55
  const iconOnlyImage = !ButtonImageElement ? null : /*#__PURE__*/React.createElement(ButtonImageElement, null);
@@ -42,6 +42,7 @@ const ChatButton = /*#__PURE__*/React.forwardRef(function ChatButton({
42
42
  } else {
43
43
  // Check if size is valid and warn if not
44
44
  if (size && !allowedSizes.includes(size)) {
45
+ // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
45
46
  console.error(`Invalid size "${size}" provided to ChatButton. Size must be one of: ${allowedSizes.join(', ')}. Defaulting to "lg".`);
46
47
  size = 'lg';
47
48
  }
@@ -19,6 +19,8 @@ var iconsReact = require('@carbon/icons-react');
19
19
  var useId = require('../../internal/useId.js');
20
20
  var index = require('../AILabel/index.js');
21
21
  var utils = require('../../internal/utils.js');
22
+ var Checkbox = require('../Checkbox/Checkbox.js');
23
+ require('../Checkbox/Checkbox.Skeleton.js');
22
24
 
23
25
  const CheckboxGroup = ({
24
26
  children,
@@ -61,6 +63,23 @@ const CheckboxGroup = ({
61
63
  size: 'mini',
62
64
  kind: 'default'
63
65
  }) : null;
66
+ const clonedChildren = React.Children.map(children, child => {
67
+ if (/*#__PURE__*/React.isValidElement(child) && child.type === Checkbox.default) {
68
+ const childProps = {
69
+ ...(typeof invalid !== 'undefined' && typeof child.props.invalid === 'undefined' ? {
70
+ invalid
71
+ } : {}),
72
+ ...(typeof readOnly !== 'undefined' && typeof child.props.readOnly === 'undefined' ? {
73
+ readOnly
74
+ } : {}),
75
+ ...(typeof warn !== 'undefined' && typeof child.props.warn === 'undefined' ? {
76
+ warn
77
+ } : {})
78
+ };
79
+ return Object.keys(childProps).length ? /*#__PURE__*/React.cloneElement(child, childProps) : child;
80
+ }
81
+ return child;
82
+ });
64
83
  return /*#__PURE__*/React.createElement("fieldset", _rollupPluginBabelHelpers.extends({
65
84
  className: fieldsetClasses,
66
85
  "data-invalid": invalid ? true : undefined,
@@ -72,7 +91,7 @@ const CheckboxGroup = ({
72
91
  id: legendId || rest['aria-labelledby']
73
92
  }, legendText, slug ? normalizedDecorator : decorator ? /*#__PURE__*/React.createElement("div", {
74
93
  className: `${prefix}--checkbox-group-inner--decorator`
75
- }, normalizedDecorator) : ''), children, /*#__PURE__*/React.createElement("div", {
94
+ }, normalizedDecorator) : ''), clonedChildren, /*#__PURE__*/React.createElement("div", {
76
95
  className: `${prefix}--checkbox-group__validation-msg`
77
96
  }, !readOnly && invalid && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(iconsReact.WarningFilled, {
78
97
  className: `${prefix}--checkbox__invalid-icon`
@@ -184,6 +184,7 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
184
184
  refs.floating.current.style.width = parentWidth + 'px';
185
185
  }
186
186
  }
187
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
187
188
  }, [enableFloatingStyles, floatingStyles, refs.floating, parentWidth]);
188
189
  const [inputValue, setInputValue] = React.useState(getInputValue({
189
190
  initialSelectedItem,
@@ -213,6 +214,7 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
213
214
  }
214
215
  prevInputLengthRef.current = inputValue.length;
215
216
  }
217
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
216
218
  }, [typeahead, inputValue, items, itemToString, autocompleteCustomFilter]);
217
219
  const isManualClearingRef = React.useRef(false);
218
220
  const [isClearing, setIsClearing] = React.useState(false);
@@ -253,6 +255,7 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
253
255
  }
254
256
  prevSelectedItemProp.current = selectedItemProp;
255
257
  }
258
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
256
259
  }, [selectedItemProp]);
257
260
  const filterItems = (items, itemToString, inputValue) => items.filter(item => typeahead ? autocompleteCustomFilter({
258
261
  item: itemToString(item),
@@ -267,8 +270,10 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
267
270
  React.useEffect(() => {
268
271
  if (prevInputValue.current !== inputValue) {
269
272
  prevInputValue.current = inputValue;
273
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20071
270
274
  onInputChange && onInputChange(inputValue);
271
275
  }
276
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
272
277
  }, [inputValue]);
273
278
  const handleSelectionClear = () => {
274
279
  if (textInput?.current) {
@@ -321,6 +326,8 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
321
326
  if (state.highlightedIndex !== -1) {
322
327
  const filteredList = filterItems(items, itemToString, inputValue);
323
328
  const highlightedItem = filteredList[state.highlightedIndex];
329
+
330
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
324
331
  if (highlightedItem && !highlightedItem.disabled) {
325
332
  return {
326
333
  ...changes,
@@ -332,6 +339,8 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
332
339
  const autoIndex = indexToHighlight(inputValue);
333
340
  if (autoIndex !== -1) {
334
341
  const matchingItem = items[autoIndex];
342
+
343
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
335
344
  if (matchingItem && !matchingItem.disabled) {
336
345
  return {
337
346
  ...changes,
@@ -484,8 +493,10 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
484
493
  onHighlightedIndexChange: ({
485
494
  highlightedIndex
486
495
  }) => {
496
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion , valid-typeof , no-constant-binary-expression -- https://github.com/carbon-design-system/carbon/issues/20071
487
497
  if (highlightedIndex > -1 && typeof window !== undefined) {
488
498
  const itemArray = document.querySelectorAll(`li.${prefix}--list-box__menu-item[role="option"]`);
499
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20071
489
500
  const highlightedItem = itemArray[highlightedIndex];
490
501
  if (highlightedItem) {
491
502
  highlightedItem.scrollIntoView({
@@ -498,7 +509,9 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
498
509
  initialSelectedItem: initialSelectedItem,
499
510
  inputId: id,
500
511
  stateReducer,
512
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
501
513
  isItemDisabled(item, _index) {
514
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
502
515
  return item?.disabled;
503
516
  },
504
517
  ...downshiftProps,
@@ -535,6 +548,7 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
535
548
  toggleMenu
536
549
  };
537
550
  }
551
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
538
552
  }, [closeMenu, openMenu, reset, selectItem, setHighlightedIndex, downshiftSetInputValue, toggleMenu]);
539
553
  const buttonProps = getToggleButtonProps({
540
554
  disabled: disabled || readOnly,
@@ -583,7 +597,9 @@ const ComboBox = /*#__PURE__*/React.forwardRef((props, ref) => {
583
597
  // Memoize the value of getMenuProps to avoid an infinite loop
584
598
  const menuProps = React.useMemo(() => getMenuProps({
585
599
  ref: enableFloatingStyles ? refs.setFloating : null
586
- }), [enableFloatingStyles, deprecatedAriaLabel, ariaLabel, getMenuProps, refs.setFloating]);
600
+ }),
601
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
602
+ [enableFloatingStyles, deprecatedAriaLabel, ariaLabel, getMenuProps, refs.setFloating]);
587
603
  React.useEffect(() => {
588
604
  if (textInput.current) {
589
605
  if (inputRef.current && typeaheadText) {
@@ -56,6 +56,7 @@ const ComboButton = /*#__PURE__*/React.forwardRef(function ComboButton({
56
56
  const id = useId.useId('combobutton');
57
57
  const prefix = usePrefix.usePrefix();
58
58
  const containerRef = React.useRef(null);
59
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
59
60
  let middlewares = [];
60
61
  if (!enableOnlyFloatingStyles) {
61
62
  middlewares = [react.flip({
@@ -138,6 +138,7 @@ const ComposedModal = /*#__PURE__*/React.forwardRef(function ComposedModal({
138
138
  setWasOpen(!!open);
139
139
  toggleClass.toggleClass(document.body, `${prefix}--body--with-modal-open`, !!open);
140
140
  }
141
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
141
142
  }, [open, wasOpen, prefix]);
142
143
  // Remove the document.body className on unmount
143
144
  React.useEffect(() => {
@@ -213,7 +214,7 @@ const ComposedModal = /*#__PURE__*/React.forwardRef(function ComposedModal({
213
214
  }
214
215
  const lastContent = modalContent.children[modalContent.children.length - 1];
215
216
  const gradientSpacing = modalContent.scrollHeight - lastContent.offsetTop - lastContent.clientHeight;
216
- for (let elem of modalContent.children) {
217
+ for (const elem of modalContent.children) {
217
218
  if (elem.contains(currentActiveNode)) {
218
219
  const spaceBelow = modalContent.clientHeight - elem.offsetTop + modalContent.scrollTop - elem.clientHeight;
219
220
  if (spaceBelow < gradientSpacing) {
@@ -280,6 +281,7 @@ const ComposedModal = /*#__PURE__*/React.forwardRef(function ComposedModal({
280
281
  return () => {
281
282
  document.removeEventListener('keydown', handleEscapeKey, true);
282
283
  };
284
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
283
285
  }, [open]);
284
286
  React.useEffect(() => {
285
287
  if (!enableDialogElement && !open && launcherButtonRef) {
@@ -311,6 +313,7 @@ const ComposedModal = /*#__PURE__*/React.forwardRef(function ComposedModal({
311
313
  focusButton(innerModal.current);
312
314
  }
313
315
  }
316
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
314
317
  }, [open, selectorPrimaryFocus, isOpen]);
315
318
 
316
319
  // AILabel is always size `sm`
@@ -70,6 +70,17 @@ const defaultTranslations = {
70
70
  [translationKeys.unselectRow]: 'Unselect row'
71
71
  };
72
72
  const translateWithId = id => defaultTranslations[id];
73
+
74
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
75
+
76
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
77
+
78
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
79
+
80
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
81
+
82
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
83
+
73
84
  /**
74
85
  * Data Tables are used to represent a collection of resources, displaying a
75
86
  * subset of their fields in columns, or headers. We prioritize direct updates
@@ -80,6 +91,7 @@ const translateWithId = id => defaultTranslations[id];
80
91
  * and updating the state of the single entity will cascade updates to the
81
92
  * consumer.
82
93
  */
94
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
83
95
  const DataTable = props => {
84
96
  const {
85
97
  children,
@@ -128,6 +140,7 @@ const DataTable = props => {
128
140
  if (hasRowIdsChanged || hasHeadersChanged || hasRowsChanged) {
129
141
  setState(prev => getDerivedStateFromProps.default(props, prev));
130
142
  }
143
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
131
144
  }, [headers, rows]);
132
145
 
133
146
  /**
@@ -160,6 +173,7 @@ const DataTable = props => {
160
173
  ...prev,
161
174
  ...nextSortState
162
175
  }));
176
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20071
163
177
  onClick && handleOnHeaderClick(onClick, {
164
178
  sortHeaderKey: header.key,
165
179
  sortDirection: nextSortState.sortDirection
@@ -76,9 +76,11 @@ const Table = ({
76
76
  [`${prefix}--data-table--visible-overflow-menu`]: !overflowMenuOnHover
77
77
  });
78
78
  const toggleTableBodyAlignmentClass = React.useCallback((alignTop = false) => {
79
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20071
79
80
  alignTop ? tableRef.current?.classList.add(`${prefix}--data-table--top-aligned-body`) : tableRef.current?.classList.remove(`${prefix}--data-table--top-aligned-body`);
80
81
  }, [prefix]);
81
82
  const toggleTableHeaderAlignmentClass = React.useCallback((alignTop = false) => {
83
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20071
82
84
  alignTop ? tableRef.current?.classList.add(`${prefix}--data-table--top-aligned-header`) : tableRef.current?.classList.remove(`${prefix}--data-table--top-aligned-header`);
83
85
  }, [prefix]);
84
86
  const setTableAlignment = React.useCallback(() => {
@@ -128,9 +130,7 @@ const Table = ({
128
130
  setTableAlignment();
129
131
  }, [setTableAlignment, size]);
130
132
  const table = /*#__PURE__*/React.createElement("div", {
131
- className: `${prefix}--data-table-content`
132
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
133
- ,
133
+ className: `${prefix}--data-table-content`,
134
134
  tabIndex: tabIndex ?? (isScrollable ? 0 : undefined)
135
135
  }, /*#__PURE__*/React.createElement("table", _rollupPluginBabelHelpers.extends({
136
136
  "aria-labelledby": titleId,
@@ -95,7 +95,11 @@ TableExpandHeader.propTypes = {
95
95
  /**
96
96
  * Hook for when a listener initiates a request to expand the given row
97
97
  */
98
- onExpand: PropTypes.oneOfType([requiredIfGivenPropIsTruthy.default('enableExpando', PropTypes.func), requiredIfGivenPropIsTruthy.default('enableToggle', PropTypes.func)])
98
+ onExpand: PropTypes.oneOfType([requiredIfGivenPropIsTruthy.default('enableExpando', PropTypes.func
99
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
100
+ ), requiredIfGivenPropIsTruthy.default('enableToggle', PropTypes.func
101
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
102
+ )])
99
103
  };
100
104
 
101
105
  exports.default = TableExpandHeader;
@@ -96,6 +96,7 @@ TableExpandRow.propTypes = {
96
96
  * Specify the string read by a voice reader when the expand trigger is
97
97
  * focused
98
98
  */
99
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
99
100
  /**@ts-ignore*/
100
101
  'aria-label': PropTypes.string,
101
102
  /**
@@ -192,6 +192,8 @@ TableHeader.propTypes = {
192
192
  */
193
193
  translateWithId: PropTypes.func
194
194
  };
195
+
196
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
195
197
  TableHeader.translationKeys = Object.values(translationKeys);
196
198
  TableHeader.displayName = 'TableHeader';
197
199
 
@@ -25,10 +25,15 @@ const TableRow = frFn((props, ref) => {
25
25
  // only useful in `TableExpandRow`
26
26
  const {
27
27
  ariaLabel,
28
+ // eslint-disable-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
28
29
  'aria-label': ariaLabelAlt,
30
+ // eslint-disable-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
29
31
  'aria-controls': ariaControls,
32
+ // eslint-disable-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
30
33
  onExpand,
34
+ // eslint-disable-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
31
35
  isExpanded,
36
+ // eslint-disable-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
32
37
  isSelected,
33
38
  ...cleanProps
34
39
  } = props;
@@ -34,6 +34,7 @@ const TableSlugRow = ({
34
34
  // Slug is always size `mini`
35
35
  let normalizedSlug;
36
36
  if (slug) {
37
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
37
38
  normalizedSlug = /*#__PURE__*/React.cloneElement(slug, {
38
39
  size: 'mini'
39
40
  });