@carbon/react 1.92.1 → 1.93.0-rc.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 (302) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +1026 -985
  2. package/es/components/AILabel/index.js +4 -4
  3. package/es/components/Breadcrumb/BreadcrumbItem.js +1 -1
  4. package/es/components/Button/Button.js +2 -2
  5. package/es/components/ChatButton/ChatButton.js +1 -1
  6. package/es/components/Checkbox/Checkbox.js +1 -1
  7. package/es/components/CheckboxGroup/CheckboxGroup.js +1 -1
  8. package/es/components/ComboBox/ComboBox.d.ts +3 -11
  9. package/es/components/ComboBox/ComboBox.js +15 -25
  10. package/es/components/ComboButton/index.d.ts +5 -8
  11. package/es/components/ComboButton/index.js +9 -12
  12. package/es/components/ComposedModal/ComposedModal.js +19 -25
  13. package/es/components/DataTable/DataTable.d.ts +25 -16
  14. package/es/components/DataTable/DataTable.js +33 -34
  15. package/es/components/DataTable/Table.js +2 -2
  16. package/es/components/DataTable/TableBatchActions.d.ts +49 -10
  17. package/es/components/DataTable/TableBatchActions.js +26 -21
  18. package/es/components/DataTable/TableExpandHeader.js +2 -2
  19. package/es/components/DataTable/TableExpandRow.js +1 -1
  20. package/es/components/DataTable/TableHeader.d.ts +8 -10
  21. package/es/components/DataTable/TableHeader.js +11 -13
  22. package/es/components/DataTable/TableRow.js +5 -5
  23. package/es/components/DataTable/TableSlugRow.js +1 -1
  24. package/es/components/DataTable/TableToolbarMenu.js +1 -1
  25. package/es/components/DataTable/TableToolbarSearch.d.ts +8 -7
  26. package/es/components/DataTable/TableToolbarSearch.js +11 -11
  27. package/es/components/DataTable/index.d.ts +2 -2
  28. package/es/components/DataTable/state/sorting.d.ts +2 -2
  29. package/es/components/DataTable/state/sorting.js +1 -1
  30. package/es/components/DataTable/tools/sorting.js +1 -1
  31. package/es/components/DatePicker/DatePicker.js +9 -9
  32. package/es/components/DatePickerInput/DatePickerInput.js +5 -5
  33. package/es/components/Dialog/Dialog.js +6 -6
  34. package/es/components/Dropdown/Dropdown.d.ts +1 -1
  35. package/es/components/Dropdown/Dropdown.js +8 -8
  36. package/es/components/ErrorBoundary/ErrorBoundaryContext.js +1 -1
  37. package/es/components/FileUploader/FileUploader.js +4 -4
  38. package/es/components/FileUploader/FileUploaderButton.js +1 -1
  39. package/es/components/FileUploader/FileUploaderDropContainer.js +1 -1
  40. package/es/components/FileUploader/FileUploaderItem.js +2 -2
  41. package/es/components/FluidComboBox/FluidComboBox.d.ts +4 -7
  42. package/es/components/FluidComboBox/FluidComboBox.js +1 -1
  43. package/es/components/FluidDropdown/FluidDropdown.d.ts +4 -8
  44. package/es/components/FluidDropdown/FluidDropdown.js +1 -1
  45. package/es/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +3 -7
  46. package/es/components/FluidMultiSelect/FluidMultiSelect.d.ts +3 -7
  47. package/es/components/FluidMultiSelect/FluidMultiSelect.js +3 -3
  48. package/es/components/FluidNumberInput/FluidNumberInput.d.ts +4 -7
  49. package/es/components/FluidNumberInput/FluidNumberInput.js +2 -2
  50. package/es/components/FluidSearch/FluidSearch.js +1 -1
  51. package/es/components/FluidSelect/FluidSelect.js +1 -1
  52. package/es/components/FluidTextInput/FluidTextInput.js +1 -1
  53. package/es/components/FluidTimePicker/FluidTimePicker.js +3 -3
  54. package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +1 -1
  55. package/es/components/Grid/CSSGrid.js +3 -3
  56. package/es/components/Grid/Column.js +2 -2
  57. package/es/components/Grid/ColumnHang.js +1 -1
  58. package/es/components/Grid/FlexGrid.js +1 -1
  59. package/es/components/Grid/Row.js +1 -1
  60. package/es/components/Heading/index.js +2 -2
  61. package/es/components/IconButton/index.js +2 -2
  62. package/es/components/IconIndicator/index.js +2 -2
  63. package/es/components/InlineCheckbox/InlineCheckbox.js +1 -1
  64. package/es/components/Layout/index.js +2 -2
  65. package/es/components/LayoutDirection/LayoutDirection.js +1 -1
  66. package/es/components/Link/Link.js +2 -2
  67. package/es/components/ListBox/ListBoxField.d.ts +0 -1
  68. package/es/components/ListBox/ListBoxMenuIcon.d.ts +8 -4
  69. package/es/components/ListBox/ListBoxMenuIcon.js +10 -6
  70. package/es/components/ListBox/ListBoxMenuItem.js +2 -2
  71. package/es/components/ListBox/ListBoxSelection.d.ts +3 -6
  72. package/es/components/ListBox/ListBoxSelection.js +5 -10
  73. package/es/components/ListBox/index.d.ts +5 -3
  74. package/es/components/ListBox/next/ListBoxSelection.d.ts +6 -13
  75. package/es/components/ListBox/next/ListBoxSelection.js +16 -8
  76. package/es/components/ListBox/next/ListBoxTrigger.d.ts +5 -10
  77. package/es/components/ListBox/next/ListBoxTrigger.js +6 -6
  78. package/es/components/Menu/MenuContext.js +1 -1
  79. package/es/components/Menu/MenuItem.js +1 -1
  80. package/es/components/MenuButton/index.js +5 -5
  81. package/es/components/Modal/Modal.js +17 -23
  82. package/es/components/ModalWrapper/ModalWrapper.js +2 -2
  83. package/es/components/MultiSelect/FilterableMultiSelect.d.ts +3 -12
  84. package/es/components/MultiSelect/FilterableMultiSelect.js +18 -27
  85. package/es/components/MultiSelect/MultiSelect.d.ts +2 -2
  86. package/es/components/MultiSelect/MultiSelect.js +12 -12
  87. package/es/components/Notification/Notification.js +1 -1
  88. package/es/components/NumberInput/NumberInput.d.ts +2 -5
  89. package/es/components/NumberInput/NumberInput.js +13 -18
  90. package/es/components/OverflowMenu/OverflowMenu.d.ts +2 -2
  91. package/es/components/OverflowMenu/OverflowMenu.js +4 -4
  92. package/es/components/OverflowMenu/next/index.d.ts +1 -1
  93. package/es/components/OverflowMenu/next/index.js +2 -2
  94. package/es/components/OverflowMenuItem/OverflowMenuItem.js +2 -2
  95. package/es/components/PageHeader/PageHeader.js +12 -12
  96. package/es/components/Pagination/Pagination.js +3 -3
  97. package/es/components/PaginationNav/PaginationNav.d.ts +6 -9
  98. package/es/components/PaginationNav/PaginationNav.js +21 -22
  99. package/es/components/Popover/index.js +8 -8
  100. package/es/components/ProgressBar/ProgressBar.js +2 -2
  101. package/es/components/ProgressIndicator/ProgressIndicator.d.ts +11 -15
  102. package/es/components/ProgressIndicator/ProgressIndicator.js +15 -15
  103. package/es/components/RadioButton/RadioButton.js +1 -1
  104. package/es/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  105. package/es/components/RadioTile/RadioTile.js +1 -1
  106. package/es/components/Select/Select.js +7 -5
  107. package/es/components/ShapeIndicator/index.js +2 -2
  108. package/es/components/Slider/Slider.d.ts +7 -9
  109. package/es/components/Slider/Slider.js +16 -20
  110. package/es/components/Stack/HStack.js +1 -1
  111. package/es/components/Stack/Stack.js +1 -1
  112. package/es/components/Stack/VStack.js +1 -1
  113. package/es/components/StructuredList/StructuredList.js +3 -3
  114. package/es/components/Tabs/Tabs.js +12 -12
  115. package/es/components/Tag/DismissibleTag.js +3 -3
  116. package/es/components/Tag/OperationalTag.js +2 -2
  117. package/es/components/Tag/SelectableTag.js +2 -2
  118. package/es/components/Tag/Tag.js +4 -4
  119. package/es/components/Tag/isEllipsisActive.js +1 -1
  120. package/es/components/Text/Text.js +1 -1
  121. package/es/components/TextArea/TextArea.js +1 -1
  122. package/es/components/TextInput/PasswordInput.js +4 -4
  123. package/es/components/TextInput/TextInput.js +3 -3
  124. package/es/components/Theme/index.js +3 -3
  125. package/es/components/Tile/Tile.js +3 -3
  126. package/es/components/TimePicker/TimePicker.js +1 -1
  127. package/es/components/Toggletip/index.js +4 -4
  128. package/es/components/Tooltip/DefinitionTooltip.js +1 -1
  129. package/es/components/Tooltip/Tooltip.js +3 -3
  130. package/es/components/TreeView/TreeNode.js +6 -6
  131. package/es/components/TreeView/TreeView.js +5 -5
  132. package/es/components/UIShell/HeaderContainer.js +1 -1
  133. package/es/components/UIShell/HeaderMenu.js +1 -1
  134. package/es/components/UIShell/Link.js +2 -2
  135. package/es/components/UIShell/SideNavItems.js +1 -1
  136. package/es/components/UIShell/Switcher.js +1 -1
  137. package/es/components/UIShell/SwitcherItem.js +1 -1
  138. package/es/index.d.ts +1 -1
  139. package/es/internal/FloatingMenu.js +4 -4
  140. package/es/internal/Selection.js +6 -6
  141. package/es/internal/useMergedRefs.js +1 -1
  142. package/es/internal/useNoInteractiveChildren.js +4 -4
  143. package/es/internal/useOutsideClick.js +1 -1
  144. package/es/internal/useOverflowItems.js +6 -6
  145. package/es/internal/useResizeObserver.js +3 -3
  146. package/es/internal/useSavedCallback.js +1 -1
  147. package/es/internal/warning.js +1 -1
  148. package/es/prop-types/isRequiredOneOf.js +2 -2
  149. package/es/tools/events.js +1 -1
  150. package/es/tools/wrapComponent.js +1 -1
  151. package/es/types/common.d.ts +6 -2
  152. package/lib/components/AILabel/index.js +4 -4
  153. package/lib/components/Breadcrumb/BreadcrumbItem.js +1 -1
  154. package/lib/components/Button/Button.js +2 -2
  155. package/lib/components/ChatButton/ChatButton.js +1 -1
  156. package/lib/components/Checkbox/Checkbox.js +1 -1
  157. package/lib/components/CheckboxGroup/CheckboxGroup.js +1 -1
  158. package/lib/components/ComboBox/ComboBox.d.ts +3 -11
  159. package/lib/components/ComboBox/ComboBox.js +15 -25
  160. package/lib/components/ComboButton/index.d.ts +5 -8
  161. package/lib/components/ComboButton/index.js +9 -12
  162. package/lib/components/ComposedModal/ComposedModal.js +18 -24
  163. package/lib/components/DataTable/DataTable.d.ts +25 -16
  164. package/lib/components/DataTable/DataTable.js +33 -34
  165. package/lib/components/DataTable/Table.js +2 -2
  166. package/lib/components/DataTable/TableBatchActions.d.ts +49 -10
  167. package/lib/components/DataTable/TableBatchActions.js +26 -21
  168. package/lib/components/DataTable/TableExpandHeader.js +2 -2
  169. package/lib/components/DataTable/TableExpandRow.js +1 -1
  170. package/lib/components/DataTable/TableHeader.d.ts +8 -10
  171. package/lib/components/DataTable/TableHeader.js +11 -13
  172. package/lib/components/DataTable/TableRow.js +5 -5
  173. package/lib/components/DataTable/TableSlugRow.js +1 -1
  174. package/lib/components/DataTable/TableToolbarMenu.js +1 -1
  175. package/lib/components/DataTable/TableToolbarSearch.d.ts +8 -7
  176. package/lib/components/DataTable/TableToolbarSearch.js +11 -11
  177. package/lib/components/DataTable/index.d.ts +2 -2
  178. package/lib/components/DataTable/state/sorting.d.ts +2 -2
  179. package/lib/components/DataTable/state/sorting.js +1 -1
  180. package/lib/components/DataTable/tools/sorting.js +1 -1
  181. package/lib/components/DatePicker/DatePicker.js +9 -9
  182. package/lib/components/DatePickerInput/DatePickerInput.js +5 -5
  183. package/lib/components/Dialog/Dialog.js +6 -6
  184. package/lib/components/Dropdown/Dropdown.d.ts +1 -1
  185. package/lib/components/Dropdown/Dropdown.js +8 -8
  186. package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +1 -1
  187. package/lib/components/FileUploader/FileUploader.js +4 -4
  188. package/lib/components/FileUploader/FileUploaderButton.js +1 -1
  189. package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -1
  190. package/lib/components/FileUploader/FileUploaderItem.js +2 -2
  191. package/lib/components/FluidComboBox/FluidComboBox.d.ts +4 -7
  192. package/lib/components/FluidComboBox/FluidComboBox.js +1 -1
  193. package/lib/components/FluidDropdown/FluidDropdown.d.ts +4 -8
  194. package/lib/components/FluidDropdown/FluidDropdown.js +1 -1
  195. package/lib/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +3 -7
  196. package/lib/components/FluidMultiSelect/FluidMultiSelect.d.ts +3 -7
  197. package/lib/components/FluidMultiSelect/FluidMultiSelect.js +3 -3
  198. package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +4 -7
  199. package/lib/components/FluidNumberInput/FluidNumberInput.js +2 -2
  200. package/lib/components/FluidSearch/FluidSearch.js +1 -1
  201. package/lib/components/FluidSelect/FluidSelect.js +1 -1
  202. package/lib/components/FluidTextInput/FluidTextInput.js +1 -1
  203. package/lib/components/FluidTimePicker/FluidTimePicker.js +3 -3
  204. package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +1 -1
  205. package/lib/components/Grid/CSSGrid.js +3 -3
  206. package/lib/components/Grid/Column.js +2 -2
  207. package/lib/components/Grid/ColumnHang.js +1 -1
  208. package/lib/components/Grid/FlexGrid.js +1 -1
  209. package/lib/components/Grid/Row.js +1 -1
  210. package/lib/components/Heading/index.js +2 -2
  211. package/lib/components/IconButton/index.js +2 -2
  212. package/lib/components/IconIndicator/index.js +2 -2
  213. package/lib/components/InlineCheckbox/InlineCheckbox.js +1 -1
  214. package/lib/components/Layout/index.js +2 -2
  215. package/lib/components/LayoutDirection/LayoutDirection.js +1 -1
  216. package/lib/components/Link/Link.js +2 -2
  217. package/lib/components/ListBox/ListBoxField.d.ts +0 -1
  218. package/lib/components/ListBox/ListBoxMenuIcon.d.ts +8 -4
  219. package/lib/components/ListBox/ListBoxMenuIcon.js +10 -6
  220. package/lib/components/ListBox/ListBoxMenuItem.js +2 -2
  221. package/lib/components/ListBox/ListBoxSelection.d.ts +3 -6
  222. package/lib/components/ListBox/ListBoxSelection.js +4 -10
  223. package/lib/components/ListBox/index.d.ts +5 -3
  224. package/lib/components/ListBox/next/ListBoxSelection.d.ts +6 -13
  225. package/lib/components/ListBox/next/ListBoxSelection.js +16 -8
  226. package/lib/components/ListBox/next/ListBoxTrigger.d.ts +5 -10
  227. package/lib/components/ListBox/next/ListBoxTrigger.js +5 -6
  228. package/lib/components/Menu/MenuContext.js +1 -1
  229. package/lib/components/Menu/MenuItem.js +1 -1
  230. package/lib/components/MenuButton/index.js +5 -5
  231. package/lib/components/Modal/Modal.js +16 -22
  232. package/lib/components/ModalWrapper/ModalWrapper.js +2 -2
  233. package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +3 -12
  234. package/lib/components/MultiSelect/FilterableMultiSelect.js +18 -27
  235. package/lib/components/MultiSelect/MultiSelect.d.ts +2 -2
  236. package/lib/components/MultiSelect/MultiSelect.js +12 -12
  237. package/lib/components/Notification/Notification.js +1 -1
  238. package/lib/components/NumberInput/NumberInput.d.ts +2 -5
  239. package/lib/components/NumberInput/NumberInput.js +12 -18
  240. package/lib/components/OverflowMenu/OverflowMenu.d.ts +2 -2
  241. package/lib/components/OverflowMenu/OverflowMenu.js +4 -4
  242. package/lib/components/OverflowMenu/next/index.d.ts +1 -1
  243. package/lib/components/OverflowMenu/next/index.js +2 -2
  244. package/lib/components/OverflowMenuItem/OverflowMenuItem.js +2 -2
  245. package/lib/components/PageHeader/PageHeader.js +12 -12
  246. package/lib/components/Pagination/Pagination.js +3 -3
  247. package/lib/components/PaginationNav/PaginationNav.d.ts +6 -9
  248. package/lib/components/PaginationNav/PaginationNav.js +21 -22
  249. package/lib/components/Popover/index.js +8 -8
  250. package/lib/components/ProgressBar/ProgressBar.js +2 -2
  251. package/lib/components/ProgressIndicator/ProgressIndicator.d.ts +11 -15
  252. package/lib/components/ProgressIndicator/ProgressIndicator.js +15 -15
  253. package/lib/components/RadioButton/RadioButton.js +1 -1
  254. package/lib/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  255. package/lib/components/RadioTile/RadioTile.js +1 -1
  256. package/lib/components/Select/Select.js +7 -5
  257. package/lib/components/ShapeIndicator/index.js +2 -2
  258. package/lib/components/Slider/Slider.d.ts +7 -9
  259. package/lib/components/Slider/Slider.js +16 -20
  260. package/lib/components/Stack/HStack.js +1 -1
  261. package/lib/components/Stack/Stack.js +1 -1
  262. package/lib/components/Stack/VStack.js +1 -1
  263. package/lib/components/StructuredList/StructuredList.js +3 -3
  264. package/lib/components/Tabs/Tabs.js +12 -12
  265. package/lib/components/Tag/DismissibleTag.js +3 -3
  266. package/lib/components/Tag/OperationalTag.js +2 -2
  267. package/lib/components/Tag/SelectableTag.js +2 -2
  268. package/lib/components/Tag/Tag.js +4 -4
  269. package/lib/components/Tag/isEllipsisActive.js +1 -1
  270. package/lib/components/Text/Text.js +1 -1
  271. package/lib/components/TextArea/TextArea.js +1 -1
  272. package/lib/components/TextInput/PasswordInput.js +4 -4
  273. package/lib/components/TextInput/TextInput.js +3 -3
  274. package/lib/components/Theme/index.js +3 -3
  275. package/lib/components/Tile/Tile.js +3 -3
  276. package/lib/components/TimePicker/TimePicker.js +1 -1
  277. package/lib/components/Toggletip/index.js +4 -4
  278. package/lib/components/Tooltip/DefinitionTooltip.js +1 -1
  279. package/lib/components/Tooltip/Tooltip.js +3 -3
  280. package/lib/components/TreeView/TreeNode.js +6 -6
  281. package/lib/components/TreeView/TreeView.js +5 -5
  282. package/lib/components/UIShell/HeaderContainer.js +1 -1
  283. package/lib/components/UIShell/HeaderMenu.js +1 -1
  284. package/lib/components/UIShell/Link.js +2 -2
  285. package/lib/components/UIShell/SideNavItems.js +1 -1
  286. package/lib/components/UIShell/Switcher.js +1 -1
  287. package/lib/components/UIShell/SwitcherItem.js +1 -1
  288. package/lib/index.d.ts +1 -1
  289. package/lib/internal/FloatingMenu.js +4 -4
  290. package/lib/internal/Selection.js +6 -6
  291. package/lib/internal/useMergedRefs.js +1 -1
  292. package/lib/internal/useNoInteractiveChildren.js +4 -4
  293. package/lib/internal/useOutsideClick.js +1 -1
  294. package/lib/internal/useOverflowItems.js +6 -6
  295. package/lib/internal/useResizeObserver.js +3 -3
  296. package/lib/internal/useSavedCallback.js +1 -1
  297. package/lib/internal/warning.js +1 -1
  298. package/lib/prop-types/isRequiredOneOf.js +2 -2
  299. package/lib/tools/events.js +1 -1
  300. package/lib/tools/wrapComponent.js +1 -1
  301. package/lib/types/common.d.ts +6 -2
  302. package/package.json +9 -9
@@ -12,7 +12,7 @@ import React from 'react';
12
12
  import { usePrefix } from '../../internal/usePrefix.js';
13
13
  import { useGridSettings, GridSettings } from './GridContext.js';
14
14
 
15
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
15
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
16
16
  const CSSGrid = /*#__PURE__*/React.forwardRef(({
17
17
  align,
18
18
  as,
@@ -96,9 +96,9 @@ CSSGrid.propTypes = {
96
96
  narrow: PropTypes.bool
97
97
  };
98
98
 
99
- // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
99
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20452
100
100
 
101
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
101
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
102
102
  const Subgrid = /*#__PURE__*/React.forwardRef(({
103
103
  as,
104
104
  className: customClassName,
@@ -13,7 +13,7 @@ import React from 'react';
13
13
  import { usePrefix } from '../../internal/usePrefix.js';
14
14
  import { useGridSettings } from './GridContext.js';
15
15
 
16
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
16
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
17
17
  const Column = /*#__PURE__*/React.forwardRef(({
18
18
  as,
19
19
  children,
@@ -116,7 +116,7 @@ Column.propTypes = {
116
116
  xlg: spanPropType
117
117
  };
118
118
 
119
- // eslint-disable-next-line @typescript-eslint/no-explicit-any , react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
119
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any , react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
120
120
  const CSSGridColumn = /*#__PURE__*/React.forwardRef(({
121
121
  as: BaseComponent = 'div',
122
122
  children,
@@ -24,7 +24,7 @@ function ColumnHang({
24
24
  const prefix = usePrefix();
25
25
  const className = cx(customClassName, `${prefix}--grid-column-hang`);
26
26
  // cast as any to let TypeScript allow passing in attributes to base component
27
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
27
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
28
28
  const BaseComponentAsAny = BaseComponent;
29
29
  return /*#__PURE__*/React.createElement(BaseComponentAsAny, _extends({}, rest, {
30
30
  className: className
@@ -12,7 +12,7 @@ import React from 'react';
12
12
  import { usePrefix } from '../../internal/usePrefix.js';
13
13
  import { GridSettings } from './GridContext.js';
14
14
 
15
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
15
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
16
16
  const FlexGrid = /*#__PURE__*/React.forwardRef(({
17
17
  as,
18
18
  condensed = false,
@@ -26,7 +26,7 @@ function Row({
26
26
  [`${prefix}--row--narrow`]: narrow
27
27
  });
28
28
  // TypeScript type validation reports conflicts on different instances of keyof JSX.IntrinsicElements
29
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
29
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
30
30
  const BaseComponentAsAny = BaseComponent;
31
31
  return /*#__PURE__*/React.createElement(BaseComponentAsAny, _extends({
32
32
  className: className
@@ -17,7 +17,7 @@ const Section = /*#__PURE__*/React.forwardRef(function Section({
17
17
  }, ref) {
18
18
  const parentLevel = React.useContext(HeadingContext);
19
19
  const level = levelOverride ?? parentLevel + 1;
20
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
20
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
21
21
  const BaseComponentAsAny = BaseComponent;
22
22
  return /*#__PURE__*/React.createElement(HeadingContext.Provider, {
23
23
  value: Math.min(level, 6)
@@ -44,7 +44,7 @@ Section.propTypes = {
44
44
  */
45
45
  level: PropTypes.number
46
46
  };
47
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
47
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
48
48
  const Heading = /*#__PURE__*/React.forwardRef((props, ref) => {
49
49
  const HeadingIntrinsic = `h${React.useContext(HeadingContext)}`;
50
50
  return /*#__PURE__*/React.createElement(HeadingIntrinsic, _extends({
@@ -19,7 +19,7 @@ import { BadgeIndicator } from '../BadgeIndicator/index.js';
19
19
  import { mapPopoverAlign } from '../../tools/mapPopoverAlign.js';
20
20
 
21
21
  const IconButtonKinds = ['primary', 'secondary', 'ghost', 'tertiary'];
22
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
22
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
23
23
  const IconButton = /*#__PURE__*/React.forwardRef(({
24
24
  align,
25
25
  autoAlign = false,
@@ -45,7 +45,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(({
45
45
  [`${prefix}--icon-tooltip--disabled`]: disabled
46
46
  });
47
47
  if (badgeCount && (kind !== 'ghost' || size !== 'lg')) {
48
- // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
48
+ // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
49
49
  console.warn("The prop BadgeCount must be used with hasIconOnly=true, kind='ghost' and size='lg'");
50
50
  }
51
51
  const badgeId = useId('badge-indicator');
@@ -26,13 +26,13 @@ const iconTypes = {
26
26
  unknown: UnknownFilled,
27
27
  informative: WarningSquareFilled
28
28
  };
29
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
29
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
30
30
  const IconIndicator = /*#__PURE__*/React.forwardRef(({
31
31
  className: customClassName,
32
32
  kind,
33
33
  label,
34
34
  size = 16,
35
- // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
35
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20452
36
36
  ...rest
37
37
  }, ref) => {
38
38
  const prefix = usePrefix();
@@ -11,7 +11,7 @@ import { deprecate } from '../../prop-types/deprecate.js';
11
11
  import { usePrefix } from '../../internal/usePrefix.js';
12
12
  import { useMergedRefs } from '../../internal/useMergedRefs.js';
13
13
 
14
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
14
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
15
15
  const InlineCheckbox = /*#__PURE__*/React.forwardRef((props, forwardRef) => {
16
16
  const {
17
17
  ['aria-label']: ariaLabel,
@@ -22,7 +22,7 @@ const densities = ['condensed', 'normal'];
22
22
  * Size of components within this layout
23
23
  */
24
24
 
25
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
25
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
26
26
  const Layout = /*#__PURE__*/React.forwardRef(({
27
27
  as: BaseComponent = 'div',
28
28
  children,
@@ -65,7 +65,7 @@ Layout.propTypes = {
65
65
  */
66
66
  size: PropTypes.oneOf(sizes)
67
67
  };
68
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
68
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
69
69
  const LayoutConstraint = /*#__PURE__*/React.forwardRef(({
70
70
  as: BaseComponent = 'div',
71
71
  children,
@@ -10,7 +10,7 @@ import PropTypes from 'prop-types';
10
10
  import React from 'react';
11
11
  import { LayoutDirectionContext } from './LayoutDirectionContext.js';
12
12
 
13
- // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
13
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20452
14
14
 
15
15
  function LayoutDirection({
16
16
  as: BaseComponent = 'div',
@@ -12,7 +12,7 @@ import React from 'react';
12
12
  import { usePrefix } from '../../internal/usePrefix.js';
13
13
 
14
14
  // First create the component with basic types
15
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
15
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
16
16
  const LinkBase = /*#__PURE__*/React.forwardRef(({
17
17
  as: BaseComponent,
18
18
  children,
@@ -49,7 +49,7 @@ const LinkBase = /*#__PURE__*/React.forwardRef(({
49
49
  linkProps['aria-disabled'] = true;
50
50
  }
51
51
 
52
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
52
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
53
53
  const BaseComponentAsAny = BaseComponent ?? 'a';
54
54
  const handleOnClick = event => {
55
55
  if (disabled) {
@@ -5,7 +5,6 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React, { type HTMLAttributes } from 'react';
8
- export declare const translationIds: {};
9
8
  export interface ListBoxFieldProps extends HTMLAttributes<HTMLDivElement> {
10
9
  /**
11
10
  * Specify if the parent <ListBox> is disabled
@@ -1,13 +1,17 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2023
2
+ * Copyright IBM Corp. 2016, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
- import { TranslateWithId } from '../../types/common';
9
- export type ListBoxMenuIconTranslationKey = 'close.menu' | 'open.menu';
10
- export interface ListBoxMenuIconProps extends TranslateWithId<ListBoxMenuIconTranslationKey> {
8
+ import type { TranslateWithId } from '../../types/common';
9
+ declare const translationIds: {
10
+ readonly 'close.menu': "close.menu";
11
+ readonly 'open.menu': "open.menu";
12
+ };
13
+ type TranslationKey = keyof typeof translationIds;
14
+ export interface ListBoxMenuIconProps extends TranslateWithId<TranslationKey> {
11
15
  /**
12
16
  * Specify whether the menu is currently open, which will influence the
13
17
  * direction of the menu icon
@@ -11,11 +11,17 @@ import PropTypes from 'prop-types';
11
11
  import { ChevronDown } from '@carbon/icons-react';
12
12
  import { usePrefix } from '../../internal/usePrefix.js';
13
13
 
14
+ const translationIds = {
15
+ 'close.menu': 'close.menu',
16
+ 'open.menu': 'open.menu'
17
+ };
14
18
  const defaultTranslations = {
15
- 'close.menu': 'Close menu',
16
- 'open.menu': 'Open menu'
19
+ [translationIds['close.menu']]: 'Close menu',
20
+ [translationIds['open.menu']]: 'Open menu'
21
+ };
22
+ const defaultTranslateWithId = messageId => {
23
+ return defaultTranslations[messageId];
17
24
  };
18
- const defaultTranslateWithId = id => defaultTranslations[id];
19
25
  /**
20
26
  * `ListBoxMenuIcon` is used to orient the icon up or down depending on the
21
27
  * state of the menu for a given `ListBox`
@@ -43,9 +49,7 @@ ListBoxMenuIcon.propTypes = {
43
49
  */
44
50
  isOpen: PropTypes.bool.isRequired,
45
51
  /**
46
- * i18n hook used to provide the appropriate description for the given menu
47
- * icon. This function takes a ListBoxMenuIconTranslationKey and should
48
- * return a string message for that given message id.
52
+ * Translates component strings using your i18n tool.
49
53
  */
50
54
  translateWithId: PropTypes.func
51
55
  };
@@ -23,7 +23,7 @@ import { useMergedRefs } from '../../internal/useMergedRefs.js';
23
23
  * @returns An object containing the truncation state and the merged ref.
24
24
  */
25
25
  const useIsTruncated = (forwardedRef,
26
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
26
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
27
27
  deps = []) => {
28
28
  const localRef = useRef(null);
29
29
  const mergedRef = useMergedRefs([...(forwardedRef ? [forwardedRef] : []), localRef]);
@@ -37,7 +37,7 @@ deps = []) => {
37
37
  } = element;
38
38
  setIsTruncated(offsetWidth < scrollWidth);
39
39
  }
40
- // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
40
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
41
41
  }, [localRef, ...deps]);
42
42
  return {
43
43
  isTruncated,
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2023
2
+ * Copyright IBM Corp. 2016, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
8
  import { KeyboardEvent, MouseEvent } from 'react';
9
- import { TranslateWithId } from '../../types/common';
9
+ import type { TranslateWithId } from '../../types/common';
10
10
  export interface ListBoxSelectionProps extends TranslateWithId<TranslationKey> {
11
11
  /**
12
12
  * Specify a function to be invoked when a user interacts with the clear
@@ -33,13 +33,10 @@ export interface ListBoxSelectionProps extends TranslateWithId<TranslationKey> {
33
33
  selectionCount?: number;
34
34
  }
35
35
  export type ListBoxSelectionComponent = React.FC<ListBoxSelectionProps>;
36
- export declare const translationIds: {
36
+ declare const translationIds: {
37
37
  readonly 'clear.all': "clear.all";
38
38
  readonly 'clear.selection': "clear.selection";
39
39
  };
40
- /**
41
- * Message ids that will be passed to translateWithId().
42
- */
43
40
  type TranslationKey = keyof typeof translationIds;
44
41
  /**
45
42
  * `ListBoxSelection` is used to provide controls for clearing a selection, in
@@ -16,16 +16,13 @@ const translationIds = {
16
16
  'clear.all': 'clear.all',
17
17
  'clear.selection': 'clear.selection'
18
18
  };
19
-
20
- /**
21
- * Message ids that will be passed to translateWithId().
22
- */
23
-
24
19
  const defaultTranslations = {
25
20
  [translationIds['clear.all']]: 'Clear all selected items',
26
21
  [translationIds['clear.selection']]: 'Clear selected item'
27
22
  };
28
- const defaultTranslateWithId = id => defaultTranslations[id];
23
+ const defaultTranslateWithId = messageId => {
24
+ return defaultTranslations[messageId];
25
+ };
29
26
 
30
27
  /**
31
28
  * `ListBoxSelection` is used to provide controls for clearing a selection, in
@@ -108,11 +105,9 @@ ListBoxSelection.propTypes = {
108
105
  */
109
106
  selectionCount: PropTypes.number,
110
107
  /**
111
- * i18n hook used to provide the appropriate description for the given menu
112
- * icon. This function takes in an id defined in `translationIds` and should
113
- * return a string message for that given message id.
108
+ * Translates component strings using your i18n tool.
114
109
  */
115
110
  translateWithId: PropTypes.func
116
111
  };
117
112
 
118
- export { ListBoxSelection as default, translationIds };
113
+ export { ListBoxSelection as default };
@@ -5,12 +5,13 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  export * from './ListBoxPropTypes';
8
+ import type { ComponentProps } from 'react';
8
9
  import ListBoxInternal from './ListBox';
9
10
  import { ListBoxFieldComponent } from './ListBoxField';
10
11
  import ListBoxMenu from './ListBoxMenu';
11
- import { ListBoxMenuIconComponent } from './ListBoxMenuIcon';
12
+ import ListBoxMenuIcon, { ListBoxMenuIconComponent } from './ListBoxMenuIcon';
12
13
  import ListBoxMenuItem from './ListBoxMenuItem';
13
- import { ListBoxSelectionComponent } from './ListBoxSelection';
14
+ import ListBoxSelection, { ListBoxSelectionComponent } from './ListBoxSelection';
14
15
  type ListBoxMenuComponent = typeof ListBoxMenu;
15
16
  type ListBoxMenuItemComponent = typeof ListBoxMenuItem;
16
17
  type ListBoxPartialComponent = typeof ListBoxInternal;
@@ -23,4 +24,5 @@ export interface ListBoxComponent extends ListBoxPartialComponent {
23
24
  }
24
25
  declare const ListBox: ListBoxComponent;
25
26
  export default ListBox;
26
- export type { ListBoxMenuIconTranslationKey } from './ListBoxMenuIcon';
27
+ export type ListBoxMenuIconTranslationKey = Parameters<NonNullable<ComponentProps<typeof ListBoxMenuIcon>['translateWithId']>>[0];
28
+ export type ListBoxSelectionTranslationKey = Parameters<NonNullable<ComponentProps<typeof ListBoxSelection>['translateWithId']>>[0];
@@ -1,22 +1,23 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2024
2
+ * Copyright IBM Corp. 2016, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
8
  import PropTypes from 'prop-types';
9
+ import type { TranslateWithId } from '../../../types/common';
9
10
  /**
10
11
  * `ListBoxSelection` is used to provide controls for clearing a selection, in
11
12
  * addition to conditionally rendering a badge if the control has more than one
12
13
  * selection.
13
14
  */
14
- export declare const translationIds: {
15
+ declare const translationIds: {
15
16
  readonly 'clear.all': "clear.all";
16
17
  readonly 'clear.selection': "clear.selection";
17
18
  };
18
- export type TranslationKey = keyof typeof translationIds;
19
- export interface ListBoxSelectionProps {
19
+ type TranslationKey = keyof typeof translationIds;
20
+ export interface ListBoxSelectionProps extends TranslateWithId<TranslationKey> {
20
21
  /**
21
22
  * Specify a function to be invoked when a user interacts with the clear
22
23
  * selection element.
@@ -27,12 +28,6 @@ export interface ListBoxSelectionProps {
27
28
  * whether the selection should display a badge or a single clear icon.
28
29
  */
29
30
  selectionCount?: number;
30
- /**
31
- * i18n hook used to provide the appropriate description for the given menu
32
- * icon. This function takes in an id defined in `translationIds` and should
33
- * return a string message for that given message id.
34
- */
35
- translateWithId?: (id: TranslationKey) => string;
36
31
  /**
37
32
  * Specify whether or not the clear selection element should be disabled
38
33
  */
@@ -104,9 +99,7 @@ declare namespace ListBoxSelection {
104
99
  */
105
100
  selectionCount: PropTypes.Requireable<number>;
106
101
  /**
107
- * i18n hook used to provide the appropriate description for the given menu
108
- * icon. This function takes in an id defined in `translationIds` and should
109
- * return a string message for that given message id.
102
+ * Translates component strings using your i18n tool.
110
103
  */
111
104
  translateWithId: PropTypes.Requireable<(...args: any[]) => any>;
112
105
  };
@@ -13,13 +13,23 @@ import { Close } from '@carbon/icons-react';
13
13
  import { usePrefix } from '../../../internal/usePrefix.js';
14
14
 
15
15
  var _Close, _Close2;
16
+ /**
17
+ * `ListBoxSelection` is used to provide controls for clearing a selection, in
18
+ * addition to conditionally rendering a badge if the control has more than one
19
+ * selection.
20
+ */
21
+
22
+ const translationIds = {
23
+ 'clear.all': 'clear.all',
24
+ 'clear.selection': 'clear.selection'
25
+ };
16
26
  const defaultTranslations = {
17
- 'clear.all': 'Clear all selected items',
18
- 'clear.selection': 'Clear selected item'
27
+ [translationIds['clear.all']]: 'Clear all selected items',
28
+ [translationIds['clear.selection']]: 'Clear selected item'
29
+ };
30
+ const defaultTranslateWithId = messageId => {
31
+ return defaultTranslations[messageId];
19
32
  };
20
- function defaultTranslateWithId(id) {
21
- return defaultTranslations[id];
22
- }
23
33
  function ListBoxSelection({
24
34
  clearSelection,
25
35
  selectionCount,
@@ -116,9 +126,7 @@ ListBoxSelection.propTypes = {
116
126
  */
117
127
  selectionCount: PropTypes.number,
118
128
  /**
119
- * i18n hook used to provide the appropriate description for the given menu
120
- * icon. This function takes in an id defined in `translationIds` and should
121
- * return a string message for that given message id.
129
+ * Translates component strings using your i18n tool.
122
130
  */
123
131
  translateWithId: PropTypes.func
124
132
  };
@@ -1,27 +1,22 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2024
2
+ * Copyright IBM Corp. 2016, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
- export declare const translationIds: {
8
+ import type { TranslateWithId } from '../../../types/common';
9
+ declare const translationIds: {
9
10
  readonly 'close.menu': "close.menu";
10
11
  readonly 'open.menu': "open.menu";
11
12
  };
12
- export type TranslationKey = keyof typeof translationIds;
13
- export interface ListBoxTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
13
+ type TranslationKey = keyof typeof translationIds;
14
+ export interface ListBoxTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, TranslateWithId<TranslationKey> {
14
15
  /**
15
16
  * Specify whether the menu is currently open, which will influence the
16
17
  * direction of the menu icon
17
18
  */
18
19
  isOpen: boolean;
19
- /**
20
- * i18n hook used to provide the appropriate description for the given menu
21
- * icon. This function takes in an id defined in `translationIds` and should
22
- * return a string message for that given message id.
23
- */
24
- translateWithId?: (id: TranslationKey) => string;
25
20
  }
26
21
  /**
27
22
  * `ListBoxTrigger` is used to orient the icon up or down depending on the
@@ -21,13 +21,15 @@ const defaultTranslations = {
21
21
  [translationIds['close.menu']]: 'Close',
22
22
  [translationIds['open.menu']]: 'Open'
23
23
  };
24
- const defaultTranslateWithId = id => defaultTranslations[id];
24
+ const defaultTranslateWithId = messageId => {
25
+ return defaultTranslations[messageId];
26
+ };
25
27
  /**
26
28
  * `ListBoxTrigger` is used to orient the icon up or down depending on the
27
29
  * state of the menu for a given `ListBox`
28
30
  */
29
31
 
30
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
32
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
31
33
  const ListBoxTrigger = /*#__PURE__*/React.forwardRef(({
32
34
  isOpen,
33
35
  translateWithId: t = defaultTranslateWithId,
@@ -55,11 +57,9 @@ ListBoxTrigger.propTypes = {
55
57
  */
56
58
  isOpen: PropTypes.bool.isRequired,
57
59
  /**
58
- * i18n hook used to provide the appropriate description for the given menu
59
- * icon. This function takes in an id defined in `translationIds` and should
60
- * return a string message for that given message id.
60
+ * Translates component strings using your i18n tool.
61
61
  */
62
62
  translateWithId: PropTypes.func
63
63
  };
64
64
 
65
- export { ListBoxTrigger as default, translationIds };
65
+ export { ListBoxTrigger as default };
@@ -44,7 +44,7 @@ function menuReducer(state, action) {
44
44
  const MenuContext = /*#__PURE__*/createContext({
45
45
  state: menuDefaultState,
46
46
  // 'dispatch' is populated by the root menu
47
- // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
47
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20452
48
48
  dispatch: _ => {}
49
49
  });
50
50
 
@@ -342,7 +342,7 @@ const MenuItemRadioGroup = /*#__PURE__*/forwardRef(function MenuItemRadioGroup({
342
342
  onChange,
343
343
  defaultValue: defaultSelectedItem ?? {}
344
344
  });
345
- //eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
345
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20452
346
346
  function handleClick(item, e) {
347
347
  setSelection(item);
348
348
  }
@@ -23,7 +23,7 @@ import { mergeRefs } from '../../tools/mergeRefs.js';
23
23
 
24
24
  const validButtonKinds = ['primary', 'tertiary', 'ghost'];
25
25
  const defaultButtonKind = 'primary';
26
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
26
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
27
27
  const MenuButton = /*#__PURE__*/forwardRef(({
28
28
  children,
29
29
  className,
@@ -42,7 +42,7 @@ const MenuButton = /*#__PURE__*/forwardRef(({
42
42
  const id = useId('MenuButton');
43
43
  const prefix = usePrefix();
44
44
  const triggerRef = useRef(null);
45
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
45
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
46
46
  let middlewares = [];
47
47
  if (!enableOnlyFloatingStyles) {
48
48
  middlewares = [flip({
@@ -161,7 +161,7 @@ MenuButton.propTypes = {
161
161
  /**
162
162
  * Specify the type of button to be used as the base for the trigger button.
163
163
  */
164
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
164
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
165
165
  // @ts-ignore-next-line -- avoid spurious (?) TS2322 error
166
166
  kind: PropTypes.oneOf(validButtonKinds),
167
167
  /**
@@ -175,13 +175,13 @@ MenuButton.propTypes = {
175
175
  /**
176
176
  * Specify the size of the button and menu.
177
177
  */
178
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
178
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
179
179
  // @ts-ignore-next-line -- avoid spurious (?) TS2322 error
180
180
  size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg']),
181
181
  /**
182
182
  * Specify the tabIndex of the button.
183
183
  */
184
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
184
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
185
185
  // @ts-ignore-next-line -- avoid spurious (?) TS2322 error
186
186
  tabIndex: PropTypes.number,
187
187
  /**