@carbon/react 1.89.0 → 1.90.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 (262) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +877 -877
  2. package/README.md +2 -2
  3. package/es/components/AILabel/index.js +8 -6
  4. package/es/components/Breadcrumb/BreadcrumbItem.js +2 -0
  5. package/es/components/Button/Button.js +3 -0
  6. package/es/components/ChatButton/ChatButton.js +1 -0
  7. package/es/components/CheckboxGroup/CheckboxGroup.js +21 -2
  8. package/es/components/ComboBox/ComboBox.js +17 -1
  9. package/es/components/ComboButton/index.js +1 -0
  10. package/es/components/ComposedModal/ComposedModal.js +18 -4
  11. package/es/components/DataTable/DataTable.d.ts +3 -8
  12. package/es/components/DataTable/DataTable.js +14 -0
  13. package/es/components/DataTable/Table.js +3 -3
  14. package/es/components/DataTable/TableExpandHeader.js +5 -1
  15. package/es/components/DataTable/TableExpandRow.d.ts +33 -5
  16. package/es/components/DataTable/TableExpandRow.js +5 -2
  17. package/es/components/DataTable/TableHeader.d.ts +1 -2
  18. package/es/components/DataTable/TableHeader.js +3 -2
  19. package/es/components/DataTable/TableRow.d.ts +3 -6
  20. package/es/components/DataTable/TableRow.js +40 -22
  21. package/es/components/DataTable/TableSlugRow.js +1 -0
  22. package/es/components/DataTable/TableToolbarMenu.js +3 -0
  23. package/es/components/DataTable/state/sorting.d.ts +57 -14
  24. package/es/components/DataTable/state/sorting.js +42 -50
  25. package/es/components/DataTable/tools/sorting.js +5 -0
  26. package/es/components/DatePicker/DatePicker.js +14 -3
  27. package/es/components/DatePickerInput/DatePickerInput.js +6 -0
  28. package/es/components/Dialog/Dialog.js +10 -2
  29. package/es/components/Dropdown/Dropdown.js +16 -4
  30. package/es/components/ErrorBoundary/ErrorBoundaryContext.js +1 -0
  31. package/es/components/FileUploader/FileUploader.js +9 -2
  32. package/es/components/FileUploader/FileUploaderButton.js +1 -1
  33. package/es/components/FileUploader/FileUploaderDropContainer.js +1 -1
  34. package/es/components/FileUploader/FileUploaderItem.js +3 -0
  35. package/es/components/FluidMultiSelect/FluidMultiSelect.js +2 -0
  36. package/es/components/FluidNumberInput/FluidNumberInput.js +3 -2
  37. package/es/components/FluidSearch/FluidSearch.js +3 -2
  38. package/es/components/FluidSelect/FluidSelect.js +3 -2
  39. package/es/components/FluidTextInput/FluidTextInput.js +3 -2
  40. package/es/components/FluidTimePicker/FluidTimePicker.js +11 -4
  41. package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +3 -2
  42. package/es/components/Grid/CSSGrid.js +5 -0
  43. package/es/components/Grid/Column.js +3 -0
  44. package/es/components/Grid/ColumnHang.js +1 -0
  45. package/es/components/Grid/FlexGrid.js +1 -0
  46. package/es/components/Grid/Row.js +1 -0
  47. package/es/components/Heading/index.js +3 -1
  48. package/es/components/IconButton/index.js +4 -2
  49. package/es/components/IconIndicator/index.js +4 -2
  50. package/es/components/InlineCheckbox/InlineCheckbox.js +3 -2
  51. package/es/components/Layout/index.js +6 -4
  52. package/es/components/LayoutDirection/LayoutDirection.js +2 -0
  53. package/es/components/Link/Link.js +3 -0
  54. package/es/components/ListBox/ListBoxMenuItem.js +4 -1
  55. package/es/components/ListBox/next/ListBoxTrigger.js +3 -2
  56. package/es/components/Menu/Menu.js +6 -9
  57. package/es/components/Menu/MenuContext.js +1 -0
  58. package/es/components/Menu/MenuItem.js +5 -13
  59. package/es/components/MenuButton/index.js +7 -2
  60. package/es/components/Modal/Modal.js +15 -6
  61. package/es/components/ModalWrapper/ModalWrapper.js +2 -0
  62. package/es/components/MultiSelect/FilterableMultiSelect.js +24 -5
  63. package/es/components/MultiSelect/MultiSelect.js +21 -5
  64. package/es/components/Notification/Notification.js +1 -1
  65. package/es/components/NumberInput/NumberInput.js +18 -7
  66. package/es/components/OverflowMenu/OverflowMenu.js +2 -0
  67. package/es/components/OverflowMenu/next/index.js +3 -2
  68. package/es/components/OverflowMenuItem/OverflowMenuItem.js +2 -0
  69. package/es/components/PageHeader/PageHeader.d.ts +3 -3
  70. package/es/components/PageHeader/PageHeader.js +22 -8
  71. package/es/components/Pagination/Pagination.js +6 -2
  72. package/es/components/PaginationNav/PaginationNav.js +2 -5
  73. package/es/components/Popover/index.js +20 -6
  74. package/es/components/ProgressBar/ProgressBar.js +4 -2
  75. package/es/components/RadioTile/RadioTile.js +2 -2
  76. package/es/components/Search/Search.js +2 -2
  77. package/es/components/Select/Select.js +2 -3
  78. package/es/components/ShapeIndicator/index.js +4 -2
  79. package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.d.ts +4 -4
  80. package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +1 -2
  81. package/es/components/SkeletonText/SkeletonText.js +0 -2
  82. package/es/components/Slider/Slider.js +11 -16
  83. package/es/components/Stack/HStack.js +1 -0
  84. package/es/components/Stack/Stack.js +6 -9
  85. package/es/components/Stack/VStack.js +1 -0
  86. package/es/components/StructuredList/StructuredList.js +3 -0
  87. package/es/components/Switch/Switch.js +1 -1
  88. package/es/components/Tabs/Tabs.js +28 -17
  89. package/es/components/Tag/DismissibleTag.d.ts +5 -0
  90. package/es/components/Tag/DismissibleTag.js +8 -1
  91. package/es/components/Tag/OperationalTag.js +2 -0
  92. package/es/components/Tag/SelectableTag.js +2 -0
  93. package/es/components/Tag/Tag.js +4 -0
  94. package/es/components/Tag/isEllipsisActive.js +1 -0
  95. package/es/components/Text/Text.js +1 -0
  96. package/es/components/TextInput/ControlledPasswordInput.js +2 -4
  97. package/es/components/TextInput/PasswordInput.js +7 -2
  98. package/es/components/TextInput/TextInput.js +4 -2
  99. package/es/components/Theme/index.js +8 -3
  100. package/es/components/Tile/Tile.js +14 -17
  101. package/es/components/TimePicker/TimePicker.js +1 -0
  102. package/es/components/Toggle/Toggle.js +1 -1
  103. package/es/components/Toggletip/index.js +23 -8
  104. package/es/components/Tooltip/DefinitionTooltip.js +1 -0
  105. package/es/components/Tooltip/Tooltip.js +30 -23
  106. package/es/components/TreeView/TreeNode.d.ts +28 -0
  107. package/es/components/TreeView/TreeNode.js +19 -10
  108. package/es/components/TreeView/TreeView.js +7 -0
  109. package/es/components/UIShell/HeaderContainer.js +3 -1
  110. package/es/components/UIShell/HeaderGlobalAction.js +2 -2
  111. package/es/components/UIShell/HeaderMenu.js +3 -3
  112. package/es/components/UIShell/HeaderPanel.js +2 -2
  113. package/es/components/UIShell/Link.js +2 -0
  114. package/es/components/UIShell/SideNavItems.js +1 -0
  115. package/es/components/UIShell/SideNavMenu.js +2 -2
  116. package/es/components/UIShell/SideNavMenuItem.js +1 -1
  117. package/es/components/UIShell/SideNavSwitcher.js +1 -1
  118. package/es/components/UIShell/Switcher.js +2 -1
  119. package/es/components/UIShell/SwitcherItem.js +4 -2
  120. package/es/internal/FloatingMenu.js +7 -1
  121. package/es/internal/Selection.js +12 -3
  122. package/es/internal/useMergedRefs.js +1 -0
  123. package/es/internal/useNoInteractiveChildren.js +4 -0
  124. package/es/internal/useOutsideClick.js +1 -0
  125. package/es/internal/useOverflowItems.js +6 -0
  126. package/es/internal/useResizeObserver.js +4 -0
  127. package/es/internal/useSavedCallback.js +1 -0
  128. package/es/internal/warning.js +1 -0
  129. package/es/prop-types/isRequiredOneOf.js +4 -1
  130. package/es/tools/events.js +3 -1
  131. package/es/tools/wrapComponent.js +1 -0
  132. package/lib/components/AILabel/index.js +8 -6
  133. package/lib/components/Breadcrumb/BreadcrumbItem.js +2 -0
  134. package/lib/components/Button/Button.js +3 -0
  135. package/lib/components/ChatButton/ChatButton.js +1 -0
  136. package/lib/components/CheckboxGroup/CheckboxGroup.js +20 -1
  137. package/lib/components/ComboBox/ComboBox.js +17 -1
  138. package/lib/components/ComboButton/index.js +1 -0
  139. package/lib/components/ComposedModal/ComposedModal.js +18 -4
  140. package/lib/components/DataTable/DataTable.d.ts +3 -8
  141. package/lib/components/DataTable/DataTable.js +14 -0
  142. package/lib/components/DataTable/Table.js +3 -3
  143. package/lib/components/DataTable/TableExpandHeader.js +5 -1
  144. package/lib/components/DataTable/TableExpandRow.d.ts +33 -5
  145. package/lib/components/DataTable/TableExpandRow.js +5 -2
  146. package/lib/components/DataTable/TableHeader.d.ts +1 -2
  147. package/lib/components/DataTable/TableHeader.js +3 -2
  148. package/lib/components/DataTable/TableRow.d.ts +3 -6
  149. package/lib/components/DataTable/TableRow.js +39 -21
  150. package/lib/components/DataTable/TableSlugRow.js +1 -0
  151. package/lib/components/DataTable/TableToolbarMenu.js +3 -0
  152. package/lib/components/DataTable/state/sorting.d.ts +57 -14
  153. package/lib/components/DataTable/state/sorting.js +41 -50
  154. package/lib/components/DataTable/tools/sorting.js +5 -0
  155. package/lib/components/DatePicker/DatePicker.js +14 -3
  156. package/lib/components/DatePickerInput/DatePickerInput.js +6 -0
  157. package/lib/components/Dialog/Dialog.js +10 -2
  158. package/lib/components/Dropdown/Dropdown.js +16 -4
  159. package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +1 -0
  160. package/lib/components/FileUploader/FileUploader.js +9 -2
  161. package/lib/components/FileUploader/FileUploaderButton.js +1 -1
  162. package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -1
  163. package/lib/components/FileUploader/FileUploaderItem.js +3 -0
  164. package/lib/components/FluidMultiSelect/FluidMultiSelect.js +2 -0
  165. package/lib/components/FluidNumberInput/FluidNumberInput.js +3 -2
  166. package/lib/components/FluidSearch/FluidSearch.js +3 -2
  167. package/lib/components/FluidSelect/FluidSelect.js +3 -2
  168. package/lib/components/FluidTextInput/FluidTextInput.js +3 -2
  169. package/lib/components/FluidTimePicker/FluidTimePicker.js +11 -4
  170. package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +3 -2
  171. package/lib/components/Grid/CSSGrid.js +5 -0
  172. package/lib/components/Grid/Column.js +3 -0
  173. package/lib/components/Grid/ColumnHang.js +1 -0
  174. package/lib/components/Grid/FlexGrid.js +1 -0
  175. package/lib/components/Grid/Row.js +1 -0
  176. package/lib/components/Heading/index.js +3 -1
  177. package/lib/components/IconButton/index.js +4 -2
  178. package/lib/components/IconIndicator/index.js +4 -2
  179. package/lib/components/InlineCheckbox/InlineCheckbox.js +3 -2
  180. package/lib/components/Layout/index.js +6 -4
  181. package/lib/components/LayoutDirection/LayoutDirection.js +2 -0
  182. package/lib/components/Link/Link.js +3 -0
  183. package/lib/components/ListBox/ListBoxMenuItem.js +4 -1
  184. package/lib/components/ListBox/next/ListBoxTrigger.js +3 -2
  185. package/lib/components/Menu/Menu.js +6 -9
  186. package/lib/components/Menu/MenuContext.js +1 -0
  187. package/lib/components/Menu/MenuItem.js +5 -13
  188. package/lib/components/MenuButton/index.js +7 -2
  189. package/lib/components/Modal/Modal.js +15 -6
  190. package/lib/components/ModalWrapper/ModalWrapper.js +2 -0
  191. package/lib/components/MultiSelect/FilterableMultiSelect.js +24 -5
  192. package/lib/components/MultiSelect/MultiSelect.js +21 -5
  193. package/lib/components/Notification/Notification.js +1 -1
  194. package/lib/components/NumberInput/NumberInput.js +17 -6
  195. package/lib/components/OverflowMenu/OverflowMenu.js +2 -0
  196. package/lib/components/OverflowMenu/next/index.js +3 -2
  197. package/lib/components/OverflowMenuItem/OverflowMenuItem.js +2 -0
  198. package/lib/components/PageHeader/PageHeader.d.ts +3 -3
  199. package/lib/components/PageHeader/PageHeader.js +22 -8
  200. package/lib/components/Pagination/Pagination.js +6 -2
  201. package/lib/components/PaginationNav/PaginationNav.js +2 -5
  202. package/lib/components/Popover/index.js +20 -6
  203. package/lib/components/ProgressBar/ProgressBar.js +4 -2
  204. package/lib/components/RadioTile/RadioTile.js +2 -2
  205. package/lib/components/Search/Search.js +2 -2
  206. package/lib/components/Select/Select.js +2 -3
  207. package/lib/components/ShapeIndicator/index.js +4 -2
  208. package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.d.ts +4 -4
  209. package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +1 -2
  210. package/lib/components/SkeletonText/SkeletonText.js +0 -2
  211. package/lib/components/Slider/Slider.js +11 -16
  212. package/lib/components/Stack/HStack.js +1 -0
  213. package/lib/components/Stack/Stack.js +6 -9
  214. package/lib/components/Stack/VStack.js +1 -0
  215. package/lib/components/StructuredList/StructuredList.js +3 -0
  216. package/lib/components/Switch/Switch.js +1 -1
  217. package/lib/components/Tabs/Tabs.js +28 -17
  218. package/lib/components/Tag/DismissibleTag.d.ts +5 -0
  219. package/lib/components/Tag/DismissibleTag.js +8 -1
  220. package/lib/components/Tag/OperationalTag.js +2 -0
  221. package/lib/components/Tag/SelectableTag.js +2 -0
  222. package/lib/components/Tag/Tag.js +4 -0
  223. package/lib/components/Tag/isEllipsisActive.js +1 -0
  224. package/lib/components/Text/Text.js +1 -0
  225. package/lib/components/TextInput/ControlledPasswordInput.js +2 -4
  226. package/lib/components/TextInput/PasswordInput.js +7 -2
  227. package/lib/components/TextInput/TextInput.js +4 -2
  228. package/lib/components/Theme/index.js +8 -3
  229. package/lib/components/Tile/Tile.js +14 -17
  230. package/lib/components/TimePicker/TimePicker.js +1 -0
  231. package/lib/components/Toggle/Toggle.js +1 -1
  232. package/lib/components/Toggletip/index.js +22 -7
  233. package/lib/components/Tooltip/DefinitionTooltip.js +1 -0
  234. package/lib/components/Tooltip/Tooltip.js +30 -23
  235. package/lib/components/TreeView/TreeNode.d.ts +28 -0
  236. package/lib/components/TreeView/TreeNode.js +19 -10
  237. package/lib/components/TreeView/TreeView.js +7 -0
  238. package/lib/components/UIShell/HeaderContainer.js +3 -1
  239. package/lib/components/UIShell/HeaderGlobalAction.js +2 -2
  240. package/lib/components/UIShell/HeaderMenu.js +3 -3
  241. package/lib/components/UIShell/HeaderPanel.js +2 -2
  242. package/lib/components/UIShell/Link.js +2 -0
  243. package/lib/components/UIShell/SideNavItems.js +1 -0
  244. package/lib/components/UIShell/SideNavMenu.js +2 -2
  245. package/lib/components/UIShell/SideNavMenuItem.js +1 -1
  246. package/lib/components/UIShell/SideNavSwitcher.js +1 -1
  247. package/lib/components/UIShell/Switcher.js +2 -1
  248. package/lib/components/UIShell/SwitcherItem.js +4 -2
  249. package/lib/internal/FloatingMenu.js +7 -1
  250. package/lib/internal/Selection.js +12 -3
  251. package/lib/internal/useMergedRefs.js +1 -0
  252. package/lib/internal/useNoInteractiveChildren.js +4 -0
  253. package/lib/internal/useOutsideClick.js +1 -0
  254. package/lib/internal/useOverflowItems.js +6 -0
  255. package/lib/internal/useResizeObserver.js +4 -0
  256. package/lib/internal/useSavedCallback.js +1 -0
  257. package/lib/internal/warning.js +1 -0
  258. package/lib/prop-types/isRequiredOneOf.js +4 -1
  259. package/lib/tools/events.js +3 -1
  260. package/lib/tools/wrapComponent.js +1 -0
  261. package/package.json +11 -11
  262. package/telemetry.yml +14 -0
@@ -23,7 +23,7 @@ import { isComponentElement } from '../../internal/utils.js';
23
23
  import { Text } from '../Text/Text.js';
24
24
 
25
25
  var _RadioButtonChecked, _RadioButton, _CheckmarkFilled;
26
- const RadioTile = /*#__PURE__*/React.forwardRef(function RadioTile({
26
+ const RadioTile = /*#__PURE__*/React.forwardRef(({
27
27
  children,
28
28
  className: customClassName,
29
29
  decorator,
@@ -39,7 +39,7 @@ const RadioTile = /*#__PURE__*/React.forwardRef(function RadioTile({
39
39
  slug,
40
40
  required,
41
41
  ...rest
42
- }, ref) {
42
+ }, ref) => {
43
43
  const prefix = usePrefix();
44
44
  const inputId = useFallbackId(id);
45
45
  const className = cx(customClassName, `${prefix}--tile`, `${prefix}--tile--selectable`, `${prefix}--tile--radio`, {
@@ -22,7 +22,7 @@ import { FormContext } from '../FluidForm/FormContext.js';
22
22
  import { noopFn } from '../../internal/noopFn.js';
23
23
 
24
24
  var _Close;
25
- const Search = /*#__PURE__*/React.forwardRef(function Search({
25
+ const Search = /*#__PURE__*/React.forwardRef(({
26
26
  autoComplete = 'off',
27
27
  className,
28
28
  closeButtonLabelText = 'Clear search input',
@@ -44,7 +44,7 @@ const Search = /*#__PURE__*/React.forwardRef(function Search({
44
44
  type = 'text',
45
45
  value,
46
46
  ...rest
47
- }, forwardRef) {
47
+ }, forwardRef) => {
48
48
  const hasPropValue = value || defaultValue ? true : false;
49
49
  const prefix = usePrefix();
50
50
  const {
@@ -21,7 +21,7 @@ import { AILabel } from '../AILabel/index.js';
21
21
  import { isComponentElement } from '../../internal/utils.js';
22
22
  import { Text } from '../Text/Text.js';
23
23
 
24
- const Select = /*#__PURE__*/React.forwardRef(function Select({
24
+ const Select = /*#__PURE__*/React.forwardRef(({
25
25
  className,
26
26
  decorator,
27
27
  id,
@@ -31,7 +31,6 @@ const Select = /*#__PURE__*/React.forwardRef(function Select({
31
31
  children,
32
32
  // reserved for use with Pagination component
33
33
  noLabel = false,
34
- // eslint-disable-next-line no-unused-vars
35
34
  hideLabel = false,
36
35
  invalid = false,
37
36
  invalidText = '',
@@ -44,7 +43,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select({
44
43
  onChange,
45
44
  slug,
46
45
  ...other
47
- }, ref) {
46
+ }, ref) => {
48
47
  const prefix = usePrefix();
49
48
  const {
50
49
  isFluid
@@ -46,13 +46,15 @@ const shapeTypes = {
46
46
  incomplete: incompleteIcon,
47
47
  draft: CircleStroke
48
48
  };
49
- const ShapeIndicator = /*#__PURE__*/React.forwardRef(function ShapeIndicatorContent({
49
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
50
+ const ShapeIndicator = /*#__PURE__*/React.forwardRef(({
50
51
  className: customClassName,
51
52
  kind,
52
53
  label,
53
54
  textSize = 12,
55
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
54
56
  ...rest
55
- }, ref) {
57
+ }, ref) => {
56
58
  const prefix = usePrefix();
57
59
  const classNames = cx(`${prefix}--shape-indicator`, customClassName, {
58
60
  [`${prefix}--shape-indicator--14`]: textSize == 14
@@ -1,11 +1,12 @@
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 { type HTMLAttributes } from 'react';
7
8
  import PropTypes from 'prop-types';
8
- export interface SkeletonPlaceholderProps {
9
+ export interface SkeletonPlaceholderProps extends HTMLAttributes<HTMLDivElement> {
9
10
  /**
10
11
  * Add a custom class to the component to set the height and width
11
12
  */
@@ -15,8 +16,7 @@ declare const SkeletonPlaceholder: {
15
16
  ({ className, ...other }: SkeletonPlaceholderProps): import("react/jsx-runtime").JSX.Element;
16
17
  propTypes: {
17
18
  /**
18
- * Add a custom class to the component
19
- * to set the height and width
19
+ * Add a custom class to the component to set the height and width
20
20
  */
21
21
  className: PropTypes.Requireable<string>;
22
22
  };
@@ -25,8 +25,7 @@ const SkeletonPlaceholder = ({
25
25
  };
26
26
  SkeletonPlaceholder.propTypes = {
27
27
  /**
28
- * Add a custom class to the component
29
- * to set the height and width
28
+ * Add a custom class to the component to set the height and width
30
29
  */
31
30
  className: PropTypes.string
32
31
  };
@@ -66,8 +66,6 @@ const SkeletonText = ({
66
66
  if (lineCountNumber !== 1) {
67
67
  return /*#__PURE__*/React.createElement("div", null, lines);
68
68
  }
69
-
70
- // eslint-disable-next-line react/jsx-no-useless-fragment
71
69
  return /*#__PURE__*/React.createElement(React.Fragment, null, lines);
72
70
  };
73
71
  SkeletonText.propTypes = {
@@ -31,23 +31,15 @@ const ThumbWrapper = ({
31
31
  ...rest
32
32
  }) => {
33
33
  if (hasTooltip) {
34
- return (
35
- /*#__PURE__*/
36
- // eslint-disable-next-line react/forbid-component-props
37
- React.createElement(Tooltip, _extends({
38
- className: className,
39
- style: style
40
- }, rest), children)
41
- );
34
+ return /*#__PURE__*/React.createElement(Tooltip, _extends({
35
+ className: className,
36
+ style: style
37
+ }, rest), children);
42
38
  } else {
43
- return (
44
- /*#__PURE__*/
45
- // eslint-disable-next-line react/forbid-dom-props
46
- React.createElement("div", {
47
- className: className,
48
- style: style
49
- }, children)
50
- );
39
+ return /*#__PURE__*/React.createElement("div", {
40
+ className: className,
41
+ style: style
42
+ }, children);
51
43
  }
52
44
  };
53
45
  const translationIds = {
@@ -883,6 +875,7 @@ class Slider extends PureComponent {
883
875
  hideLabel,
884
876
  step = 1,
885
877
  // TODO: Other properties are deleted below. Why isn't this one?
878
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
886
879
  stepMultiplier: _stepMultiplier,
887
880
  inputType = 'number',
888
881
  invalidText,
@@ -912,9 +905,11 @@ class Slider extends PureComponent {
912
905
  } = this.state;
913
906
  const showWarning = !readOnly && warn ||
914
907
  // TODO: https://github.com/carbon-design-system/carbon/issues/18991#issuecomment-2795709637
908
+ // eslint-disable-next-line valid-typeof , no-constant-binary-expression -- https://github.com/carbon-design-system/carbon/issues/20071
915
909
  typeof correctedValue !== null && correctedPosition === HandlePosition.LOWER && isValid;
916
910
  const showWarningUpper = !readOnly && warn ||
917
911
  // TODO: https://github.com/carbon-design-system/carbon/issues/18991#issuecomment-2795709637
912
+ // eslint-disable-next-line valid-typeof, no-constant-binary-expression -- https://github.com/carbon-design-system/carbon/issues/20071
918
913
  typeof correctedValue !== null && correctedPosition === (twoHandles ? HandlePosition.UPPER : HandlePosition.LOWER) && (twoHandles ? isValidUpper : isValid);
919
914
  return /*#__PURE__*/React.createElement(PrefixContext.Consumer, null, prefix => {
920
915
  const labelId = `${id}-label`;
@@ -9,6 +9,7 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
9
9
  import React, { forwardRef } from 'react';
10
10
  import { Stack } from './Stack.js';
11
11
 
12
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
12
13
  const HStack = /*#__PURE__*/forwardRef((props, ref) => {
13
14
  return /*#__PURE__*/React.createElement(Stack, _extends({}, props, {
14
15
  ref: ref,
@@ -35,6 +35,7 @@ const SPACING_STEPS = Array.from({
35
35
  * - https://paste.twilio.design/layout/stack/
36
36
  * - https://github.com/Workday/canvas-kit/blob/f2f599654876700f483a1d8c5de82a41315c76f1/modules/labs-react/layout/lib/Stack.tsx
37
37
  */
38
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
38
39
  const Stack = /*#__PURE__*/forwardRef((props, ref) => {
39
40
  const {
40
41
  as: BaseComponent = 'div',
@@ -55,15 +56,11 @@ const Stack = /*#__PURE__*/forwardRef((props, ref) => {
55
56
  if (typeof gap === 'string') {
56
57
  style[`--${prefix}-stack-gap`] = gap;
57
58
  }
58
- return (
59
- /*#__PURE__*/
60
- // eslint-disable-next-line react/forbid-component-props
61
- React.createElement(BaseComponent, _extends({}, rest, {
62
- ref: ref,
63
- className: className,
64
- style: style
65
- }), children)
66
- );
59
+ return /*#__PURE__*/React.createElement(BaseComponent, _extends({}, rest, {
60
+ ref: ref,
61
+ className: className,
62
+ style: style
63
+ }), children);
67
64
  });
68
65
  Stack.propTypes = {
69
66
  /**
@@ -9,6 +9,7 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
9
9
  import React, { forwardRef } from 'react';
10
10
  import { Stack } from './Stack.js';
11
11
 
12
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
12
13
  const VStack = /*#__PURE__*/forwardRef((props, ref) => {
13
14
  return /*#__PURE__*/React.createElement(Stack, _extends({}, props, {
14
15
  ref: ref,
@@ -150,6 +150,7 @@ function StructuredListRow(props) {
150
150
  ...other
151
151
  } = props;
152
152
  const [hasFocusWithin, setHasFocusWithin] = useState(false);
153
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
153
154
  const rowId = id ?? useId('grid-input');
154
155
  const selectedRow = React.useContext(GridSelectedRowStateContext);
155
156
  const setSelectedRow = React.useContext(GridSelectedRowDispatchContext);
@@ -183,6 +184,7 @@ function StructuredListRow(props) {
183
184
  ref: itemRef,
184
185
  onClick: event => {
185
186
  setSelectedRow?.(rowId);
187
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20071
186
188
  onClick && onClick(event);
187
189
  if (selection) {
188
190
  // focus items only when selection is enabled
@@ -262,6 +264,7 @@ function StructuredListInput(props) {
262
264
  value: row?.id ?? '',
263
265
  onChange: event => {
264
266
  setSelectedRow?.(event.target.value);
267
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20071
265
268
  onChange && onChange(event);
266
269
  },
267
270
  id: id ?? defaultId,
@@ -12,7 +12,7 @@ import cx from 'classnames';
12
12
  import { usePrefix } from '../../internal/usePrefix.js';
13
13
  import { noopFn } from '../../internal/noopFn.js';
14
14
 
15
- const Switch = /*#__PURE__*/React.forwardRef(function Switch(props, tabRef) {
15
+ const Switch = /*#__PURE__*/React.forwardRef((props, tabRef) => {
16
16
  const {
17
17
  children,
18
18
  className,
@@ -78,6 +78,7 @@ function Tabs({
78
78
  }) {
79
79
  const baseId = useId('ccs');
80
80
  if (dismissable && !onTabCloseRequest) {
81
+ // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
81
82
  console.error('dismissable property specified without also providing an onTabCloseRequest property.');
82
83
  }
83
84
  // The active index is used to track the element which has focus in our tablist
@@ -164,15 +165,11 @@ function TabsVertical({
164
165
  };
165
166
  const isSm = useMatchMedia(smMediaQuery);
166
167
  if (!isSm) {
167
- return (
168
- /*#__PURE__*/
169
- // eslint-disable-next-line react/forbid-component-props
170
- React.createElement(GridAsGridComponent, {
171
- style: {
172
- height: height
173
- }
174
- }, /*#__PURE__*/React.createElement(Tabs, props, children))
175
- );
168
+ return /*#__PURE__*/React.createElement(GridAsGridComponent, {
169
+ style: {
170
+ height: height
171
+ }
172
+ }, /*#__PURE__*/React.createElement(Tabs, props, children));
176
173
  }
177
174
  return /*#__PURE__*/React.createElement(Tabs, props, children);
178
175
  }
@@ -276,6 +273,7 @@ function TabList({
276
273
  let hasSecondaryLabelTabs = false;
277
274
  if (contained) {
278
275
  hasSecondaryLabelTabs = React.Children.toArray(children).some(child => {
276
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
279
277
  const _child = child;
280
278
  return /*#__PURE__*/React.isValidElement(child) && !!_child.props.secondaryLabel;
281
279
  });
@@ -389,6 +387,7 @@ function TabList({
389
387
  inline: 'nearest'
390
388
  });
391
389
  }
390
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
392
391
  }, []);
393
392
  useEffect(() => {
394
393
  //adding 1 in calculation for firefox support
@@ -409,6 +408,7 @@ function TabList({
409
408
  setSelectedIndex(tabs.current.indexOf(tab));
410
409
  }
411
410
  }
411
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
412
412
  }, []);
413
413
  useIsomorphicEffect(() => {
414
414
  if (ref.current) {
@@ -495,7 +495,9 @@ function TabList({
495
495
  hasSecondaryLabel: hasSecondaryLabelTabs,
496
496
  contained
497
497
  }
498
- }, /*#__PURE__*/React.cloneElement(child, {
498
+ }, /*#__PURE__*/React.cloneElement(
499
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
500
+ child, {
499
501
  ref: node => {
500
502
  tabs.current[index] = node;
501
503
  }
@@ -629,6 +631,7 @@ function TabListVertical({
629
631
  setSelectedIndex(tabs.current.indexOf(tab));
630
632
  }
631
633
  }
634
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
632
635
  }, []);
633
636
  useEffect(() => {
634
637
  function handler() {
@@ -639,6 +642,7 @@ function TabListVertical({
639
642
  if (containerTop && containerHeight) {
640
643
  // scrolls so selected tab is in view
641
644
  if (selectedPositionTop - halfTabHeight < containerTop || selectedPositionTop - containerTop + verticalTabHeight + halfTabHeight > containerHeight) {
645
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20071
642
646
  ref.current && ref.current.scrollTo({
643
647
  top: (selectedIndex - 1) * verticalTabHeight,
644
648
  behavior: 'smooth'
@@ -693,7 +697,9 @@ function TabListVertical({
693
697
  index,
694
698
  hasSecondaryLabel: false
695
699
  }
696
- }, /*#__PURE__*/React.cloneElement(child, {
700
+ }, /*#__PURE__*/React.cloneElement(
701
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
702
+ child, {
697
703
  ref: node => {
698
704
  tabs.current[index] = node;
699
705
  }
@@ -769,7 +775,8 @@ function createLongPressBehavior(ref, direction, setScrollLeft) {
769
775
  * Tab
770
776
  */
771
777
 
772
- const Tab = /*#__PURE__*/forwardRef(function Tab({
778
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
779
+ const Tab = /*#__PURE__*/forwardRef(({
773
780
  as = 'button',
774
781
  children,
775
782
  className: customClassName,
@@ -779,7 +786,7 @@ const Tab = /*#__PURE__*/forwardRef(function Tab({
779
786
  secondaryLabel,
780
787
  renderIcon: Icon,
781
788
  ...rest
782
- }, forwardRef) {
789
+ }, forwardRef) => {
783
790
  const prefix = usePrefix();
784
791
  const {
785
792
  selectedIndex,
@@ -803,6 +810,8 @@ const Tab = /*#__PURE__*/forwardRef(function Tab({
803
810
  const id = `${baseId}-tab-${index}`;
804
811
  const panelId = `${baseId}-tabpanel-${index}`;
805
812
  const [isEllipsisApplied, setIsEllipsisApplied] = useState(false);
813
+
814
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
806
815
  const isEllipsisActive = element => {
807
816
  setIsEllipsisApplied(element.offsetHeight < element.scrollHeight);
808
817
  return element.offsetHeight < element.scrollHeight;
@@ -1022,7 +1031,8 @@ Tab.propTypes = {
1022
1031
  */
1023
1032
 
1024
1033
  const IconTabContext = /*#__PURE__*/createContext(false);
1025
- const IconTab = /*#__PURE__*/React.forwardRef(function IconTab({
1034
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
1035
+ const IconTab = /*#__PURE__*/React.forwardRef(({
1026
1036
  badgeIndicator,
1027
1037
  children,
1028
1038
  className: customClassName,
@@ -1031,7 +1041,7 @@ const IconTab = /*#__PURE__*/React.forwardRef(function IconTab({
1031
1041
  leaveDelayMs,
1032
1042
  label,
1033
1043
  ...rest
1034
- }, ref) {
1044
+ }, ref) => {
1035
1045
  const prefix = usePrefix();
1036
1046
  const value = useMemo(() => ({
1037
1047
  badgeIndicator
@@ -1093,11 +1103,12 @@ IconTab.propTypes = {
1093
1103
  * TabPanel
1094
1104
  */
1095
1105
 
1096
- const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel({
1106
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
1107
+ const TabPanel = /*#__PURE__*/React.forwardRef(({
1097
1108
  children,
1098
1109
  className: customClassName,
1099
1110
  ...rest
1100
- }, forwardRef) {
1111
+ }, forwardRef) => {
1101
1112
  const prefix = usePrefix();
1102
1113
  const panel = useRef(null);
1103
1114
  const ref = useMergedRefs([forwardRef, panel]);
@@ -7,6 +7,7 @@
7
7
  import React, { type ReactNode } from 'react';
8
8
  import { PolymorphicProps } from '../../types/common';
9
9
  import { SIZES, TYPES } from './Tag';
10
+ import { PopoverAlignment } from '../Popover';
10
11
  export interface DismissibleTagBaseProps {
11
12
  /**
12
13
  * Provide a custom className that is applied to the containing <span>
@@ -20,6 +21,10 @@ export interface DismissibleTagBaseProps {
20
21
  * Specify if the `DismissibleTag` is disabled
21
22
  */
22
23
  disabled?: boolean;
24
+ /**
25
+ * Specify the tooltip alignment for the dismiss button
26
+ */
27
+ dismissTooltipAlignment?: PopoverAlignment;
23
28
  /**
24
29
  * Provide a custom tooltip label for the dismiss button
25
30
  */
@@ -24,6 +24,7 @@ import { isComponentElement } from '../../internal/utils.js';
24
24
  import { Text } from '../Text/Text.js';
25
25
 
26
26
  var _Close;
27
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
27
28
  const DismissibleTag = /*#__PURE__*/forwardRef(({
28
29
  className,
29
30
  decorator,
@@ -37,11 +38,13 @@ const DismissibleTag = /*#__PURE__*/forwardRef(({
37
38
  text,
38
39
  tagTitle,
39
40
  type,
41
+ dismissTooltipAlignment = 'bottom',
40
42
  dismissTooltipLabel = 'Dismiss tag',
41
43
  ...other
42
44
  }, forwardRef) => {
43
45
  const prefix = usePrefix();
44
46
  const tagLabelRef = useRef(null);
47
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
45
48
  const tagId = id || `tag-${useId()}`;
46
49
  const tagClasses = cx(`${prefix}--tag--filter`, className);
47
50
  const [isEllipsisApplied, setIsEllipsisApplied] = useState(false);
@@ -88,7 +91,7 @@ const DismissibleTag = /*#__PURE__*/forwardRef(({
88
91
  className: `${prefix}--tag__decorator`
89
92
  }, normalizedDecorator) : '', /*#__PURE__*/React.createElement(Tooltip, {
90
93
  label: dismissActionLabel,
91
- align: "bottom",
94
+ align: dismissTooltipAlignment,
92
95
  className: tooltipClasses,
93
96
  leaveDelayMs: 0,
94
97
  closeOnActivation: true
@@ -113,6 +116,10 @@ DismissibleTag.propTypes = {
113
116
  * Specify if the `DismissibleTag` is disabled
114
117
  */
115
118
  disabled: PropTypes.bool,
119
+ /**
120
+ * Specify the tooltip alignment for the dismiss button
121
+ */
122
+ dismissTooltipAlignment: PropTypes.oneOf(['top', 'bottom', 'left', 'right', 'top-start', 'top-end', 'bottom-start', 'bottom-end', 'left-end', 'left-start', 'right-end', 'right-start']),
116
123
  /**
117
124
  * Provide a custom tooltip label for the dismiss button
118
125
  */
@@ -31,6 +31,7 @@ const TYPES = {
31
31
  'cool-gray': 'Cool-Gray',
32
32
  'warm-gray': 'Warm-Gray'
33
33
  };
34
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
34
35
  const OperationalTag = /*#__PURE__*/forwardRef(({
35
36
  className,
36
37
  disabled,
@@ -43,6 +44,7 @@ const OperationalTag = /*#__PURE__*/forwardRef(({
43
44
  }, forwardRef) => {
44
45
  const prefix = usePrefix();
45
46
  const tagRef = useRef(null);
47
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
46
48
  const tagId = id || `tag-${useId()}`;
47
49
  const tagClasses = cx(`${prefix}--tag--operational`, className);
48
50
  const [isEllipsisApplied, setIsEllipsisApplied] = useState(false);
@@ -20,6 +20,7 @@ import mergeRefs from '../../tools/mergeRefs.js';
20
20
  import { useControllableState } from '../../internal/useControllableState.js';
21
21
  import { Text } from '../Text/Text.js';
22
22
 
23
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
23
24
  const SelectableTag = /*#__PURE__*/forwardRef(({
24
25
  className,
25
26
  disabled,
@@ -35,6 +36,7 @@ const SelectableTag = /*#__PURE__*/forwardRef(({
35
36
  }, forwardRef) => {
36
37
  const prefix = usePrefix();
37
38
  const tagRef = useRef(null);
39
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
38
40
  const tagId = id || `tag-${useId()}`;
39
41
  const [selectedTag, setSelectedTag] = useControllableState({
40
42
  value: selected,
@@ -42,6 +42,7 @@ const SIZES = {
42
42
  md: 'md',
43
43
  lg: 'lg'
44
44
  };
45
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
45
46
  const TagBase = /*#__PURE__*/React.forwardRef(({
46
47
  children,
47
48
  className,
@@ -64,12 +65,15 @@ const TagBase = /*#__PURE__*/React.forwardRef(({
64
65
  const prefix = usePrefix();
65
66
  const tagRef = useRef(null);
66
67
  if (filter) {
68
+ // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
67
69
  console.warn('The `filter` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead.');
68
70
  }
69
71
  if (onClose) {
72
+ // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
70
73
  console.warn('The `onClose` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead.');
71
74
  }
72
75
  const ref = useMergedRefs([forwardRef, tagRef]);
76
+ // eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
73
77
  const tagId = id || `tag-${useId()}`;
74
78
  const [isEllipsisApplied, setIsEllipsisApplied] = useState(false);
75
79
  useLayoutEffect(() => {
@@ -5,6 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
8
9
  const isEllipsisActive = element => {
9
10
  if (element) {
10
11
  return element?.offsetWidth < element?.scrollWidth;
@@ -11,6 +11,7 @@ import React, { useContext, Children } from 'react';
11
11
  import './index.js';
12
12
  import { TextDirectionContext } from './TextDirectionContext.js';
13
13
 
14
+ // eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
14
15
  const TextBase = /*#__PURE__*/React.forwardRef(({
15
16
  as,
16
17
  children,
@@ -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(function ControlledPasswordInput({
19
+ const ControlledPasswordInput = /*#__PURE__*/React.forwardRef(({
20
20
  labelText,
21
21
  className,
22
22
  id,
@@ -29,9 +29,7 @@ const ControlledPasswordInput = /*#__PURE__*/React.forwardRef(function Controlle
29
29
  invalidText = '',
30
30
  helperText = '',
31
31
  light,
32
- // eslint-disable-next-line react/prop-types
33
32
  type = 'password',
34
- // eslint-disable-next-line react/prop-types
35
33
  togglePasswordVisibility,
36
34
  tooltipPosition = 'bottom',
37
35
  tooltipAlignment = 'center',
@@ -39,7 +37,7 @@ const ControlledPasswordInput = /*#__PURE__*/React.forwardRef(function Controlle
39
37
  showPasswordLabel = 'Show password',
40
38
  size = undefined,
41
39
  ...other
42
- }, ref) {
40
+ }, ref) => {
43
41
  const prefix = usePrefix();
44
42
  const controlledPasswordInstanceId = useId();
45
43
  const errorId = id + '-error-msg';
@@ -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(function PasswordInput({
22
+ const PasswordInput = /*#__PURE__*/React.forwardRef(({
23
23
  className,
24
24
  disabled = false,
25
25
  helperText,
@@ -44,7 +44,7 @@ const PasswordInput = /*#__PURE__*/React.forwardRef(function PasswordInput({
44
44
  warn = false,
45
45
  warnText,
46
46
  ...rest
47
- }, ref) {
47
+ }, ref) => {
48
48
  const [inputType, setInputType] = useState(type);
49
49
  const prefix = usePrefix();
50
50
  const normalizedProps = useNormalizedInputProps({
@@ -61,6 +61,7 @@ const PasswordInput = /*#__PURE__*/React.forwardRef(function PasswordInput({
61
61
  } = useContext(FormContext);
62
62
  const handleTogglePasswordVisibility = event => {
63
63
  setInputType(inputType === 'password' ? 'text' : 'password');
64
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20071
64
65
  onTogglePasswordVisibility && onTogglePasswordVisibility(event);
65
66
  };
66
67
  const textInputClasses = cx(`${prefix}--text-input`, `${prefix}--password-input`, className, {
@@ -150,8 +151,10 @@ const PasswordInput = /*#__PURE__*/React.forwardRef(function PasswordInput({
150
151
  align = tooltipPosition;
151
152
  }
152
153
  if (!hidePasswordLabel || hidePasswordLabel.trim() === '') {
154
+ // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
153
155
  console.warn('Warning: The "hidePasswordLabel" should not be blank.');
154
156
  } else if (!showPasswordLabel || showPasswordLabel.trim() === '') {
157
+ // eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
155
158
  console.warn('Warning: The "showPasswordLabel" should not be blank.');
156
159
  }
157
160
  const input = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", _extends({}, textInputProps({
@@ -180,6 +183,8 @@ const PasswordInput = /*#__PURE__*/React.forwardRef(function PasswordInput({
180
183
  useEffect(() => {
181
184
  setInputType(type);
182
185
  }, [type]);
186
+
187
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
183
188
  const Icon = normalizedProps.icon;
184
189
  return /*#__PURE__*/React.createElement("div", {
185
190
  className: inputWrapperClasses
@@ -21,7 +21,7 @@ import { AILabel } from '../AILabel/index.js';
21
21
  import { isComponentElement } from '../../internal/utils.js';
22
22
  import { Text } from '../Text/Text.js';
23
23
 
24
- const TextInput = /*#__PURE__*/React.forwardRef(function TextInput({
24
+ const TextInput = /*#__PURE__*/React.forwardRef(({
25
25
  className,
26
26
  decorator,
27
27
  disabled = false,
@@ -45,7 +45,7 @@ const TextInput = /*#__PURE__*/React.forwardRef(function TextInput({
45
45
  maxCount,
46
46
  slug,
47
47
  ...rest
48
- }, ref) {
48
+ }, ref) => {
49
49
  const prefix = usePrefix();
50
50
  const {
51
51
  defaultValue,
@@ -60,6 +60,7 @@ const TextInput = /*#__PURE__*/React.forwardRef(function TextInput({
60
60
  const [textCount, setTextCount] = useState(getInitialTextCount());
61
61
  useEffect(() => {
62
62
  setTextCount(getInitialTextCount());
63
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
63
64
  }, [value, defaultValue, enableCounter]);
64
65
  const normalizedProps = useNormalizedInputProps({
65
66
  id,
@@ -188,6 +189,7 @@ const TextInput = /*#__PURE__*/React.forwardRef(function TextInput({
188
189
  }
189
190
  }
190
191
  }, [ariaAnnouncement, prevAnnouncement]);
192
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
191
193
  const Icon = normalizedProps.icon;
192
194
 
193
195
  // AILabel is always size `mini`