@carbon/react 1.99.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 (251) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +953 -953
  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/OverflowMenu/OverflowMenu.d.ts +1 -1
  75. package/es/components/OverflowMenu/OverflowMenu.js +0 -1
  76. package/es/components/OverflowMenu/index.d.ts +1 -1
  77. package/es/components/PageHeader/PageHeader.d.ts +3 -3
  78. package/es/components/Popover/index.js +21 -12
  79. package/es/components/Search/Search.d.ts +2 -2
  80. package/es/components/Select/Select.d.ts +1 -1
  81. package/es/components/Select/Select.js +2 -2
  82. package/es/components/SkeletonIcon/SkeletonIcon.d.ts +16 -2
  83. package/es/components/SkeletonText/SkeletonText.d.ts +1 -1
  84. package/es/components/Tag/Tag.d.ts +1 -1
  85. package/es/components/Tag/Tag.js +2 -0
  86. package/es/components/Text/Text.d.ts +1 -1
  87. package/es/components/Text/Text.js +4 -3
  88. package/es/components/Text/TextDirection.d.ts +1 -1
  89. package/es/components/Text/TextDirection.js +1 -3
  90. package/es/components/Text/TextDirectionContext.d.ts +3 -3
  91. package/es/components/TextInput/ControlledPasswordInput.d.ts +1 -1
  92. package/es/components/TextInput/ControlledPasswordInput.js +2 -2
  93. package/es/components/TextInput/PasswordInput.d.ts +1 -1
  94. package/es/components/TextInput/PasswordInput.js +2 -2
  95. package/es/components/TextInput/TextInput.d.ts +1 -1
  96. package/es/components/TextInput/TextInput.js +2 -2
  97. package/es/components/Toggle/Toggle.Skeleton.d.ts +9 -3
  98. package/es/components/Toggletip/index.d.ts +1 -1
  99. package/es/components/Toggletip/index.js +9 -7
  100. package/es/components/Tooltip/DefinitionTooltip.d.ts +52 -1
  101. package/es/components/Tooltip/Tooltip.js +2 -0
  102. package/es/components/TreeView/TreeNode.d.ts +4 -4
  103. package/es/components/UIShell/Header.d.ts +20 -3
  104. package/es/components/UIShell/HeaderGlobalAction.d.ts +2 -2
  105. package/es/components/UIShell/HeaderName.js +1 -1
  106. package/es/components/UIShell/Link.d.ts +1 -1
  107. package/es/components/UIShell/Link.js +14 -14
  108. package/es/components/UIShell/SideNav.d.ts +3 -3
  109. package/es/components/UIShell/SideNav.js +26 -25
  110. package/es/components/UIShell/SideNavDivider.d.ts +11 -3
  111. package/es/components/UIShell/SideNavHeader.d.ts +24 -1
  112. package/es/components/UIShell/SideNavIcon.d.ts +20 -2
  113. package/es/components/UIShell/SideNavItem.d.ts +20 -2
  114. package/es/components/UIShell/SideNavItems.d.ts +22 -2
  115. package/es/components/UIShell/SideNavLink.d.ts +1 -1
  116. package/es/components/UIShell/SideNavLink.js +14 -14
  117. package/es/components/UIShell/SideNavMenu.d.ts +1 -1
  118. package/es/components/UIShell/SideNavMenu.js +2 -2
  119. package/es/components/UIShell/SideNavMenuItem.d.ts +2 -2
  120. package/es/components/UIShell/SideNavMenuItem.js +2 -2
  121. package/es/components/UIShell/SwitcherDivider.d.ts +10 -2
  122. package/es/internal/FloatingMenu.d.ts +1 -1
  123. package/es/internal/FloatingMenu.js +0 -2
  124. package/es/internal/PolymorphicProps.d.ts +3 -3
  125. package/es/internal/useNoInteractiveChildren.d.ts +1 -1
  126. package/es/internal/useNoInteractiveChildren.js +8 -10
  127. package/es/internal/useOutsideClick.d.ts +1 -1
  128. package/es/internal/useOutsideClick.js +0 -4
  129. package/lib/components/BadgeIndicator/index.d.ts +1 -1
  130. package/lib/components/BadgeIndicator/index.js +7 -5
  131. package/lib/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
  132. package/lib/components/Breadcrumb/BreadcrumbItem.js +5 -6
  133. package/lib/components/Button/Button.Skeleton.d.ts +28 -2
  134. package/lib/components/Button/Button.js +3 -2
  135. package/lib/components/ChatButton/ChatButton.d.ts +3 -2
  136. package/lib/components/CheckboxGroup/CheckboxGroup.d.ts +60 -2
  137. package/lib/components/ComboBox/ComboBox.d.ts +4 -4
  138. package/lib/components/ComboBox/ComboBox.js +21 -3
  139. package/lib/components/ComposedModal/ComposedModal.d.ts +2 -2
  140. package/lib/components/ContainedList/ContainedList.d.ts +35 -6
  141. package/lib/components/ContainedList/ContainedList.js +3 -1
  142. package/lib/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +32 -3
  143. package/lib/components/ContainedList/index.d.ts +1 -1
  144. package/lib/components/ContainedList/index.js +4 -1
  145. package/lib/components/DangerButton/DangerButton.d.ts +1 -1
  146. package/lib/components/DataTable/DataTable.d.ts +22 -5
  147. package/lib/components/DataTable/DataTable.js +1 -1
  148. package/lib/components/DataTable/TableExpandRow.d.ts +1 -1
  149. package/lib/components/DataTable/TableHeader.d.ts +1 -1
  150. package/lib/components/DataTable/TableHeader.js +17 -15
  151. package/lib/components/DataTable/TableToolbar.d.ts +25 -1
  152. package/lib/components/DataTable/TableToolbarMenu.d.ts +25 -5
  153. package/lib/components/DataTable/TableToolbarMenu.js +0 -3
  154. package/lib/components/DataTableSkeleton/DataTableSkeleton.d.ts +51 -2
  155. package/lib/components/DataTableSkeleton/DataTableSkeleton.js +6 -0
  156. package/lib/components/DatePicker/DatePicker.d.ts +2 -2
  157. package/lib/components/DatePicker/DatePicker.js +37 -52
  158. package/lib/components/DatePicker/plugins/fixEventsPlugin.js +28 -2
  159. package/lib/components/DatePickerInput/DatePickerInput.d.ts +1 -1
  160. package/lib/components/DatePickerInput/DatePickerInput.js +2 -1
  161. package/lib/components/Dialog/Dialog.d.ts +1 -1
  162. package/lib/components/Dropdown/Dropdown.Skeleton.d.ts +19 -2
  163. package/lib/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
  164. package/lib/components/ExpandableSearch/ExpandableSearch.js +13 -11
  165. package/lib/components/FileUploader/FileUploader.d.ts +1 -1
  166. package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
  167. package/lib/components/FileUploader/FileUploaderDropContainer.js +28 -10
  168. package/lib/components/FluidComboBox/FluidComboBox.Skeleton.d.ts +11 -3
  169. package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.d.ts +15 -3
  170. package/lib/components/FluidDatePicker/FluidDatePicker.d.ts +2 -2
  171. package/lib/components/FluidDropdown/FluidDropdown.Skeleton.d.ts +11 -3
  172. package/lib/components/FluidForm/FluidForm.d.ts +15 -2
  173. package/lib/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +2 -2
  174. package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.d.ts +11 -3
  175. package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +11 -3
  176. package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +1 -1
  177. package/lib/components/FluidSearch/FluidSearch.Skeleton.d.ts +11 -3
  178. package/lib/components/FluidSearch/FluidSearch.d.ts +1 -1
  179. package/lib/components/FluidSearch/FluidSearch.js +2 -2
  180. package/lib/components/FluidSelect/FluidSelect.Skeleton.d.ts +11 -3
  181. package/lib/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +11 -3
  182. package/lib/components/FluidTextArea/FluidTextArea.d.ts +95 -1
  183. package/lib/components/FluidTextInput/FluidPasswordInput.d.ts +83 -2
  184. package/lib/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +11 -3
  185. package/lib/components/Grid/GridContext.d.ts +19 -1
  186. package/lib/components/IconButton/index.d.ts +1 -1
  187. package/lib/components/Link/Link.js +3 -0
  188. package/lib/components/ListBox/ListBoxField.d.ts +35 -2
  189. package/lib/components/ListBox/ListBoxMenuIcon.d.ts +16 -3
  190. package/lib/components/ListBox/ListBoxMenuItem.d.ts +1 -1
  191. package/lib/components/ListBox/ListBoxSelection.d.ts +34 -3
  192. package/lib/components/Menu/MenuItem.d.ts +2 -2
  193. package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +2 -2
  194. package/lib/components/MultiSelect/FilterableMultiSelect.js +22 -13
  195. package/lib/components/MultiSelect/MultiSelect.js +22 -13
  196. package/lib/components/Notification/Notification.d.ts +8 -7
  197. package/lib/components/Notification/Notification.js +0 -1
  198. package/lib/components/OverflowMenu/OverflowMenu.d.ts +1 -1
  199. package/lib/components/OverflowMenu/OverflowMenu.js +0 -1
  200. package/lib/components/OverflowMenu/index.d.ts +1 -1
  201. package/lib/components/PageHeader/PageHeader.d.ts +3 -3
  202. package/lib/components/Popover/index.js +19 -10
  203. package/lib/components/Search/Search.d.ts +2 -2
  204. package/lib/components/Select/Select.d.ts +1 -1
  205. package/lib/components/SkeletonIcon/SkeletonIcon.d.ts +16 -2
  206. package/lib/components/SkeletonText/SkeletonText.d.ts +1 -1
  207. package/lib/components/Tag/Tag.d.ts +1 -1
  208. package/lib/components/Tag/Tag.js +2 -0
  209. package/lib/components/Text/Text.d.ts +1 -1
  210. package/lib/components/Text/Text.js +3 -2
  211. package/lib/components/Text/TextDirection.d.ts +1 -1
  212. package/lib/components/Text/TextDirection.js +1 -3
  213. package/lib/components/Text/TextDirectionContext.d.ts +3 -3
  214. package/lib/components/TextInput/ControlledPasswordInput.d.ts +1 -1
  215. package/lib/components/TextInput/PasswordInput.d.ts +1 -1
  216. package/lib/components/TextInput/TextInput.d.ts +1 -1
  217. package/lib/components/Toggle/Toggle.Skeleton.d.ts +9 -3
  218. package/lib/components/Toggletip/index.d.ts +1 -1
  219. package/lib/components/Toggletip/index.js +7 -5
  220. package/lib/components/Tooltip/DefinitionTooltip.d.ts +52 -1
  221. package/lib/components/Tooltip/Tooltip.js +2 -0
  222. package/lib/components/TreeView/TreeNode.d.ts +4 -4
  223. package/lib/components/UIShell/Header.d.ts +20 -3
  224. package/lib/components/UIShell/HeaderGlobalAction.d.ts +2 -2
  225. package/lib/components/UIShell/HeaderName.js +1 -1
  226. package/lib/components/UIShell/Link.d.ts +1 -1
  227. package/lib/components/UIShell/Link.js +13 -13
  228. package/lib/components/UIShell/SideNav.d.ts +3 -3
  229. package/lib/components/UIShell/SideNav.js +25 -24
  230. package/lib/components/UIShell/SideNavDivider.d.ts +11 -3
  231. package/lib/components/UIShell/SideNavHeader.d.ts +24 -1
  232. package/lib/components/UIShell/SideNavIcon.d.ts +20 -2
  233. package/lib/components/UIShell/SideNavItem.d.ts +20 -2
  234. package/lib/components/UIShell/SideNavItems.d.ts +22 -2
  235. package/lib/components/UIShell/SideNavLink.d.ts +1 -1
  236. package/lib/components/UIShell/SideNavLink.js +14 -14
  237. package/lib/components/UIShell/SideNavMenu.d.ts +1 -1
  238. package/lib/components/UIShell/SideNavMenuItem.d.ts +2 -2
  239. package/lib/components/UIShell/SwitcherDivider.d.ts +10 -2
  240. package/lib/internal/FloatingMenu.d.ts +1 -1
  241. package/lib/internal/FloatingMenu.js +0 -2
  242. package/lib/internal/PolymorphicProps.d.ts +3 -3
  243. package/lib/internal/useNoInteractiveChildren.d.ts +1 -1
  244. package/lib/internal/useNoInteractiveChildren.js +8 -10
  245. package/lib/internal/useOutsideClick.d.ts +1 -1
  246. package/lib/internal/useOutsideClick.js +0 -4
  247. package/package.json +7 -7
  248. package/scss/_carbon-utilities.scss +9 -0
  249. package/telemetry.yml +0 -1
  250. package/es/internal/createClassWrapper.d.ts +0 -12
  251. package/lib/internal/createClassWrapper.d.ts +0 -12
@@ -72,7 +72,7 @@ export interface TagBaseProps {
72
72
  */
73
73
  slug?: ReactNode;
74
74
  /**
75
- * @deprecated The `title` prop has been deprecated and will be removed in the next major version. Use DismissibleTag instead.
75
+ * @deprecated The `title` prop has been deprecated and will be removed in the next major version. Use `children` instead.
76
76
  */
77
77
  title?: string;
78
78
  /**
@@ -152,6 +152,8 @@ const TagBase = /*#__PURE__*/React.forwardRef(({
152
152
  }, normalizedDecorator) : '');
153
153
  });
154
154
  const Tag = TagBase;
155
+
156
+ // @ts-expect-error - `propTypes` isn't typed.
155
157
  Tag.propTypes = {
156
158
  /**
157
159
  * Provide an alternative tag or component to use instead of the default
@@ -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.
@@ -7,11 +7,11 @@
7
7
 
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import PropTypes from 'prop-types';
10
- import React, { useContext, Children } from 'react';
10
+ import React, { forwardRef, useContext, Children } from 'react';
11
11
  import { TextDirectionContext } from './TextDirectionContext.js';
12
12
 
13
13
  // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
14
- const TextBase = /*#__PURE__*/React.forwardRef(({
14
+ const Text = /*#__PURE__*/forwardRef(({
15
15
  as,
16
16
  children,
17
17
  dir = 'auto',
@@ -53,7 +53,8 @@ const TextBase = /*#__PURE__*/React.forwardRef(({
53
53
  ref: ref
54
54
  }, rest, textProps), children));
55
55
  });
56
- const Text = TextBase;
56
+
57
+ // @ts-expect-error - `propTypes` isn't typed.
57
58
  Text.propTypes = {
58
59
  /**
59
60
  * Provide a custom element type used to render the outermost node
@@ -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.
@@ -23,9 +23,7 @@ const TextDirection = ({
23
23
  }, [dir]);
24
24
  useEffect(() => {
25
25
  savedCallback.current = getTextDirection;
26
- // TODO: Is this `useEffect` supposed to have a dependency on
27
- // `getTextDirection`?
28
- });
26
+ }, [getTextDirection]);
29
27
  return /*#__PURE__*/React.createElement(TextDirectionContext.Provider, {
30
28
  value: value
31
29
  }, children);
@@ -1,14 +1,14 @@
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 { type MutableRefObject } from 'react';
7
+ import { type RefObject } from 'react';
8
8
  export type TextDir = 'ltr' | 'rtl' | 'auto' | string;
9
9
  export type GetTextDirection = (text: string | string[] | undefined) => TextDir;
10
10
  export interface TextDirectionContextType {
11
11
  direction: TextDir;
12
- getTextDirection: MutableRefObject<GetTextDirection | undefined>;
12
+ getTextDirection: RefObject<GetTextDirection | undefined>;
13
13
  }
14
14
  export declare const TextDirectionContext: import("react").Context<TextDirectionContextType>;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2023, 2025
2
+ * Copyright IBM Corp. 2023, 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 from 'react';
9
+ import React, { forwardRef } from 'react';
10
10
  import cx from 'classnames';
11
11
  import PropTypes from 'prop-types';
12
12
  import { WarningFilled, ViewOff, View } from '@carbon/icons-react';
@@ -16,7 +16,7 @@ import { usePrefix } from '../../internal/usePrefix.js';
16
16
  import { useId } from '../../internal/useId.js';
17
17
  import { noopFn } from '../../internal/noopFn.js';
18
18
 
19
- const ControlledPasswordInput = /*#__PURE__*/React.forwardRef(({
19
+ const ControlledPasswordInput = /*#__PURE__*/forwardRef(({
20
20
  labelText,
21
21
  className,
22
22
  id,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2023, 2025
2
+ * Copyright IBM Corp. 2023, 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, useContext, useEffect } from 'react';
9
+ import React, { forwardRef, useState, useContext, useEffect } from 'react';
10
10
  import cx from 'classnames';
11
11
  import PropTypes from 'prop-types';
12
12
  import { ViewOff, View } from '@carbon/icons-react';
@@ -19,7 +19,7 @@ import { Tooltip } from '../Tooltip/Tooltip.js';
19
19
  import { deprecate } from '../../prop-types/deprecate.js';
20
20
  import { usePrefix } from '../../internal/usePrefix.js';
21
21
 
22
- const PasswordInput = /*#__PURE__*/React.forwardRef(({
22
+ const PasswordInput = /*#__PURE__*/forwardRef(({
23
23
  className,
24
24
  disabled = false,
25
25
  helperText,
@@ -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.
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import PropTypes from 'prop-types';
9
- import React, { useRef, useState, useEffect, useContext, cloneElement } from 'react';
9
+ import React, { forwardRef, useRef, useState, useEffect, useContext, cloneElement } from 'react';
10
10
  import cx from 'classnames';
11
11
  import { useNormalizedInputProps } from '../../internal/useNormalizedInputProps.js';
12
12
  import { deprecate } from '../../prop-types/deprecate.js';
@@ -21,7 +21,7 @@ import '../Text/TextDirection.js';
21
21
  import { AILabel } from '../AILabel/index.js';
22
22
  import { isComponentElement } from '../../internal/utils.js';
23
23
 
24
- const TextInput = /*#__PURE__*/React.forwardRef(({
24
+ const TextInput = /*#__PURE__*/forwardRef(({
25
25
  className,
26
26
  decorator,
27
27
  disabled = false,
@@ -1,14 +1,20 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2023
2
+ * Copyright IBM Corp. 2016, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import React from 'react';
7
+ import PropTypes from 'prop-types';
8
8
  export interface ToggleSkeletonProps {
9
9
  'aria-label'?: string;
10
10
  className?: string;
11
11
  }
12
- declare const ToggleSkeleton: React.FC<ToggleSkeletonProps>;
12
+ declare const ToggleSkeleton: {
13
+ ({ className, ...rest }: ToggleSkeletonProps): import("react/jsx-runtime").JSX.Element;
14
+ propTypes: {
15
+ 'aria-label': PropTypes.Requireable<string>;
16
+ className: PropTypes.Requireable<string>;
17
+ };
18
+ };
13
19
  export default ToggleSkeleton;
14
20
  export { ToggleSkeleton };
@@ -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, { useContext, useRef, useState, useEffect } from 'react';
11
+ import React, { forwardRef, useContext, useRef, useState, useEffect } from 'react';
12
12
  import { Popover, PopoverContent } from '../Popover/index.js';
13
13
  import { Escape } from '../../internal/keyboard/keys.js';
14
14
  import { match } from '../../internal/keyboard/match.js';
@@ -184,8 +184,7 @@ Toggletip.propTypes = {
184
184
  * `ToggletipButton` controls the visibility of the Toggletip through mouse
185
185
  * clicks and keyboard interactions.
186
186
  */
187
-
188
- const ToggletipButton = /*#__PURE__*/React.forwardRef(function ToggletipButton({
187
+ const ToggletipButton = /*#__PURE__*/forwardRef(function ToggletipButton({
189
188
  children,
190
189
  className: customClassName,
191
190
  label = 'Show information',
@@ -225,15 +224,18 @@ ToggletipButton.propTypes = {
225
224
  label: PropTypes.string
226
225
  };
227
226
  ToggletipButton.displayName = 'ToggletipButton';
227
+ const frFn = forwardRef;
228
+
228
229
  /**
229
230
  * `ToggletipContent` is a wrapper around `PopoverContent`. It places the
230
231
  * `children` passed in as a prop inside of `PopoverContent` so that they will
231
232
  * be rendered inside of the popover for this component.
232
233
  */
233
- const ToggletipContent = /*#__PURE__*/React.forwardRef(function ToggletipContent({
234
- children,
235
- className: customClassName
236
- }, ref) {
234
+ const ToggletipContent = frFn((props, ref) => {
235
+ const {
236
+ children,
237
+ className: customClassName
238
+ } = props;
237
239
  const toggletip = useToggletip();
238
240
  const prefix = usePrefix();
239
241
  return /*#__PURE__*/React.createElement(PopoverContent, _extends({
@@ -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
  import { PopoverAlignment } from '../Popover';
9
10
  export interface DefinitionTooltipProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'id' | 'classname' | 'children' | 'type'> {
@@ -54,5 +55,55 @@ export interface DefinitionTooltipProps extends Omit<React.ButtonHTMLAttributes<
54
55
  */
55
56
  triggerClassName?: string;
56
57
  }
57
- declare const DefinitionTooltip: React.FC<DefinitionTooltipProps>;
58
+ declare const DefinitionTooltip: {
59
+ ({ align, autoAlign, className, children, definition, defaultOpen, id, openOnHover, tooltipText, triggerClassName, ...rest }: DefinitionTooltipProps): import("react/jsx-runtime").JSX.Element;
60
+ propTypes: {
61
+ /**
62
+ * Specify how the trigger should align with the tooltip
63
+ */
64
+ align: PropTypes.Requireable<string>;
65
+ /**
66
+ * Will auto-align the popover. This prop is currently experimental and is
67
+ * subject to future changes. Requires React v17+
68
+ * @see https://github.com/carbon-design-system/carbon/issues/18714
69
+ */
70
+ autoAlign: PropTypes.Requireable<boolean>;
71
+ /**
72
+ * The `children` prop will be used as the value that is being defined
73
+ */
74
+ children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
75
+ /**
76
+ * Specify an optional className to be applied to the container node
77
+ */
78
+ className: PropTypes.Requireable<string>;
79
+ /**
80
+ * Specify whether the tooltip should be open when it first renders
81
+ */
82
+ defaultOpen: PropTypes.Requireable<boolean>;
83
+ /**
84
+ * The `definition` prop is used as the content inside of the tooltip that
85
+ * appears when a user interacts with the element rendered by the `children`
86
+ * prop
87
+ */
88
+ definition: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
89
+ /**
90
+ * Provide a value that will be assigned as the id of the tooltip
91
+ */
92
+ id: PropTypes.Requireable<string>;
93
+ /**
94
+ * Specifies whether or not the `DefinitionTooltip` should open on hover or not
95
+ */
96
+ openOnHover: PropTypes.Requireable<boolean>;
97
+ /**
98
+ * [Deprecated in v11] Please use the `definition` prop instead.
99
+ *
100
+ * Provide the text that will be displayed in the tooltip when it is rendered.
101
+ */
102
+ tooltipText: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
103
+ /**
104
+ * The CSS class name of the trigger element
105
+ */
106
+ triggerClassName: PropTypes.Requireable<string>;
107
+ };
108
+ };
58
109
  export { DefinitionTooltip };
@@ -187,6 +187,8 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
187
187
  }, label || description))
188
188
  );
189
189
  });
190
+
191
+ // @ts-expect-error - `propTypes` isn't typed.
190
192
  Tooltip.propTypes = {
191
193
  /**
192
194
  * Specify how the trigger should align with the tooltip
@@ -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, { type ComponentType, type FunctionComponent } from 'react';
7
+ import React, { type ElementType } from 'react';
8
8
  type UncontrolledOnToggle = (event: React.MouseEvent | React.KeyboardEvent, node: Pick<TreeNodeProps, 'id' | 'label' | 'value' | 'isExpanded'>) => void;
9
9
  type ControlledOnToggle = (isExpanded: TreeNodeProps['isExpanded']) => void;
10
10
  export type TreeNodeProps = {
@@ -78,7 +78,7 @@ export type TreeNodeProps = {
78
78
  /**
79
79
  * A component used to render an icon.
80
80
  */
81
- renderIcon?: ComponentType | FunctionComponent;
81
+ renderIcon?: ElementType;
82
82
  /**
83
83
  * **Note:** this is controlled by the parent TreeView component, do not set manually.
84
84
  * Array containing all selected node IDs in the tree
@@ -178,7 +178,7 @@ declare const TreeNode: React.ForwardRefExoticComponent<{
178
178
  /**
179
179
  * A component used to render an icon.
180
180
  */
181
- renderIcon?: ComponentType | FunctionComponent;
181
+ renderIcon?: ElementType;
182
182
  /**
183
183
  * **Note:** this is controlled by the parent TreeView component, do not set manually.
184
184
  * Array containing all selected node IDs in the tree
@@ -1,10 +1,11 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2023
2
+ * Copyright IBM Corp. 2016, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import React, { ReactNode } from 'react';
7
+ import PropTypes from 'prop-types';
8
+ import { ReactNode } from 'react';
8
9
  export interface HeaderProps {
9
10
  children?: ReactNode;
10
11
  /**
@@ -20,5 +21,21 @@ export interface HeaderProps {
20
21
  */
21
22
  className?: string;
22
23
  }
23
- declare const Header: React.FC<HeaderProps>;
24
+ declare const Header: {
25
+ ({ className: customClassName, children, ...rest }: HeaderProps): import("react/jsx-runtime").JSX.Element;
26
+ propTypes: {
27
+ /**
28
+ * Optionally provide aria-label
29
+ */
30
+ 'aria-label': PropTypes.Requireable<string>;
31
+ /**
32
+ * Optionally provide aria-labelledby
33
+ */
34
+ 'aria-labelledby': PropTypes.Requireable<string>;
35
+ /**
36
+ * Optionally provide a custom class name that is applied to the underlying header
37
+ */
38
+ className: PropTypes.Requireable<string>;
39
+ };
40
+ };
24
41
  export default Header;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2016, 2023
2
+ * Copyright IBM Corp. 2016, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -55,5 +55,5 @@ export interface HeaderGlobalActionProps {
55
55
  *
56
56
  * Note: children passed to this component should be an Icon.
57
57
  */
58
- declare const HeaderGlobalAction: React.FC<HeaderGlobalActionProps>;
58
+ declare const HeaderGlobalAction: React.ForwardRefExoticComponent<HeaderGlobalActionProps & React.RefAttributes<HTMLButtonElement>>;
59
59
  export default HeaderGlobalAction;
@@ -24,7 +24,7 @@ function HeaderName({
24
24
  className: className
25
25
  }), prefix && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
26
26
  className: `${selectorPrefix}--header__name--prefix`
27
- }, prefix), "\xA0"), children);
27
+ }, prefix), "\xA0"), /*#__PURE__*/React.createElement("span", null, children));
28
28
  }
29
29
  HeaderName.propTypes = {
30
30
  /**
@@ -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.
@@ -7,29 +7,29 @@
7
7
 
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import PropTypes from 'prop-types';
10
- import React from 'react';
10
+ import React, { forwardRef } from 'react';
11
11
  import { deprecate } from '../../prop-types/deprecate.js';
12
12
 
13
13
  // First define the component without generics
14
14
 
15
- const LinkBase = ({
16
- element,
17
- as: BaseComponent,
18
- // Captured here to prevent it from being passed into the created element.
19
- // See https://github.com/carbon-design-system/carbon/issues/3970
20
- // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20452
21
- isSideNavExpanded: _isSideNavExpanded,
22
- ...rest
23
- }, ref) => {
15
+ const frFn = forwardRef;
16
+ const Link = frFn((props, ref) => {
17
+ const {
18
+ element,
19
+ as: BaseComponent,
20
+ // Captured here to prevent it from being passed into the created element.
21
+ // See https://github.com/carbon-design-system/carbon/issues/3970
22
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20452
23
+ isSideNavExpanded: _isSideNavExpanded,
24
+ ...rest
25
+ } = props;
26
+
24
27
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
25
28
  const BaseComponentAsAny = BaseComponent ?? element ?? 'a';
26
29
  return /*#__PURE__*/React.createElement(BaseComponentAsAny, _extends({
27
30
  ref: ref
28
31
  }, rest));
29
- };
30
-
31
- // Use forwardRef with the non-generic function
32
- const Link = /*#__PURE__*/React.forwardRef(LinkBase);
32
+ });
33
33
 
34
34
  /**
35
35
  * Link is a custom component that allows us to supporting rendering elements
@@ -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 @@ export interface SideNavProps {
9
9
  expanded?: boolean | undefined;
10
10
  defaultExpanded?: boolean | undefined;
11
11
  isChildOfHeader?: boolean | undefined;
12
- onToggle?: (event: FocusEvent<HTMLElement> | KeyboardEvent<HTMLElement> | boolean, value: boolean) => void | undefined;
12
+ onToggle?: (event: FocusEvent<HTMLElement> | KeyboardEvent<HTMLElement> | boolean, value: boolean) => void;
13
13
  href?: string | undefined;
14
14
  isFixedNav?: boolean | undefined;
15
15
  isRail?: boolean | undefined;
@@ -17,7 +17,7 @@ export interface SideNavProps {
17
17
  addFocusListeners?: boolean | undefined;
18
18
  addMouseListeners?: boolean | undefined;
19
19
  onOverlayClick?: MouseEventHandler<HTMLDivElement> | undefined;
20
- onSideNavBlur?: () => void | undefined;
20
+ onSideNavBlur?: () => void;
21
21
  enterDelayMs?: number;
22
22
  inert?: boolean;
23
23
  }
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
- import React, { useRef, isValidElement, createContext } from 'react';
9
+ import React, { forwardRef, useRef, isValidElement, createContext } from 'react';
10
10
  import cx from 'classnames';
11
11
  import PropTypes from 'prop-types';
12
12
  import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
@@ -24,28 +24,30 @@ import { useMatchMedia } from '../../internal/useMatchMedia.js';
24
24
  // import SideNavFooter from './SideNavFooter';
25
25
 
26
26
  const SideNavContext = /*#__PURE__*/createContext({});
27
- function SideNavRenderFunction({
28
- expanded: expandedProp,
29
- defaultExpanded = false,
30
- isChildOfHeader = true,
31
- 'aria-label': ariaLabel,
32
- 'aria-labelledby': ariaLabelledBy,
33
- children,
34
- onToggle,
35
- className: customClassName,
36
- // TO-DO: comment back in when footer is added for rails
37
- // translateById: t = (id) => translations[id],
38
- href,
39
- isFixedNav = false,
40
- isRail,
41
- isPersistent = true,
42
- addFocusListeners = true,
43
- addMouseListeners = true,
44
- onOverlayClick,
45
- onSideNavBlur,
46
- enterDelayMs = 100,
47
- ...other
48
- }, ref) {
27
+ const frFn = forwardRef;
28
+ const SideNav = frFn((props, ref) => {
29
+ const {
30
+ expanded: expandedProp,
31
+ defaultExpanded = false,
32
+ isChildOfHeader = true,
33
+ 'aria-label': ariaLabel,
34
+ 'aria-labelledby': ariaLabelledBy,
35
+ children,
36
+ onToggle,
37
+ className: customClassName,
38
+ // TO-DO: comment back in when footer is added for rails
39
+ // translateById: t = (id) => translations[id],
40
+ href,
41
+ isFixedNav = false,
42
+ isRail,
43
+ isPersistent = true,
44
+ addFocusListeners = true,
45
+ addMouseListeners = true,
46
+ onOverlayClick,
47
+ onSideNavBlur,
48
+ enterDelayMs = 100,
49
+ ...other
50
+ } = props;
49
51
  const prefix = usePrefix();
50
52
  const {
51
53
  current: controlled
@@ -171,8 +173,7 @@ function SideNavRenderFunction({
171
173
  className: `${prefix}--side-nav__navigation ${className}`,
172
174
  inert: !isRail ? !(expanded || isLg) : undefined
173
175
  }, accessibilityLabel, eventHandlers, other), childrenToRender));
174
- }
175
- const SideNav = /*#__PURE__*/React.forwardRef(SideNavRenderFunction);
176
+ });
176
177
  SideNav.displayName = 'SideNav';
177
178
  SideNav.propTypes = {
178
179
  /**
@@ -1,15 +1,23 @@
1
1
  /**
2
- * Copyright IBM Corp. 2021
2
+ * Copyright IBM Corp. 2021, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import React from 'react';
7
+ import PropTypes from 'prop-types';
8
8
  interface SideNavDividerProps {
9
9
  /**
10
10
  * Provide an optional class to be applied to the containing node
11
11
  */
12
12
  className?: string;
13
13
  }
14
- declare const SideNavDivider: React.FC<SideNavDividerProps>;
14
+ declare const SideNavDivider: {
15
+ ({ className }: SideNavDividerProps): import("react/jsx-runtime").JSX.Element;
16
+ propTypes: {
17
+ /**
18
+ * Provide an optional class to be applied to the containing node
19
+ */
20
+ className: PropTypes.Requireable<string>;
21
+ };
22
+ };
15
23
  export default SideNavDivider;
@@ -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 SideNavHeaderProps {
9
10
  /**
@@ -24,5 +25,27 @@ export interface SideNavHeaderProps {
24
25
  */
25
26
  renderIcon: React.ComponentType;
26
27
  }
27
- declare const SideNavHeader: React.FC<SideNavHeaderProps>;
28
+ declare const SideNavHeader: {
29
+ ({ children, className: customClassName, renderIcon: IconElement, }: SideNavHeaderProps): import("react/jsx-runtime").JSX.Element;
30
+ displayName: string;
31
+ propTypes: {
32
+ /**
33
+ * The child nodes to be rendered
34
+ */
35
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
36
+ /**
37
+ * Provide an optional class to be applied to the containing node
38
+ */
39
+ className: PropTypes.Requireable<string>;
40
+ /**
41
+ * Property to indicate if the side nav container is open (or not). Use to
42
+ * keep local state and styling in step with the SideNav expansion state.
43
+ */
44
+ isSideNavExpanded: PropTypes.Requireable<boolean>;
45
+ /**
46
+ * A component used to render an icon.
47
+ */
48
+ renderIcon: PropTypes.Validator<object>;
49
+ };
50
+ };
28
51
  export default SideNavHeader;