@carbon/react 1.99.0-rc.0 → 1.100.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 (255) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +942 -942
  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 +4 -4
  11. package/es/components/ComboBox/ComboBox.js +21 -3
  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/ExpandableSearch/ExpandableSearch.d.ts +1 -1
  38. package/es/components/ExpandableSearch/ExpandableSearch.js +14 -12
  39. package/es/components/FileUploader/FileUploader.d.ts +1 -1
  40. package/es/components/FileUploader/FileUploader.js +2 -2
  41. package/es/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
  42. package/es/components/FileUploader/FileUploaderDropContainer.js +28 -10
  43. package/es/components/FluidComboBox/FluidComboBox.Skeleton.d.ts +11 -3
  44. package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.d.ts +15 -3
  45. package/es/components/FluidDatePicker/FluidDatePicker.d.ts +2 -2
  46. package/es/components/FluidDropdown/FluidDropdown.Skeleton.d.ts +11 -3
  47. package/es/components/FluidForm/FluidForm.d.ts +15 -2
  48. package/es/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +2 -2
  49. package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.d.ts +11 -3
  50. package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +11 -3
  51. package/es/components/FluidNumberInput/FluidNumberInput.d.ts +1 -1
  52. package/es/components/FluidSearch/FluidSearch.Skeleton.d.ts +11 -3
  53. package/es/components/FluidSearch/FluidSearch.d.ts +1 -1
  54. package/es/components/FluidSearch/FluidSearch.js +3 -3
  55. package/es/components/FluidSelect/FluidSelect.Skeleton.d.ts +11 -3
  56. package/es/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +11 -3
  57. package/es/components/FluidTextArea/FluidTextArea.d.ts +95 -1
  58. package/es/components/FluidTextInput/FluidPasswordInput.d.ts +83 -2
  59. package/es/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +11 -3
  60. package/es/components/Grid/GridContext.d.ts +19 -1
  61. package/es/components/IconButton/index.d.ts +1 -1
  62. package/es/components/IconButton/index.js +2 -2
  63. package/es/components/Link/Link.js +3 -0
  64. package/es/components/ListBox/ListBoxField.d.ts +35 -2
  65. package/es/components/ListBox/ListBoxMenuIcon.d.ts +16 -3
  66. package/es/components/ListBox/ListBoxMenuItem.d.ts +1 -1
  67. package/es/components/ListBox/ListBoxSelection.d.ts +34 -3
  68. package/es/components/Menu/MenuItem.d.ts +2 -2
  69. package/es/components/MultiSelect/FilterableMultiSelect.d.ts +2 -2
  70. package/es/components/MultiSelect/FilterableMultiSelect.js +22 -13
  71. package/es/components/MultiSelect/MultiSelect.js +22 -13
  72. package/es/components/Notification/Notification.d.ts +8 -7
  73. package/es/components/Notification/Notification.js +0 -1
  74. package/es/components/NumberInput/NumberInput.d.ts +9 -0
  75. package/es/components/NumberInput/NumberInput.js +206 -38
  76. package/es/components/OverflowMenu/OverflowMenu.d.ts +1 -1
  77. package/es/components/OverflowMenu/OverflowMenu.js +0 -1
  78. package/es/components/OverflowMenu/index.d.ts +1 -1
  79. package/es/components/PageHeader/PageHeader.d.ts +3 -3
  80. package/es/components/Popover/index.js +21 -12
  81. package/es/components/Search/Search.d.ts +2 -2
  82. package/es/components/Select/Select.d.ts +1 -1
  83. package/es/components/Select/Select.js +2 -2
  84. package/es/components/SkeletonIcon/SkeletonIcon.d.ts +16 -2
  85. package/es/components/SkeletonText/SkeletonText.d.ts +1 -1
  86. package/es/components/Tag/Tag.d.ts +1 -1
  87. package/es/components/Tag/Tag.js +2 -0
  88. package/es/components/Text/Text.d.ts +1 -1
  89. package/es/components/Text/Text.js +4 -3
  90. package/es/components/Text/TextDirection.d.ts +1 -1
  91. package/es/components/Text/TextDirection.js +1 -3
  92. package/es/components/Text/TextDirectionContext.d.ts +3 -3
  93. package/es/components/TextInput/ControlledPasswordInput.d.ts +1 -1
  94. package/es/components/TextInput/ControlledPasswordInput.js +2 -2
  95. package/es/components/TextInput/PasswordInput.d.ts +1 -1
  96. package/es/components/TextInput/PasswordInput.js +2 -2
  97. package/es/components/TextInput/TextInput.d.ts +1 -1
  98. package/es/components/TextInput/TextInput.js +2 -2
  99. package/es/components/Toggle/Toggle.Skeleton.d.ts +9 -3
  100. package/es/components/Toggletip/index.d.ts +1 -1
  101. package/es/components/Toggletip/index.js +9 -7
  102. package/es/components/Tooltip/DefinitionTooltip.d.ts +52 -1
  103. package/es/components/Tooltip/Tooltip.js +2 -0
  104. package/es/components/TreeView/TreeNode.d.ts +4 -4
  105. package/es/components/UIShell/Header.d.ts +20 -3
  106. package/es/components/UIShell/HeaderGlobalAction.d.ts +2 -2
  107. package/es/components/UIShell/HeaderName.js +1 -1
  108. package/es/components/UIShell/Link.d.ts +1 -1
  109. package/es/components/UIShell/Link.js +14 -14
  110. package/es/components/UIShell/SideNav.d.ts +3 -3
  111. package/es/components/UIShell/SideNav.js +26 -25
  112. package/es/components/UIShell/SideNavDivider.d.ts +11 -3
  113. package/es/components/UIShell/SideNavHeader.d.ts +24 -1
  114. package/es/components/UIShell/SideNavIcon.d.ts +20 -2
  115. package/es/components/UIShell/SideNavItem.d.ts +20 -2
  116. package/es/components/UIShell/SideNavItems.d.ts +22 -2
  117. package/es/components/UIShell/SideNavLink.d.ts +1 -1
  118. package/es/components/UIShell/SideNavLink.js +14 -14
  119. package/es/components/UIShell/SideNavMenu.d.ts +1 -1
  120. package/es/components/UIShell/SideNavMenu.js +2 -2
  121. package/es/components/UIShell/SideNavMenuItem.d.ts +2 -2
  122. package/es/components/UIShell/SideNavMenuItem.js +2 -2
  123. package/es/components/UIShell/SwitcherDivider.d.ts +10 -2
  124. package/es/internal/FloatingMenu.d.ts +1 -1
  125. package/es/internal/FloatingMenu.js +0 -2
  126. package/es/internal/PolymorphicProps.d.ts +3 -3
  127. package/es/internal/useNoInteractiveChildren.d.ts +1 -1
  128. package/es/internal/useNoInteractiveChildren.js +8 -10
  129. package/es/internal/useOutsideClick.d.ts +1 -1
  130. package/es/internal/useOutsideClick.js +0 -4
  131. package/lib/components/BadgeIndicator/index.d.ts +1 -1
  132. package/lib/components/BadgeIndicator/index.js +7 -5
  133. package/lib/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  134. package/lib/components/Breadcrumb/BreadcrumbItem.js +5 -6
  135. package/lib/components/Button/Button.Skeleton.d.ts +28 -2
  136. package/lib/components/Button/Button.js +3 -2
  137. package/lib/components/ChatButton/ChatButton.d.ts +3 -2
  138. package/lib/components/CheckboxGroup/CheckboxGroup.d.ts +60 -2
  139. package/lib/components/ComboBox/ComboBox.d.ts +4 -4
  140. package/lib/components/ComboBox/ComboBox.js +21 -3
  141. package/lib/components/ComposedModal/ComposedModal.d.ts +2 -2
  142. package/lib/components/ContainedList/ContainedList.d.ts +35 -6
  143. package/lib/components/ContainedList/ContainedList.js +3 -1
  144. package/lib/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +32 -3
  145. package/lib/components/ContainedList/index.d.ts +1 -1
  146. package/lib/components/ContainedList/index.js +4 -1
  147. package/lib/components/DangerButton/DangerButton.d.ts +1 -1
  148. package/lib/components/DataTable/DataTable.d.ts +22 -5
  149. package/lib/components/DataTable/DataTable.js +1 -1
  150. package/lib/components/DataTable/TableExpandRow.d.ts +1 -1
  151. package/lib/components/DataTable/TableHeader.d.ts +1 -1
  152. package/lib/components/DataTable/TableHeader.js +17 -15
  153. package/lib/components/DataTable/TableToolbar.d.ts +25 -1
  154. package/lib/components/DataTable/TableToolbarMenu.d.ts +25 -5
  155. package/lib/components/DataTable/TableToolbarMenu.js +0 -3
  156. package/lib/components/DataTableSkeleton/DataTableSkeleton.d.ts +51 -2
  157. package/lib/components/DataTableSkeleton/DataTableSkeleton.js +6 -0
  158. package/lib/components/DatePicker/DatePicker.d.ts +2 -2
  159. package/lib/components/DatePicker/DatePicker.js +37 -52
  160. package/lib/components/DatePicker/plugins/fixEventsPlugin.js +28 -2
  161. package/lib/components/DatePickerInput/DatePickerInput.d.ts +1 -1
  162. package/lib/components/DatePickerInput/DatePickerInput.js +2 -1
  163. package/lib/components/Dialog/Dialog.d.ts +1 -1
  164. package/lib/components/Dropdown/Dropdown.Skeleton.d.ts +19 -2
  165. package/lib/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
  166. package/lib/components/ExpandableSearch/ExpandableSearch.js +13 -11
  167. package/lib/components/FileUploader/FileUploader.d.ts +1 -1
  168. package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
  169. package/lib/components/FileUploader/FileUploaderDropContainer.js +28 -10
  170. package/lib/components/FluidComboBox/FluidComboBox.Skeleton.d.ts +11 -3
  171. package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.d.ts +15 -3
  172. package/lib/components/FluidDatePicker/FluidDatePicker.d.ts +2 -2
  173. package/lib/components/FluidDropdown/FluidDropdown.Skeleton.d.ts +11 -3
  174. package/lib/components/FluidForm/FluidForm.d.ts +15 -2
  175. package/lib/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +2 -2
  176. package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.d.ts +11 -3
  177. package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +11 -3
  178. package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +1 -1
  179. package/lib/components/FluidSearch/FluidSearch.Skeleton.d.ts +11 -3
  180. package/lib/components/FluidSearch/FluidSearch.d.ts +1 -1
  181. package/lib/components/FluidSearch/FluidSearch.js +2 -2
  182. package/lib/components/FluidSelect/FluidSelect.Skeleton.d.ts +11 -3
  183. package/lib/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +11 -3
  184. package/lib/components/FluidTextArea/FluidTextArea.d.ts +95 -1
  185. package/lib/components/FluidTextInput/FluidPasswordInput.d.ts +83 -2
  186. package/lib/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +11 -3
  187. package/lib/components/Grid/GridContext.d.ts +19 -1
  188. package/lib/components/IconButton/index.d.ts +1 -1
  189. package/lib/components/Link/Link.js +3 -0
  190. package/lib/components/ListBox/ListBoxField.d.ts +35 -2
  191. package/lib/components/ListBox/ListBoxMenuIcon.d.ts +16 -3
  192. package/lib/components/ListBox/ListBoxMenuItem.d.ts +1 -1
  193. package/lib/components/ListBox/ListBoxSelection.d.ts +34 -3
  194. package/lib/components/Menu/MenuItem.d.ts +2 -2
  195. package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +2 -2
  196. package/lib/components/MultiSelect/FilterableMultiSelect.js +22 -13
  197. package/lib/components/MultiSelect/MultiSelect.js +22 -13
  198. package/lib/components/Notification/Notification.d.ts +8 -7
  199. package/lib/components/Notification/Notification.js +0 -1
  200. package/lib/components/NumberInput/NumberInput.d.ts +9 -0
  201. package/lib/components/NumberInput/NumberInput.js +206 -37
  202. package/lib/components/OverflowMenu/OverflowMenu.d.ts +1 -1
  203. package/lib/components/OverflowMenu/OverflowMenu.js +0 -1
  204. package/lib/components/OverflowMenu/index.d.ts +1 -1
  205. package/lib/components/PageHeader/PageHeader.d.ts +3 -3
  206. package/lib/components/Popover/index.js +19 -10
  207. package/lib/components/Search/Search.d.ts +2 -2
  208. package/lib/components/Select/Select.d.ts +1 -1
  209. package/lib/components/SkeletonIcon/SkeletonIcon.d.ts +16 -2
  210. package/lib/components/SkeletonText/SkeletonText.d.ts +1 -1
  211. package/lib/components/Tag/Tag.d.ts +1 -1
  212. package/lib/components/Tag/Tag.js +2 -0
  213. package/lib/components/Text/Text.d.ts +1 -1
  214. package/lib/components/Text/Text.js +3 -2
  215. package/lib/components/Text/TextDirection.d.ts +1 -1
  216. package/lib/components/Text/TextDirection.js +1 -3
  217. package/lib/components/Text/TextDirectionContext.d.ts +3 -3
  218. package/lib/components/TextInput/ControlledPasswordInput.d.ts +1 -1
  219. package/lib/components/TextInput/PasswordInput.d.ts +1 -1
  220. package/lib/components/TextInput/TextInput.d.ts +1 -1
  221. package/lib/components/Toggle/Toggle.Skeleton.d.ts +9 -3
  222. package/lib/components/Toggletip/index.d.ts +1 -1
  223. package/lib/components/Toggletip/index.js +7 -5
  224. package/lib/components/Tooltip/DefinitionTooltip.d.ts +52 -1
  225. package/lib/components/Tooltip/Tooltip.js +2 -0
  226. package/lib/components/TreeView/TreeNode.d.ts +4 -4
  227. package/lib/components/UIShell/Header.d.ts +20 -3
  228. package/lib/components/UIShell/HeaderGlobalAction.d.ts +2 -2
  229. package/lib/components/UIShell/HeaderName.js +1 -1
  230. package/lib/components/UIShell/Link.d.ts +1 -1
  231. package/lib/components/UIShell/Link.js +13 -13
  232. package/lib/components/UIShell/SideNav.d.ts +3 -3
  233. package/lib/components/UIShell/SideNav.js +25 -24
  234. package/lib/components/UIShell/SideNavDivider.d.ts +11 -3
  235. package/lib/components/UIShell/SideNavHeader.d.ts +24 -1
  236. package/lib/components/UIShell/SideNavIcon.d.ts +20 -2
  237. package/lib/components/UIShell/SideNavItem.d.ts +20 -2
  238. package/lib/components/UIShell/SideNavItems.d.ts +22 -2
  239. package/lib/components/UIShell/SideNavLink.d.ts +1 -1
  240. package/lib/components/UIShell/SideNavLink.js +14 -14
  241. package/lib/components/UIShell/SideNavMenu.d.ts +1 -1
  242. package/lib/components/UIShell/SideNavMenuItem.d.ts +2 -2
  243. package/lib/components/UIShell/SwitcherDivider.d.ts +10 -2
  244. package/lib/internal/FloatingMenu.d.ts +1 -1
  245. package/lib/internal/FloatingMenu.js +0 -2
  246. package/lib/internal/PolymorphicProps.d.ts +3 -3
  247. package/lib/internal/useNoInteractiveChildren.d.ts +1 -1
  248. package/lib/internal/useNoInteractiveChildren.js +8 -10
  249. package/lib/internal/useOutsideClick.d.ts +1 -1
  250. package/lib/internal/useOutsideClick.js +0 -4
  251. package/package.json +8 -8
  252. package/scss/_carbon-utilities.scss +9 -0
  253. package/telemetry.yml +0 -1
  254. package/es/internal/createClassWrapper.d.ts +0 -12
  255. package/lib/internal/createClassWrapper.d.ts +0 -12
@@ -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, { useRef, cloneElement } from 'react';
11
+ import React, { forwardRef, useRef, cloneElement } from 'react';
12
12
  import { ArrowUp, ArrowsVertical } from '@carbon/icons-react';
13
13
  import { useId } from '../../internal/useId.js';
14
14
  import { usePrefix } from '../../internal/usePrefix.js';
@@ -45,21 +45,23 @@ const sortDirections = {
45
45
  [sortStates.ASC]: 'ascending',
46
46
  [sortStates.DESC]: 'descending'
47
47
  };
48
- const TableHeader = /*#__PURE__*/React.forwardRef(function TableHeader({
49
- className: headerClassName,
50
- children,
51
- colSpan,
52
- decorator,
53
- isSortable = false,
54
- isSortHeader,
55
- onClick,
56
- scope = defaultScope,
57
- sortDirection,
58
- translateWithId: t = defaultTranslateWithId,
59
- slug,
60
- id,
61
- ...rest
62
- }, ref) {
48
+ const frFn = forwardRef;
49
+ const TableHeader = frFn((props, ref) => {
50
+ const {
51
+ className: headerClassName,
52
+ children,
53
+ colSpan,
54
+ decorator,
55
+ isSortable = false,
56
+ isSortHeader,
57
+ onClick,
58
+ scope = defaultScope,
59
+ sortDirection,
60
+ translateWithId: t = defaultTranslateWithId,
61
+ slug,
62
+ id,
63
+ ...rest
64
+ } = props;
63
65
  const prefix = usePrefix();
64
66
  const uniqueId = useId('table-sort');
65
67
 
@@ -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 TableToolbarProps extends React.HTMLAttributes<HTMLDivElement> {
9
10
  /**
@@ -25,5 +26,28 @@ export interface TableToolbarProps extends React.HTMLAttributes<HTMLDivElement>
25
26
  */
26
27
  size?: 'sm' | 'lg';
27
28
  }
28
- declare const TableToolbar: React.FC<TableToolbarProps>;
29
+ declare const TableToolbar: {
30
+ ({ ["aria-label"]: ariaLabel, ariaLabel: deprecatedAriaLabel, children, size, ...rest }: TableToolbarProps): import("react/jsx-runtime").JSX.Element;
31
+ propTypes: {
32
+ /**
33
+ * 'aria-label' of the TableToolbar component.
34
+ * Specify a label to be read by screen readers on the container node
35
+ */
36
+ "aria-label": PropTypes.Requireable<string>;
37
+ /**
38
+ * Deprecated, please use `aria-label` instead.
39
+ * Specify a label to be read by screen readers on the container node.
40
+ * 'aria-label' of the TableToolbar component.
41
+ */
42
+ ariaLabel: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
43
+ /**
44
+ * Pass in the children that will be rendered inside the TableToolbar
45
+ */
46
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
47
+ /**
48
+ * `lg` Change the row height of table
49
+ */
50
+ size: PropTypes.Requireable<string>;
51
+ };
52
+ };
29
53
  export default TableToolbar;
@@ -1,12 +1,32 @@
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.
6
6
  */
7
- import React from 'react';
7
+ import PropTypes from 'prop-types';
8
8
  import { OverflowMenuProps } from '../OverflowMenu';
9
- export interface TableToolbarMenuProps extends OverflowMenuProps {
10
- }
11
- declare const TableToolbarMenu: React.FC<TableToolbarMenuProps>;
9
+ export type TableToolbarMenuProps = OverflowMenuProps;
10
+ declare const TableToolbarMenu: {
11
+ ({ className, renderIcon, iconDescription, children, menuOptionsClass, ...rest }: TableToolbarMenuProps): import("react/jsx-runtime").JSX.Element;
12
+ propTypes: {
13
+ children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
14
+ /**
15
+ * Provide an optional class name for the toolbar menu
16
+ */
17
+ className: PropTypes.Requireable<string>;
18
+ /**
19
+ * The description of the menu icon.
20
+ */
21
+ iconDescription: PropTypes.Requireable<string>;
22
+ /**
23
+ * Provide an optional class name for the toolbar menu
24
+ */
25
+ menuOptionsClass: PropTypes.Requireable<string>;
26
+ /**
27
+ * A component used to render an icon.
28
+ */
29
+ renderIcon: PropTypes.Requireable<object>;
30
+ };
31
+ };
12
32
  export default TableToolbarMenu;
@@ -14,9 +14,6 @@ import { usePrefix } from '../../internal/usePrefix.js';
14
14
  import OverflowMenu from '../OverflowMenu/index.js';
15
15
 
16
16
  const defaultIconDescription = 'Settings';
17
-
18
- // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- https://github.com/carbon-design-system/carbon/issues/20452
19
-
20
17
  const TableToolbarMenu = ({
21
18
  className,
22
19
  renderIcon = Settings,
@@ -4,7 +4,9 @@
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 FunctionComponent, TableHTMLAttributes } from 'react';
7
+ import PropTypes from 'prop-types';
8
+ import React, { type TableHTMLAttributes } from 'react';
9
+ import { DataTableSize } from '../DataTable/DataTable';
8
10
  export interface DataTableSkeletonHeader {
9
11
  /**
10
12
  * Specify header label
@@ -41,6 +43,10 @@ export interface DataTableSkeletonProps extends TableHTMLAttributes<HTMLTableEle
41
43
  * Specify if the table toolbar should be rendered as part of the skeleton.
42
44
  */
43
45
  showToolbar?: boolean;
46
+ /**
47
+ * Changes the row height of table.
48
+ */
49
+ size?: DataTableSize;
44
50
  /**
45
51
  * Optionally specify whether you want the DataTable to be zebra striped
46
52
  */
@@ -50,5 +56,48 @@ export interface DataTableSkeletonProps extends TableHTMLAttributes<HTMLTableEle
50
56
  */
51
57
  className?: string;
52
58
  }
53
- declare const DataTableSkeleton: FunctionComponent<DataTableSkeletonProps>;
59
+ declare const DataTableSkeleton: {
60
+ ({ headers, rowCount, columnCount, zebra, compact, className, showHeader, showToolbar, size, ...rest }: DataTableSkeletonProps): import("react/jsx-runtime").JSX.Element;
61
+ propTypes: {
62
+ /**
63
+ * Specify an optional className to add.
64
+ */
65
+ className: PropTypes.Requireable<string>;
66
+ /**
67
+ * Specify the number of columns that you want to render in the skeleton state
68
+ */
69
+ columnCount: PropTypes.Requireable<number>;
70
+ /**
71
+ * Optionally specify whether you want the Skeleton to be rendered as a
72
+ * compact DataTable
73
+ */
74
+ compact: PropTypes.Requireable<boolean>;
75
+ /**
76
+ * Optionally specify the displayed headers
77
+ */
78
+ headers: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
79
+ header: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
80
+ }>>[]>;
81
+ /**
82
+ * Specify the number of rows that you want to render in the skeleton state
83
+ */
84
+ rowCount: PropTypes.Requireable<number>;
85
+ /**
86
+ * Specify if the table header should be rendered as part of the skeleton.
87
+ */
88
+ showHeader: PropTypes.Requireable<boolean>;
89
+ /**
90
+ * Specify if the table toolbar should be rendered as part of the skeleton.
91
+ */
92
+ showToolbar: PropTypes.Requireable<boolean>;
93
+ /**
94
+ * Changes the row height of table.
95
+ */
96
+ size: PropTypes.Requireable<string>;
97
+ /**
98
+ * Optionally specify whether you want the DataTable to be zebra striped
99
+ */
100
+ zebra: PropTypes.Requireable<boolean>;
101
+ };
102
+ };
54
103
  export default DataTableSkeleton;
@@ -21,12 +21,14 @@ const DataTableSkeleton = ({
21
21
  className,
22
22
  showHeader = true,
23
23
  showToolbar = true,
24
+ size = 'lg',
24
25
  ...rest
25
26
  }) => {
26
27
  const prefix = usePrefix();
27
28
  const dataTableSkeletonClasses = cx(className, {
28
29
  [`${prefix}--skeleton`]: true,
29
30
  [`${prefix}--data-table`]: true,
31
+ [`${prefix}--data-table--${size}`]: size,
30
32
  [`${prefix}--data-table--zebra`]: zebra,
31
33
  [`${prefix}--data-table--compact`]: compact
32
34
  });
@@ -97,6 +99,10 @@ DataTableSkeleton.propTypes = {
97
99
  * Specify if the table toolbar should be rendered as part of the skeleton.
98
100
  */
99
101
  showToolbar: PropTypes.bool,
102
+ /**
103
+ * Changes the row height of table.
104
+ */
105
+ size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),
100
106
  /**
101
107
  * Optionally specify whether you want the DataTable to be zebra striped
102
108
  */
@@ -1,10 +1,10 @@
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.
6
6
  */
7
- import React, { ReactNode } from 'react';
7
+ import React, { type ReactNode } from 'react';
8
8
  import flatpickr from 'flatpickr';
9
9
  import { DateLimit, DateOption } from 'flatpickr/dist/types/options';
10
10
  import { type SupportedLocale } from './DatePickerLocales';
@@ -7,7 +7,7 @@
7
7
 
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import PropTypes from 'prop-types';
10
- import React, { useContext, useState, useCallback, useRef, useEffect, useImperativeHandle } from 'react';
10
+ import React, { forwardRef, useContext, useState, useCallback, useRef, useEffect, useImperativeHandle } from 'react';
11
11
  import cx from 'classnames';
12
12
  import flatpickr from 'flatpickr';
13
13
  import l10n from 'flatpickr/dist/l10n/index';
@@ -139,36 +139,38 @@ function updateClassNames(calendar, prefix) {
139
139
  });
140
140
  }
141
141
  }
142
- const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
143
- allowInput,
144
- appendTo,
145
- children,
146
- className,
147
- closeOnSelect = true,
148
- dateFormat = 'm/d/Y',
149
- datePickerType,
150
- disable,
151
- enable,
152
- inline,
153
- invalid,
154
- invalidText,
155
- warn,
156
- warnText,
157
- light = false,
158
- locale = 'en',
159
- maxDate,
160
- minDate,
161
- onChange,
162
- onClose,
163
- onOpen,
164
- readOnly = false,
165
- short = false,
166
- value,
167
- parseDate: parseDateProp,
168
- nextMonthAriaLabel = 'Next month',
169
- prevMonthAriaLabel = 'Previous month',
170
- ...rest
171
- }, ref) {
142
+ // eslint-disable-next-line react/display-name
143
+ const DatePicker = /*#__PURE__*/forwardRef((props, ref) => {
144
+ const {
145
+ allowInput,
146
+ appendTo,
147
+ children,
148
+ className,
149
+ closeOnSelect = true,
150
+ dateFormat = 'm/d/Y',
151
+ datePickerType,
152
+ disable,
153
+ enable,
154
+ inline,
155
+ invalid,
156
+ invalidText,
157
+ warn,
158
+ warnText,
159
+ light = false,
160
+ locale = 'en',
161
+ maxDate,
162
+ minDate,
163
+ onChange,
164
+ onClose,
165
+ onOpen,
166
+ readOnly = false,
167
+ short = false,
168
+ value,
169
+ parseDate: parseDateProp,
170
+ nextMonthAriaLabel = 'Next month',
171
+ prevMonthAriaLabel = 'Previous month',
172
+ ...rest
173
+ } = props;
172
174
  const prefix = usePrefix();
173
175
  const {
174
176
  isFluid
@@ -197,7 +199,6 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
197
199
  },
198
200
  // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
199
201
  [onClose]);
200
- // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
201
202
  const onCalendarClose = (selectedDates, dateStr, instance, e) => {
202
203
  if (e && e.type === 'clickOutside') {
203
204
  return;
@@ -224,6 +225,7 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
224
225
  const savedOnChange = useSavedCallback(onChange);
225
226
  const savedOnOpen = useSavedCallback(onOpen);
226
227
  const effectiveWarn = warn && !invalid;
228
+ const wrapperRef = useRef(null);
227
229
  const datePickerClasses = cx(`${prefix}--date-picker`, {
228
230
  [`${prefix}--date-picker--short`]: short,
229
231
  [`${prefix}--date-picker--light`]: light,
@@ -389,7 +391,8 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
389
391
  }), carbonFlatpickrFixEventsPlugin({
390
392
  inputFrom: startInputField.current,
391
393
  inputTo: endInputField.current,
392
- lastStartValue
394
+ lastStartValue,
395
+ container: wrapperRef.current
393
396
  })],
394
397
  clickOpens: !readOnly,
395
398
  noCalendar: readOnly,
@@ -596,25 +599,6 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
596
599
  }
597
600
  }
598
601
  }, [value, startInputField]);
599
- useEffect(() => {
600
- const handleMouseDown = event => {
601
- if (calendarRef.current && calendarRef.current.isOpen && !calendarRef.current.calendarContainer.contains(event.target) && !startInputField.current.contains(event.target) && !endInputField.current?.contains(event.target)) {
602
- // Close the calendar immediately on mousedown
603
- closeCalendar();
604
- }
605
- };
606
- const closeCalendar = () => {
607
- calendarRef.current?.close();
608
- // Remove focus from endDate calendar input
609
- onCalendarClose(calendarRef.current?.selectedDates, '', calendarRef.current, {
610
- type: 'clickOutside'
611
- });
612
- };
613
- document.addEventListener('mousedown', handleMouseDown, true);
614
- return () => {
615
- document.removeEventListener('mousedown', handleMouseDown, true);
616
- };
617
- }, [calendarRef, startInputField, endInputField, onCalendarClose]);
618
602
  useEffect(() => {
619
603
  if (calendarRef.current?.set) {
620
604
  if (value !== undefined) {
@@ -658,7 +642,8 @@ const DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker({
658
642
  className: wrapperClasses,
659
643
  ref: ref
660
644
  }, rest), /*#__PURE__*/React.createElement("div", {
661
- className: datePickerClasses
645
+ className: datePickerClasses,
646
+ ref: wrapperRef
662
647
  }, childrenWithProps), fluidError);
663
648
  });
664
649
  DatePicker.propTypes = {
@@ -16,17 +16,41 @@ var carbonFlatpickrFixEventsPlugin = config => fp => {
16
16
  const {
17
17
  inputFrom,
18
18
  inputTo,
19
- lastStartValue
19
+ lastStartValue,
20
+ container
20
21
  } = config;
22
+ // Avoid closing when mousedown starts inside but click lands outside after
23
+ // scroll or blur (e.g., scrollable modal masks).
24
+ let mouseDownInside = false;
25
+ const getEventPath = event => typeof event.composedPath === 'function' ? event.composedPath() : [];
26
+ const isEventInside = event => {
27
+ const path = getEventPath(event);
28
+ return Boolean(container && (path.includes(container) || container.contains(event.target)) || fp.calendarContainer && (path.includes(fp.calendarContainer) || fp.calendarContainer.contains(event.target)) || inputFrom && (path.includes(inputFrom) || inputFrom.contains(event.target)) || inputTo && (path.includes(inputTo) || inputTo.contains(event.target)));
29
+ };
30
+
21
31
  /**
22
32
  * Handles `click` outside to close calendar
23
33
  */
24
34
  const handleClickOutside = event => {
25
- if (!fp.isOpen || fp.calendarContainer.contains(event.target) || event.target === inputFrom || event.target === inputTo) {
35
+ if (mouseDownInside) {
36
+ mouseDownInside = false;
26
37
  return;
27
38
  }
39
+ if (!fp.isOpen || isEventInside(event)) {
40
+ mouseDownInside = false;
41
+ return;
42
+ }
43
+ mouseDownInside = false;
28
44
  fp.close();
29
45
  };
46
+
47
+ /**
48
+ * Tracks the initial mouse target to avoid closing on click after scroll.
49
+ */
50
+ const handleMouseDown = event => {
51
+ mouseDownInside = isEventInside(event);
52
+ };
53
+
30
54
  /**
31
55
  * Handles `keydown` event.
32
56
  */
@@ -120,6 +144,7 @@ var carbonFlatpickrFixEventsPlugin = config => fp => {
120
144
  inputTo.removeEventListener('blur', handleBlur, true);
121
145
  }
122
146
  inputFrom.removeEventListener('keydown', handleKeydown, true);
147
+ document.removeEventListener('mousedown', handleMouseDown, true);
123
148
  document.removeEventListener('click', handleClickOutside, true);
124
149
  };
125
150
 
@@ -137,6 +162,7 @@ var carbonFlatpickrFixEventsPlugin = config => fp => {
137
162
  inputTo.addEventListener('keydown', handleKeydown, true);
138
163
  inputTo.addEventListener('blur', handleBlur, true);
139
164
  }
165
+ document.addEventListener('mousedown', handleMouseDown, true);
140
166
  document.addEventListener('click', handleClickOutside, true);
141
167
  };
142
168
 
@@ -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.
@@ -9,7 +9,7 @@ import { Calendar, WarningFilled, WarningAltFilled } from '@carbon/icons-react';
9
9
  import { warning } from '../../internal/warning.js';
10
10
  import cx from 'classnames';
11
11
  import PropTypes from 'prop-types';
12
- import React, { useContext, cloneElement } from 'react';
12
+ import React, { forwardRef, useContext, cloneElement } from 'react';
13
13
  import { usePrefix } from '../../internal/usePrefix.js';
14
14
  import '../FluidForm/FluidForm.js';
15
15
  import { FormContext } from '../FluidForm/FormContext.js';
@@ -24,7 +24,8 @@ import { useNormalizedInputProps } from '../../internal/useNormalizedInputProps.
24
24
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
25
25
 
26
26
  let didWarnAboutDatePickerInputValue = false;
27
- const DatePickerInput = /*#__PURE__*/React.forwardRef(function DatePickerInput(props, ref) {
27
+ const frFn = forwardRef;
28
+ const DatePickerInput = frFn((props, ref) => {
28
29
  const {
29
30
  datePickerType,
30
31
  decorator,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2025
2
+ * Copyright IBM Corp. 2025, 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.
@@ -4,7 +4,8 @@
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
  import { type ListBoxSize } from '../ListBox';
9
10
  export interface DropdownSkeletonProps extends HTMLAttributes<HTMLDivElement> {
10
11
  /**
@@ -20,6 +21,22 @@ export interface DropdownSkeletonProps extends HTMLAttributes<HTMLDivElement> {
20
21
  */
21
22
  size?: ListBoxSize;
22
23
  }
23
- declare const DropdownSkeleton: React.FC<DropdownSkeletonProps>;
24
+ declare const DropdownSkeleton: {
25
+ ({ className, size, hideLabel, ...rest }: DropdownSkeletonProps): import("react/jsx-runtime").JSX.Element;
26
+ propTypes: {
27
+ /**
28
+ * Specify an optional className to add.
29
+ */
30
+ className: PropTypes.Requireable<string>;
31
+ /**
32
+ * Specify whether the label should be hidden, or not
33
+ */
34
+ hideLabel: PropTypes.Requireable<boolean>;
35
+ /**
36
+ * Specify the size of the ListBox.
37
+ */
38
+ size: PropTypes.Requireable<"sm" | "md" | "lg">;
39
+ };
40
+ };
24
41
  export default DropdownSkeleton;
25
42
  export { DropdownSkeleton };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2021, 2025
2
+ * Copyright IBM Corp. 2021, 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,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
- import React, { useState, useRef, useEffect } from 'react';
9
+ import React, { forwardRef, useState, useRef, useEffect } from 'react';
10
10
  import cx from 'classnames';
11
11
  import Search from '../Search/Search.js';
12
12
  import '../Search/Search.Skeleton.js';
@@ -16,15 +16,17 @@ import { Escape } from '../../internal/keyboard/keys.js';
16
16
  import { match } from '../../internal/keyboard/match.js';
17
17
  import { mergeRefs } from '../../tools/mergeRefs.js';
18
18
 
19
- const ExpandableSearch = /*#__PURE__*/React.forwardRef(function ExpandableSearch({
20
- onBlur,
21
- onChange,
22
- onExpand,
23
- onKeyDown,
24
- defaultValue,
25
- isExpanded,
26
- ...props
27
- }, forwardedRef) {
19
+ const frFn = forwardRef;
20
+ const ExpandableSearch = frFn((props, forwardedRef) => {
21
+ const {
22
+ onBlur,
23
+ onChange,
24
+ onExpand,
25
+ onKeyDown,
26
+ defaultValue,
27
+ isExpanded,
28
+ ...rest
29
+ } = props;
28
30
  const [expanded, setExpanded] = useState(isExpanded || false);
29
31
  const [hasContent, setHasContent] = useState(defaultValue ? true : false);
30
32
  const searchRef = useRef(null);
@@ -57,8 +59,8 @@ const ExpandableSearch = /*#__PURE__*/React.forwardRef(function ExpandableSearch
57
59
  }
58
60
  const classes = cx(`${prefix}--search--expandable`, {
59
61
  [`${prefix}--search--expanded`]: expanded
60
- }, props.className);
61
- return /*#__PURE__*/React.createElement(Search, _extends({}, props, {
62
+ }, rest.className);
63
+ return /*#__PURE__*/React.createElement(Search, _extends({}, rest, {
62
64
  defaultValue: defaultValue,
63
65
  isExpanded: expanded,
64
66
  ref: mergeRefs(searchRef, forwardedRef),
@@ -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();