@carbon/react 1.99.0 → 1.100.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 (277) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +978 -978
  2. package/es/components/BadgeIndicator/index.d.ts +1 -1
  3. package/es/components/BadgeIndicator/index.js +8 -6
  4. package/es/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  5. package/es/components/Breadcrumb/BreadcrumbItem.js +6 -7
  6. package/es/components/Button/Button.Skeleton.d.ts +28 -2
  7. package/es/components/Button/Button.js +3 -2
  8. package/es/components/ChatButton/ChatButton.d.ts +3 -2
  9. package/es/components/CheckboxGroup/CheckboxGroup.d.ts +60 -2
  10. package/es/components/ComboBox/ComboBox.d.ts +6 -7
  11. package/es/components/ComboBox/ComboBox.js +22 -10
  12. package/es/components/ComposedModal/ComposedModal.d.ts +2 -2
  13. package/es/components/ContainedList/ContainedList.d.ts +35 -6
  14. package/es/components/ContainedList/ContainedList.js +3 -1
  15. package/es/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +32 -3
  16. package/es/components/ContainedList/index.d.ts +1 -1
  17. package/es/components/ContainedList/index.js +4 -1
  18. package/es/components/DangerButton/DangerButton.d.ts +1 -1
  19. package/es/components/DataTable/DataTable.d.ts +22 -5
  20. package/es/components/DataTable/DataTable.js +1 -1
  21. package/es/components/DataTable/TableExpandRow.d.ts +1 -1
  22. package/es/components/DataTable/TableExpandRow.js +2 -2
  23. package/es/components/DataTable/TableHeader.d.ts +1 -1
  24. package/es/components/DataTable/TableHeader.js +18 -16
  25. package/es/components/DataTable/TableToolbar.d.ts +25 -1
  26. package/es/components/DataTable/TableToolbarMenu.d.ts +25 -5
  27. package/es/components/DataTable/TableToolbarMenu.js +0 -3
  28. package/es/components/DataTableSkeleton/DataTableSkeleton.d.ts +51 -2
  29. package/es/components/DataTableSkeleton/DataTableSkeleton.js +6 -0
  30. package/es/components/DatePicker/DatePicker.d.ts +2 -2
  31. package/es/components/DatePicker/DatePicker.js +38 -53
  32. package/es/components/DatePicker/plugins/fixEventsPlugin.js +28 -2
  33. package/es/components/DatePickerInput/DatePickerInput.d.ts +1 -1
  34. package/es/components/DatePickerInput/DatePickerInput.js +3 -2
  35. package/es/components/Dialog/Dialog.d.ts +1 -1
  36. package/es/components/Dropdown/Dropdown.Skeleton.d.ts +19 -2
  37. package/es/components/Dropdown/Dropdown.d.ts +3 -4
  38. package/es/components/Dropdown/Dropdown.js +16 -13
  39. package/es/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
  40. package/es/components/ExpandableSearch/ExpandableSearch.js +14 -12
  41. package/es/components/FileUploader/FileUploader.d.ts +1 -1
  42. package/es/components/FileUploader/FileUploader.js +2 -2
  43. package/es/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
  44. package/es/components/FileUploader/FileUploaderDropContainer.js +28 -10
  45. package/es/components/FluidComboBox/FluidComboBox.Skeleton.d.ts +11 -3
  46. package/es/components/FluidComboBox/FluidComboBox.d.ts +2 -7
  47. package/es/components/FluidComboBox/FluidComboBox.js +1 -2
  48. package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.d.ts +15 -3
  49. package/es/components/FluidDatePicker/FluidDatePicker.d.ts +2 -2
  50. package/es/components/FluidDropdown/FluidDropdown.Skeleton.d.ts +11 -3
  51. package/es/components/FluidDropdown/FluidDropdown.d.ts +1 -6
  52. package/es/components/FluidDropdown/FluidDropdown.js +1 -2
  53. package/es/components/FluidForm/FluidForm.d.ts +15 -2
  54. package/es/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +2 -2
  55. package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.d.ts +11 -3
  56. package/es/components/FluidMultiSelect/FluidMultiSelect.d.ts +1 -6
  57. package/es/components/FluidMultiSelect/FluidMultiSelect.js +1 -2
  58. package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +11 -3
  59. package/es/components/FluidNumberInput/FluidNumberInput.d.ts +1 -1
  60. package/es/components/FluidSearch/FluidSearch.Skeleton.d.ts +11 -3
  61. package/es/components/FluidSearch/FluidSearch.d.ts +1 -1
  62. package/es/components/FluidSearch/FluidSearch.js +3 -3
  63. package/es/components/FluidSelect/FluidSelect.Skeleton.d.ts +11 -3
  64. package/es/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +11 -3
  65. package/es/components/FluidTextArea/FluidTextArea.d.ts +95 -1
  66. package/es/components/FluidTextInput/FluidPasswordInput.d.ts +83 -2
  67. package/es/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +11 -3
  68. package/es/components/Grid/GridContext.d.ts +19 -1
  69. package/es/components/IconButton/index.d.ts +1 -1
  70. package/es/components/IconButton/index.js +2 -2
  71. package/es/components/InlineLoading/InlineLoading.js +5 -11
  72. package/es/components/Link/Link.js +3 -0
  73. package/es/components/ListBox/ListBoxField.d.ts +35 -2
  74. package/es/components/ListBox/ListBoxMenuIcon.d.ts +16 -3
  75. package/es/components/ListBox/ListBoxMenuItem.d.ts +1 -1
  76. package/es/components/ListBox/ListBoxSelection.d.ts +34 -3
  77. package/es/components/Menu/MenuItem.d.ts +2 -2
  78. package/es/components/MultiSelect/FilterableMultiSelect.d.ts +2 -2
  79. package/es/components/MultiSelect/FilterableMultiSelect.js +22 -13
  80. package/es/components/MultiSelect/MultiSelect.d.ts +3 -4
  81. package/es/components/MultiSelect/MultiSelect.js +24 -22
  82. package/es/components/Notification/Notification.d.ts +8 -7
  83. package/es/components/Notification/Notification.js +4 -4
  84. package/es/components/OverflowMenu/OverflowMenu.d.ts +1 -1
  85. package/es/components/OverflowMenu/OverflowMenu.js +0 -1
  86. package/es/components/OverflowMenu/index.d.ts +1 -1
  87. package/es/components/PageHeader/PageHeader.d.ts +3 -3
  88. package/es/components/Popover/index.js +21 -12
  89. package/es/components/Search/Search.d.ts +2 -2
  90. package/es/components/Select/Select.d.ts +1 -1
  91. package/es/components/Select/Select.js +2 -2
  92. package/es/components/SkeletonIcon/SkeletonIcon.d.ts +16 -2
  93. package/es/components/SkeletonText/SkeletonText.d.ts +1 -1
  94. package/es/components/Tag/Tag.d.ts +1 -1
  95. package/es/components/Tag/Tag.js +2 -0
  96. package/es/components/Text/Text.d.ts +1 -1
  97. package/es/components/Text/Text.js +4 -3
  98. package/es/components/Text/TextDirection.d.ts +1 -1
  99. package/es/components/Text/TextDirection.js +1 -3
  100. package/es/components/Text/TextDirectionContext.d.ts +3 -3
  101. package/es/components/TextArea/TextArea.js +1 -3
  102. package/es/components/TextInput/ControlledPasswordInput.d.ts +1 -1
  103. package/es/components/TextInput/ControlledPasswordInput.js +2 -2
  104. package/es/components/TextInput/PasswordInput.d.ts +1 -1
  105. package/es/components/TextInput/PasswordInput.js +2 -2
  106. package/es/components/TextInput/TextInput.d.ts +1 -1
  107. package/es/components/TextInput/TextInput.js +2 -2
  108. package/es/components/Tile/Tile.d.ts +1 -1
  109. package/es/components/Tile/Tile.js +37 -69
  110. package/es/components/Toggle/Toggle.Skeleton.d.ts +9 -3
  111. package/es/components/Toggletip/index.d.ts +1 -1
  112. package/es/components/Toggletip/index.js +9 -7
  113. package/es/components/Tooltip/DefinitionTooltip.d.ts +52 -1
  114. package/es/components/Tooltip/Tooltip.js +2 -0
  115. package/es/components/TreeView/TreeNode.d.ts +4 -4
  116. package/es/components/UIShell/Header.d.ts +20 -3
  117. package/es/components/UIShell/HeaderGlobalAction.d.ts +2 -2
  118. package/es/components/UIShell/HeaderName.js +1 -1
  119. package/es/components/UIShell/Link.d.ts +1 -1
  120. package/es/components/UIShell/Link.js +14 -14
  121. package/es/components/UIShell/SideNav.d.ts +3 -4
  122. package/es/components/UIShell/SideNav.js +37 -27
  123. package/es/components/UIShell/SideNavDivider.d.ts +11 -3
  124. package/es/components/UIShell/SideNavHeader.d.ts +24 -1
  125. package/es/components/UIShell/SideNavIcon.d.ts +20 -2
  126. package/es/components/UIShell/SideNavItem.d.ts +20 -2
  127. package/es/components/UIShell/SideNavItems.d.ts +22 -2
  128. package/es/components/UIShell/SideNavLink.d.ts +1 -1
  129. package/es/components/UIShell/SideNavLink.js +14 -14
  130. package/es/components/UIShell/SideNavMenu.d.ts +1 -1
  131. package/es/components/UIShell/SideNavMenu.js +2 -2
  132. package/es/components/UIShell/SideNavMenuItem.d.ts +2 -2
  133. package/es/components/UIShell/SideNavMenuItem.js +2 -2
  134. package/es/components/UIShell/SwitcherDivider.d.ts +10 -2
  135. package/es/internal/FloatingMenu.d.ts +1 -1
  136. package/es/internal/FloatingMenu.js +0 -2
  137. package/es/internal/PolymorphicProps.d.ts +3 -3
  138. package/es/internal/useNoInteractiveChildren.d.ts +1 -1
  139. package/es/internal/useNoInteractiveChildren.js +8 -10
  140. package/es/internal/useOutsideClick.d.ts +1 -1
  141. package/es/internal/useOutsideClick.js +0 -4
  142. package/lib/components/BadgeIndicator/index.d.ts +1 -1
  143. package/lib/components/BadgeIndicator/index.js +7 -5
  144. package/lib/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  145. package/lib/components/Breadcrumb/BreadcrumbItem.js +5 -6
  146. package/lib/components/Button/Button.Skeleton.d.ts +28 -2
  147. package/lib/components/Button/Button.js +3 -2
  148. package/lib/components/ChatButton/ChatButton.d.ts +3 -2
  149. package/lib/components/CheckboxGroup/CheckboxGroup.d.ts +60 -2
  150. package/lib/components/ComboBox/ComboBox.d.ts +6 -7
  151. package/lib/components/ComboBox/ComboBox.js +22 -10
  152. package/lib/components/ComposedModal/ComposedModal.d.ts +2 -2
  153. package/lib/components/ContainedList/ContainedList.d.ts +35 -6
  154. package/lib/components/ContainedList/ContainedList.js +3 -1
  155. package/lib/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +32 -3
  156. package/lib/components/ContainedList/index.d.ts +1 -1
  157. package/lib/components/ContainedList/index.js +4 -1
  158. package/lib/components/DangerButton/DangerButton.d.ts +1 -1
  159. package/lib/components/DataTable/DataTable.d.ts +22 -5
  160. package/lib/components/DataTable/DataTable.js +1 -1
  161. package/lib/components/DataTable/TableExpandRow.d.ts +1 -1
  162. package/lib/components/DataTable/TableHeader.d.ts +1 -1
  163. package/lib/components/DataTable/TableHeader.js +17 -15
  164. package/lib/components/DataTable/TableToolbar.d.ts +25 -1
  165. package/lib/components/DataTable/TableToolbarMenu.d.ts +25 -5
  166. package/lib/components/DataTable/TableToolbarMenu.js +0 -3
  167. package/lib/components/DataTableSkeleton/DataTableSkeleton.d.ts +51 -2
  168. package/lib/components/DataTableSkeleton/DataTableSkeleton.js +6 -0
  169. package/lib/components/DatePicker/DatePicker.d.ts +2 -2
  170. package/lib/components/DatePicker/DatePicker.js +37 -52
  171. package/lib/components/DatePicker/plugins/fixEventsPlugin.js +28 -2
  172. package/lib/components/DatePickerInput/DatePickerInput.d.ts +1 -1
  173. package/lib/components/DatePickerInput/DatePickerInput.js +2 -1
  174. package/lib/components/Dialog/Dialog.d.ts +1 -1
  175. package/lib/components/Dropdown/Dropdown.Skeleton.d.ts +19 -2
  176. package/lib/components/Dropdown/Dropdown.d.ts +3 -4
  177. package/lib/components/Dropdown/Dropdown.js +16 -13
  178. package/lib/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
  179. package/lib/components/ExpandableSearch/ExpandableSearch.js +13 -11
  180. package/lib/components/FileUploader/FileUploader.d.ts +1 -1
  181. package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
  182. package/lib/components/FileUploader/FileUploaderDropContainer.js +28 -10
  183. package/lib/components/FluidComboBox/FluidComboBox.Skeleton.d.ts +11 -3
  184. package/lib/components/FluidComboBox/FluidComboBox.d.ts +2 -7
  185. package/lib/components/FluidComboBox/FluidComboBox.js +1 -2
  186. package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.d.ts +15 -3
  187. package/lib/components/FluidDatePicker/FluidDatePicker.d.ts +2 -2
  188. package/lib/components/FluidDropdown/FluidDropdown.Skeleton.d.ts +11 -3
  189. package/lib/components/FluidDropdown/FluidDropdown.d.ts +1 -6
  190. package/lib/components/FluidDropdown/FluidDropdown.js +1 -2
  191. package/lib/components/FluidForm/FluidForm.d.ts +15 -2
  192. package/lib/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +2 -2
  193. package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.d.ts +11 -3
  194. package/lib/components/FluidMultiSelect/FluidMultiSelect.d.ts +1 -6
  195. package/lib/components/FluidMultiSelect/FluidMultiSelect.js +1 -2
  196. package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +11 -3
  197. package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +1 -1
  198. package/lib/components/FluidSearch/FluidSearch.Skeleton.d.ts +11 -3
  199. package/lib/components/FluidSearch/FluidSearch.d.ts +1 -1
  200. package/lib/components/FluidSearch/FluidSearch.js +2 -2
  201. package/lib/components/FluidSelect/FluidSelect.Skeleton.d.ts +11 -3
  202. package/lib/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +11 -3
  203. package/lib/components/FluidTextArea/FluidTextArea.d.ts +95 -1
  204. package/lib/components/FluidTextInput/FluidPasswordInput.d.ts +83 -2
  205. package/lib/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +11 -3
  206. package/lib/components/Grid/GridContext.d.ts +19 -1
  207. package/lib/components/IconButton/index.d.ts +1 -1
  208. package/lib/components/InlineLoading/InlineLoading.js +5 -11
  209. package/lib/components/Link/Link.js +3 -0
  210. package/lib/components/ListBox/ListBoxField.d.ts +35 -2
  211. package/lib/components/ListBox/ListBoxMenuIcon.d.ts +16 -3
  212. package/lib/components/ListBox/ListBoxMenuItem.d.ts +1 -1
  213. package/lib/components/ListBox/ListBoxSelection.d.ts +34 -3
  214. package/lib/components/Menu/MenuItem.d.ts +2 -2
  215. package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +2 -2
  216. package/lib/components/MultiSelect/FilterableMultiSelect.js +22 -13
  217. package/lib/components/MultiSelect/MultiSelect.d.ts +3 -4
  218. package/lib/components/MultiSelect/MultiSelect.js +24 -22
  219. package/lib/components/Notification/Notification.d.ts +8 -7
  220. package/lib/components/Notification/Notification.js +4 -4
  221. package/lib/components/OverflowMenu/OverflowMenu.d.ts +1 -1
  222. package/lib/components/OverflowMenu/OverflowMenu.js +0 -1
  223. package/lib/components/OverflowMenu/index.d.ts +1 -1
  224. package/lib/components/PageHeader/PageHeader.d.ts +3 -3
  225. package/lib/components/Popover/index.js +19 -10
  226. package/lib/components/Search/Search.d.ts +2 -2
  227. package/lib/components/Select/Select.d.ts +1 -1
  228. package/lib/components/SkeletonIcon/SkeletonIcon.d.ts +16 -2
  229. package/lib/components/SkeletonText/SkeletonText.d.ts +1 -1
  230. package/lib/components/Tag/Tag.d.ts +1 -1
  231. package/lib/components/Tag/Tag.js +2 -0
  232. package/lib/components/Text/Text.d.ts +1 -1
  233. package/lib/components/Text/Text.js +3 -2
  234. package/lib/components/Text/TextDirection.d.ts +1 -1
  235. package/lib/components/Text/TextDirection.js +1 -3
  236. package/lib/components/Text/TextDirectionContext.d.ts +3 -3
  237. package/lib/components/TextArea/TextArea.js +1 -3
  238. package/lib/components/TextInput/ControlledPasswordInput.d.ts +1 -1
  239. package/lib/components/TextInput/PasswordInput.d.ts +1 -1
  240. package/lib/components/TextInput/TextInput.d.ts +1 -1
  241. package/lib/components/Tile/Tile.d.ts +1 -1
  242. package/lib/components/Tile/Tile.js +35 -67
  243. package/lib/components/Toggle/Toggle.Skeleton.d.ts +9 -3
  244. package/lib/components/Toggletip/index.d.ts +1 -1
  245. package/lib/components/Toggletip/index.js +7 -5
  246. package/lib/components/Tooltip/DefinitionTooltip.d.ts +52 -1
  247. package/lib/components/Tooltip/Tooltip.js +2 -0
  248. package/lib/components/TreeView/TreeNode.d.ts +4 -4
  249. package/lib/components/UIShell/Header.d.ts +20 -3
  250. package/lib/components/UIShell/HeaderGlobalAction.d.ts +2 -2
  251. package/lib/components/UIShell/HeaderName.js +1 -1
  252. package/lib/components/UIShell/Link.d.ts +1 -1
  253. package/lib/components/UIShell/Link.js +13 -13
  254. package/lib/components/UIShell/SideNav.d.ts +3 -4
  255. package/lib/components/UIShell/SideNav.js +36 -26
  256. package/lib/components/UIShell/SideNavDivider.d.ts +11 -3
  257. package/lib/components/UIShell/SideNavHeader.d.ts +24 -1
  258. package/lib/components/UIShell/SideNavIcon.d.ts +20 -2
  259. package/lib/components/UIShell/SideNavItem.d.ts +20 -2
  260. package/lib/components/UIShell/SideNavItems.d.ts +22 -2
  261. package/lib/components/UIShell/SideNavLink.d.ts +1 -1
  262. package/lib/components/UIShell/SideNavLink.js +14 -14
  263. package/lib/components/UIShell/SideNavMenu.d.ts +1 -1
  264. package/lib/components/UIShell/SideNavMenuItem.d.ts +2 -2
  265. package/lib/components/UIShell/SwitcherDivider.d.ts +10 -2
  266. package/lib/internal/FloatingMenu.d.ts +1 -1
  267. package/lib/internal/FloatingMenu.js +0 -2
  268. package/lib/internal/PolymorphicProps.d.ts +3 -3
  269. package/lib/internal/useNoInteractiveChildren.d.ts +1 -1
  270. package/lib/internal/useNoInteractiveChildren.js +8 -10
  271. package/lib/internal/useOutsideClick.d.ts +1 -1
  272. package/lib/internal/useOutsideClick.js +0 -4
  273. package/package.json +7 -7
  274. package/scss/_carbon-utilities.scss +9 -0
  275. package/telemetry.yml +0 -1
  276. package/es/internal/createClassWrapper.d.ts +0 -12
  277. package/lib/internal/createClassWrapper.d.ts +0 -12
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2025
2
+ * Copyright IBM Corp. 2016, 2026
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.
@@ -8,7 +8,7 @@
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import cx from 'classnames';
10
10
  import PropTypes from 'prop-types';
11
- import React, { useState, useCallback, useImperativeHandle } from 'react';
11
+ import React, { forwardRef, useState, useCallback, useImperativeHandle } from 'react';
12
12
  import Filename from './Filename.js';
13
13
  import FileUploaderButton from './FileUploaderButton.js';
14
14
  import { ButtonKinds } from '../Button/Button.js';
@@ -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
- const FileUploader = /*#__PURE__*/React.forwardRef(({
23
+ const FileUploader = /*#__PURE__*/forwardRef(({
24
24
  accept,
25
25
  buttonKind,
26
26
  buttonLabel,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2025
2
+ * Copyright IBM Corp. 2016, 2026
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.
@@ -73,22 +73,40 @@ function FileUploaderDropContainer({
73
73
  return acc.concat([curr]);
74
74
  }, []);
75
75
  }
76
- function handleChange(event) {
77
- const files = [...(event.target.files ?? [])];
78
- const filesToValidate = multiple ? files : [files[0]];
79
- const addedFiles = validateFiles(filesToValidate);
80
- return onAddFiles(event, {
81
- addedFiles
76
+ const handleFiles = (event, files) => {
77
+ if (!files.length) return onAddFiles(event, {
78
+ addedFiles: []
82
79
  });
83
- }
84
- function handleDrop(event) {
85
- const files = [...event.dataTransfer.files];
86
80
  const filesToValidate = multiple ? files : [files[0]];
87
81
  const addedFiles = validateFiles(filesToValidate);
88
82
  return onAddFiles(event, {
89
83
  addedFiles
90
84
  });
91
- }
85
+ };
86
+ const handleChange = event => {
87
+ const files = [...(event.target.files ?? [])];
88
+ return handleFiles(event, files);
89
+ };
90
+ const handleDrop = event => {
91
+ const items = [...(event.dataTransfer.items ?? [])];
92
+ const files = items.length ?
93
+ // Normalize dropped items to files. Skip directories and non-file items.
94
+ items.reduce((acc, item) => {
95
+ if (item.kind !== 'file') {
96
+ return acc;
97
+ }
98
+ const entry = item.webkitGetAsEntry();
99
+ if (entry?.isDirectory) {
100
+ return acc;
101
+ }
102
+ const file = item.getAsFile();
103
+ if (file) {
104
+ acc.push(file);
105
+ }
106
+ return acc;
107
+ }, []) : [...event.dataTransfer.files];
108
+ return handleFiles(event, files);
109
+ };
92
110
  const handleClick = () => {
93
111
  if (!disabled) {
94
112
  inputRef.current?.click();
@@ -1,15 +1,23 @@
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
- import React from 'react';
7
+ import PropTypes from 'prop-types';
8
8
  export interface FluidComboBoxSkeletonProps {
9
9
  /**
10
10
  * Specify an optional className to add.
11
11
  */
12
12
  className?: string;
13
13
  }
14
- declare const FluidComboBoxSkeleton: React.FC<FluidComboBoxSkeletonProps>;
14
+ declare const FluidComboBoxSkeleton: {
15
+ ({ className, ...rest }: FluidComboBoxSkeletonProps): import("react/jsx-runtime").JSX.Element;
16
+ propTypes: {
17
+ /**
18
+ * Specify an optional className to add.
19
+ */
20
+ className: PropTypes.Requireable<string>;
21
+ };
22
+ };
15
23
  export default FluidComboBoxSkeleton;
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Copyright IBM Corp. 2022, 2025
2
+ * Copyright IBM Corp. 2022, 2026
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, type ComponentProps } from 'react';
7
+ import React, { type ComponentProps } from 'react';
8
8
  import ComboBox from '../ComboBox';
9
9
  import { ComboBoxProps } from '../ComboBox/ComboBox';
10
10
  type ItemToStringHandler<ItemType> = (item: ItemType | null) => string;
@@ -46,11 +46,6 @@ export interface FluidComboBoxProps<ItemType> extends ComboBoxProps<ItemType>, P
46
46
  * Specify if the `FluidComboBox` should render its menu items in condensed mode
47
47
  */
48
48
  isCondensed?: boolean;
49
- /**
50
- * Function to render items as custom components instead of strings.
51
- * Defaults to null and is overridden by a getter
52
- */
53
- itemToElement?: ComponentType<ItemType> | null;
54
49
  /**
55
50
  * Helper function passed to downshift that allows the library to render a
56
51
  * given item to a string label. By default, it extracts the `label` field
@@ -66,8 +66,7 @@ FluidComboBox.propTypes = {
66
66
  */
67
67
  isCondensed: PropTypes.bool,
68
68
  /**
69
- * Function to render items as custom components instead of strings.
70
- * Defaults to null and is overridden by a getter
69
+ * Renders an item as a custom React node instead of a string.
71
70
  */
72
71
  itemToElement: PropTypes.func,
73
72
  /**
@@ -1,10 +1,10 @@
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
- import React from 'react';
7
+ import PropTypes from 'prop-types';
8
8
  export interface FluidDatePickerSkeletonProps {
9
9
  /**
10
10
  * Specify an optional className to be applied to the outer FluidForm wrapper
@@ -15,5 +15,17 @@ export interface FluidDatePickerSkeletonProps {
15
15
  */
16
16
  datePickerType?: 'simple' | 'single' | 'range';
17
17
  }
18
- declare const FluidDatePickerSkeleton: React.FC<FluidDatePickerSkeletonProps>;
18
+ declare const FluidDatePickerSkeleton: {
19
+ ({ className, datePickerType, ...other }: FluidDatePickerSkeletonProps): import("react/jsx-runtime").JSX.Element;
20
+ propTypes: {
21
+ /**
22
+ * Specify an optional className to be applied to the outer FluidForm wrapper
23
+ */
24
+ className: PropTypes.Requireable<string>;
25
+ /**
26
+ * Specify which variant of the DatePicker the skeleton should mimic
27
+ */
28
+ datePickerType: PropTypes.Requireable<string>;
29
+ };
30
+ };
19
31
  export default FluidDatePickerSkeleton;
@@ -1,5 +1,5 @@
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.
@@ -35,5 +35,5 @@ export interface FluidDatePickerProps {
35
35
  */
36
36
  warnText?: React.ReactNode;
37
37
  }
38
- declare const FluidDatePicker: React.FC<FluidDatePickerProps>;
38
+ declare const FluidDatePicker: React.ForwardRefExoticComponent<FluidDatePickerProps & React.RefAttributes<HTMLInputElement>>;
39
39
  export default FluidDatePicker;
@@ -1,15 +1,23 @@
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
- import React from 'react';
7
+ import PropTypes from 'prop-types';
8
8
  export interface FluidDropdownSkeletonProps {
9
9
  /**
10
10
  * Specify an optional className to add.
11
11
  */
12
12
  className?: string;
13
13
  }
14
- declare const FluidDropdownSkeleton: React.FC<FluidDropdownSkeletonProps>;
14
+ declare const FluidDropdownSkeleton: {
15
+ ({ className, ...rest }: FluidDropdownSkeletonProps): import("react/jsx-runtime").JSX.Element;
16
+ propTypes: {
17
+ /**
18
+ * Specify an optional className to add.
19
+ */
20
+ className: PropTypes.Requireable<string>;
21
+ };
22
+ };
15
23
  export default FluidDropdownSkeleton;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2022, 2025
2
+ * Copyright IBM Corp. 2022, 2026
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.
@@ -43,11 +43,6 @@ export interface FluidDropdownProps<ItemType> extends DropdownProps<ItemType>, P
43
43
  * Specify if the `FluidDropdown` should render its menu items in condensed mode
44
44
  */
45
45
  isCondensed?: boolean;
46
- /**
47
- * Function to render items as custom components instead of strings.
48
- * Defaults to null and is overridden by a getter
49
- */
50
- itemToElement?: React.JSXElementConstructor<ItemType> | null;
51
46
  /**
52
47
  * Helper function passed to downshift that allows the library to render a
53
48
  * given item to a string label. By default, it extracts the `label` field
@@ -67,8 +67,7 @@ FluidDropdown.propTypes = {
67
67
  */
68
68
  isCondensed: PropTypes.bool,
69
69
  /**
70
- * Function to render items as custom components instead of strings.
71
- * Defaults to null and is overridden by a getter
70
+ * Renders an item as a custom React node instead of a string.
72
71
  */
73
72
  itemToElement: PropTypes.func,
74
73
  /**
@@ -4,7 +4,20 @@
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, { type HTMLAttributes } from 'react';
7
+ import PropTypes from 'prop-types';
8
+ import { type HTMLAttributes } from 'react';
8
9
  export type FluidFormProps = HTMLAttributes<HTMLFormElement>;
9
- declare const FluidForm: React.FC<FluidFormProps>;
10
+ declare const FluidForm: {
11
+ ({ className, children, ...other }: FluidFormProps): import("react/jsx-runtime").JSX.Element;
12
+ propTypes: {
13
+ /**
14
+ * Provide children to be rendered inside of the <form> element
15
+ */
16
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
17
+ /**
18
+ * Provide a custom className to be applied on the containing <form> node
19
+ */
20
+ className: PropTypes.Requireable<string>;
21
+ };
22
+ };
10
23
  export default FluidForm;
@@ -4,7 +4,7 @@
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, type ComponentProps } from 'react';
7
+ import React, { type ComponentProps, type ReactNode } from 'react';
8
8
  import type { UseComboboxProps, UseMultipleSelectionProps } from 'downshift';
9
9
  import { type FilterableMultiSelectProps, type MultiSelect } from '../MultiSelect';
10
10
  interface OnChangeData<ItemType> {
@@ -65,7 +65,7 @@ export interface FluidFilterableMultiSelectProps<ItemType> extends FilterableMul
65
65
  * Function to render items as custom components instead of strings.
66
66
  * Defaults to null and is overridden by a getter
67
67
  */
68
- itemToElement?: FunctionComponent<ItemType>;
68
+ itemToElement?: (item: ItemType) => ReactNode;
69
69
  /**
70
70
  * Helper function passed to downshift that allows the library to render a
71
71
  * given item to a string label. By default, it extracts the `label` field
@@ -1,15 +1,23 @@
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
- import React from 'react';
7
+ import PropTypes from 'prop-types';
8
8
  export interface FluidMultiSelectSkeletonProps {
9
9
  /**
10
10
  * Specify an optional className to add.
11
11
  */
12
12
  className?: string;
13
13
  }
14
- declare const FluidMultiSelectSkeleton: React.FC<FluidMultiSelectSkeletonProps>;
14
+ declare const FluidMultiSelectSkeleton: {
15
+ ({ className, ...rest }: FluidMultiSelectSkeletonProps): import("react/jsx-runtime").JSX.Element;
16
+ propTypes: {
17
+ /**
18
+ * Specify an optional className to add.
19
+ */
20
+ className: PropTypes.Requireable<string>;
21
+ };
22
+ };
15
23
  export default FluidMultiSelectSkeleton;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2022, 2025
2
+ * Copyright IBM Corp. 2022, 2026
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.
@@ -66,11 +66,6 @@ export interface FluidMultiSelectProps<ItemType> extends MultiSelectProps<ItemTy
66
66
  * @deprecated This prop is deprecated in favor of new component called FluidFilterableMultiSelect and will be removed in the next major release
67
67
  */
68
68
  isFilterable?: boolean;
69
- /**
70
- * Function to render items as custom components instead of strings.
71
- * Defaults to null and is overridden by a getter
72
- */
73
- itemToElement?: React.JSXElementConstructor<ItemType>;
74
69
  /**
75
70
  * Helper function passed to downshift that allows the library to render a
76
71
  * given item to a string label. By default, it extracts the `label` field
@@ -106,8 +106,7 @@ FluidMultiSelect.propTypes = {
106
106
  */
107
107
  isFilterable: PropTypes.bool,
108
108
  /**
109
- * Function to render items as custom components instead of strings.
110
- * Defaults to null and is overridden by a getter
109
+ * Renders an item as a custom React node instead of a string.
111
110
  */
112
111
  itemToElement: PropTypes.func,
113
112
  /**
@@ -1,15 +1,23 @@
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
- import React from 'react';
7
+ import PropTypes from 'prop-types';
8
8
  export interface FluidNumberInputSkeletonProps {
9
9
  /**
10
10
  * Specify an optional className to be applied to the outer FluidForm wrapper
11
11
  */
12
12
  className?: string;
13
13
  }
14
- declare const FluidNumberInputSkeleton: React.FC<FluidNumberInputSkeletonProps>;
14
+ declare const FluidNumberInputSkeleton: {
15
+ ({ className, ...other }: FluidNumberInputSkeletonProps): import("react/jsx-runtime").JSX.Element;
16
+ propTypes: {
17
+ /**
18
+ * Specify an optional className to be applied to the outer FluidForm wrapper
19
+ */
20
+ className: PropTypes.Requireable<string>;
21
+ };
22
+ };
15
23
  export default FluidNumberInputSkeleton;
@@ -132,5 +132,5 @@ export interface FluidNumberInputProps extends Pick<ComponentProps<typeof Number
132
132
  */
133
133
  readOnly?: boolean;
134
134
  }
135
- declare const FluidNumberInput: React.FC<FluidNumberInputProps>;
135
+ declare const FluidNumberInput: React.ForwardRefExoticComponent<FluidNumberInputProps & React.RefAttributes<HTMLInputElement>>;
136
136
  export default FluidNumberInput;
@@ -1,15 +1,23 @@
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
- import React from 'react';
7
+ import PropTypes from 'prop-types';
8
8
  export interface FluidSearchSkeletonProps {
9
9
  /**
10
10
  * Specify an optional className to be applied to the outer FluidForm wrapper
11
11
  */
12
12
  className?: string;
13
13
  }
14
- declare const FluidSearchSkeleton: React.FC<FluidSearchSkeletonProps>;
14
+ declare const FluidSearchSkeleton: {
15
+ ({ className, ...other }: FluidSearchSkeletonProps): import("react/jsx-runtime").JSX.Element;
16
+ propTypes: {
17
+ /**
18
+ * Specify an optional className to be applied to the outer FluidForm wrapper
19
+ */
20
+ className: PropTypes.Requireable<string>;
21
+ };
22
+ };
15
23
  export default FluidSearchSkeleton;
@@ -66,5 +66,5 @@ export interface FluidSearchProps {
66
66
  */
67
67
  value?: string | number;
68
68
  }
69
- declare const FluidSearch: React.FC<FluidSearchProps>;
69
+ declare const FluidSearch: React.ForwardRefExoticComponent<FluidSearchProps & React.RefAttributes<HTMLInputElement>>;
70
70
  export default FluidSearch;
@@ -7,15 +7,15 @@
7
7
 
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import PropTypes from 'prop-types';
10
- import React from 'react';
10
+ import React, { forwardRef } from 'react';
11
11
  import cx from 'classnames';
12
12
  import Search from '../Search/Search.js';
13
13
  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/20452
18
- const FluidSearch = /*#__PURE__*/React.forwardRef(({
17
+ const frFn = forwardRef;
18
+ const FluidSearch = frFn(({
19
19
  className,
20
20
  ...other
21
21
  }, ref) => {
@@ -1,15 +1,23 @@
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 PropTypes from 'prop-types';
8
8
  export interface FluidSelectSkeletonProps {
9
9
  /**
10
10
  * Specify an optional className to add.
11
11
  */
12
12
  className?: string;
13
13
  }
14
- declare const FluidSelectSkeleton: React.FC<FluidSelectSkeletonProps>;
14
+ declare const FluidSelectSkeleton: {
15
+ ({ className, ...rest }: FluidSelectSkeletonProps): import("react/jsx-runtime").JSX.Element;
16
+ propTypes: {
17
+ /**
18
+ * Specify an optional className to add.
19
+ */
20
+ className: PropTypes.Requireable<string>;
21
+ };
22
+ };
15
23
  export default FluidSelectSkeleton;
@@ -1,15 +1,23 @@
1
1
  /**
2
- * Copyright IBM Corp. 2024
2
+ * Copyright IBM Corp. 2024, 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 PropTypes from 'prop-types';
8
8
  export interface FluidTextAreaSkeletonProps {
9
9
  /**
10
10
  * Specify an optional className to be applied to the outer FluidForm wrapper
11
11
  */
12
12
  className?: string;
13
13
  }
14
- declare const FluidTextAreaSkeleton: React.FC<FluidTextAreaSkeletonProps>;
14
+ declare const FluidTextAreaSkeleton: {
15
+ ({ className, ...other }: FluidTextAreaSkeletonProps): import("react/jsx-runtime").JSX.Element;
16
+ propTypes: {
17
+ /**
18
+ * Specify an optional className to be applied to the outer FluidForm wrapper
19
+ */
20
+ className: PropTypes.Requireable<string>;
21
+ };
22
+ };
15
23
  export default FluidTextAreaSkeleton;
@@ -4,6 +4,7 @@
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 PropTypes from 'prop-types';
7
8
  import React from 'react';
8
9
  export interface FluidTextAreaProps {
9
10
  /**
@@ -96,5 +97,98 @@ export interface FluidTextAreaProps {
96
97
  */
97
98
  readOnly?: boolean;
98
99
  }
99
- declare const FluidTextArea: React.FC<FluidTextAreaProps>;
100
+ declare const FluidTextArea: {
101
+ ({ className, ...other }: FluidTextAreaProps): import("react/jsx-runtime").JSX.Element;
102
+ propTypes: {
103
+ /**
104
+ * Provide a custom className that is applied directly to the underlying
105
+ * `<textarea>` node
106
+ */
107
+ className: PropTypes.Requireable<string>;
108
+ /**
109
+ * Specify the `cols` attribute for the underlying `<textarea>` node
110
+ */
111
+ cols: PropTypes.Requireable<number>;
112
+ /**
113
+ * Optionally provide the default value of the `<textarea>`
114
+ */
115
+ defaultValue: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
116
+ /**
117
+ * Specify whether the control is disabled
118
+ */
119
+ disabled: PropTypes.Requireable<boolean>;
120
+ /**
121
+ * Specify whether to display the character counter
122
+ */
123
+ enableCounter: PropTypes.Requireable<boolean>;
124
+ /**
125
+ * Provide text that is used alongside the control label for additional help
126
+ */
127
+ helperText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
128
+ /**
129
+ * Specify whether you want the underlying label to be visually hidden
130
+ */
131
+ hideLabel: PropTypes.Requireable<boolean>;
132
+ /**
133
+ * Provide a unique identifier for the control
134
+ */
135
+ id: PropTypes.Requireable<string>;
136
+ /**
137
+ * Specify whether the control is currently invalid
138
+ */
139
+ invalid: PropTypes.Requireable<boolean>;
140
+ /**
141
+ * Provide the text that is displayed when the control is in an invalid state
142
+ */
143
+ invalidText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
144
+ /**
145
+ * Provide the text that will be read by a screen reader when visiting this
146
+ * control
147
+ */
148
+ labelText: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
149
+ /**
150
+ * `true` to use the light version. For use on $ui-01 backgrounds only.
151
+ * Don't use this to make tile background color same as container background color.
152
+ */
153
+ light: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
154
+ /**
155
+ * Max character count allowed for the textarea. This is needed in order for enableCounter to display
156
+ */
157
+ maxCount: PropTypes.Requireable<number>;
158
+ /**
159
+ * Optionally provide an `onChange` handler that is called whenever `<textarea>`
160
+ * is updated
161
+ */
162
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
163
+ /**
164
+ * Optionally provide an `onClick` handler that is called whenever the
165
+ * `<textarea>` is clicked
166
+ */
167
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
168
+ /**
169
+ * Specify the placeholder attribute for the `<textarea>`
170
+ */
171
+ placeholder: PropTypes.Requireable<string>;
172
+ /**
173
+ * Specify the rows attribute for the `<textarea>`
174
+ */
175
+ rows: PropTypes.Requireable<number>;
176
+ /**
177
+ * Provide the current value of the `<textarea>`
178
+ */
179
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
180
+ /**
181
+ * Specify whether the control is currently in warning state
182
+ */
183
+ warn: PropTypes.Requireable<boolean>;
184
+ /**
185
+ * Provide the text that is displayed when the control is in warning state
186
+ */
187
+ warnText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
188
+ /**
189
+ * Whether or not the component is readonly
190
+ */
191
+ readOnly: PropTypes.Requireable<boolean>;
192
+ };
193
+ };
100
194
  export default FluidTextArea;