@carbon/react 1.85.1 → 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.
- package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +816 -816
- package/es/components/AILabel/index.js +1 -1
- package/es/components/Accordion/AccordionItem.d.ts +1 -1
- package/es/components/Accordion/AccordionItem.js +1 -1
- package/es/components/Checkbox/Checkbox.js +1 -1
- package/es/components/CheckboxGroup/CheckboxGroup.js +1 -1
- package/es/components/CodeSnippet/CodeSnippet.d.ts +2 -2
- package/es/components/CodeSnippet/CodeSnippet.js +1 -1
- package/es/components/ComboBox/ComboBox.js +1 -1
- package/es/components/ComposedModal/ComposedModal.js +1 -1
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +1 -1
- package/es/components/ContentSwitcher/ContentSwitcher.js +1 -1
- package/es/components/DataTable/DataTable.d.ts +230 -170
- package/es/components/DataTable/DataTable.js +508 -519
- package/es/components/DataTable/TableContainer.d.ts +9 -1
- package/es/components/DataTable/TableContainer.js +7 -1
- package/es/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/es/components/DataTable/TableExpandHeader.js +1 -1
- package/es/components/DataTable/TableSelectAll.d.ts +2 -2
- package/es/components/DataTable/TableSelectAll.js +1 -1
- package/es/components/DataTable/TableSelectRow.d.ts +2 -2
- package/es/components/DataTable/TableSelectRow.js +1 -1
- package/es/components/DataTable/TableToolbar.d.ts +1 -1
- package/es/components/DataTable/TableToolbar.js +1 -1
- package/es/components/DataTable/TableToolbarMenu.d.ts +2 -18
- package/es/components/DataTable/TableToolbarMenu.js +0 -1
- package/es/components/DataTable/index.d.ts +1 -1
- package/es/components/DataTable/state/getDerivedStateFromProps.js +5 -1
- package/es/components/DatePicker/DatePicker.js +1 -1
- package/es/components/DatePickerInput/DatePickerInput.js +1 -1
- package/es/components/Dropdown/Dropdown.js +1 -1
- package/es/components/FeatureFlags/index.d.ts +2 -2
- package/es/components/FeatureFlags/index.js +1 -1
- package/es/components/FileUploader/FileUploaderButton.d.ts +1 -1
- package/es/components/FileUploader/FileUploaderButton.js +1 -1
- package/es/components/FileUploader/FileUploaderDropContainer.d.ts +2 -2
- package/es/components/FileUploader/FileUploaderDropContainer.js +1 -1
- package/es/components/FluidTextArea/FluidTextArea.d.ts +1 -1
- package/es/components/FluidTextArea/FluidTextArea.js +1 -1
- package/es/components/InlineCheckbox/InlineCheckbox.js +1 -1
- package/es/components/ListBox/ListBox.js +1 -1
- package/es/components/Loading/Loading.d.ts +1 -1
- package/es/components/Loading/Loading.js +1 -1
- package/es/components/Menu/Menu.js +1 -1
- package/es/components/Modal/Modal.js +1 -1
- package/es/components/MultiSelect/FilterableMultiSelect.js +1 -1
- package/es/components/MultiSelect/MultiSelect.js +1 -1
- package/es/components/Notification/Notification.d.ts +4 -4
- package/es/components/Notification/Notification.js +1 -1
- package/es/components/NumberInput/NumberInput.d.ts +7 -0
- package/es/components/NumberInput/NumberInput.js +80 -25
- package/es/components/OverflowMenu/OverflowMenu.d.ts +2 -6
- package/es/components/OverflowMenu/OverflowMenu.js +1 -1
- package/es/components/Pagination/Pagination.js +22 -5
- package/es/components/RadioButton/RadioButton.js +1 -1
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/es/components/RadioTile/RadioTile.js +1 -1
- package/es/components/Search/Search.js +1 -1
- package/es/components/Select/Select.js +1 -1
- package/es/components/Slider/Slider.js +1 -1
- package/es/components/StructuredList/StructuredList.d.ts +5 -5
- package/es/components/StructuredList/StructuredList.js +1 -1
- package/es/components/Tabs/Tabs.d.ts +1 -1
- package/es/components/Tabs/Tabs.js +1 -1
- package/es/components/Tag/DismissibleTag.js +1 -1
- package/es/components/Tag/Tag.js +1 -1
- package/es/components/TextArea/TextArea.js +1 -1
- package/es/components/TextInput/ControlledPasswordInput.js +1 -1
- package/es/components/TextInput/PasswordInput.js +1 -1
- package/es/components/TextInput/TextInput.js +1 -1
- package/es/components/Tile/Tile.js +1 -1
- package/es/components/TileGroup/TileGroup.d.ts +5 -5
- package/es/components/TimePicker/TimePicker.d.ts +8 -0
- package/es/components/TimePicker/TimePicker.js +6 -4
- package/es/components/Tooltip/DefinitionTooltip.d.ts +1 -1
- package/es/components/Tooltip/DefinitionTooltip.js +1 -1
- package/es/components/TreeView/TreeContext.d.ts +19 -0
- package/es/components/TreeView/TreeContext.js +13 -0
- package/es/components/TreeView/TreeNode.d.ts +4 -4
- package/es/components/TreeView/TreeNode.js +56 -108
- package/es/components/TreeView/TreeView.js +42 -79
- package/es/components/UIShell/HeaderMenu.js +1 -1
- package/es/components/UIShell/HeaderMenuItem.d.ts +1 -1
- package/es/components/UIShell/HeaderMenuItem.js +1 -1
- package/es/components/UIShell/HeaderName.d.ts +1 -1
- package/es/components/UIShell/Link.d.ts +2 -2
- package/es/components/UIShell/Link.js +1 -1
- package/es/components/UIShell/Switcher.d.ts +1 -1
- package/es/components/UIShell/Switcher.js +39 -12
- package/es/index.js +1 -1
- package/es/internal/useNoInteractiveChildren.d.ts +25 -0
- package/es/internal/useNoInteractiveChildren.js +39 -32
- package/es/prop-types/deprecate.d.ts +17 -0
- package/es/prop-types/deprecate.js +22 -12
- package/lib/components/AILabel/index.js +2 -2
- package/lib/components/Accordion/AccordionItem.d.ts +1 -1
- package/lib/components/Accordion/AccordionItem.js +1 -1
- package/lib/components/Checkbox/Checkbox.js +1 -1
- package/lib/components/CheckboxGroup/CheckboxGroup.js +1 -1
- package/lib/components/CodeSnippet/CodeSnippet.d.ts +2 -2
- package/lib/components/CodeSnippet/CodeSnippet.js +2 -2
- package/lib/components/ComboBox/ComboBox.js +3 -3
- package/lib/components/ComposedModal/ComposedModal.js +1 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +1 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.js +1 -1
- package/lib/components/DataTable/DataTable.d.ts +230 -170
- package/lib/components/DataTable/DataTable.js +507 -518
- package/lib/components/DataTable/TableContainer.d.ts +9 -1
- package/lib/components/DataTable/TableContainer.js +7 -1
- package/lib/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/lib/components/DataTable/TableExpandHeader.js +1 -1
- package/lib/components/DataTable/TableSelectAll.d.ts +2 -2
- package/lib/components/DataTable/TableSelectAll.js +1 -1
- package/lib/components/DataTable/TableSelectRow.d.ts +2 -2
- package/lib/components/DataTable/TableSelectRow.js +1 -1
- package/lib/components/DataTable/TableToolbar.d.ts +1 -1
- package/lib/components/DataTable/TableToolbar.js +1 -1
- package/lib/components/DataTable/TableToolbarMenu.d.ts +2 -18
- package/lib/components/DataTable/TableToolbarMenu.js +0 -1
- package/lib/components/DataTable/index.d.ts +1 -1
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +5 -1
- package/lib/components/DatePicker/DatePicker.js +1 -1
- package/lib/components/DatePickerInput/DatePickerInput.js +1 -1
- package/lib/components/Dropdown/Dropdown.js +3 -3
- package/lib/components/FeatureFlags/index.d.ts +2 -2
- package/lib/components/FeatureFlags/index.js +1 -1
- package/lib/components/FileUploader/FileUploaderButton.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderButton.js +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +2 -2
- package/lib/components/FileUploader/FileUploaderDropContainer.js +2 -2
- package/lib/components/FluidTextArea/FluidTextArea.d.ts +1 -1
- package/lib/components/FluidTextArea/FluidTextArea.js +1 -1
- package/lib/components/InlineCheckbox/InlineCheckbox.js +1 -1
- package/lib/components/ListBox/ListBox.js +1 -1
- package/lib/components/Loading/Loading.d.ts +1 -1
- package/lib/components/Loading/Loading.js +1 -1
- package/lib/components/Menu/Menu.js +1 -1
- package/lib/components/Modal/Modal.js +1 -1
- package/lib/components/MultiSelect/FilterableMultiSelect.js +4 -4
- package/lib/components/MultiSelect/MultiSelect.js +2 -2
- package/lib/components/Notification/Notification.d.ts +4 -4
- package/lib/components/Notification/Notification.js +4 -4
- package/lib/components/NumberInput/NumberInput.d.ts +7 -0
- package/lib/components/NumberInput/NumberInput.js +81 -26
- package/lib/components/OverflowMenu/OverflowMenu.d.ts +2 -6
- package/lib/components/OverflowMenu/OverflowMenu.js +2 -2
- package/lib/components/Pagination/Pagination.js +21 -4
- package/lib/components/RadioButton/RadioButton.js +1 -1
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/lib/components/RadioTile/RadioTile.js +2 -2
- package/lib/components/Search/Search.js +1 -1
- package/lib/components/Select/Select.js +2 -2
- package/lib/components/Slider/Slider.js +1 -1
- package/lib/components/StructuredList/StructuredList.d.ts +5 -5
- package/lib/components/StructuredList/StructuredList.js +4 -4
- package/lib/components/Tabs/Tabs.d.ts +1 -1
- package/lib/components/Tabs/Tabs.js +1 -1
- package/lib/components/Tag/DismissibleTag.js +1 -1
- package/lib/components/Tag/Tag.js +4 -4
- package/lib/components/TextArea/TextArea.js +2 -2
- package/lib/components/TextInput/ControlledPasswordInput.js +1 -1
- package/lib/components/TextInput/PasswordInput.js +1 -1
- package/lib/components/TextInput/TextInput.js +2 -2
- package/lib/components/Tile/Tile.js +9 -9
- package/lib/components/TileGroup/TileGroup.d.ts +5 -5
- package/lib/components/TimePicker/TimePicker.d.ts +8 -0
- package/lib/components/TimePicker/TimePicker.js +6 -4
- package/lib/components/Tooltip/DefinitionTooltip.d.ts +1 -1
- package/lib/components/Tooltip/DefinitionTooltip.js +1 -1
- package/lib/components/TreeView/TreeContext.d.ts +19 -0
- package/lib/components/TreeView/TreeContext.js +18 -0
- package/lib/components/TreeView/TreeNode.d.ts +4 -4
- package/lib/components/TreeView/TreeNode.js +55 -107
- package/lib/components/TreeView/TreeView.js +41 -78
- package/lib/components/UIShell/HeaderMenu.js +1 -1
- package/lib/components/UIShell/HeaderMenuItem.d.ts +1 -1
- package/lib/components/UIShell/HeaderMenuItem.js +1 -1
- package/lib/components/UIShell/HeaderName.d.ts +1 -1
- package/lib/components/UIShell/Link.d.ts +2 -2
- package/lib/components/UIShell/Link.js +1 -1
- package/lib/components/UIShell/Switcher.d.ts +1 -1
- package/lib/components/UIShell/Switcher.js +38 -11
- package/lib/index.js +1 -1
- package/lib/internal/useNoInteractiveChildren.d.ts +25 -0
- package/lib/internal/useNoInteractiveChildren.js +39 -32
- package/lib/prop-types/deprecate.d.ts +17 -0
- package/lib/prop-types/deprecate.js +22 -12
- package/package.json +3 -3
- 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
|
/**
|
|
@@ -25,6 +25,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
|
25
25
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
26
|
|
|
27
27
|
const TableContainer = ({
|
|
28
|
+
aiEnabled,
|
|
28
29
|
className,
|
|
29
30
|
children,
|
|
30
31
|
title,
|
|
@@ -39,7 +40,8 @@ const TableContainer = ({
|
|
|
39
40
|
const prefix = usePrefix.usePrefix();
|
|
40
41
|
const tableContainerClasses = cx__default["default"](className, `${prefix}--data-table-container`, {
|
|
41
42
|
[`${prefix}--data-table--max-width`]: stickyHeader,
|
|
42
|
-
[`${prefix}--data-table-container--static`]: useStaticWidth
|
|
43
|
+
[`${prefix}--data-table-container--static`]: useStaticWidth,
|
|
44
|
+
[`${prefix}--data-table-container--ai-enabled`]: aiEnabled
|
|
43
45
|
});
|
|
44
46
|
const value = React.useMemo(() => {
|
|
45
47
|
return {
|
|
@@ -62,6 +64,10 @@ const TableContainer = ({
|
|
|
62
64
|
}, description)), children));
|
|
63
65
|
};
|
|
64
66
|
TableContainer.propTypes = {
|
|
67
|
+
/**
|
|
68
|
+
* Specify if the entire table has AI generated contents
|
|
69
|
+
*/
|
|
70
|
+
aiEnabled: PropTypes__default["default"].bool,
|
|
65
71
|
children: PropTypes__default["default"].node,
|
|
66
72
|
className: PropTypes__default["default"].string,
|
|
67
73
|
/**
|
|
@@ -81,7 +81,7 @@ declare const TableExpandHeader: {
|
|
|
81
81
|
/**
|
|
82
82
|
* The enableExpando prop is being replaced by TableExpandHeader
|
|
83
83
|
*/
|
|
84
|
-
enableExpando: (props:
|
|
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
|
*/
|
|
@@ -80,7 +80,7 @@ TableExpandHeader.propTypes = {
|
|
|
80
80
|
/**
|
|
81
81
|
* The enableExpando prop is being replaced by TableExpandHeader
|
|
82
82
|
*/
|
|
83
|
-
enableExpando: deprecate
|
|
83
|
+
enableExpando: deprecate.deprecate(PropTypes__default["default"].bool, 'The `enableExpando` prop has been deprecated in favor of `enableToggle`. This prop will be removed in the next major release.'),
|
|
84
84
|
/**
|
|
85
85
|
* Specify whether an expand all button should be displayed
|
|
86
86
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
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:
|
|
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
|
*/
|
|
@@ -57,7 +57,7 @@ TableSelectAll.propTypes = {
|
|
|
57
57
|
* Deprecated, please use `aria-label` instead.
|
|
58
58
|
* Specify the aria label for the underlying input control
|
|
59
59
|
*/
|
|
60
|
-
ariaLabel: deprecate
|
|
60
|
+
ariaLabel: deprecate.deprecate(PropTypes__default["default"].string, 'This prop syntax has been deprecated. Please use the new `aria-label`.'),
|
|
61
61
|
/**
|
|
62
62
|
* Specify whether all items are selected, or not
|
|
63
63
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
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:
|
|
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
|
*/
|
|
@@ -81,7 +81,7 @@ TableSelectRow.propTypes = {
|
|
|
81
81
|
* Deprecated, please use `aria-label` instead.
|
|
82
82
|
* Specify the aria label for the underlying input control
|
|
83
83
|
*/
|
|
84
|
-
ariaLabel: deprecate
|
|
84
|
+
ariaLabel: deprecate.deprecate(PropTypes__default["default"].string, 'This prop syntax has been deprecated. Please use the new `aria-label`.'),
|
|
85
85
|
/**
|
|
86
86
|
* Specify whether this row is selected, or not
|
|
87
87
|
*/
|
|
@@ -51,7 +51,7 @@ TableToolbar.propTypes = {
|
|
|
51
51
|
* Specify a label to be read by screen readers on the container node.
|
|
52
52
|
* 'aria-label' of the TableToolbar component.
|
|
53
53
|
*/
|
|
54
|
-
ariaLabel: deprecate
|
|
54
|
+
ariaLabel: deprecate.deprecate(PropTypes__default["default"].string, 'This prop syntax has been deprecated. Please use the new `aria-label`.'),
|
|
55
55
|
/**
|
|
56
56
|
* Pass in the children that will be rendered inside the TableToolbar
|
|
57
57
|
*/
|
|
@@ -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
|
-
|
|
9
|
-
|
|
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;
|
|
@@ -36,7 +36,6 @@ const TableToolbarMenu = ({
|
|
|
36
36
|
const toolbarActionClasses = cx__default["default"](className, `${prefix}--toolbar-action ${prefix}--overflow-menu`);
|
|
37
37
|
const menuOptionsClasses = cx__default["default"](menuOptionsClass, `${prefix}--toolbar-action__menu`);
|
|
38
38
|
return /*#__PURE__*/React__default["default"].createElement(index["default"], _rollupPluginBabelHelpers["extends"]({
|
|
39
|
-
"aria-label": iconDescription,
|
|
40
39
|
renderIcon: renderIcon,
|
|
41
40
|
className: toolbarActionClasses,
|
|
42
41
|
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,
|
|
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';
|
|
@@ -37,7 +37,11 @@ const getDerivedStateFromProps = (props, prevState) => {
|
|
|
37
37
|
filterInputValue: prevState.filterInputValue || null,
|
|
38
38
|
// Optional state field to indicate whether a consumer should show a
|
|
39
39
|
// batch actions menu
|
|
40
|
-
shouldShowBatchActions: prevState.shouldShowBatchActions || false
|
|
40
|
+
shouldShowBatchActions: prevState.shouldShowBatchActions || false,
|
|
41
|
+
// TODO: Investigate deleting this property when this util is ported to
|
|
42
|
+
// TypeScript. The only reason it was added was to address a type error in
|
|
43
|
+
// packages/react/src/components/DataTable/DataTable.tsx
|
|
44
|
+
isExpandedAll: false
|
|
41
45
|
};
|
|
42
46
|
if (prevState.sortDirection && prevState.sortHeaderKey) {
|
|
43
47
|
const {
|
|
@@ -685,7 +685,7 @@ DatePicker.propTypes = {
|
|
|
685
685
|
/**
|
|
686
686
|
* `true` to use the light version.
|
|
687
687
|
*/
|
|
688
|
-
light: deprecate
|
|
688
|
+
light: deprecate.deprecate(PropTypes__default["default"].bool, 'The `light` prop for `DatePicker` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
|
|
689
689
|
/**
|
|
690
690
|
* The language locale used to format the days of the week, months, and numbers. The full list of supported locales can be found here https://github.com/flatpickr/flatpickr/tree/master/src/l10n
|
|
691
691
|
*/
|
|
@@ -224,7 +224,7 @@ DatePickerInput.propTypes = {
|
|
|
224
224
|
* Specify the size of the Date Picker Input. Currently supports either `sm`, `md`, or `lg` as an option.
|
|
225
225
|
*/
|
|
226
226
|
size: PropTypes__default["default"].oneOf(['sm', 'md', 'lg']),
|
|
227
|
-
slug: deprecate
|
|
227
|
+
slug: deprecate.deprecate(PropTypes__default["default"].node, 'The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead.'),
|
|
228
228
|
/**
|
|
229
229
|
* Specify the type of the `<input>`
|
|
230
230
|
*/
|
|
@@ -404,7 +404,7 @@ Dropdown.propTypes = {
|
|
|
404
404
|
* Deprecated, please use `aria-label` instead.
|
|
405
405
|
* Specify a label to be read by screen readers on the container note.
|
|
406
406
|
*/
|
|
407
|
-
ariaLabel: deprecate
|
|
407
|
+
ariaLabel: deprecate.deprecate(PropTypes__default["default"].string, 'This prop syntax has been deprecated. Please use the new `aria-label`.'),
|
|
408
408
|
/**
|
|
409
409
|
* **Experimental**: Will attempt to automatically align the floating element to avoid collisions with the viewport and being clipped by ancestor elements.
|
|
410
410
|
*/
|
|
@@ -484,7 +484,7 @@ Dropdown.propTypes = {
|
|
|
484
484
|
/**
|
|
485
485
|
* `true` to use the light version.
|
|
486
486
|
*/
|
|
487
|
-
light: deprecate
|
|
487
|
+
light: deprecate.deprecate(PropTypes__default["default"].bool, 'The `light` prop for `Dropdown` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
|
|
488
488
|
/**
|
|
489
489
|
* `onChange` is a utility for this controlled component to communicate to a
|
|
490
490
|
* consuming component what kind of internal state changes are occurring.
|
|
@@ -510,7 +510,7 @@ Dropdown.propTypes = {
|
|
|
510
510
|
/**
|
|
511
511
|
* **Experimental**: Provide a `Slug` component to be rendered inside the `Dropdown` component
|
|
512
512
|
*/
|
|
513
|
-
slug: deprecate
|
|
513
|
+
slug: deprecate.deprecate(PropTypes__default["default"].node, 'The `slug` prop for `Dropdown` has ' + 'been deprecated in favor of the new `decorator` prop. It will be removed in the next major release.'),
|
|
514
514
|
/**
|
|
515
515
|
* Provide the title text that will be read by a screen reader when
|
|
516
516
|
* visiting this control
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2015,
|
|
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:
|
|
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>;
|
|
@@ -82,7 +82,7 @@ FeatureFlags.propTypes = {
|
|
|
82
82
|
/**
|
|
83
83
|
* Provide the feature flags to enabled or disabled in the current Rea,ct tree
|
|
84
84
|
*/
|
|
85
|
-
flags: deprecate
|
|
85
|
+
flags: deprecate.deprecate(PropTypes__default["default"].objectOf(PropTypes__default["default"].bool), 'The `flags` prop for `FeatureFlag` has ' + 'been deprecated. Please run the `featureflag-deprecate-flags-prop` codemod to migrate to individual boolean props.' + `npx @carbon/upgrade migrate featureflag-deprecate-flags-prop --write`),
|
|
86
86
|
enableV12TileDefaultIcons: PropTypes__default["default"].bool,
|
|
87
87
|
enableV12TileRadioIcons: PropTypes__default["default"].bool,
|
|
88
88
|
enableV12Overflowmenu: PropTypes__default["default"].bool,
|
|
@@ -133,7 +133,7 @@ declare namespace FileUploaderButton {
|
|
|
133
133
|
/**
|
|
134
134
|
* Provide a custom tabIndex value for the `<FileUploaderButton>`
|
|
135
135
|
*/
|
|
136
|
-
tabIndex: (props:
|
|
136
|
+
tabIndex: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
139
|
export default FileUploaderButton;
|
|
@@ -176,7 +176,7 @@ FileUploaderButton.propTypes = {
|
|
|
176
176
|
/**
|
|
177
177
|
* Provide a custom tabIndex value for the `<FileUploaderButton>`
|
|
178
178
|
*/
|
|
179
|
-
tabIndex: deprecate
|
|
179
|
+
tabIndex: deprecate.deprecate(PropTypes__default["default"].number, 'The `tabIndex` prop for `FileUploaderButton` has ' + 'been deprecated since it now renders a button element by default.')
|
|
180
180
|
};
|
|
181
181
|
|
|
182
182
|
exports["default"] = FileUploaderButton;
|
|
@@ -113,11 +113,11 @@ declare namespace FileUploaderDropContainer {
|
|
|
113
113
|
/**
|
|
114
114
|
* Provide an accessibility role for the `<FileUploaderButton>`
|
|
115
115
|
*/
|
|
116
|
-
role: (props:
|
|
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:
|
|
120
|
+
tabIndex: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
export default FileUploaderDropContainer;
|
|
@@ -205,11 +205,11 @@ FileUploaderDropContainer.propTypes = {
|
|
|
205
205
|
/**
|
|
206
206
|
* Provide an accessibility role for the `<FileUploaderButton>`
|
|
207
207
|
*/
|
|
208
|
-
role: deprecate
|
|
208
|
+
role: deprecate.deprecate(PropTypes__default["default"].number, 'The `role` prop for `FileUploaderButton` has ' + 'been deprecated since it now renders a button element by default, and has an implicit role of button.'),
|
|
209
209
|
/**
|
|
210
210
|
* Provide a custom tabIndex value for the `<FileUploaderButton>`
|
|
211
211
|
*/
|
|
212
|
-
tabIndex: deprecate
|
|
212
|
+
tabIndex: deprecate.deprecate(PropTypes__default["default"].number, 'The `tabIndex` prop for `FileUploaderButton` has ' + 'been deprecated since it now renders a button element by default.')
|
|
213
213
|
};
|
|
214
214
|
|
|
215
215
|
exports["default"] = FileUploaderDropContainer;
|
|
@@ -90,7 +90,7 @@ FluidTextArea.propTypes = {
|
|
|
90
90
|
* `true` to use the light version. For use on $ui-01 backgrounds only.
|
|
91
91
|
* Don't use this to make tile background color same as container background color.
|
|
92
92
|
*/
|
|
93
|
-
light: deprecate
|
|
93
|
+
light: deprecate.deprecate(PropTypes__default["default"].bool, 'The `light` prop for `FluidTextArea` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
|
|
94
94
|
/**
|
|
95
95
|
* Max character count allowed for the textarea. This is needed in order for enableCounter to display
|
|
96
96
|
*/
|
|
@@ -90,7 +90,7 @@ InlineCheckbox.propTypes = {
|
|
|
90
90
|
* Deprecated, please use `aria-label` instead.
|
|
91
91
|
* Specify the label for the control
|
|
92
92
|
*/
|
|
93
|
-
ariaLabel: deprecate
|
|
93
|
+
ariaLabel: deprecate.deprecate(PropTypes__default["default"].string.isRequired, 'The `ariaLabel` prop has been deprecated in favor of `aria-label`. This prop will be removed in the next major release.'),
|
|
94
94
|
/**
|
|
95
95
|
* Specify whether the underlying control is checked, or not
|
|
96
96
|
*/
|
|
@@ -124,7 +124,7 @@ ListBox.propTypes = {
|
|
|
124
124
|
* `true` to use the light version. For use on $ui-01 backgrounds only.
|
|
125
125
|
* Don't use this to make tile background color same as container background color.
|
|
126
126
|
*/
|
|
127
|
-
light: deprecate
|
|
127
|
+
light: deprecate.deprecate(PropTypes__default["default"].bool, 'The `light` prop for `ListBox` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
|
|
128
128
|
/**
|
|
129
129
|
* Specify the size of the ListBox. Currently supports either `sm`, `md` or `lg` as an option.
|
|
130
130
|
*/
|
|
@@ -50,7 +50,7 @@ declare namespace Loading {
|
|
|
50
50
|
/**
|
|
51
51
|
* Provide an `id` to uniquely identify the label
|
|
52
52
|
*/
|
|
53
|
-
id: (props:
|
|
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
|
*/
|
|
@@ -78,7 +78,7 @@ Loading.propTypes = {
|
|
|
78
78
|
/**
|
|
79
79
|
* Provide an `id` to uniquely identify the label
|
|
80
80
|
*/
|
|
81
|
-
id: deprecate
|
|
81
|
+
id: deprecate.deprecate(PropTypes__default["default"].string, `\nThe prop \`id\` is no longer needed.`),
|
|
82
82
|
/**
|
|
83
83
|
* Specify whether you would like the small variant of <Loading>
|
|
84
84
|
*/
|
|
@@ -328,7 +328,7 @@ Menu.propTypes = {
|
|
|
328
328
|
*
|
|
329
329
|
* **This prop is not intended for use and will be set by the respective implementation (like useContextMenu, MenuButton, and ComboButton).**
|
|
330
330
|
*/
|
|
331
|
-
mode: deprecate
|
|
331
|
+
mode: deprecate.deprecate(PropTypes__default["default"].oneOf(['full', 'basic']), 'Menus now always support both icons as well as selectable items and nesting.'),
|
|
332
332
|
/**
|
|
333
333
|
* Provide an optional function to be called when the Menu should be closed.
|
|
334
334
|
*/
|
|
@@ -612,7 +612,7 @@ Modal.propTypes = {
|
|
|
612
612
|
* Specify the size variant.
|
|
613
613
|
*/
|
|
614
614
|
size: PropTypes__default["default"].oneOf(ModalSizes),
|
|
615
|
-
slug: deprecate
|
|
615
|
+
slug: deprecate.deprecate(PropTypes__default["default"].node, 'The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead.')
|
|
616
616
|
};
|
|
617
617
|
|
|
618
618
|
exports.ModalSizes = ModalSizes;
|
|
@@ -681,12 +681,12 @@ FilterableMultiSelect.propTypes = {
|
|
|
681
681
|
* Deprecated, aria-label is no longer needed
|
|
682
682
|
* Specify a label to be read by screen readers on the container node
|
|
683
683
|
*/
|
|
684
|
-
['aria-label']: deprecate
|
|
684
|
+
['aria-label']: deprecate.deprecate(PropTypes__default["default"].string, 'ariaLabel / aria-label props are no longer required for FilterableMultiSelect'),
|
|
685
685
|
/**
|
|
686
686
|
* Deprecated, please use `aria-label` instead.
|
|
687
687
|
* Specify a label to be read by screen readers on the container note.
|
|
688
688
|
*/
|
|
689
|
-
ariaLabel: deprecate
|
|
689
|
+
ariaLabel: deprecate.deprecate(PropTypes__default["default"].string, 'ariaLabel / aria-label props are no longer required for FilterableMultiSelect'),
|
|
690
690
|
/**
|
|
691
691
|
* **Experimental**: Will attempt to automatically align the floating
|
|
692
692
|
* element to avoid collisions with the viewport and being clipped by
|
|
@@ -763,7 +763,7 @@ FilterableMultiSelect.propTypes = {
|
|
|
763
763
|
/**
|
|
764
764
|
* `true` to use the light version.
|
|
765
765
|
*/
|
|
766
|
-
light: deprecate
|
|
766
|
+
light: deprecate.deprecate(PropTypes__default["default"].bool, 'The `light` prop for `FilterableMultiSelect` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
|
|
767
767
|
/**
|
|
768
768
|
* Specify the locale of the control. Used for the default `compareItems`
|
|
769
769
|
* used for sorting the list of items in the control.
|
|
@@ -804,7 +804,7 @@ FilterableMultiSelect.propTypes = {
|
|
|
804
804
|
* Specify the size of the ListBox. Currently supports either `sm`, `md` or `lg` as an option.
|
|
805
805
|
*/
|
|
806
806
|
size: ListBoxPropTypes.ListBoxSizePropType,
|
|
807
|
-
slug: deprecate
|
|
807
|
+
slug: deprecate.deprecate(PropTypes__default["default"].node, 'The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead.'),
|
|
808
808
|
...MultiSelectPropTypes.sortingPropTypes,
|
|
809
809
|
/**
|
|
810
810
|
* Provide text to be used in a `<label>` element that is tied to the
|
|
@@ -641,7 +641,7 @@ MultiSelect.propTypes = {
|
|
|
641
641
|
/**
|
|
642
642
|
* `true` to use the light version.
|
|
643
643
|
*/
|
|
644
|
-
light: deprecate
|
|
644
|
+
light: deprecate.deprecate(PropTypes__default["default"].bool, 'The `light` prop for `MultiSelect` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
|
|
645
645
|
/**
|
|
646
646
|
* Specify the locale of the control. Used for the default `compareItems`
|
|
647
647
|
* used for sorting the list of items in the control.
|
|
@@ -680,7 +680,7 @@ MultiSelect.propTypes = {
|
|
|
680
680
|
* Specify the size of the ListBox. Currently supports either `sm`, `md` or `lg` as an option.
|
|
681
681
|
*/
|
|
682
682
|
size: ListBoxPropTypes.ListBoxSizePropType,
|
|
683
|
-
slug: deprecate
|
|
683
|
+
slug: deprecate.deprecate(PropTypes__default["default"].node, 'The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead.'),
|
|
684
684
|
/**
|
|
685
685
|
* Provide a method that sorts all options in the control. Overriding this
|
|
686
686
|
* prop means that you also have to handle the sort logic for selected versus
|
|
@@ -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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
*/
|
|
@@ -137,7 +137,7 @@ NotificationButton.propTypes = {
|
|
|
137
137
|
* Deprecated, please use `aria-label` instead.
|
|
138
138
|
* Specify a label to be read by screen readers on the container note.
|
|
139
139
|
*/
|
|
140
|
-
ariaLabel: deprecate
|
|
140
|
+
ariaLabel: deprecate.deprecate(PropTypes__default["default"].string, 'This prop syntax has been deprecated. Please use the new `aria-label`.'),
|
|
141
141
|
/**
|
|
142
142
|
* Specify an optional className to be applied to the notification button
|
|
143
143
|
*/
|
|
@@ -295,7 +295,7 @@ ToastNotification.propTypes = {
|
|
|
295
295
|
* Deprecated, please use `aria-label` instead.
|
|
296
296
|
* Provide a description for "close" icon button that can be read by screen readers
|
|
297
297
|
*/
|
|
298
|
-
ariaLabel: deprecate
|
|
298
|
+
ariaLabel: deprecate.deprecate(PropTypes__default["default"].string, 'This prop syntax has been deprecated. Please use the new `aria-label`.'),
|
|
299
299
|
/**
|
|
300
300
|
* Specify the caption
|
|
301
301
|
*/
|
|
@@ -626,7 +626,7 @@ ActionableNotification.propTypes = {
|
|
|
626
626
|
* Deprecated, please use `aria-label` instead.
|
|
627
627
|
* Provide a description for "close" icon button that can be read by screen readers
|
|
628
628
|
*/
|
|
629
|
-
ariaLabel: deprecate
|
|
629
|
+
ariaLabel: deprecate.deprecate(PropTypes__default["default"].string, 'This prop syntax has been deprecated. Please use the new `aria-label`.'),
|
|
630
630
|
/**
|
|
631
631
|
* Specify the content
|
|
632
632
|
*/
|
|
@@ -642,7 +642,7 @@ ActionableNotification.propTypes = {
|
|
|
642
642
|
/**
|
|
643
643
|
* Specify if focus should be moved to the component when the notification contains actions
|
|
644
644
|
*/
|
|
645
|
-
hasFocus: deprecate
|
|
645
|
+
hasFocus: deprecate.deprecate(PropTypes__default["default"].bool, 'hasFocus is deprecated. To conform to accessibility requirements hasFocus ' + 'should always be `true` for ActionableNotification. If you were ' + 'setting this prop to `false`, consider using the Callout component instead.'),
|
|
646
646
|
/**
|
|
647
647
|
* Specify the close button should be disabled, or not
|
|
648
648
|
*/
|
|
@@ -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.
|