@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
|
/**
|
|
@@ -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:
|
|
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,
|
|
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
|
*/
|
|
@@ -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,
|
|
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
|
*/
|
|
@@ -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,
|
|
@@ -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
|
-
|
|
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;
|
|
@@ -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,
|
|
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,
|
|
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>;
|
|
@@ -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:
|
|
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:
|
|
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;
|
|
@@ -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({
|
|
@@ -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:
|
|
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:
|
|
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
|
*/
|
|
@@ -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.
|