@carbon/react 1.90.0-rc.0 → 1.91.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 (320) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +923 -964
  2. package/es/components/AILabel/index.js +8 -6
  3. package/es/components/Breadcrumb/BreadcrumbItem.js +2 -0
  4. package/es/components/Button/Button.js +3 -0
  5. package/es/components/ChatButton/ChatButton.js +1 -0
  6. package/es/components/CheckboxGroup/CheckboxGroup.js +21 -2
  7. package/es/components/CodeSnippet/CodeSnippet.d.ts +1 -1
  8. package/es/components/CodeSnippet/CodeSnippet.js +1 -1
  9. package/es/components/ComboBox/ComboBox.js +18 -13
  10. package/es/components/ComboButton/index.js +2 -1
  11. package/es/components/ComposedModal/ComposedModal.js +5 -2
  12. package/es/components/Copy/Copy.d.ts +1 -1
  13. package/es/components/Copy/Copy.js +1 -1
  14. package/es/components/CopyButton/CopyButton.d.ts +1 -1
  15. package/es/components/CopyButton/CopyButton.js +1 -1
  16. package/es/components/DataTable/DataTable.d.ts +60 -15
  17. package/es/components/DataTable/DataTable.js +119 -178
  18. package/es/components/DataTable/Table.d.ts +2 -2
  19. package/es/components/DataTable/Table.js +4 -4
  20. package/es/components/DataTable/TableExpandHeader.d.ts +1 -1
  21. package/es/components/DataTable/TableExpandHeader.js +6 -2
  22. package/es/components/DataTable/TableExpandRow.js +1 -0
  23. package/es/components/DataTable/TableHeader.js +2 -0
  24. package/es/components/DataTable/TableRow.js +5 -0
  25. package/es/components/DataTable/TableSlugRow.js +1 -0
  26. package/es/components/DataTable/TableToolbarMenu.js +3 -0
  27. package/es/components/DataTable/state/sorting.d.ts +3 -1
  28. package/es/components/DataTable/state/sorting.js +2 -0
  29. package/es/components/DataTable/tools/sorting.js +1 -0
  30. package/es/components/DatePicker/DatePicker.d.ts +0 -12
  31. package/es/components/DatePicker/DatePicker.js +17 -6
  32. package/es/components/DatePicker/plugins/rangePlugin.d.ts +19 -2
  33. package/es/components/DatePicker/plugins/rangePlugin.js +18 -14
  34. package/es/components/DatePickerInput/DatePickerInput.js +6 -0
  35. package/es/components/Dialog/Dialog.js +10 -2
  36. package/es/components/Dropdown/Dropdown.js +17 -16
  37. package/es/components/ErrorBoundary/ErrorBoundaryContext.js +1 -0
  38. package/es/components/FeatureFlags/index.js +1 -0
  39. package/es/components/FileUploader/FileUploader.js +9 -2
  40. package/es/components/FileUploader/FileUploaderButton.js +1 -1
  41. package/es/components/FileUploader/FileUploaderDropContainer.js +1 -1
  42. package/es/components/FileUploader/FileUploaderItem.js +3 -0
  43. package/es/components/FluidMultiSelect/FluidMultiSelect.js +2 -0
  44. package/es/components/FluidNumberInput/FluidNumberInput.js +3 -2
  45. package/es/components/FluidSearch/FluidSearch.js +3 -2
  46. package/es/components/FluidSelect/FluidSelect.js +3 -2
  47. package/es/components/FluidTextInput/FluidTextInput.js +3 -2
  48. package/es/components/FluidTimePicker/FluidTimePicker.js +11 -4
  49. package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +3 -2
  50. package/es/components/Grid/CSSGrid.js +5 -0
  51. package/es/components/Grid/Column.js +3 -0
  52. package/es/components/Grid/ColumnHang.js +1 -0
  53. package/es/components/Grid/FlexGrid.js +1 -0
  54. package/es/components/Grid/Row.js +1 -0
  55. package/es/components/Heading/index.js +3 -1
  56. package/es/components/IconButton/index.js +5 -3
  57. package/es/components/IconIndicator/index.js +4 -2
  58. package/es/components/InlineCheckbox/InlineCheckbox.js +3 -2
  59. package/es/components/Layout/index.js +6 -4
  60. package/es/components/LayoutDirection/LayoutDirection.js +2 -0
  61. package/es/components/Link/Link.js +3 -0
  62. package/es/components/ListBox/ListBoxMenuItem.js +4 -1
  63. package/es/components/ListBox/next/ListBoxTrigger.js +3 -2
  64. package/es/components/Menu/Menu.js +6 -9
  65. package/es/components/Menu/MenuContext.js +1 -0
  66. package/es/components/Menu/MenuItem.d.ts +1 -1
  67. package/es/components/Menu/MenuItem.js +10 -18
  68. package/es/components/MenuButton/index.js +7 -2
  69. package/es/components/Modal/Modal.js +4 -1
  70. package/es/components/ModalWrapper/ModalWrapper.js +2 -0
  71. package/es/components/MultiSelect/FilterableMultiSelect.js +25 -6
  72. package/es/components/MultiSelect/MultiSelect.js +22 -17
  73. package/es/components/Notification/Notification.d.ts +6 -6
  74. package/es/components/Notification/Notification.js +7 -7
  75. package/es/components/NumberInput/NumberInput.js +7 -1
  76. package/es/components/OverflowMenu/OverflowMenu.js +3 -1
  77. package/es/components/OverflowMenu/next/index.js +4 -3
  78. package/es/components/OverflowMenuItem/OverflowMenuItem.js +2 -0
  79. package/es/components/PageHeader/PageHeader.d.ts +3 -3
  80. package/es/components/PageHeader/PageHeader.js +22 -8
  81. package/es/components/Pagination/Pagination.js +6 -2
  82. package/es/components/PaginationNav/PaginationNav.js +2 -5
  83. package/es/components/Popover/index.js +15 -5
  84. package/es/components/ProgressBar/ProgressBar.js +4 -2
  85. package/es/components/RadioTile/RadioTile.js +2 -2
  86. package/es/components/Search/Search.d.ts +4 -2
  87. package/es/components/Search/Search.js +7 -6
  88. package/es/components/Select/Select.js +2 -3
  89. package/es/components/ShapeIndicator/index.js +4 -2
  90. package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.d.ts +4 -4
  91. package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +1 -2
  92. package/es/components/SkeletonText/SkeletonText.js +0 -2
  93. package/es/components/Slider/Slider.d.ts +144 -188
  94. package/es/components/Slider/Slider.js +798 -726
  95. package/es/components/Slider/index.d.ts +2 -2
  96. package/es/components/Stack/HStack.js +1 -0
  97. package/es/components/Stack/Stack.js +6 -9
  98. package/es/components/Stack/VStack.js +1 -0
  99. package/es/components/StructuredList/StructuredList.js +3 -0
  100. package/es/components/Switch/Switch.js +1 -1
  101. package/es/components/Tabs/Tabs.d.ts +4 -0
  102. package/es/components/Tabs/Tabs.js +28 -17
  103. package/es/components/Tag/DismissibleTag.js +2 -0
  104. package/es/components/Tag/OperationalTag.js +2 -0
  105. package/es/components/Tag/SelectableTag.js +2 -0
  106. package/es/components/Tag/Tag.js +4 -0
  107. package/es/components/Tag/isEllipsisActive.js +1 -0
  108. package/es/components/Text/Text.js +1 -0
  109. package/es/components/TextArea/TextArea.js +13 -6
  110. package/es/components/TextInput/ControlledPasswordInput.js +4 -6
  111. package/es/components/TextInput/PasswordInput.js +9 -4
  112. package/es/components/TextInput/TextInput.js +6 -4
  113. package/es/components/TextInput/util.d.ts +17 -5
  114. package/es/components/TextInput/util.js +2 -7
  115. package/es/components/Theme/index.js +8 -3
  116. package/es/components/Tile/Tile.js +14 -17
  117. package/es/components/TimePicker/TimePicker.js +1 -0
  118. package/es/components/Toggle/Toggle.js +1 -1
  119. package/es/components/Toggletip/index.js +4 -0
  120. package/es/components/Tooltip/DefinitionTooltip.js +1 -0
  121. package/es/components/Tooltip/Tooltip.js +30 -23
  122. package/es/components/TreeView/TreeNode.js +13 -5
  123. package/es/components/TreeView/TreeView.js +7 -0
  124. package/es/components/UIShell/HeaderContainer.js +3 -1
  125. package/es/components/UIShell/HeaderGlobalAction.js +2 -2
  126. package/es/components/UIShell/HeaderMenu.js +3 -3
  127. package/es/components/UIShell/HeaderPanel.d.ts +1 -1
  128. package/es/components/UIShell/HeaderPanel.js +2 -2
  129. package/es/components/UIShell/Link.js +2 -0
  130. package/es/components/UIShell/SideNavItems.js +1 -0
  131. package/es/components/UIShell/SideNavMenu.js +2 -2
  132. package/es/components/UIShell/SideNavMenuItem.js +1 -1
  133. package/es/components/UIShell/SideNavSwitcher.js +1 -1
  134. package/es/components/UIShell/Switcher.js +2 -1
  135. package/es/components/UIShell/SwitcherItem.js +4 -2
  136. package/es/index.d.ts +12 -13
  137. package/es/index.js +25 -24
  138. package/es/internal/FloatingMenu.js +7 -1
  139. package/es/internal/Selection.js +12 -3
  140. package/es/internal/defaultItemToString.d.ts +7 -0
  141. package/es/internal/defaultItemToString.js +17 -0
  142. package/es/internal/index.d.ts +1 -0
  143. package/es/internal/useMergedRefs.js +1 -0
  144. package/es/internal/useNoInteractiveChildren.js +4 -0
  145. package/es/internal/useOutsideClick.js +1 -0
  146. package/es/internal/useOverflowItems.js +6 -0
  147. package/es/internal/useResizeObserver.js +4 -0
  148. package/es/internal/useSavedCallback.js +1 -0
  149. package/es/internal/warning.js +1 -0
  150. package/es/prop-types/deprecateValuesWithin.d.ts +8 -1
  151. package/es/prop-types/deprecateValuesWithin.js +6 -6
  152. package/es/prop-types/isRequiredOneOf.js +4 -1
  153. package/es/prop-types/requiredIfGivenPropIsTruthy.d.ts +8 -7
  154. package/es/prop-types/requiredIfGivenPropIsTruthy.js +10 -10
  155. package/es/tools/events.js +3 -1
  156. package/es/tools/wrapComponent.js +1 -0
  157. package/lib/components/AILabel/index.js +8 -6
  158. package/lib/components/Breadcrumb/BreadcrumbItem.js +2 -0
  159. package/lib/components/Button/Button.js +3 -0
  160. package/lib/components/ChatButton/ChatButton.js +1 -0
  161. package/lib/components/CheckboxGroup/CheckboxGroup.js +20 -1
  162. package/lib/components/CodeSnippet/CodeSnippet.d.ts +1 -1
  163. package/lib/components/CodeSnippet/CodeSnippet.js +1 -1
  164. package/lib/components/ComboBox/ComboBox.js +20 -15
  165. package/lib/components/ComboButton/index.js +2 -1
  166. package/lib/components/ComposedModal/ComposedModal.js +5 -2
  167. package/lib/components/Copy/Copy.d.ts +1 -1
  168. package/lib/components/Copy/Copy.js +1 -1
  169. package/lib/components/CopyButton/CopyButton.d.ts +1 -1
  170. package/lib/components/CopyButton/CopyButton.js +1 -1
  171. package/lib/components/DataTable/DataTable.d.ts +60 -15
  172. package/lib/components/DataTable/DataTable.js +119 -178
  173. package/lib/components/DataTable/Table.d.ts +2 -2
  174. package/lib/components/DataTable/Table.js +4 -4
  175. package/lib/components/DataTable/TableExpandHeader.d.ts +1 -1
  176. package/lib/components/DataTable/TableExpandHeader.js +6 -2
  177. package/lib/components/DataTable/TableExpandRow.js +1 -0
  178. package/lib/components/DataTable/TableHeader.js +2 -0
  179. package/lib/components/DataTable/TableRow.js +5 -0
  180. package/lib/components/DataTable/TableSlugRow.js +1 -0
  181. package/lib/components/DataTable/TableToolbarMenu.js +3 -0
  182. package/lib/components/DataTable/state/sorting.d.ts +3 -1
  183. package/lib/components/DataTable/state/sorting.js +2 -0
  184. package/lib/components/DataTable/tools/sorting.js +1 -0
  185. package/lib/components/DatePicker/DatePicker.d.ts +0 -12
  186. package/lib/components/DatePicker/DatePicker.js +16 -5
  187. package/lib/components/DatePicker/plugins/rangePlugin.d.ts +19 -2
  188. package/lib/components/DatePicker/plugins/rangePlugin.js +18 -16
  189. package/lib/components/DatePickerInput/DatePickerInput.js +6 -0
  190. package/lib/components/Dialog/Dialog.js +10 -2
  191. package/lib/components/Dropdown/Dropdown.js +19 -18
  192. package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +1 -0
  193. package/lib/components/FeatureFlags/index.js +1 -0
  194. package/lib/components/FileUploader/FileUploader.js +9 -2
  195. package/lib/components/FileUploader/FileUploaderButton.js +1 -1
  196. package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -1
  197. package/lib/components/FileUploader/FileUploaderItem.js +3 -0
  198. package/lib/components/FluidMultiSelect/FluidMultiSelect.js +2 -0
  199. package/lib/components/FluidNumberInput/FluidNumberInput.js +3 -2
  200. package/lib/components/FluidSearch/FluidSearch.js +3 -2
  201. package/lib/components/FluidSelect/FluidSelect.js +3 -2
  202. package/lib/components/FluidTextInput/FluidTextInput.js +3 -2
  203. package/lib/components/FluidTimePicker/FluidTimePicker.js +11 -4
  204. package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +3 -2
  205. package/lib/components/Grid/CSSGrid.js +5 -0
  206. package/lib/components/Grid/Column.js +3 -0
  207. package/lib/components/Grid/ColumnHang.js +1 -0
  208. package/lib/components/Grid/FlexGrid.js +1 -0
  209. package/lib/components/Grid/Row.js +1 -0
  210. package/lib/components/Heading/index.js +3 -1
  211. package/lib/components/IconButton/index.js +5 -3
  212. package/lib/components/IconIndicator/index.js +4 -2
  213. package/lib/components/InlineCheckbox/InlineCheckbox.js +3 -2
  214. package/lib/components/Layout/index.js +6 -4
  215. package/lib/components/LayoutDirection/LayoutDirection.js +2 -0
  216. package/lib/components/Link/Link.js +3 -0
  217. package/lib/components/ListBox/ListBoxMenuItem.js +4 -1
  218. package/lib/components/ListBox/next/ListBoxTrigger.js +3 -2
  219. package/lib/components/Menu/Menu.js +6 -9
  220. package/lib/components/Menu/MenuContext.js +1 -0
  221. package/lib/components/Menu/MenuItem.d.ts +1 -1
  222. package/lib/components/Menu/MenuItem.js +11 -19
  223. package/lib/components/MenuButton/index.js +7 -2
  224. package/lib/components/Modal/Modal.js +4 -1
  225. package/lib/components/ModalWrapper/ModalWrapper.js +2 -0
  226. package/lib/components/MultiSelect/FilterableMultiSelect.js +32 -13
  227. package/lib/components/MultiSelect/MultiSelect.js +23 -18
  228. package/lib/components/Notification/Notification.d.ts +6 -6
  229. package/lib/components/Notification/Notification.js +7 -7
  230. package/lib/components/NumberInput/NumberInput.js +7 -1
  231. package/lib/components/OverflowMenu/OverflowMenu.js +3 -1
  232. package/lib/components/OverflowMenu/next/index.js +4 -3
  233. package/lib/components/OverflowMenuItem/OverflowMenuItem.js +2 -0
  234. package/lib/components/PageHeader/PageHeader.d.ts +3 -3
  235. package/lib/components/PageHeader/PageHeader.js +22 -8
  236. package/lib/components/Pagination/Pagination.js +6 -2
  237. package/lib/components/PaginationNav/PaginationNav.js +2 -5
  238. package/lib/components/Popover/index.js +15 -5
  239. package/lib/components/ProgressBar/ProgressBar.js +4 -2
  240. package/lib/components/RadioTile/RadioTile.js +2 -2
  241. package/lib/components/Search/Search.d.ts +4 -2
  242. package/lib/components/Search/Search.js +7 -6
  243. package/lib/components/Select/Select.js +2 -3
  244. package/lib/components/ShapeIndicator/index.js +4 -2
  245. package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.d.ts +4 -4
  246. package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +1 -2
  247. package/lib/components/SkeletonText/SkeletonText.js +0 -2
  248. package/lib/components/Slider/Slider.d.ts +144 -188
  249. package/lib/components/Slider/Slider.js +795 -725
  250. package/lib/components/Slider/index.d.ts +2 -2
  251. package/lib/components/Stack/HStack.js +1 -0
  252. package/lib/components/Stack/Stack.js +6 -9
  253. package/lib/components/Stack/VStack.js +1 -0
  254. package/lib/components/StructuredList/StructuredList.js +3 -0
  255. package/lib/components/Switch/Switch.js +1 -1
  256. package/lib/components/Tabs/Tabs.d.ts +4 -0
  257. package/lib/components/Tabs/Tabs.js +28 -17
  258. package/lib/components/Tag/DismissibleTag.js +2 -0
  259. package/lib/components/Tag/OperationalTag.js +2 -0
  260. package/lib/components/Tag/SelectableTag.js +2 -0
  261. package/lib/components/Tag/Tag.js +4 -0
  262. package/lib/components/Tag/isEllipsisActive.js +1 -0
  263. package/lib/components/Text/Text.js +1 -0
  264. package/lib/components/TextArea/TextArea.js +13 -6
  265. package/lib/components/TextInput/ControlledPasswordInput.js +3 -5
  266. package/lib/components/TextInput/PasswordInput.js +8 -3
  267. package/lib/components/TextInput/TextInput.js +5 -3
  268. package/lib/components/TextInput/util.d.ts +17 -5
  269. package/lib/components/TextInput/util.js +2 -7
  270. package/lib/components/Theme/index.js +8 -3
  271. package/lib/components/Tile/Tile.js +14 -17
  272. package/lib/components/TimePicker/TimePicker.js +1 -0
  273. package/lib/components/Toggle/Toggle.js +1 -1
  274. package/lib/components/Toggletip/index.js +4 -0
  275. package/lib/components/Tooltip/DefinitionTooltip.js +1 -0
  276. package/lib/components/Tooltip/Tooltip.js +30 -23
  277. package/lib/components/TreeView/TreeNode.js +13 -5
  278. package/lib/components/TreeView/TreeView.js +7 -0
  279. package/lib/components/UIShell/HeaderContainer.js +3 -1
  280. package/lib/components/UIShell/HeaderGlobalAction.js +2 -2
  281. package/lib/components/UIShell/HeaderMenu.js +3 -3
  282. package/lib/components/UIShell/HeaderPanel.d.ts +1 -1
  283. package/lib/components/UIShell/HeaderPanel.js +2 -2
  284. package/lib/components/UIShell/Link.js +2 -0
  285. package/lib/components/UIShell/SideNavItems.js +1 -0
  286. package/lib/components/UIShell/SideNavMenu.js +2 -2
  287. package/lib/components/UIShell/SideNavMenuItem.js +1 -1
  288. package/lib/components/UIShell/SideNavSwitcher.js +1 -1
  289. package/lib/components/UIShell/Switcher.js +2 -1
  290. package/lib/components/UIShell/SwitcherItem.js +4 -2
  291. package/lib/index.d.ts +12 -13
  292. package/lib/index.js +51 -28
  293. package/lib/internal/FloatingMenu.js +7 -1
  294. package/lib/internal/Selection.js +12 -3
  295. package/lib/internal/defaultItemToString.d.ts +7 -0
  296. package/lib/internal/defaultItemToString.js +19 -0
  297. package/lib/internal/index.d.ts +1 -0
  298. package/lib/internal/useMergedRefs.js +1 -0
  299. package/lib/internal/useNoInteractiveChildren.js +4 -0
  300. package/lib/internal/useOutsideClick.js +1 -0
  301. package/lib/internal/useOverflowItems.js +6 -0
  302. package/lib/internal/useResizeObserver.js +4 -0
  303. package/lib/internal/useSavedCallback.js +1 -0
  304. package/lib/internal/warning.js +1 -0
  305. package/lib/prop-types/deprecateValuesWithin.d.ts +8 -1
  306. package/lib/prop-types/deprecateValuesWithin.js +6 -8
  307. package/lib/prop-types/isRequiredOneOf.js +4 -1
  308. package/lib/prop-types/requiredIfGivenPropIsTruthy.d.ts +8 -7
  309. package/lib/prop-types/requiredIfGivenPropIsTruthy.js +10 -12
  310. package/lib/tools/events.js +3 -1
  311. package/lib/tools/wrapComponent.js +1 -0
  312. package/package.json +10 -9
  313. package/es/components/MultiSelect/tools/itemToString.d.ts +0 -1
  314. package/es/components/MultiSelect/tools/itemToString.js +0 -21
  315. package/es/components/Slider/index.js +0 -14
  316. package/es/internal/createClassWrapper.js +0 -23
  317. package/lib/components/MultiSelect/tools/itemToString.d.ts +0 -1
  318. package/lib/components/MultiSelect/tools/itemToString.js +0 -23
  319. package/lib/components/Slider/index.js +0 -20
  320. package/lib/internal/createClassWrapper.js +0 -25
@@ -25,10 +25,15 @@ const TableRow = frFn((props, ref) => {
25
25
  // only useful in `TableExpandRow`
26
26
  const {
27
27
  ariaLabel,
28
+ // eslint-disable-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
28
29
  'aria-label': ariaLabelAlt,
30
+ // eslint-disable-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
29
31
  'aria-controls': ariaControls,
32
+ // eslint-disable-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
30
33
  onExpand,
34
+ // eslint-disable-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
31
35
  isExpanded,
36
+ // eslint-disable-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
32
37
  isSelected,
33
38
  ...cleanProps
34
39
  } = props;
@@ -34,6 +34,7 @@ const TableSlugRow = ({
34
34
  // Slug is always size `mini`
35
35
  let normalizedSlug;
36
36
  if (slug) {
37
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
37
38
  normalizedSlug = /*#__PURE__*/React.cloneElement(slug, {
38
39
  size: 'mini'
39
40
  });
@@ -18,6 +18,9 @@ var usePrefix = require('../../internal/usePrefix.js');
18
18
  var index = require('../OverflowMenu/index.js');
19
19
 
20
20
  const defaultIconDescription = 'Settings';
21
+
22
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- https://github.com/carbon-design-system/carbon/issues/20071
23
+
21
24
  const TableToolbarMenu = ({
22
25
  className,
23
26
  renderIcon = iconsReact.Settings,
@@ -13,7 +13,9 @@ export interface SortRowParams {
13
13
  locale: string;
14
14
  compare: (a: string | number, b: string | number, locale?: string) => number;
15
15
  }
16
- export type SortRowFn = (cellA: any, cellB: any, options: SortRowParams) => number;
16
+ export type SortRowFn = (cellA: any, // eslint-disable-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
17
+ cellB: any, // eslint-disable-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
18
+ options: SortRowParams) => number;
17
19
  interface Props {
18
20
  locale?: string;
19
21
  sortRow?: SortRowFn;
@@ -10,6 +10,8 @@
10
10
  var sortStates = require('./sortStates.js');
11
11
  var sorting = require('../tools/sorting.js');
12
12
 
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
14
+
13
15
  const initialSortState = sortStates.sortStates.NONE;
14
16
 
15
17
  /**
@@ -15,6 +15,7 @@ var sortStates = require('../state/sortStates.js');
15
15
  * type, the default sort algorithm will be used for those types. Otherwise, the
16
16
  * values will be converted to strings for comparison.
17
17
  */
18
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
18
19
  const compare = (a, b, locale = 'en') => {
19
20
  // prevent multiple null values in one column (sorting breaks)
20
21
  if (a === null) a = '';
@@ -8,18 +8,6 @@ import React, { ReactNode } from 'react';
8
8
  import flatpickr from 'flatpickr';
9
9
  import { DateLimit, DateOption } from 'flatpickr/dist/types/options';
10
10
  export type DatePickerTypes = 'simple' | 'single' | 'range';
11
- export type CalRef = {
12
- inline: boolean;
13
- disableMobile: boolean;
14
- defaultDate: Date;
15
- closeOnSelect: (evt: React.ChangeEvent<HTMLTextAreaElement>) => void;
16
- mode: 'simple' | 'single' | 'range';
17
- allowInput: boolean;
18
- dateFormat: string;
19
- locale: string;
20
- plugins: [];
21
- clickOpens: any;
22
- };
23
11
  export interface DatePickerProps {
24
12
  /**
25
13
  * Flatpickr prop passthrough enables direct date input, and when set to false,
@@ -73,7 +73,6 @@ const carbonFlatpickrMonthSelectPlugin = config => fp => {
73
73
  elem.parentNode.removeChild(elem);
74
74
  });
75
75
  fp.monthElements.splice(0, fp.monthElements.length, ...fp.monthElements.map(() => {
76
- // eslint-disable-next-line no-underscore-dangle
77
76
  const monthElement = fp._createElement('span', config.classFlatpickrCurrentMonth);
78
77
  monthElement.textContent = monthToStr(fp.currentMonth, config.shorthand === true, fp.l10n);
79
78
  fp.yearElements[0].closest(config.selectorFlatpickrMonthYearContainer).insertBefore(monthElement, fp.yearElements[0].closest(config.selectorFlatpickrYearContainer));
@@ -174,6 +173,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
174
173
  isFluid
175
174
  } = React.useContext(FormContext.FormContext);
176
175
  const [hasInput, setHasInput] = React.useState(false);
176
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
177
177
  const startInputField = React.useCallback(node => {
178
178
  if (node !== null) {
179
179
  startInputField.current = node;
@@ -193,7 +193,10 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
193
193
  if (onClose) {
194
194
  onClose(selectedDates, dateStr, instance);
195
195
  }
196
- }, [onClose]);
196
+ },
197
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
198
+ [onClose]);
199
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
197
200
  const onCalendarClose = (selectedDates, dateStr, instance, e) => {
198
201
  if (e && e.type === 'clickOutside') {
199
202
  return;
@@ -230,7 +233,11 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
230
233
  const wrapperClasses = cx(`${prefix}--form-item`, {
231
234
  [String(className)]: className
232
235
  });
233
- const childrenWithProps = React.Children.toArray(children).map((child, index) => {
236
+
237
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
238
+ const childrenWithProps = React.Children.toArray(children).map(
239
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
240
+ (child, index) => {
234
241
  if (index === 0 && child.type === /*#__PURE__*/React.createElement(DatePickerInput.default, child.props).type) {
235
242
  return /*#__PURE__*/React.cloneElement(child, {
236
243
  datePickerType,
@@ -336,6 +343,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
336
343
  const {
337
344
  current: end
338
345
  } = endInputField;
346
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
339
347
  const flatpickerConfig = {
340
348
  inline: inline ?? false,
341
349
  onClose: onCalendarClose,
@@ -350,8 +358,8 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
350
358
  minDate: minDate,
351
359
  maxDate: maxDate,
352
360
  parseDate: parseDate,
353
- plugins: [datePickerType === 'range' ? rangePlugin.default({
354
- input: endInputField.current
361
+ plugins: [datePickerType === 'range' ? rangePlugin.rangePlugin({
362
+ input: endInputField.current ?? undefined
355
363
  }) : () => {}, appendTo ? appendToPlugin.appendToPlugin({
356
364
  appendTo
357
365
  }) : () => {}, carbonFlatpickrMonthSelectPlugin({
@@ -511,6 +519,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
511
519
  // this hook allows consumers to access the flatpickr calendar
512
520
  // instance for cases where functions like open() or close()
513
521
  // need to be imperatively called on the calendar
522
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
514
523
  React.useImperativeHandle(ref, () => ({
515
524
  get calendar() {
516
525
  return calendarRef.current;
@@ -567,6 +576,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
567
576
  endInputField.current.value = '';
568
577
  }
569
578
  }
579
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
570
580
  }, [value]);
571
581
  React.useEffect(() => {
572
582
  const handleMouseDown = event => {
@@ -575,6 +585,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
575
585
  closeCalendar();
576
586
  }
577
587
  };
588
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
578
589
  const closeCalendar = event => {
579
590
  calendarRef.current?.close();
580
591
  // Remove focus from endDate calendar input
@@ -1,2 +1,19 @@
1
- declare function _default(config: object): Plugin;
2
- export default _default;
1
+ /**
2
+ * Copyright IBM Corp. 2019, 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { type Config } from 'flatpickr/dist/plugins/rangePlugin';
8
+ import { Instance } from 'flatpickr/dist/types/instance';
9
+ /**
10
+ * @param config Plugin configuration.
11
+ * @returns An extension of Flatpickr `rangePlugin` that does the following:
12
+ * * Better ensures the calendar dropdown is always aligned to the `<input>` for the starting date.
13
+ * Workaround for: https://github.com/flatpickr/flatpickr/issues/1944
14
+ * * A logic to ensure `fp.setDate()` call won't end up with "startDate to endDate" set to the first `<input>`
15
+ */
16
+ export declare const rangePlugin: (config?: Config) => (fp: Instance) => Partial<import("flatpickr/dist/types/options").BaseOptions> & {
17
+ onReady: (import("flatpickr/dist/types/options").Hook | import("flatpickr/dist/types/options").Hook[] | undefined)[];
18
+ onPreCalendarPosition: () => void;
19
+ };
@@ -7,38 +7,40 @@
7
7
 
8
8
  'use strict';
9
9
 
10
- Object.defineProperty(exports, '__esModule', { value: true });
11
-
12
- var rangePlugin = require('flatpickr/dist/plugins/rangePlugin');
10
+ var baseRangePlugin = require('flatpickr/dist/plugins/rangePlugin');
13
11
 
14
12
  /**
15
- * @param {object} config Plugin configuration.
16
- * @returns {Plugin} An extension of Flatpickr `rangePlugin` that does the following:
13
+ * @param config Plugin configuration.
14
+ * @returns An extension of Flatpickr `rangePlugin` that does the following:
17
15
  * * Better ensures the calendar dropdown is always aligned to the `<input>` for the starting date.
18
16
  * Workaround for: https://github.com/flatpickr/flatpickr/issues/1944
19
17
  * * A logic to ensure `fp.setDate()` call won't end up with "startDate to endDate" set to the first `<input>`
20
18
  */
21
- var carbonFlatpickrRangePlugin = config => {
22
- const factory = rangePlugin(Object.assign({
19
+ const rangePlugin = (config = {}) => {
20
+ const factory = baseRangePlugin(Object.assign({
23
21
  position: 'left'
24
22
  }, config));
25
23
  return fp => {
26
- const origSetDate = fp.setDate;
24
+ const {
25
+ setDate: origSetDate
26
+ } = fp;
27
27
  const init = () => {
28
- fp.setDate = function setDate(dates, triggerChange, format) {
29
- origSetDate.call(this, dates, triggerChange, format);
28
+ fp.setDate = (dates, triggerChange, format) => {
29
+ origSetDate(dates, triggerChange, format);
30
30
  // If `triggerChange` is `true`, `onValueUpdate` Flatpickr event is fired
31
31
  // where Flatpickr's range plugin takes care of fixing the first `<input>`
32
- if (!triggerChange && dates.length === 2) {
32
+ if (!triggerChange && Array.isArray(dates) && dates.length === 2) {
33
33
  const {
34
+ formatDate,
34
35
  _input: inputFrom
35
36
  } = fp;
36
37
  const {
37
38
  input: inputTo
38
39
  } = config;
39
- [inputFrom, inputTo].forEach((input, i) => {
40
- if (input) {
41
- input.value = !dates[i] ? '' : fp.formatDate(new Date(dates[i]), fp.config.dateFormat);
40
+ const inputToElement = typeof inputTo === 'string' ? document.querySelector(inputTo) : inputTo;
41
+ [inputFrom, inputToElement].forEach((input, i) => {
42
+ if (input && input instanceof HTMLInputElement) {
43
+ input.value = !dates[i] ? '' : formatDate(new Date(dates[i]), fp.config.dateFormat);
42
44
  }
43
45
  });
44
46
  }
@@ -50,9 +52,9 @@ var carbonFlatpickrRangePlugin = config => {
50
52
  } = origRangePlugin;
51
53
  return Object.assign(origRangePlugin, {
52
54
  onReady: [init, origOnReady],
53
- onPreCalendarPosition() {}
55
+ onPreCalendarPosition: () => {}
54
56
  });
55
57
  };
56
58
  };
57
59
 
58
- exports.default = carbonFlatpickrRangePlugin;
60
+ exports.rangePlugin = rangePlugin;
@@ -24,6 +24,8 @@ var index = require('../AILabel/index.js');
24
24
  var utils = require('../../internal/utils.js');
25
25
  var Text = require('../Text/Text.js');
26
26
 
27
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
28
+
27
29
  let didWarnAboutDatePickerInputValue = false;
28
30
  const DatePickerInput = /*#__PURE__*/React.forwardRef(function DatePickerInput(props, ref) {
29
31
  const {
@@ -97,6 +99,8 @@ const DatePickerInput = /*#__PURE__*/React.forwardRef(function DatePickerInput(p
97
99
  [`${prefix}--date-picker--fluid--warn`]: isFluid && warn
98
100
  });
99
101
  const datePickerInputHelperId = !helperText ? undefined : `datepicker-input-helper-text-${datePickerInputInstanceId}`;
102
+
103
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
100
104
  const inputProps = {
101
105
  ...rest,
102
106
  ...datePickerInputProps,
@@ -202,12 +206,14 @@ DatePickerInput.propTypes = {
202
206
  /**
203
207
  * Provide a regular expression that the input value must match
204
208
  */
209
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
205
210
  pattern: (props, propName, componentName) => {
206
211
  if (props[propName] === undefined) {
207
212
  return;
208
213
  }
209
214
  try {
210
215
  new RegExp(props[propName]);
216
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
211
217
  } catch (e) {
212
218
  return new Error(`Invalid value of prop '${propName}' supplied to '${componentName}', it should be a valid regular expression`);
213
219
  }
@@ -95,6 +95,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(({
95
95
  ref.current.close();
96
96
  }
97
97
  }
98
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
98
99
  }, [modal, open]);
99
100
  React.useEffect(() => {
100
101
  if (!open && focusAfterCloseRef) {
@@ -125,6 +126,7 @@ const Dialog = /*#__PURE__*/React.forwardRef(({
125
126
  ref.current.setAttribute('aria-labelledby', title.id);
126
127
  }
127
128
  }
129
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
128
130
  }, [open, ariaLabel, ariaLabelledBy, prefix]);
129
131
  return /*#__PURE__*/React.createElement(DialogContext.Provider, {
130
132
  value: contextValue
@@ -229,6 +231,7 @@ const DialogControls = /*#__PURE__*/React.forwardRef(({
229
231
  const prefix = usePrefix.usePrefix();
230
232
  return (
231
233
  /*#__PURE__*/
234
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
232
235
  // @ts-ignore
233
236
  React.createElement("div", _rollupPluginBabelHelpers.extends({
234
237
  className: `${prefix}--dialog__header-controls`,
@@ -257,6 +260,7 @@ const DialogCloseButton = /*#__PURE__*/React.forwardRef(({
257
260
  const prefix = usePrefix.usePrefix();
258
261
  return (
259
262
  /*#__PURE__*/
263
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
260
264
  // @ts-ignore
261
265
  React.createElement(index.IconButton, _rollupPluginBabelHelpers.extends({
262
266
  kind: "ghost",
@@ -492,7 +496,9 @@ const DialogFooter = /*#__PURE__*/React.forwardRef(({
492
496
  buttonText,
493
497
  onClick: onButtonClick
494
498
  }, i) => /*#__PURE__*/React.createElement(Button.default, {
495
- key: `${buttonText}-${i}`,
499
+ key: `${buttonText}-${i}`
500
+ // eslint-disable-next-line jsx-a11y/no-autofocus -- https://github.com/carbon-design-system/carbon/issues/20071
501
+ ,
496
502
  autoFocus: danger,
497
503
  kind: "secondary",
498
504
  ref: i === 0 && danger ? setSecondaryButtonRef : undefined,
@@ -500,7 +506,9 @@ const DialogFooter = /*#__PURE__*/React.forwardRef(({
500
506
  }, buttonText)) : secondaryButtonText && /*#__PURE__*/React.createElement(Button.default, {
501
507
  ref: danger ? setSecondaryButtonRef : undefined,
502
508
  disabled: loadingActive,
503
- kind: "secondary",
509
+ kind: "secondary"
510
+ // eslint-disable-next-line jsx-a11y/no-autofocus -- https://github.com/carbon-design-system/carbon/issues/20071
511
+ ,
504
512
  autoFocus: danger,
505
513
  onClick: onSecondaryButtonClick
506
514
  }, secondaryButtonText), /*#__PURE__*/React.createElement(Button.default, {
@@ -25,6 +25,7 @@ var useId = require('../../internal/useId.js');
25
25
  var react = require('@floating-ui/react');
26
26
  var index = require('../FeatureFlags/index.js');
27
27
  var index$1 = require('../AILabel/index.js');
28
+ var defaultItemToString = require('../../internal/defaultItemToString.js');
28
29
  var utils = require('../../internal/utils.js');
29
30
  var ListBoxPropTypes = require('../ListBox/ListBoxPropTypes.js');
30
31
 
@@ -32,18 +33,6 @@ const {
32
33
  ItemMouseMove,
33
34
  MenuMouseLeave
34
35
  } = Downshift.useSelect.stateChangeTypes;
35
- const defaultItemToString = item => {
36
- if (typeof item === 'string') {
37
- return item;
38
- }
39
- if (typeof item === 'number') {
40
- return `${item}`;
41
- }
42
- if (item !== null && typeof item === 'object' && 'label' in item && typeof item['label'] === 'string') {
43
- return item['label'];
44
- }
45
- return '';
46
- };
47
36
  /**
48
37
  * Custom state reducer for `useSelect` in Downshift, providing control over
49
38
  * state changes.
@@ -90,7 +79,7 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
90
79
  label,
91
80
  ['aria-label']: ariaLabel,
92
81
  ariaLabel: deprecatedAriaLabel,
93
- itemToString = defaultItemToString,
82
+ itemToString = defaultItemToString.defaultItemToString,
94
83
  itemToElement = null,
95
84
  renderSelectedItem,
96
85
  type = 'default',
@@ -153,6 +142,7 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
153
142
  }
154
143
  });
155
144
  }
145
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
156
146
  }, [floatingStyles, autoAlign, refs.floating]);
157
147
  const prefix = usePrefix.usePrefix();
158
148
  const {
@@ -167,6 +157,8 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
167
157
  });
168
158
  }
169
159
  }, [onChange]);
160
+
161
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
170
162
  const isItemDisabled = React.useCallback((item, _index) => {
171
163
  const isObject = item !== null && typeof item === 'object';
172
164
  return isObject && 'disabled' in item && item.disabled === true;
@@ -175,7 +167,9 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
175
167
  const {
176
168
  highlightedIndex
177
169
  } = changes;
178
- if (highlightedIndex !== undefined && highlightedIndex > -1 && typeof window !== undefined) {
170
+ if (highlightedIndex !== undefined && highlightedIndex > -1 &&
171
+ // eslint-disable-next-line valid-typeof , no-constant-binary-expression -- https://github.com/carbon-design-system/carbon/issues/20071
172
+ typeof window !== undefined) {
179
173
  const itemArray = document.querySelectorAll(`li.${prefix}--list-box__menu-item[role="option"]`);
180
174
  const highlightedItem = itemArray[highlightedIndex];
181
175
  if (highlightedItem) {
@@ -196,7 +190,9 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
196
190
  isItemDisabled,
197
191
  onHighlightedIndexChange,
198
192
  ...downshiftProps
199
- }), [items, itemToString, initialSelectedItem, onSelectedItemChange, stateReducer, isItemDisabled, onHighlightedIndexChange, downshiftProps]);
193
+ }),
194
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
195
+ [items, itemToString, initialSelectedItem, onSelectedItemChange, stateReducer, isItemDisabled, onHighlightedIndexChange, downshiftProps]);
200
196
  const dropdownInstanceId = useId.useId();
201
197
 
202
198
  // only set selectedItem if the prop is defined. Setting if it is undefined
@@ -285,7 +281,9 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
285
281
  if (toggleButtonProps.onKeyDown && (evt.key !== 'ArrowUp' || isOpen && evt.key === 'ArrowUp')) {
286
282
  toggleButtonProps.onKeyDown(evt);
287
283
  }
288
- }, [isTyping, currTimer, toggleButtonProps]);
284
+ },
285
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
286
+ [isTyping, currTimer, toggleButtonProps]);
289
287
  const readOnlyEventHandlers = React.useMemo(() => {
290
288
  if (readOnly) {
291
289
  return {
@@ -308,6 +306,7 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
308
306
  onKeyDown: onKeyDownHandler
309
307
  };
310
308
  }
309
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
311
310
  }, [readOnly, onKeyDownHandler]);
312
311
  const menuProps = React.useMemo(() => getMenuProps({
313
312
  ref: enableFloatingStyles || autoAlign ? refs.setFloating : null
@@ -353,12 +352,14 @@ const Dropdown = /*#__PURE__*/React.forwardRef(({
353
352
  "aria-disabled": readOnly ? true : undefined // aria-disabled to remain focusable
354
353
  ,
355
354
  "aria-describedby": !inline && !invalid && !warn && helper ? helperId : undefined,
356
- title: selectedItem && itemToString !== undefined ? itemToString(selectedItem) : defaultItemToString(label)
355
+ title: selectedItem && itemToString !== undefined ? itemToString(selectedItem) : defaultItemToString.defaultItemToString(label)
357
356
  }, toggleButtonProps, readOnlyEventHandlers, {
358
357
  ref: mergedRef
359
358
  }), /*#__PURE__*/React.createElement("span", {
360
359
  className: `${prefix}--list-box__label`
361
- }, selectedItem ? renderSelectedItem ? renderSelectedItem(selectedItem) : itemToString(selectedItem) : label), /*#__PURE__*/React.createElement(index$2.default.MenuIcon, {
360
+ }, selectedItem ? renderSelectedItem ? renderSelectedItem(selectedItem) : itemToString(selectedItem) :
361
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
362
+ label), /*#__PURE__*/React.createElement(index$2.default.MenuIcon, {
362
363
  isOpen: isOpen,
363
364
  translateWithId: translateWithId
364
365
  })), slug ? normalizedDecorator : decorator ? /*#__PURE__*/React.createElement("div", {
@@ -11,6 +11,7 @@ var React = require('react');
11
11
 
12
12
  const ErrorBoundaryContext = /*#__PURE__*/React.createContext({
13
13
  log(error, info) {
14
+ // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
14
15
  console.log(info.componentStack);
15
16
  }
16
17
  });
@@ -12,6 +12,7 @@ var PropTypes = require('prop-types');
12
12
  var React = require('react');
13
13
  var deprecate = require('../../prop-types/deprecate.js');
14
14
 
15
+ // TODO: Can this variable be deleted now? It isn't used anywhere.
15
16
  /**
16
17
  * Our FeatureFlagContext is used alongside the FeatureFlags component to enable
17
18
  * or disable feature flags in a given React tree
@@ -24,6 +24,7 @@ var useId = require('../../internal/useId.js');
24
24
  var index = require('../FeatureFlags/index.js');
25
25
  var Text = require('../Text/Text.js');
26
26
 
27
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
27
28
  const FileUploader = /*#__PURE__*/React.forwardRef(({
28
29
  accept,
29
30
  buttonKind,
@@ -47,6 +48,8 @@ const FileUploader = /*#__PURE__*/React.forwardRef(({
47
48
  const enhancedFileUploaderEnabled = index.useFeatureFlag('enable-enhanced-file-uploader');
48
49
  const [fileItems, setFileItems] = React.useState([]);
49
50
  const [legacyFileNames, setLegacyFileNames] = React.useState([]);
51
+
52
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
50
53
  const [fileObjects, setFileObjects] = React.useState(new Map());
51
54
  const nodes = [];
52
55
  const createFileItem = file => ({
@@ -99,7 +102,9 @@ const FileUploader = /*#__PURE__*/React.forwardRef(({
99
102
  onChange(evt);
100
103
  }
101
104
  }
102
- }, [enhancedFileUploaderEnabled, fileItems, legacyFileNames, multiple, onChange]);
105
+ },
106
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
107
+ [enhancedFileUploaderEnabled, fileItems, legacyFileNames, multiple, onChange]);
103
108
  const handleClick = React.useCallback((evt, {
104
109
  index,
105
110
  filenameStatus
@@ -154,7 +159,9 @@ const FileUploader = /*#__PURE__*/React.forwardRef(({
154
159
  }
155
160
  uploaderButton.current?.focus?.();
156
161
  }
157
- }, [enhancedFileUploaderEnabled, fileItems, legacyFileNames, onDelete, onChange, onClick]);
162
+ },
163
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
164
+ [enhancedFileUploaderEnabled, fileItems, legacyFileNames, onDelete, onChange, onClick]);
158
165
  React.useImperativeHandle(ref, () => ({
159
166
  clearFiles() {
160
167
  if (enhancedFileUploaderEnabled) {
@@ -34,13 +34,13 @@ function FileUploaderButton({
34
34
  onChange = noopFn.noopFn,
35
35
  name,
36
36
  size = 'md',
37
- // eslint-disable-next-line react/prop-types
38
37
  innerRef,
39
38
  ...other
40
39
  }) {
41
40
  const prefix = usePrefix.usePrefix();
42
41
  const [labelText, setLabelText] = React.useState(ownerLabelText);
43
42
  const [prevOwnerLabelText, setPrevOwnerLabelText] = React.useState(ownerLabelText);
43
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
44
44
  const {
45
45
  current: inputId
46
46
  } = React.useRef(id || useId.useId());
@@ -32,12 +32,12 @@ function FileUploaderDropContainer({
32
32
  onAddFiles = noopFn.noopFn,
33
33
  onClick,
34
34
  pattern = '.[0-9a-z]+$',
35
- // eslint-disable-next-line react/prop-types
36
35
  innerRef,
37
36
  ...rest
38
37
  }) {
39
38
  const prefix = usePrefix.usePrefix();
40
39
  const inputRef = React.useRef(null);
40
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
41
41
  const {
42
42
  current: uid
43
43
  } = React.useRef(id || useId.useId());
@@ -40,6 +40,7 @@ function FileUploaderItem({
40
40
  const textRef = React.useRef(null);
41
41
  const [isEllipsisApplied, setIsEllipsisApplied] = React.useState(false);
42
42
  const prefix = usePrefix.usePrefix();
43
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
43
44
  const {
44
45
  current: id
45
46
  } = React.useRef(uuid || useId.useId());
@@ -52,6 +53,8 @@ function FileUploaderItem({
52
53
  const filterSpaceName = name => {
53
54
  return name?.replace(/\s+/g, '');
54
55
  };
56
+
57
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
55
58
  const isEllipsisActive = element => {
56
59
  setIsEllipsisApplied(element.offsetWidth < element.scrollWidth);
57
60
  return element.offsetWidth < element.scrollWidth;
@@ -34,12 +34,14 @@ const FluidMultiSelect = /*#__PURE__*/React.forwardRef(function FluidMultiSelect
34
34
  }
35
35
  }, isFilterable ?
36
36
  /*#__PURE__*/
37
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
37
38
  // @ts-ignore
38
39
  React.createElement(FilterableMultiSelect.FilterableMultiSelect, _rollupPluginBabelHelpers.extends({
39
40
  ref: ref,
40
41
  className: classNames
41
42
  }, other)) :
42
43
  /*#__PURE__*/
44
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
43
45
  // @ts-ignore
44
46
  React.createElement(MultiSelect.MultiSelect, _rollupPluginBabelHelpers.extends({
45
47
  ref: ref,
@@ -19,10 +19,11 @@ var usePrefix = require('../../internal/usePrefix.js');
19
19
  var FormContext = require('../FluidForm/FormContext.js');
20
20
  var NumberFormatPropTypes = require('../NumberInput/NumberFormatPropTypes.js');
21
21
 
22
- const FluidNumberInput = /*#__PURE__*/React.forwardRef(function FluidNumberInput({
22
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
23
+ const FluidNumberInput = /*#__PURE__*/React.forwardRef(({
23
24
  className,
24
25
  ...other
25
- }, ref) {
26
+ }, ref) => {
26
27
  const prefix = usePrefix.usePrefix();
27
28
  const classNames = cx(`${prefix}--number-input--fluid`, className);
28
29
  return /*#__PURE__*/React.createElement(FormContext.FormContext.Provider, {
@@ -18,10 +18,11 @@ require('../Search/Search.Skeleton.js');
18
18
  var usePrefix = require('../../internal/usePrefix.js');
19
19
  var FormContext = require('../FluidForm/FormContext.js');
20
20
 
21
- const FluidSearch = /*#__PURE__*/React.forwardRef(function FluidSearch({
21
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
22
+ const FluidSearch = /*#__PURE__*/React.forwardRef(({
22
23
  className,
23
24
  ...other
24
- }, ref) {
25
+ }, ref) => {
25
26
  const prefix = usePrefix.usePrefix();
26
27
  const classNames = cx(`${prefix}--search--fluid`, className);
27
28
  return /*#__PURE__*/React.createElement(FormContext.FormContext.Provider, {
@@ -18,11 +18,12 @@ require('../Select/Select.Skeleton.js');
18
18
  var usePrefix = require('../../internal/usePrefix.js');
19
19
  var FormContext = require('../FluidForm/FormContext.js');
20
20
 
21
- const FluidSelect = /*#__PURE__*/React.forwardRef(function FluidSelect({
21
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
22
+ const FluidSelect = /*#__PURE__*/React.forwardRef(({
22
23
  className,
23
24
  children,
24
25
  ...other
25
- }, ref) {
26
+ }, ref) => {
26
27
  const prefix = usePrefix.usePrefix();
27
28
  const classNames = cx(`${prefix}--select--fluid`, className);
28
29
  return /*#__PURE__*/React.createElement(FormContext.FormContext.Provider, {
@@ -20,11 +20,12 @@ var PasswordInput = require('../TextInput/PasswordInput.js');
20
20
  var usePrefix = require('../../internal/usePrefix.js');
21
21
  var FormContext = require('../FluidForm/FormContext.js');
22
22
 
23
- const FluidTextInput = /*#__PURE__*/React.forwardRef(function FluidTextInput({
23
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
24
+ const FluidTextInput = /*#__PURE__*/React.forwardRef(({
24
25
  className,
25
26
  isPassword,
26
27
  ...other
27
- }, ref) {
28
+ }, ref) => {
28
29
  const prefix = usePrefix.usePrefix();
29
30
  const classNames = cx(className, {
30
31
  [`${prefix}--text-input--fluid`]: !isPassword