@carbon/react 1.85.0 → 1.86.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 (191) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +797 -797
  2. package/es/components/AILabel/index.js +1 -1
  3. package/es/components/Accordion/AccordionItem.d.ts +1 -1
  4. package/es/components/Accordion/AccordionItem.js +1 -1
  5. package/es/components/Checkbox/Checkbox.js +1 -1
  6. package/es/components/CheckboxGroup/CheckboxGroup.js +1 -1
  7. package/es/components/CodeSnippet/CodeSnippet.d.ts +2 -2
  8. package/es/components/CodeSnippet/CodeSnippet.js +1 -1
  9. package/es/components/ComboBox/ComboBox.js +1 -1
  10. package/es/components/ComposedModal/ComposedModal.js +1 -1
  11. package/es/components/ContentSwitcher/ContentSwitcher.d.ts +1 -1
  12. package/es/components/ContentSwitcher/ContentSwitcher.js +1 -1
  13. package/es/components/DataTable/DataTable.d.ts +230 -170
  14. package/es/components/DataTable/DataTable.js +508 -519
  15. package/es/components/DataTable/TableContainer.d.ts +9 -1
  16. package/es/components/DataTable/TableContainer.js +7 -1
  17. package/es/components/DataTable/TableExpandHeader.d.ts +1 -1
  18. package/es/components/DataTable/TableExpandHeader.js +1 -1
  19. package/es/components/DataTable/TableSelectAll.d.ts +2 -2
  20. package/es/components/DataTable/TableSelectAll.js +1 -1
  21. package/es/components/DataTable/TableSelectRow.d.ts +2 -2
  22. package/es/components/DataTable/TableSelectRow.js +1 -1
  23. package/es/components/DataTable/TableToolbar.d.ts +1 -1
  24. package/es/components/DataTable/TableToolbar.js +1 -1
  25. package/es/components/DataTable/TableToolbarMenu.d.ts +2 -18
  26. package/es/components/DataTable/TableToolbarMenu.js +0 -1
  27. package/es/components/DataTable/index.d.ts +1 -1
  28. package/es/components/DataTable/state/getDerivedStateFromProps.js +5 -1
  29. package/es/components/DatePicker/DatePicker.js +1 -1
  30. package/es/components/DatePickerInput/DatePickerInput.js +1 -1
  31. package/es/components/Dropdown/Dropdown.js +1 -1
  32. package/es/components/FeatureFlags/index.d.ts +2 -2
  33. package/es/components/FeatureFlags/index.js +1 -1
  34. package/es/components/FileUploader/FileUploaderButton.d.ts +1 -1
  35. package/es/components/FileUploader/FileUploaderButton.js +1 -1
  36. package/es/components/FileUploader/FileUploaderDropContainer.d.ts +2 -2
  37. package/es/components/FileUploader/FileUploaderDropContainer.js +1 -1
  38. package/es/components/FluidTextArea/FluidTextArea.d.ts +1 -1
  39. package/es/components/FluidTextArea/FluidTextArea.js +1 -1
  40. package/es/components/InlineCheckbox/InlineCheckbox.js +1 -1
  41. package/es/components/ListBox/ListBox.js +1 -1
  42. package/es/components/Loading/Loading.d.ts +1 -1
  43. package/es/components/Loading/Loading.js +1 -1
  44. package/es/components/Menu/Menu.js +1 -1
  45. package/es/components/Modal/Modal.js +1 -1
  46. package/es/components/MultiSelect/FilterableMultiSelect.js +1 -1
  47. package/es/components/MultiSelect/MultiSelect.js +1 -1
  48. package/es/components/Notification/Notification.d.ts +4 -4
  49. package/es/components/Notification/Notification.js +1 -1
  50. package/es/components/NumberInput/NumberInput.d.ts +7 -0
  51. package/es/components/NumberInput/NumberInput.js +80 -25
  52. package/es/components/OverflowMenu/OverflowMenu.d.ts +2 -6
  53. package/es/components/OverflowMenu/OverflowMenu.js +1 -1
  54. package/es/components/Pagination/Pagination.js +22 -5
  55. package/es/components/RadioButton/RadioButton.js +1 -1
  56. package/es/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  57. package/es/components/RadioTile/RadioTile.js +1 -1
  58. package/es/components/Search/Search.js +1 -1
  59. package/es/components/Select/Select.js +1 -1
  60. package/es/components/Slider/Slider.js +1 -1
  61. package/es/components/StructuredList/StructuredList.d.ts +5 -5
  62. package/es/components/StructuredList/StructuredList.js +1 -1
  63. package/es/components/Tabs/Tabs.d.ts +1 -1
  64. package/es/components/Tabs/Tabs.js +1 -1
  65. package/es/components/Tag/DismissibleTag.js +1 -1
  66. package/es/components/Tag/Tag.js +1 -1
  67. package/es/components/TextArea/TextArea.js +1 -1
  68. package/es/components/TextInput/ControlledPasswordInput.js +1 -1
  69. package/es/components/TextInput/PasswordInput.js +1 -1
  70. package/es/components/TextInput/TextInput.js +1 -1
  71. package/es/components/Tile/Tile.js +1 -1
  72. package/es/components/TileGroup/TileGroup.d.ts +5 -5
  73. package/es/components/TimePicker/TimePicker.d.ts +8 -0
  74. package/es/components/TimePicker/TimePicker.js +6 -4
  75. package/es/components/Tooltip/DefinitionTooltip.d.ts +1 -1
  76. package/es/components/Tooltip/DefinitionTooltip.js +1 -1
  77. package/es/components/TreeView/TreeContext.d.ts +19 -0
  78. package/es/components/TreeView/TreeContext.js +13 -0
  79. package/es/components/TreeView/TreeNode.d.ts +4 -4
  80. package/es/components/TreeView/TreeNode.js +56 -108
  81. package/es/components/TreeView/TreeView.js +42 -79
  82. package/es/components/UIShell/HeaderMenu.js +1 -1
  83. package/es/components/UIShell/HeaderMenuItem.d.ts +1 -1
  84. package/es/components/UIShell/HeaderMenuItem.js +1 -1
  85. package/es/components/UIShell/HeaderName.d.ts +1 -1
  86. package/es/components/UIShell/HeaderPanel.js +5 -7
  87. package/es/components/UIShell/Link.d.ts +2 -2
  88. package/es/components/UIShell/Link.js +1 -1
  89. package/es/components/UIShell/Switcher.d.ts +1 -1
  90. package/es/components/UIShell/Switcher.js +39 -12
  91. package/es/index.js +1 -1
  92. package/es/internal/useNoInteractiveChildren.d.ts +25 -0
  93. package/es/internal/useNoInteractiveChildren.js +39 -32
  94. package/es/prop-types/deprecate.d.ts +17 -0
  95. package/es/prop-types/deprecate.js +22 -12
  96. package/lib/components/AILabel/index.js +2 -2
  97. package/lib/components/Accordion/AccordionItem.d.ts +1 -1
  98. package/lib/components/Accordion/AccordionItem.js +1 -1
  99. package/lib/components/Checkbox/Checkbox.js +1 -1
  100. package/lib/components/CheckboxGroup/CheckboxGroup.js +1 -1
  101. package/lib/components/CodeSnippet/CodeSnippet.d.ts +2 -2
  102. package/lib/components/CodeSnippet/CodeSnippet.js +2 -2
  103. package/lib/components/ComboBox/ComboBox.js +3 -3
  104. package/lib/components/ComposedModal/ComposedModal.js +1 -1
  105. package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +1 -1
  106. package/lib/components/ContentSwitcher/ContentSwitcher.js +1 -1
  107. package/lib/components/DataTable/DataTable.d.ts +230 -170
  108. package/lib/components/DataTable/DataTable.js +507 -518
  109. package/lib/components/DataTable/TableContainer.d.ts +9 -1
  110. package/lib/components/DataTable/TableContainer.js +7 -1
  111. package/lib/components/DataTable/TableExpandHeader.d.ts +1 -1
  112. package/lib/components/DataTable/TableExpandHeader.js +1 -1
  113. package/lib/components/DataTable/TableSelectAll.d.ts +2 -2
  114. package/lib/components/DataTable/TableSelectAll.js +1 -1
  115. package/lib/components/DataTable/TableSelectRow.d.ts +2 -2
  116. package/lib/components/DataTable/TableSelectRow.js +1 -1
  117. package/lib/components/DataTable/TableToolbar.d.ts +1 -1
  118. package/lib/components/DataTable/TableToolbar.js +1 -1
  119. package/lib/components/DataTable/TableToolbarMenu.d.ts +2 -18
  120. package/lib/components/DataTable/TableToolbarMenu.js +0 -1
  121. package/lib/components/DataTable/index.d.ts +1 -1
  122. package/lib/components/DataTable/state/getDerivedStateFromProps.js +5 -1
  123. package/lib/components/DatePicker/DatePicker.js +1 -1
  124. package/lib/components/DatePickerInput/DatePickerInput.js +1 -1
  125. package/lib/components/Dropdown/Dropdown.js +3 -3
  126. package/lib/components/FeatureFlags/index.d.ts +2 -2
  127. package/lib/components/FeatureFlags/index.js +1 -1
  128. package/lib/components/FileUploader/FileUploaderButton.d.ts +1 -1
  129. package/lib/components/FileUploader/FileUploaderButton.js +1 -1
  130. package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +2 -2
  131. package/lib/components/FileUploader/FileUploaderDropContainer.js +2 -2
  132. package/lib/components/FluidTextArea/FluidTextArea.d.ts +1 -1
  133. package/lib/components/FluidTextArea/FluidTextArea.js +1 -1
  134. package/lib/components/InlineCheckbox/InlineCheckbox.js +1 -1
  135. package/lib/components/ListBox/ListBox.js +1 -1
  136. package/lib/components/Loading/Loading.d.ts +1 -1
  137. package/lib/components/Loading/Loading.js +1 -1
  138. package/lib/components/Menu/Menu.js +1 -1
  139. package/lib/components/Modal/Modal.js +1 -1
  140. package/lib/components/MultiSelect/FilterableMultiSelect.js +4 -4
  141. package/lib/components/MultiSelect/MultiSelect.js +2 -2
  142. package/lib/components/Notification/Notification.d.ts +4 -4
  143. package/lib/components/Notification/Notification.js +4 -4
  144. package/lib/components/NumberInput/NumberInput.d.ts +7 -0
  145. package/lib/components/NumberInput/NumberInput.js +81 -26
  146. package/lib/components/OverflowMenu/OverflowMenu.d.ts +2 -6
  147. package/lib/components/OverflowMenu/OverflowMenu.js +2 -2
  148. package/lib/components/Pagination/Pagination.js +21 -4
  149. package/lib/components/RadioButton/RadioButton.js +1 -1
  150. package/lib/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
  151. package/lib/components/RadioTile/RadioTile.js +2 -2
  152. package/lib/components/Search/Search.js +1 -1
  153. package/lib/components/Select/Select.js +2 -2
  154. package/lib/components/Slider/Slider.js +1 -1
  155. package/lib/components/StructuredList/StructuredList.d.ts +5 -5
  156. package/lib/components/StructuredList/StructuredList.js +4 -4
  157. package/lib/components/Tabs/Tabs.d.ts +1 -1
  158. package/lib/components/Tabs/Tabs.js +1 -1
  159. package/lib/components/Tag/DismissibleTag.js +1 -1
  160. package/lib/components/Tag/Tag.js +4 -4
  161. package/lib/components/TextArea/TextArea.js +2 -2
  162. package/lib/components/TextInput/ControlledPasswordInput.js +1 -1
  163. package/lib/components/TextInput/PasswordInput.js +1 -1
  164. package/lib/components/TextInput/TextInput.js +2 -2
  165. package/lib/components/Tile/Tile.js +9 -9
  166. package/lib/components/TileGroup/TileGroup.d.ts +5 -5
  167. package/lib/components/TimePicker/TimePicker.d.ts +8 -0
  168. package/lib/components/TimePicker/TimePicker.js +6 -4
  169. package/lib/components/Tooltip/DefinitionTooltip.d.ts +1 -1
  170. package/lib/components/Tooltip/DefinitionTooltip.js +1 -1
  171. package/lib/components/TreeView/TreeContext.d.ts +19 -0
  172. package/lib/components/TreeView/TreeContext.js +18 -0
  173. package/lib/components/TreeView/TreeNode.d.ts +4 -4
  174. package/lib/components/TreeView/TreeNode.js +55 -107
  175. package/lib/components/TreeView/TreeView.js +41 -78
  176. package/lib/components/UIShell/HeaderMenu.js +1 -1
  177. package/lib/components/UIShell/HeaderMenuItem.d.ts +1 -1
  178. package/lib/components/UIShell/HeaderMenuItem.js +1 -1
  179. package/lib/components/UIShell/HeaderName.d.ts +1 -1
  180. package/lib/components/UIShell/HeaderPanel.js +5 -7
  181. package/lib/components/UIShell/Link.d.ts +2 -2
  182. package/lib/components/UIShell/Link.js +1 -1
  183. package/lib/components/UIShell/Switcher.d.ts +1 -1
  184. package/lib/components/UIShell/Switcher.js +38 -11
  185. package/lib/index.js +1 -1
  186. package/lib/internal/useNoInteractiveChildren.d.ts +25 -0
  187. package/lib/internal/useNoInteractiveChildren.js +39 -32
  188. package/lib/prop-types/deprecate.d.ts +17 -0
  189. package/lib/prop-types/deprecate.js +22 -12
  190. package/package.json +3 -3
  191. package/telemetry.yml +15 -14
@@ -7,6 +7,10 @@
7
7
  import PropTypes from 'prop-types';
8
8
  import React, { type HTMLAttributes } from 'react';
9
9
  export interface TableContainerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
10
+ /**
11
+ * Specify if the entire table has AI generated contents
12
+ */
13
+ aiEnabled?: boolean;
10
14
  /**
11
15
  * Optional description text for the Table
12
16
  */
@@ -25,8 +29,12 @@ export interface TableContainerProps extends Omit<HTMLAttributes<HTMLDivElement>
25
29
  title?: React.ReactNode;
26
30
  }
27
31
  declare const TableContainer: {
28
- ({ className, children, title, description, stickyHeader, useStaticWidth, ...rest }: TableContainerProps): import("react/jsx-runtime").JSX.Element;
32
+ ({ aiEnabled, className, children, title, description, stickyHeader, useStaticWidth, ...rest }: TableContainerProps): import("react/jsx-runtime").JSX.Element;
29
33
  propTypes: {
34
+ /**
35
+ * Specify if the entire table has AI generated contents
36
+ */
37
+ aiEnabled: PropTypes.Requireable<boolean>;
30
38
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
31
39
  className: PropTypes.Requireable<string>;
32
40
  /**
@@ -15,6 +15,7 @@ import { TableContext } from './TableContext.js';
15
15
  import { Section, Heading } from '../Heading/index.js';
16
16
 
17
17
  const TableContainer = ({
18
+ aiEnabled,
18
19
  className,
19
20
  children,
20
21
  title,
@@ -29,7 +30,8 @@ const TableContainer = ({
29
30
  const prefix = usePrefix();
30
31
  const tableContainerClasses = cx(className, `${prefix}--data-table-container`, {
31
32
  [`${prefix}--data-table--max-width`]: stickyHeader,
32
- [`${prefix}--data-table-container--static`]: useStaticWidth
33
+ [`${prefix}--data-table-container--static`]: useStaticWidth,
34
+ [`${prefix}--data-table-container--ai-enabled`]: aiEnabled
33
35
  });
34
36
  const value = useMemo(() => {
35
37
  return {
@@ -52,6 +54,10 @@ const TableContainer = ({
52
54
  }, description)), children));
53
55
  };
54
56
  TableContainer.propTypes = {
57
+ /**
58
+ * Specify if the entire table has AI generated contents
59
+ */
60
+ aiEnabled: PropTypes.bool,
55
61
  children: PropTypes.node,
56
62
  className: PropTypes.string,
57
63
  /**
@@ -81,7 +81,7 @@ declare const TableExpandHeader: {
81
81
  /**
82
82
  * The enableExpando prop is being replaced by TableExpandHeader
83
83
  */
84
- enableExpando: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
84
+ enableExpando: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
85
85
  /**
86
86
  * Specify whether an expand all button should be displayed
87
87
  */
@@ -11,7 +11,7 @@ import cx from 'classnames';
11
11
  import PropTypes from 'prop-types';
12
12
  import React from 'react';
13
13
  import { usePrefix } from '../../internal/usePrefix.js';
14
- import deprecate from '../../prop-types/deprecate.js';
14
+ import { deprecate } from '../../prop-types/deprecate.js';
15
15
  import requiredIfGivenPropIsTruthy from '../../prop-types/requiredIfGivenPropIsTruthy.js';
16
16
 
17
17
  const TableExpandHeader = ({
@@ -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.
@@ -57,7 +57,7 @@ declare const TableSelectAll: {
57
57
  * Deprecated, please use `aria-label` instead.
58
58
  * Specify the aria label for the underlying input control
59
59
  */
60
- ariaLabel: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
60
+ ariaLabel: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
61
61
  /**
62
62
  * Specify whether all items are selected, or not
63
63
  */
@@ -10,7 +10,7 @@ import React from 'react';
10
10
  import InlineCheckbox from '../InlineCheckbox/InlineCheckbox.js';
11
11
  import cx from 'classnames';
12
12
  import { usePrefix } from '../../internal/usePrefix.js';
13
- import deprecate from '../../prop-types/deprecate.js';
13
+ import { deprecate } from '../../prop-types/deprecate.js';
14
14
 
15
15
  const TableSelectAll = ({
16
16
  ariaLabel: deprecatedAriaLabel = 'Select all rows in the table',
@@ -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.
@@ -62,7 +62,7 @@ declare const TableSelectRow: {
62
62
  * Deprecated, please use `aria-label` instead.
63
63
  * Specify the aria label for the underlying input control
64
64
  */
65
- ariaLabel: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
65
+ ariaLabel: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
66
66
  /**
67
67
  * Specify whether this row is selected, or not
68
68
  */
@@ -13,7 +13,7 @@ import InlineCheckbox from '../InlineCheckbox/InlineCheckbox.js';
13
13
  import RadioButton from '../RadioButton/RadioButton.js';
14
14
  import { useId } from '../../internal/useId.js';
15
15
  import { usePrefix } from '../../internal/usePrefix.js';
16
- import deprecate from '../../prop-types/deprecate.js';
16
+ import { deprecate } from '../../prop-types/deprecate.js';
17
17
 
18
18
  const TableSelectRow = ({
19
19
  ariaLabel: deprecatedAriaLabel,
@@ -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.
@@ -10,7 +10,7 @@ import cx from 'classnames';
10
10
  import PropTypes from 'prop-types';
11
11
  import React from 'react';
12
12
  import { usePrefix } from '../../internal/usePrefix.js';
13
- import deprecate from '../../prop-types/deprecate.js';
13
+ import { deprecate } from '../../prop-types/deprecate.js';
14
14
 
15
15
  const TableToolbar = ({
16
16
  ['aria-label']: ariaLabel = 'data table toolbar',
@@ -5,24 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import React from 'react';
8
- export interface TableToolbarMenuProps extends React.HTMLAttributes<HTMLDivElement> {
9
- children: React.ReactNode;
10
- /**
11
- * Provide an optional class name for the toolbar menu trigger button
12
- */
13
- className?: string;
14
- /**
15
- * The description of the menu icon.
16
- */
17
- iconDescription?: string;
18
- /**
19
- * Provide an optional class name for the toolbar menu
20
- */
21
- menuOptionsClass?: string;
22
- /**
23
- * A component used to render an icon.
24
- */
25
- renderIcon?: any;
8
+ import { OverflowMenuProps } from '../OverflowMenu';
9
+ export interface TableToolbarMenuProps extends OverflowMenuProps {
26
10
  }
27
11
  declare const TableToolbarMenu: React.FC<TableToolbarMenuProps>;
28
12
  export default TableToolbarMenu;
@@ -26,7 +26,6 @@ const TableToolbarMenu = ({
26
26
  const toolbarActionClasses = cx(className, `${prefix}--toolbar-action ${prefix}--overflow-menu`);
27
27
  const menuOptionsClasses = cx(menuOptionsClass, `${prefix}--toolbar-action__menu`);
28
28
  return /*#__PURE__*/React.createElement(OverflowMenu, _extends({
29
- "aria-label": iconDescription,
30
29
  renderIcon: renderIcon,
31
30
  className: toolbarActionClasses,
32
31
  title: iconDescription,
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import DataTable, { type DataTableCell, type DataTableHeader, type DataTableRow, type DataTableProps, type DataTableRenderProps, type DataTableSize } from './DataTable';
7
+ import { DataTable, type DataTableCell, type DataTableHeader, type DataTableProps, type DataTableRenderProps, type DataTableRow, type DataTableSize } from './DataTable';
8
8
  import Table from './Table';
9
9
  import TableActionList from './TableActionList';
10
10
  import TableBatchAction from './TableBatchAction';
@@ -33,7 +33,11 @@ const getDerivedStateFromProps = (props, prevState) => {
33
33
  filterInputValue: prevState.filterInputValue || null,
34
34
  // Optional state field to indicate whether a consumer should show a
35
35
  // batch actions menu
36
- shouldShowBatchActions: prevState.shouldShowBatchActions || false
36
+ shouldShowBatchActions: prevState.shouldShowBatchActions || false,
37
+ // TODO: Investigate deleting this property when this util is ported to
38
+ // TypeScript. The only reason it was added was to address a type error in
39
+ // packages/react/src/components/DataTable/DataTable.tsx
40
+ isExpandedAll: false
37
41
  };
38
42
  if (prevState.sortDirection && prevState.sortHeaderKey) {
39
43
  const {
@@ -15,7 +15,7 @@ import DatePickerInput from '../DatePickerInput/DatePickerInput.js';
15
15
  import { appendToPlugin } from './plugins/appendToPlugin.js';
16
16
  import carbonFlatpickrFixEventsPlugin from './plugins/fixEventsPlugin.js';
17
17
  import carbonFlatpickrRangePlugin from './plugins/rangePlugin.js';
18
- import deprecate from '../../prop-types/deprecate.js';
18
+ import { deprecate } from '../../prop-types/deprecate.js';
19
19
  import { Escape, Tab, Enter } from '../../internal/keyboard/keys.js';
20
20
  import { match } from '../../internal/keyboard/match.js';
21
21
  import { usePrefix } from '../../internal/usePrefix.js';
@@ -14,7 +14,7 @@ import '../FluidForm/FluidForm.js';
14
14
  import { FormContext } from '../FluidForm/FormContext.js';
15
15
  import { useId } from '../../internal/useId.js';
16
16
  import '../Text/index.js';
17
- import deprecate from '../../prop-types/deprecate.js';
17
+ import { deprecate } from '../../prop-types/deprecate.js';
18
18
  import { AILabel } from '../AILabel/index.js';
19
19
  import { isComponentElement } from '../../internal/utils.js';
20
20
  import { Text } from '../Text/Text.js';
@@ -13,7 +13,7 @@ import PropTypes from 'prop-types';
13
13
  import { WarningFilled, WarningAltFilled, Checkmark } from '@carbon/icons-react';
14
14
  import ListBox from '../ListBox/index.js';
15
15
  import mergeRefs from '../../tools/mergeRefs.js';
16
- import deprecate from '../../prop-types/deprecate.js';
16
+ import { deprecate } from '../../prop-types/deprecate.js';
17
17
  import { usePrefix } from '../../internal/usePrefix.js';
18
18
  import '../FluidForm/FluidForm.js';
19
19
  import { FormContext } from '../FluidForm/FormContext.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2015, 2023
2
+ * Copyright IBM Corp. 2015, 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.
@@ -34,7 +34,7 @@ declare namespace FeatureFlags {
34
34
  /**
35
35
  * Provide the feature flags to enabled or disabled in the current Rea,ct tree
36
36
  */
37
- flags: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
37
+ flags: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
38
38
  enableV12TileDefaultIcons: PropTypes.Requireable<boolean>;
39
39
  enableV12TileRadioIcons: PropTypes.Requireable<boolean>;
40
40
  enableV12Overflowmenu: PropTypes.Requireable<boolean>;
@@ -8,7 +8,7 @@
8
8
  import { createScope, FeatureFlags as FeatureFlags$1 } from '@carbon/feature-flags';
9
9
  import PropTypes from 'prop-types';
10
10
  import React, { useContext, useState, useRef, useEffect, createContext } from 'react';
11
- import deprecate from '../../prop-types/deprecate.js';
11
+ import { deprecate } from '../../prop-types/deprecate.js';
12
12
 
13
13
  /**
14
14
  * Our FeatureFlagContext is used alongside the FeatureFlags component to enable
@@ -133,7 +133,7 @@ declare namespace FileUploaderButton {
133
133
  /**
134
134
  * Provide a custom tabIndex value for the `<FileUploaderButton>`
135
135
  */
136
- tabIndex: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
136
+ tabIndex: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
137
137
  };
138
138
  }
139
139
  export default FileUploaderButton;
@@ -13,7 +13,7 @@ import { Enter, Space } from '../../internal/keyboard/keys.js';
13
13
  import { matches } from '../../internal/keyboard/match.js';
14
14
  import { useId } from '../../internal/useId.js';
15
15
  import { usePrefix } from '../../internal/usePrefix.js';
16
- import deprecate from '../../prop-types/deprecate.js';
16
+ import { deprecate } from '../../prop-types/deprecate.js';
17
17
  import { noopFn } from '../../internal/noopFn.js';
18
18
  import { ButtonKinds } from '../Button/Button.js';
19
19
  import '../Button/Button.Skeleton.js';
@@ -113,11 +113,11 @@ declare namespace FileUploaderDropContainer {
113
113
  /**
114
114
  * Provide an accessibility role for the `<FileUploaderButton>`
115
115
  */
116
- role: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
116
+ role: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
117
117
  /**
118
118
  * Provide a custom tabIndex value for the `<FileUploaderButton>`
119
119
  */
120
- tabIndex: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
120
+ tabIndex: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
121
121
  };
122
122
  }
123
123
  export default FileUploaderDropContainer;
@@ -14,7 +14,7 @@ import { matches } from '../../internal/keyboard/match.js';
14
14
  import { useId } from '../../internal/useId.js';
15
15
  import { usePrefix } from '../../internal/usePrefix.js';
16
16
  import { composeEventHandlers } from '../../tools/events.js';
17
- import deprecate from '../../prop-types/deprecate.js';
17
+ import { deprecate } from '../../prop-types/deprecate.js';
18
18
  import { noopFn } from '../../internal/noopFn.js';
19
19
 
20
20
  function FileUploaderDropContainer({
@@ -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.
@@ -11,7 +11,7 @@ import React from 'react';
11
11
  import cx from 'classnames';
12
12
  import TextArea from '../TextArea/TextArea.js';
13
13
  import '../TextArea/TextArea.Skeleton.js';
14
- import deprecate from '../../prop-types/deprecate.js';
14
+ import { deprecate } from '../../prop-types/deprecate.js';
15
15
  import { usePrefix } from '../../internal/usePrefix.js';
16
16
  import { FormContext } from '../FluidForm/FormContext.js';
17
17
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  import PropTypes from 'prop-types';
9
9
  import React, { useRef, useEffect } from 'react';
10
- import deprecate from '../../prop-types/deprecate.js';
10
+ import { deprecate } from '../../prop-types/deprecate.js';
11
11
  import { usePrefix } from '../../internal/usePrefix.js';
12
12
  import { useMergedRefs } from '../../internal/useMergedRefs.js';
13
13
 
@@ -9,7 +9,7 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
9
9
  import cx from 'classnames';
10
10
  import React, { forwardRef, useContext } from 'react';
11
11
  import PropTypes from 'prop-types';
12
- import deprecate from '../../prop-types/deprecate.js';
12
+ import { deprecate } from '../../prop-types/deprecate.js';
13
13
  import './index.js';
14
14
  import { usePrefix } from '../../internal/usePrefix.js';
15
15
  import '../FluidForm/FluidForm.js';
@@ -50,7 +50,7 @@ declare namespace Loading {
50
50
  /**
51
51
  * Provide an `id` to uniquely identify the label
52
52
  */
53
- id: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
53
+ id: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
54
54
  /**
55
55
  * Specify whether you would like the small variant of <Loading>
56
56
  */
@@ -10,7 +10,7 @@ import cx from 'classnames';
10
10
  import PropTypes from 'prop-types';
11
11
  import React from 'react';
12
12
  import { usePrefix } from '../../internal/usePrefix.js';
13
- import deprecate from '../../prop-types/deprecate.js';
13
+ import { deprecate } from '../../prop-types/deprecate.js';
14
14
 
15
15
  function Loading({
16
16
  active = true,
@@ -14,7 +14,7 @@ import { Escape, ArrowLeft, ArrowUp, ArrowDown } from '../../internal/keyboard/k
14
14
  import { match } from '../../internal/keyboard/match.js';
15
15
  import { useMergedRefs } from '../../internal/useMergedRefs.js';
16
16
  import { usePrefix } from '../../internal/usePrefix.js';
17
- import deprecate from '../../prop-types/deprecate.js';
17
+ import { deprecate } from '../../prop-types/deprecate.js';
18
18
  import { MenuContext, menuReducer } from './MenuContext.js';
19
19
  import '../LayoutDirection/LayoutDirection.js';
20
20
  import { useLayoutDirection } from '../LayoutDirection/useLayoutDirection.js';
@@ -29,7 +29,7 @@ import { noopFn } from '../../internal/noopFn.js';
29
29
  import '../Text/index.js';
30
30
  import { useFeatureFlag } from '../FeatureFlags/index.js';
31
31
  import { composeEventHandlers } from '../../tools/events.js';
32
- import deprecate from '../../prop-types/deprecate.js';
32
+ import { deprecate } from '../../prop-types/deprecate.js';
33
33
  import { unstable__Dialog } from '../Dialog/index.js';
34
34
  import { AILabel } from '../AILabel/index.js';
35
35
  import { isComponentElement } from '../../internal/utils.js';
@@ -21,7 +21,7 @@ import { Space, Enter, Delete, Escape, Tab, Home, End } from '../../internal/key
21
21
  import { match } from '../../internal/keyboard/match.js';
22
22
  import { defaultItemToString } from './tools/itemToString.js';
23
23
  import mergeRefs from '../../tools/mergeRefs.js';
24
- import deprecate from '../../prop-types/deprecate.js';
24
+ import { deprecate } from '../../prop-types/deprecate.js';
25
25
  import { useId } from '../../internal/useId.js';
26
26
  import { defaultCompareItems, defaultSortItems } from './tools/sorting.js';
27
27
  import { usePrefix } from '../../internal/usePrefix.js';
@@ -18,7 +18,7 @@ import { defaultSortItems, defaultCompareItems } from './tools/sorting.js';
18
18
  import { useSelection } from '../../internal/Selection.js';
19
19
  import { useId } from '../../internal/useId.js';
20
20
  import mergeRefs from '../../tools/mergeRefs.js';
21
- import deprecate from '../../prop-types/deprecate.js';
21
+ import { deprecate } from '../../prop-types/deprecate.js';
22
22
  import { Delete, Escape, Space, ArrowDown, Enter } from '../../internal/keyboard/keys.js';
23
23
  import { match } from '../../internal/keyboard/match.js';
24
24
  import { usePrefix } from '../../internal/usePrefix.js';
@@ -86,7 +86,7 @@ export declare namespace NotificationButton {
86
86
  * Deprecated, please use `aria-label` instead.
87
87
  * Specify a label to be read by screen readers on the container note.
88
88
  */
89
- ariaLabel: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
89
+ ariaLabel: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
90
90
  /**
91
91
  * Specify an optional className to be applied to the notification button
92
92
  */
@@ -189,7 +189,7 @@ export declare namespace ToastNotification {
189
189
  * Deprecated, please use `aria-label` instead.
190
190
  * Provide a description for "close" icon button that can be read by screen readers
191
191
  */
192
- ariaLabel: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
192
+ ariaLabel: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
193
193
  /**
194
194
  * Specify the caption
195
195
  */
@@ -445,7 +445,7 @@ export declare namespace ActionableNotification {
445
445
  * Deprecated, please use `aria-label` instead.
446
446
  * Provide a description for "close" icon button that can be read by screen readers
447
447
  */
448
- ariaLabel: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
448
+ ariaLabel: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
449
449
  /**
450
450
  * Specify the content
451
451
  */
@@ -461,7 +461,7 @@ export declare namespace ActionableNotification {
461
461
  /**
462
462
  * Specify if focus should be moved to the component when the notification contains actions
463
463
  */
464
- hasFocus: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
464
+ hasFocus: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
465
465
  /**
466
466
  * Specify the close button should be disabled, or not
467
467
  */
@@ -8,7 +8,7 @@
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import PropTypes from 'prop-types';
10
10
  import React, { useState, useRef, useEffect } from 'react';
11
- import deprecate from '../../prop-types/deprecate.js';
11
+ import { deprecate } from '../../prop-types/deprecate.js';
12
12
  import cx from 'classnames';
13
13
  import { Close, ErrorFilled, CheckmarkFilled, WarningFilled, WarningAltFilled, InformationFilled, InformationSquareFilled } from '@carbon/icons-react';
14
14
  import '../Text/index.js';
@@ -32,6 +32,8 @@ export interface NumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInp
32
32
  decorator?: ReactNode;
33
33
  /**
34
34
  * Optional starting value for uncontrolled state
35
+ * Defaults to 0 when type="number"
36
+ * Defaults to NaN when type="text"
35
37
  */
36
38
  defaultValue?: number | string;
37
39
  /**
@@ -110,6 +112,11 @@ export interface NumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInp
110
112
  * The minimum value.
111
113
  */
112
114
  min?: number;
115
+ /**
116
+ * Provide an optional handler that is called when the input or stepper
117
+ * buttons are blurred.
118
+ */
119
+ onBlur?: (event: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLButtonElement>) => void;
113
120
  /**
114
121
  * Provide an optional handler that is called when the internal state of
115
122
  * NumberInput changes. This handler is called with event and state info.