@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
@@ -169,7 +169,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
169
169
  isFluid
170
170
  } = useContext(FormContext);
171
171
  const [hasInput, setHasInput] = useState(false);
172
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
172
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
173
173
  const startInputField = useCallback(node => {
174
174
  if (node !== null) {
175
175
  startInputField.current = node;
@@ -190,9 +190,9 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
190
190
  onClose(selectedDates, dateStr, instance);
191
191
  }
192
192
  },
193
- // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
193
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
194
194
  [onClose]);
195
- // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
195
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
196
196
  const onCalendarClose = (selectedDates, dateStr, instance, e) => {
197
197
  if (e && e.type === 'clickOutside') {
198
198
  return;
@@ -231,9 +231,9 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
231
231
  [String(className)]: className
232
232
  });
233
233
 
234
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
234
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
235
235
  const childrenWithProps = React.Children.toArray(children).map(
236
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
236
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
237
237
  (child, index) => {
238
238
  if (index === 0 && child.type === /*#__PURE__*/React.createElement(DatePickerInput, child.props).type) {
239
239
  return /*#__PURE__*/React.cloneElement(child, {
@@ -348,7 +348,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
348
348
  const {
349
349
  current: end
350
350
  } = endInputField;
351
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
351
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
352
352
  const flatpickerConfig = {
353
353
  inline: inline ?? false,
354
354
  onClose: onCalendarClose,
@@ -524,7 +524,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
524
524
  // this hook allows consumers to access the flatpickr calendar
525
525
  // instance for cases where functions like open() or close()
526
526
  // need to be imperatively called on the calendar
527
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
527
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
528
528
  useImperativeHandle(ref, () => ({
529
529
  get calendar() {
530
530
  return calendarRef.current;
@@ -581,7 +581,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
581
581
  endInputField.current.value = '';
582
582
  }
583
583
  }
584
- // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
584
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
585
585
  }, [value]);
586
586
  useEffect(() => {
587
587
  const handleMouseDown = event => {
@@ -590,7 +590,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
590
590
  closeCalendar();
591
591
  }
592
592
  };
593
- // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
593
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20452
594
594
  const closeCalendar = event => {
595
595
  calendarRef.current?.close();
596
596
  // Remove focus from endDate calendar input
@@ -20,7 +20,7 @@ import { deprecate } from '../../prop-types/deprecate.js';
20
20
  import { AILabel } from '../AILabel/index.js';
21
21
  import { isComponentElement } from '../../internal/utils.js';
22
22
 
23
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
23
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
24
24
 
25
25
  let didWarnAboutDatePickerInputValue = false;
26
26
  const DatePickerInput = /*#__PURE__*/React.forwardRef(function DatePickerInput(props, ref) {
@@ -96,7 +96,7 @@ const DatePickerInput = /*#__PURE__*/React.forwardRef(function DatePickerInput(p
96
96
  });
97
97
  const datePickerInputHelperId = !helperText ? undefined : `datepicker-input-helper-text-${datePickerInputInstanceId}`;
98
98
 
99
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
99
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
100
100
  const inputProps = {
101
101
  ...rest,
102
102
  ...datePickerInputProps,
@@ -115,7 +115,7 @@ const DatePickerInput = /*#__PURE__*/React.forwardRef(function DatePickerInput(p
115
115
  const candidateIsAILabel = isComponentElement(candidate, AILabel);
116
116
  const normalizedDecorator = candidateIsAILabel ? /*#__PURE__*/cloneElement(candidate, {
117
117
  size: 'mini'
118
- }) : null;
118
+ }) : candidate;
119
119
  return /*#__PURE__*/React.createElement("div", {
120
120
  className: containerClasses
121
121
  }, labelText && /*#__PURE__*/React.createElement(Text, {
@@ -202,14 +202,14 @@ DatePickerInput.propTypes = {
202
202
  /**
203
203
  * Provide a regular expression that the input value must match
204
204
  */
205
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
205
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
206
206
  pattern: (props, propName, componentName) => {
207
207
  if (props[propName] === undefined) {
208
208
  return;
209
209
  }
210
210
  try {
211
211
  new RegExp(props[propName]);
212
- // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
212
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20452
213
213
  } catch (e) {
214
214
  return new Error(`Invalid value of prop '${propName}' supplied to '${componentName}', it should be a valid regular expression`);
215
215
  }
@@ -93,7 +93,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(({
93
93
  ref.current.close();
94
94
  }
95
95
  }
96
- // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
96
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
97
97
  }, [modal, open]);
98
98
  useEffect(() => {
99
99
  if (!open && focusAfterCloseRef) {
@@ -124,7 +124,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(({
124
124
  ref.current.setAttribute('aria-labelledby', title.id);
125
125
  }
126
126
  }
127
- // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
127
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
128
128
  }, [open, ariaLabel, ariaLabelledBy, prefix]);
129
129
  return /*#__PURE__*/React.createElement(DialogContext.Provider, {
130
130
  value: contextValue
@@ -229,7 +229,7 @@ const DialogControls = /*#__PURE__*/React.forwardRef(({
229
229
  const prefix = usePrefix();
230
230
  return (
231
231
  /*#__PURE__*/
232
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
232
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
233
233
  // @ts-ignore
234
234
  React.createElement("div", _extends({
235
235
  className: `${prefix}--dialog__header-controls`,
@@ -258,7 +258,7 @@ const DialogCloseButton = /*#__PURE__*/React.forwardRef(({
258
258
  const prefix = usePrefix();
259
259
  return (
260
260
  /*#__PURE__*/
261
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
261
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
262
262
  // @ts-ignore
263
263
  React.createElement(IconButton, _extends({
264
264
  kind: "ghost",
@@ -495,7 +495,7 @@ const DialogFooter = /*#__PURE__*/React.forwardRef(({
495
495
  onClick: onButtonClick
496
496
  }, i) => /*#__PURE__*/React.createElement(Button, {
497
497
  key: `${buttonText}-${i}`
498
- // eslint-disable-next-line jsx-a11y/no-autofocus -- https://github.com/carbon-design-system/carbon/issues/20071
498
+ // eslint-disable-next-line jsx-a11y/no-autofocus -- https://github.com/carbon-design-system/carbon/issues/20452
499
499
  ,
500
500
  autoFocus: danger,
501
501
  kind: "secondary",
@@ -505,7 +505,7 @@ const DialogFooter = /*#__PURE__*/React.forwardRef(({
505
505
  ref: danger ? setSecondaryButtonRef : undefined,
506
506
  disabled: loadingActive,
507
507
  kind: "secondary"
508
- // eslint-disable-next-line jsx-a11y/no-autofocus -- https://github.com/carbon-design-system/carbon/issues/20071
508
+ // eslint-disable-next-line jsx-a11y/no-autofocus -- https://github.com/carbon-design-system/carbon/issues/20452
509
509
  ,
510
510
  autoFocus: danger,
511
511
  onClick: onSecondaryButtonClick
@@ -7,7 +7,7 @@
7
7
  import React, { type HTMLAttributes, type ReactNode, type Ref } from 'react';
8
8
  import { UseSelectProps } from 'downshift';
9
9
  import { type ListBoxMenuIconTranslationKey, type ListBoxSize, type ListBoxType } from '../ListBox';
10
- import { TranslateWithId } from '../../types/common';
10
+ import type { TranslateWithId } from '../../types/common';
11
11
  type ExcludedAttributes = 'id' | 'onChange';
12
12
  export interface OnChangeData<ItemType> {
13
13
  selectedItem: ItemType | null;
@@ -138,7 +138,7 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
138
138
  }
139
139
  });
140
140
  }
141
- // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
141
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
142
142
  }, [floatingStyles, autoAlign, refs.floating]);
143
143
  const prefix = usePrefix();
144
144
  const {
@@ -154,7 +154,7 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
154
154
  }
155
155
  }, [onChange]);
156
156
 
157
- // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
157
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20452
158
158
  const isItemDisabled = useCallback((item, _index) => {
159
159
  const isObject = item !== null && typeof item === 'object';
160
160
  return isObject && 'disabled' in item && item.disabled === true;
@@ -164,7 +164,7 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
164
164
  highlightedIndex
165
165
  } = changes;
166
166
  if (highlightedIndex !== undefined && highlightedIndex > -1 &&
167
- // eslint-disable-next-line valid-typeof , no-constant-binary-expression -- https://github.com/carbon-design-system/carbon/issues/20071
167
+ // eslint-disable-next-line valid-typeof , no-constant-binary-expression -- https://github.com/carbon-design-system/carbon/issues/20452
168
168
  typeof window !== undefined) {
169
169
  const itemArray = document.querySelectorAll(`li.${prefix}--list-box__menu-item[role="option"]`);
170
170
  const highlightedItem = itemArray[highlightedIndex];
@@ -187,7 +187,7 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
187
187
  onHighlightedIndexChange,
188
188
  ...downshiftProps
189
189
  }),
190
- // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
190
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
191
191
  [items, itemToString, initialSelectedItem, onSelectedItemChange, stateReducer, isItemDisabled, onHighlightedIndexChange, downshiftProps]);
192
192
  const dropdownInstanceId = useId();
193
193
 
@@ -279,7 +279,7 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
279
279
  toggleButtonProps.onKeyDown(evt);
280
280
  }
281
281
  },
282
- // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
282
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
283
283
  [isTyping, currTimer, toggleButtonProps]);
284
284
  const readOnlyEventHandlers = useMemo(() => {
285
285
  if (readOnly) {
@@ -313,7 +313,7 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
313
313
  const candidateIsAILabel = isComponentElement(candidate, AILabel);
314
314
  const normalizedDecorator = candidateIsAILabel ? /*#__PURE__*/cloneElement(candidate, {
315
315
  size: 'mini'
316
- }) : null;
316
+ }) : candidate;
317
317
  const allLabelProps = getLabelProps();
318
318
  const labelProps = /*#__PURE__*/isValidElement(titleText) ? {
319
319
  id: allLabelProps.id
@@ -354,7 +354,7 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
354
354
  }), /*#__PURE__*/React.createElement("span", {
355
355
  className: `${prefix}--list-box__label`
356
356
  }, selectedItem ? renderSelectedItem ? renderSelectedItem(selectedItem) : itemToString(selectedItem) :
357
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
357
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
358
358
  label), /*#__PURE__*/React.createElement(ListBox.MenuIcon, {
359
359
  isOpen: isOpen,
360
360
  translateWithId: translateWithId
@@ -511,7 +511,7 @@ Dropdown.propTypes = {
511
511
  */
512
512
  titleText: PropTypes.node.isRequired,
513
513
  /**
514
- * Callback function for translating ListBoxMenuIcon SVG title
514
+ * Translates component strings using your i18n tool.
515
515
  */
516
516
  translateWithId: PropTypes.func,
517
517
  /**
@@ -9,7 +9,7 @@ import { createContext } from 'react';
9
9
 
10
10
  const ErrorBoundaryContext = /*#__PURE__*/createContext({
11
11
  log(error, info) {
12
- // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
12
+ // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
13
13
  console.log(info.componentStack);
14
14
  }
15
15
  });
@@ -20,7 +20,7 @@ import '../Text/TextDirection.js';
20
20
  import { useId } from '../../internal/useId.js';
21
21
  import { useFeatureFlag } from '../FeatureFlags/index.js';
22
22
 
23
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
23
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
24
24
  const FileUploader = /*#__PURE__*/React.forwardRef(({
25
25
  accept,
26
26
  buttonKind,
@@ -45,7 +45,7 @@ const FileUploader = /*#__PURE__*/React.forwardRef(({
45
45
  const [fileItems, setFileItems] = useState([]);
46
46
  const [legacyFileNames, setLegacyFileNames] = useState([]);
47
47
 
48
- // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
48
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20452
49
49
  const [fileObjects, setFileObjects] = useState(new Map());
50
50
  const nodes = [];
51
51
  const createFileItem = file => ({
@@ -99,7 +99,7 @@ const FileUploader = /*#__PURE__*/React.forwardRef(({
99
99
  }
100
100
  }
101
101
  },
102
- // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
102
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
103
103
  [enhancedFileUploaderEnabled, fileItems, legacyFileNames, multiple, onChange]);
104
104
  const handleClick = useCallback((evt, {
105
105
  index,
@@ -156,7 +156,7 @@ const FileUploader = /*#__PURE__*/React.forwardRef(({
156
156
  uploaderButton.current?.focus?.();
157
157
  }
158
158
  },
159
- // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
159
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
160
160
  [enhancedFileUploaderEnabled, fileItems, legacyFileNames, onDelete, onChange, onClick]);
161
161
  useImperativeHandle(ref, () => ({
162
162
  clearFiles() {
@@ -36,7 +36,7 @@ function FileUploaderButton({
36
36
  const prefix = usePrefix();
37
37
  const [labelText, setLabelText] = useState(ownerLabelText);
38
38
  const [prevOwnerLabelText, setPrevOwnerLabelText] = useState(ownerLabelText);
39
- // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
39
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
40
40
  const {
41
41
  current: inputId
42
42
  } = useRef(id || useId());
@@ -33,7 +33,7 @@ function FileUploaderDropContainer({
33
33
  }) {
34
34
  const prefix = usePrefix();
35
35
  const inputRef = useRef(null);
36
- // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
36
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
37
37
  const {
38
38
  current: uid
39
39
  } = useRef(id || useId());
@@ -36,7 +36,7 @@ function FileUploaderItem({
36
36
  const textRef = useRef(null);
37
37
  const [isEllipsisApplied, setIsEllipsisApplied] = useState(false);
38
38
  const prefix = usePrefix();
39
- // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
39
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
40
40
  const {
41
41
  current: id
42
42
  } = useRef(uuid || useId());
@@ -50,7 +50,7 @@ function FileUploaderItem({
50
50
  return name?.replace(/\s+/g, '');
51
51
  };
52
52
 
53
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
53
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
54
54
  const isEllipsisActive = element => {
55
55
  setIsEllipsisApplied(element.offsetWidth < element.scrollWidth);
56
56
  return element.offsetWidth < element.scrollWidth;
@@ -1,17 +1,18 @@
1
1
  /**
2
- * Copyright IBM Corp. 2022
2
+ * Copyright IBM Corp. 2022, 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
- import React, { ComponentType } from 'react';
7
+ import React, { ComponentType, type ComponentProps } from 'react';
8
+ import ComboBox from '../ComboBox';
8
9
  import { ComboBoxProps } from '../ComboBox/ComboBox';
9
10
  type ItemToStringHandler<ItemType> = (item: ItemType | null) => string;
10
11
  interface OnChangeData<ItemType> {
11
12
  selectedItem: ItemType | null | undefined;
12
13
  inputValue?: string | null;
13
14
  }
14
- export interface FluidComboBoxProps<ItemType> extends ComboBoxProps<ItemType> {
15
+ export interface FluidComboBoxProps<ItemType> extends ComboBoxProps<ItemType>, Pick<ComponentProps<typeof ComboBox>, 'translateWithId'> {
15
16
  /**
16
17
  * Specify an optional className to be applied to the outer FluidForm wrapper
17
18
  */
@@ -85,10 +86,6 @@ export interface FluidComboBoxProps<ItemType> extends ComboBoxProps<ItemType> {
85
86
  * visiting this control
86
87
  */
87
88
  titleText?: React.ReactNode;
88
- /**
89
- * Callback function for translating ListBoxMenuIcon SVG title
90
- */
91
- translateWithId?: (id: string) => string;
92
89
  /**
93
90
  * Specify whether the control is currently in warning state
94
91
  */
@@ -106,7 +106,7 @@ FluidComboBox.propTypes = {
106
106
  */
107
107
  titleText: PropTypes.node,
108
108
  /**
109
- * Callback function for translating ListBoxMenuIcon SVG title
109
+ * Translates component strings using your i18n tool.
110
110
  */
111
111
  translateWithId: PropTypes.func,
112
112
  /**
@@ -1,15 +1,15 @@
1
1
  /**
2
- * Copyright IBM Corp. 2022
2
+ * Copyright IBM Corp. 2022, 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
- import React from 'react';
8
- import { DropdownProps } from '../Dropdown';
7
+ import React, { type ComponentProps } from 'react';
8
+ import Dropdown, { DropdownProps } from '../Dropdown';
9
9
  export interface OnChangeData<ItemType> {
10
10
  selectedItem: ItemType | null;
11
11
  }
12
- export interface FluidDropdownProps<ItemType> extends DropdownProps<ItemType> {
12
+ export interface FluidDropdownProps<ItemType> extends DropdownProps<ItemType>, Pick<ComponentProps<typeof Dropdown>, 'translateWithId'> {
13
13
  /**
14
14
  * Specify an optional className to be applied to the outer FluidForm wrapper
15
15
  */
@@ -84,10 +84,6 @@ export interface FluidDropdownProps<ItemType> extends DropdownProps<ItemType> {
84
84
  * visiting this control
85
85
  */
86
86
  titleText: React.ReactNode;
87
- /**
88
- * Callback function for translating ListBoxMenuIcon SVG title
89
- */
90
- translateWithId?: (id: string) => string;
91
87
  /**
92
88
  * Specify whether the control is currently in warning state
93
89
  */
@@ -107,7 +107,7 @@ FluidDropdown.propTypes = {
107
107
  */
108
108
  titleText: PropTypes.node,
109
109
  /**
110
- * Callback function for translating ListBoxMenuIcon SVG title
110
+ * Translates component strings using your i18n tool.
111
111
  */
112
112
  translateWithId: PropTypes.func,
113
113
  /**
@@ -4,13 +4,13 @@
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
- import React, { FunctionComponent } from 'react';
7
+ import React, { FunctionComponent, type ComponentProps } from 'react';
8
8
  import type { UseComboboxProps, UseMultipleSelectionProps } from 'downshift';
9
- import { type FilterableMultiSelectProps } from '../MultiSelect';
9
+ import { type FilterableMultiSelectProps, type MultiSelect } from '../MultiSelect';
10
10
  interface OnChangeData<ItemType> {
11
11
  selectedItems: ItemType[] | null;
12
12
  }
13
- export interface FluidFilterableMultiSelectProps<ItemType> extends FilterableMultiSelectProps<ItemType> {
13
+ export interface FluidFilterableMultiSelectProps<ItemType> extends FilterableMultiSelectProps<ItemType>, Pick<ComponentProps<typeof MultiSelect>, 'translateWithId'> {
14
14
  /**
15
15
  * Specify an optional className to be applied to the outer FluidForm wrapper
16
16
  */
@@ -123,10 +123,6 @@ export interface FluidFilterableMultiSelectProps<ItemType> extends FilterableMul
123
123
  * visiting this control
124
124
  */
125
125
  titleText?: React.ReactNode;
126
- /**
127
- * Callback function for translating ListBoxMenuIcon SVG title
128
- */
129
- translateWithId?: (id: string) => string;
130
126
  /**
131
127
  * Specify title to show title on hover
132
128
  */
@@ -4,13 +4,13 @@
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
- import React from 'react';
8
- import { type MultiSelectProps } from '../MultiSelect';
7
+ import React, { type ComponentProps } from 'react';
8
+ import { MultiSelect, type MultiSelectProps } from '../MultiSelect';
9
9
  import { UseSelectProps } from 'downshift';
10
10
  interface OnChangeData<ItemType> {
11
11
  selectedItems: ItemType[] | null;
12
12
  }
13
- export interface FluidMultiSelectProps<ItemType> extends MultiSelectProps<ItemType> {
13
+ export interface FluidMultiSelectProps<ItemType> extends MultiSelectProps<ItemType>, Pick<ComponentProps<typeof MultiSelect>, 'translateWithId'> {
14
14
  /**
15
15
  * Specify an optional className to be applied to the outer FluidForm wrapper
16
16
  */
@@ -128,10 +128,6 @@ export interface FluidMultiSelectProps<ItemType> extends MultiSelectProps<ItemTy
128
128
  * visiting this control
129
129
  */
130
130
  titleText?: React.ReactNode;
131
- /**
132
- * Callback function for translating ListBoxMenuIcon SVG title
133
- */
134
- translateWithId?: (id: string) => string;
135
131
  /**
136
132
  * Specify title to show title on hover
137
133
  */
@@ -30,14 +30,14 @@ const FluidMultiSelect = /*#__PURE__*/React.forwardRef(function FluidMultiSelect
30
30
  }
31
31
  }, isFilterable ?
32
32
  /*#__PURE__*/
33
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
33
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
34
34
  // @ts-ignore
35
35
  React.createElement(FilterableMultiSelect, _extends({
36
36
  ref: ref,
37
37
  className: classNames
38
38
  }, other)) :
39
39
  /*#__PURE__*/
40
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
40
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
41
41
  // @ts-ignore
42
42
  React.createElement(MultiSelect, _extends({
43
43
  ref: ref,
@@ -189,7 +189,7 @@ FluidMultiSelect.propTypes = {
189
189
  */
190
190
  titleText: PropTypes.node,
191
191
  /**
192
- * Callback function for translating ListBoxMenuIcon SVG title
192
+ * Translates component strings using your i18n tool.
193
193
  */
194
194
  translateWithId: PropTypes.func,
195
195
  /**
@@ -1,12 +1,13 @@
1
1
  /**
2
- * Copyright IBM Corp. 2022
2
+ * Copyright IBM Corp. 2022, 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
- import React from 'react';
7
+ import React, { type ComponentProps } from 'react';
8
+ import { NumberInput } from '../NumberInput';
8
9
  import { type NumberFormatOptions } from '@carbon/utilities';
9
- export interface FluidNumberInputProps {
10
+ export interface FluidNumberInputProps extends Pick<ComponentProps<typeof NumberInput>, 'translateWithId'> {
10
11
  /**
11
12
  * `true` to allow empty string.
12
13
  */
@@ -108,10 +109,6 @@ export interface FluidNumberInputProps {
108
109
  * Specify how much the values should increase/decrease upon clicking on up/down button
109
110
  */
110
111
  step?: number;
111
- /**
112
- * Provide custom text for the component for each translation id
113
- */
114
- translateWithId?: (id: string) => string;
115
112
  /**
116
113
  * **Experimental**: Specify if the input should be of type text or number.
117
114
  * Use type="text" with `locale`, `formatOptions`, and guide user input with
@@ -15,7 +15,7 @@ import { usePrefix } from '../../internal/usePrefix.js';
15
15
  import { FormContext } from '../FluidForm/FormContext.js';
16
16
  import { NumberFormatOptionsPropType } from '../NumberInput/NumberFormatPropTypes.js';
17
17
 
18
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
18
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
19
19
  const FluidNumberInput = /*#__PURE__*/React.forwardRef(({
20
20
  className,
21
21
  ...other
@@ -128,7 +128,7 @@ FluidNumberInput.propTypes = {
128
128
  */
129
129
  step: PropTypes.number,
130
130
  /**
131
- * Provide custom text for the component for each translation id
131
+ * Translates component strings using your i18n tool.
132
132
  */
133
133
  translateWithId: PropTypes.func,
134
134
  /**
@@ -14,7 +14,7 @@ import '../Search/Search.Skeleton.js';
14
14
  import { usePrefix } from '../../internal/usePrefix.js';
15
15
  import { FormContext } from '../FluidForm/FormContext.js';
16
16
 
17
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
17
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
18
18
  const FluidSearch = /*#__PURE__*/React.forwardRef(({
19
19
  className,
20
20
  ...other
@@ -14,7 +14,7 @@ import '../Select/Select.Skeleton.js';
14
14
  import { usePrefix } from '../../internal/usePrefix.js';
15
15
  import { FormContext } from '../FluidForm/FormContext.js';
16
16
 
17
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
17
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
18
18
  const FluidSelect = /*#__PURE__*/React.forwardRef(({
19
19
  className,
20
20
  children,
@@ -16,7 +16,7 @@ import PasswordInput from '../TextInput/PasswordInput.js';
16
16
  import { usePrefix } from '../../internal/usePrefix.js';
17
17
  import { FormContext } from '../FluidForm/FormContext.js';
18
18
 
19
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
19
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
20
20
  const FluidTextInput = /*#__PURE__*/React.forwardRef(({
21
21
  className,
22
22
  isPassword,
@@ -15,7 +15,7 @@ import '../FluidTextInput/FluidTextInput.Skeleton.js';
15
15
  import { usePrefix } from '../../internal/usePrefix.js';
16
16
  import { WarningFilled, WarningAltFilled } from '@carbon/icons-react';
17
17
 
18
- // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
18
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
19
19
  const FluidTimePicker = /*#__PURE__*/React.forwardRef(({
20
20
  className,
21
21
  children,
@@ -48,7 +48,7 @@ const FluidTimePicker = /*#__PURE__*/React.forwardRef(({
48
48
  if (disabled) {
49
49
  return React.Children.toArray(children).map(child =>
50
50
  /*#__PURE__*/
51
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
51
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
52
52
  React.cloneElement(child, {
53
53
  disabled: true
54
54
  }));
@@ -56,7 +56,7 @@ const FluidTimePicker = /*#__PURE__*/React.forwardRef(({
56
56
  if (readOnly) {
57
57
  return React.Children.toArray(children).map(child =>
58
58
  /*#__PURE__*/
59
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
59
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
60
60
  React.cloneElement(child, {
61
61
  readOnly: true
62
62
  }));
@@ -11,7 +11,7 @@ import PropTypes from 'prop-types';
11
11
  import FluidSelect from '../FluidSelect/FluidSelect.js';
12
12
  import '../FluidSelect/FluidSelect.Skeleton.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 FluidTimePickerSelect = /*#__PURE__*/React.forwardRef(({
16
16
  children,
17
17
  className,