@carbon/react 1.99.0 → 1.100.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 +978 -978
- package/es/components/BadgeIndicator/index.d.ts +1 -1
- package/es/components/BadgeIndicator/index.js +8 -6
- package/es/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/es/components/Breadcrumb/BreadcrumbItem.js +6 -7
- package/es/components/Button/Button.Skeleton.d.ts +28 -2
- package/es/components/Button/Button.js +3 -2
- package/es/components/ChatButton/ChatButton.d.ts +3 -2
- package/es/components/CheckboxGroup/CheckboxGroup.d.ts +60 -2
- package/es/components/ComboBox/ComboBox.d.ts +6 -7
- package/es/components/ComboBox/ComboBox.js +22 -10
- package/es/components/ComposedModal/ComposedModal.d.ts +2 -2
- package/es/components/ContainedList/ContainedList.d.ts +35 -6
- package/es/components/ContainedList/ContainedList.js +3 -1
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +32 -3
- package/es/components/ContainedList/index.d.ts +1 -1
- package/es/components/ContainedList/index.js +4 -1
- package/es/components/DangerButton/DangerButton.d.ts +1 -1
- package/es/components/DataTable/DataTable.d.ts +22 -5
- package/es/components/DataTable/DataTable.js +1 -1
- package/es/components/DataTable/TableExpandRow.d.ts +1 -1
- package/es/components/DataTable/TableExpandRow.js +2 -2
- package/es/components/DataTable/TableHeader.d.ts +1 -1
- package/es/components/DataTable/TableHeader.js +18 -16
- package/es/components/DataTable/TableToolbar.d.ts +25 -1
- package/es/components/DataTable/TableToolbarMenu.d.ts +25 -5
- package/es/components/DataTable/TableToolbarMenu.js +0 -3
- package/es/components/DataTableSkeleton/DataTableSkeleton.d.ts +51 -2
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +6 -0
- package/es/components/DatePicker/DatePicker.d.ts +2 -2
- package/es/components/DatePicker/DatePicker.js +38 -53
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +28 -2
- package/es/components/DatePickerInput/DatePickerInput.d.ts +1 -1
- package/es/components/DatePickerInput/DatePickerInput.js +3 -2
- package/es/components/Dialog/Dialog.d.ts +1 -1
- package/es/components/Dropdown/Dropdown.Skeleton.d.ts +19 -2
- package/es/components/Dropdown/Dropdown.d.ts +3 -4
- package/es/components/Dropdown/Dropdown.js +16 -13
- package/es/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
- package/es/components/ExpandableSearch/ExpandableSearch.js +14 -12
- package/es/components/FileUploader/FileUploader.d.ts +1 -1
- package/es/components/FileUploader/FileUploader.js +2 -2
- package/es/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
- package/es/components/FileUploader/FileUploaderDropContainer.js +28 -10
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.d.ts +11 -3
- package/es/components/FluidComboBox/FluidComboBox.d.ts +2 -7
- package/es/components/FluidComboBox/FluidComboBox.js +1 -2
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.d.ts +15 -3
- package/es/components/FluidDatePicker/FluidDatePicker.d.ts +2 -2
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.d.ts +11 -3
- package/es/components/FluidDropdown/FluidDropdown.d.ts +1 -6
- package/es/components/FluidDropdown/FluidDropdown.js +1 -2
- package/es/components/FluidForm/FluidForm.d.ts +15 -2
- package/es/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +2 -2
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.d.ts +11 -3
- package/es/components/FluidMultiSelect/FluidMultiSelect.d.ts +1 -6
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +1 -2
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +11 -3
- package/es/components/FluidNumberInput/FluidNumberInput.d.ts +1 -1
- package/es/components/FluidSearch/FluidSearch.Skeleton.d.ts +11 -3
- package/es/components/FluidSearch/FluidSearch.d.ts +1 -1
- package/es/components/FluidSearch/FluidSearch.js +3 -3
- package/es/components/FluidSelect/FluidSelect.Skeleton.d.ts +11 -3
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +11 -3
- package/es/components/FluidTextArea/FluidTextArea.d.ts +95 -1
- package/es/components/FluidTextInput/FluidPasswordInput.d.ts +83 -2
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +11 -3
- package/es/components/Grid/GridContext.d.ts +19 -1
- package/es/components/IconButton/index.d.ts +1 -1
- package/es/components/IconButton/index.js +2 -2
- package/es/components/InlineLoading/InlineLoading.js +5 -11
- package/es/components/Link/Link.js +3 -0
- package/es/components/ListBox/ListBoxField.d.ts +35 -2
- package/es/components/ListBox/ListBoxMenuIcon.d.ts +16 -3
- package/es/components/ListBox/ListBoxMenuItem.d.ts +1 -1
- package/es/components/ListBox/ListBoxSelection.d.ts +34 -3
- package/es/components/Menu/MenuItem.d.ts +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.d.ts +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.js +22 -13
- package/es/components/MultiSelect/MultiSelect.d.ts +3 -4
- package/es/components/MultiSelect/MultiSelect.js +24 -22
- package/es/components/Notification/Notification.d.ts +8 -7
- package/es/components/Notification/Notification.js +4 -4
- package/es/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/es/components/OverflowMenu/OverflowMenu.js +0 -1
- package/es/components/OverflowMenu/index.d.ts +1 -1
- package/es/components/PageHeader/PageHeader.d.ts +3 -3
- package/es/components/Popover/index.js +21 -12
- package/es/components/Search/Search.d.ts +2 -2
- package/es/components/Select/Select.d.ts +1 -1
- package/es/components/Select/Select.js +2 -2
- package/es/components/SkeletonIcon/SkeletonIcon.d.ts +16 -2
- package/es/components/SkeletonText/SkeletonText.d.ts +1 -1
- package/es/components/Tag/Tag.d.ts +1 -1
- package/es/components/Tag/Tag.js +2 -0
- package/es/components/Text/Text.d.ts +1 -1
- package/es/components/Text/Text.js +4 -3
- package/es/components/Text/TextDirection.d.ts +1 -1
- package/es/components/Text/TextDirection.js +1 -3
- package/es/components/Text/TextDirectionContext.d.ts +3 -3
- package/es/components/TextArea/TextArea.js +1 -3
- package/es/components/TextInput/ControlledPasswordInput.d.ts +1 -1
- package/es/components/TextInput/ControlledPasswordInput.js +2 -2
- package/es/components/TextInput/PasswordInput.d.ts +1 -1
- package/es/components/TextInput/PasswordInput.js +2 -2
- package/es/components/TextInput/TextInput.d.ts +1 -1
- package/es/components/TextInput/TextInput.js +2 -2
- package/es/components/Tile/Tile.d.ts +1 -1
- package/es/components/Tile/Tile.js +37 -69
- package/es/components/Toggle/Toggle.Skeleton.d.ts +9 -3
- package/es/components/Toggletip/index.d.ts +1 -1
- package/es/components/Toggletip/index.js +9 -7
- package/es/components/Tooltip/DefinitionTooltip.d.ts +52 -1
- package/es/components/Tooltip/Tooltip.js +2 -0
- package/es/components/TreeView/TreeNode.d.ts +4 -4
- package/es/components/UIShell/Header.d.ts +20 -3
- package/es/components/UIShell/HeaderGlobalAction.d.ts +2 -2
- package/es/components/UIShell/HeaderName.js +1 -1
- package/es/components/UIShell/Link.d.ts +1 -1
- package/es/components/UIShell/Link.js +14 -14
- package/es/components/UIShell/SideNav.d.ts +3 -4
- package/es/components/UIShell/SideNav.js +37 -27
- package/es/components/UIShell/SideNavDivider.d.ts +11 -3
- package/es/components/UIShell/SideNavHeader.d.ts +24 -1
- package/es/components/UIShell/SideNavIcon.d.ts +20 -2
- package/es/components/UIShell/SideNavItem.d.ts +20 -2
- package/es/components/UIShell/SideNavItems.d.ts +22 -2
- package/es/components/UIShell/SideNavLink.d.ts +1 -1
- package/es/components/UIShell/SideNavLink.js +14 -14
- package/es/components/UIShell/SideNavMenu.d.ts +1 -1
- package/es/components/UIShell/SideNavMenu.js +2 -2
- package/es/components/UIShell/SideNavMenuItem.d.ts +2 -2
- package/es/components/UIShell/SideNavMenuItem.js +2 -2
- package/es/components/UIShell/SwitcherDivider.d.ts +10 -2
- package/es/internal/FloatingMenu.d.ts +1 -1
- package/es/internal/FloatingMenu.js +0 -2
- package/es/internal/PolymorphicProps.d.ts +3 -3
- package/es/internal/useNoInteractiveChildren.d.ts +1 -1
- package/es/internal/useNoInteractiveChildren.js +8 -10
- package/es/internal/useOutsideClick.d.ts +1 -1
- package/es/internal/useOutsideClick.js +0 -4
- package/lib/components/BadgeIndicator/index.d.ts +1 -1
- package/lib/components/BadgeIndicator/index.js +7 -5
- package/lib/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/lib/components/Breadcrumb/BreadcrumbItem.js +5 -6
- package/lib/components/Button/Button.Skeleton.d.ts +28 -2
- package/lib/components/Button/Button.js +3 -2
- package/lib/components/ChatButton/ChatButton.d.ts +3 -2
- package/lib/components/CheckboxGroup/CheckboxGroup.d.ts +60 -2
- package/lib/components/ComboBox/ComboBox.d.ts +6 -7
- package/lib/components/ComboBox/ComboBox.js +22 -10
- package/lib/components/ComposedModal/ComposedModal.d.ts +2 -2
- package/lib/components/ContainedList/ContainedList.d.ts +35 -6
- package/lib/components/ContainedList/ContainedList.js +3 -1
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +32 -3
- package/lib/components/ContainedList/index.d.ts +1 -1
- package/lib/components/ContainedList/index.js +4 -1
- package/lib/components/DangerButton/DangerButton.d.ts +1 -1
- package/lib/components/DataTable/DataTable.d.ts +22 -5
- package/lib/components/DataTable/DataTable.js +1 -1
- package/lib/components/DataTable/TableExpandRow.d.ts +1 -1
- package/lib/components/DataTable/TableHeader.d.ts +1 -1
- package/lib/components/DataTable/TableHeader.js +17 -15
- package/lib/components/DataTable/TableToolbar.d.ts +25 -1
- package/lib/components/DataTable/TableToolbarMenu.d.ts +25 -5
- package/lib/components/DataTable/TableToolbarMenu.js +0 -3
- package/lib/components/DataTableSkeleton/DataTableSkeleton.d.ts +51 -2
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +6 -0
- package/lib/components/DatePicker/DatePicker.d.ts +2 -2
- package/lib/components/DatePicker/DatePicker.js +37 -52
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +28 -2
- package/lib/components/DatePickerInput/DatePickerInput.d.ts +1 -1
- package/lib/components/DatePickerInput/DatePickerInput.js +2 -1
- package/lib/components/Dialog/Dialog.d.ts +1 -1
- package/lib/components/Dropdown/Dropdown.Skeleton.d.ts +19 -2
- package/lib/components/Dropdown/Dropdown.d.ts +3 -4
- package/lib/components/Dropdown/Dropdown.js +16 -13
- package/lib/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
- package/lib/components/ExpandableSearch/ExpandableSearch.js +13 -11
- package/lib/components/FileUploader/FileUploader.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.js +28 -10
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.d.ts +11 -3
- package/lib/components/FluidComboBox/FluidComboBox.d.ts +2 -7
- package/lib/components/FluidComboBox/FluidComboBox.js +1 -2
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.d.ts +15 -3
- package/lib/components/FluidDatePicker/FluidDatePicker.d.ts +2 -2
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.d.ts +11 -3
- package/lib/components/FluidDropdown/FluidDropdown.d.ts +1 -6
- package/lib/components/FluidDropdown/FluidDropdown.js +1 -2
- package/lib/components/FluidForm/FluidForm.d.ts +15 -2
- package/lib/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +2 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.d.ts +11 -3
- package/lib/components/FluidMultiSelect/FluidMultiSelect.d.ts +1 -6
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +1 -2
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +11 -3
- package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +1 -1
- package/lib/components/FluidSearch/FluidSearch.Skeleton.d.ts +11 -3
- package/lib/components/FluidSearch/FluidSearch.d.ts +1 -1
- package/lib/components/FluidSearch/FluidSearch.js +2 -2
- package/lib/components/FluidSelect/FluidSelect.Skeleton.d.ts +11 -3
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +11 -3
- package/lib/components/FluidTextArea/FluidTextArea.d.ts +95 -1
- package/lib/components/FluidTextInput/FluidPasswordInput.d.ts +83 -2
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +11 -3
- package/lib/components/Grid/GridContext.d.ts +19 -1
- package/lib/components/IconButton/index.d.ts +1 -1
- package/lib/components/InlineLoading/InlineLoading.js +5 -11
- package/lib/components/Link/Link.js +3 -0
- package/lib/components/ListBox/ListBoxField.d.ts +35 -2
- package/lib/components/ListBox/ListBoxMenuIcon.d.ts +16 -3
- package/lib/components/ListBox/ListBoxMenuItem.d.ts +1 -1
- package/lib/components/ListBox/ListBoxSelection.d.ts +34 -3
- package/lib/components/Menu/MenuItem.d.ts +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.js +22 -13
- package/lib/components/MultiSelect/MultiSelect.d.ts +3 -4
- package/lib/components/MultiSelect/MultiSelect.js +24 -22
- package/lib/components/Notification/Notification.d.ts +8 -7
- package/lib/components/Notification/Notification.js +4 -4
- package/lib/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/lib/components/OverflowMenu/OverflowMenu.js +0 -1
- package/lib/components/OverflowMenu/index.d.ts +1 -1
- package/lib/components/PageHeader/PageHeader.d.ts +3 -3
- package/lib/components/Popover/index.js +19 -10
- package/lib/components/Search/Search.d.ts +2 -2
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/SkeletonIcon/SkeletonIcon.d.ts +16 -2
- package/lib/components/SkeletonText/SkeletonText.d.ts +1 -1
- package/lib/components/Tag/Tag.d.ts +1 -1
- package/lib/components/Tag/Tag.js +2 -0
- package/lib/components/Text/Text.d.ts +1 -1
- package/lib/components/Text/Text.js +3 -2
- package/lib/components/Text/TextDirection.d.ts +1 -1
- package/lib/components/Text/TextDirection.js +1 -3
- package/lib/components/Text/TextDirectionContext.d.ts +3 -3
- package/lib/components/TextArea/TextArea.js +1 -3
- package/lib/components/TextInput/ControlledPasswordInput.d.ts +1 -1
- package/lib/components/TextInput/PasswordInput.d.ts +1 -1
- package/lib/components/TextInput/TextInput.d.ts +1 -1
- package/lib/components/Tile/Tile.d.ts +1 -1
- package/lib/components/Tile/Tile.js +35 -67
- package/lib/components/Toggle/Toggle.Skeleton.d.ts +9 -3
- package/lib/components/Toggletip/index.d.ts +1 -1
- package/lib/components/Toggletip/index.js +7 -5
- package/lib/components/Tooltip/DefinitionTooltip.d.ts +52 -1
- package/lib/components/Tooltip/Tooltip.js +2 -0
- package/lib/components/TreeView/TreeNode.d.ts +4 -4
- package/lib/components/UIShell/Header.d.ts +20 -3
- package/lib/components/UIShell/HeaderGlobalAction.d.ts +2 -2
- package/lib/components/UIShell/HeaderName.js +1 -1
- package/lib/components/UIShell/Link.d.ts +1 -1
- package/lib/components/UIShell/Link.js +13 -13
- package/lib/components/UIShell/SideNav.d.ts +3 -4
- package/lib/components/UIShell/SideNav.js +36 -26
- package/lib/components/UIShell/SideNavDivider.d.ts +11 -3
- package/lib/components/UIShell/SideNavHeader.d.ts +24 -1
- package/lib/components/UIShell/SideNavIcon.d.ts +20 -2
- package/lib/components/UIShell/SideNavItem.d.ts +20 -2
- package/lib/components/UIShell/SideNavItems.d.ts +22 -2
- package/lib/components/UIShell/SideNavLink.d.ts +1 -1
- package/lib/components/UIShell/SideNavLink.js +14 -14
- package/lib/components/UIShell/SideNavMenu.d.ts +1 -1
- package/lib/components/UIShell/SideNavMenuItem.d.ts +2 -2
- package/lib/components/UIShell/SwitcherDivider.d.ts +10 -2
- package/lib/internal/FloatingMenu.d.ts +1 -1
- package/lib/internal/FloatingMenu.js +0 -2
- package/lib/internal/PolymorphicProps.d.ts +3 -3
- package/lib/internal/useNoInteractiveChildren.d.ts +1 -1
- package/lib/internal/useNoInteractiveChildren.js +8 -10
- package/lib/internal/useOutsideClick.d.ts +1 -1
- package/lib/internal/useOutsideClick.js +0 -4
- package/package.json +7 -7
- package/scss/_carbon-utilities.scss +9 -0
- package/telemetry.yml +0 -1
- package/es/internal/createClassWrapper.d.ts +0 -12
- package/lib/internal/createClassWrapper.d.ts +0 -12
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2021
|
|
2
|
+
* Copyright IBM Corp. 2021, 2025
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
8
|
interface SideNavDividerProps {
|
|
9
9
|
/**
|
|
10
10
|
* Provide an optional class to be applied to the containing node
|
|
11
11
|
*/
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
declare const SideNavDivider:
|
|
14
|
+
declare const SideNavDivider: {
|
|
15
|
+
({ className }: SideNavDividerProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
propTypes: {
|
|
17
|
+
/**
|
|
18
|
+
* Provide an optional class to be applied to the containing node
|
|
19
|
+
*/
|
|
20
|
+
className: PropTypes.Requireable<string>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
15
23
|
export default SideNavDivider;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
export interface SideNavHeaderProps {
|
|
9
10
|
/**
|
|
@@ -24,5 +25,27 @@ export interface SideNavHeaderProps {
|
|
|
24
25
|
*/
|
|
25
26
|
renderIcon: React.ComponentType;
|
|
26
27
|
}
|
|
27
|
-
declare const SideNavHeader:
|
|
28
|
+
declare const SideNavHeader: {
|
|
29
|
+
({ children, className: customClassName, renderIcon: IconElement, }: SideNavHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
propTypes: {
|
|
32
|
+
/**
|
|
33
|
+
* The child nodes to be rendered
|
|
34
|
+
*/
|
|
35
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
36
|
+
/**
|
|
37
|
+
* Provide an optional class to be applied to the containing node
|
|
38
|
+
*/
|
|
39
|
+
className: PropTypes.Requireable<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Property to indicate if the side nav container is open (or not). Use to
|
|
42
|
+
* keep local state and styling in step with the SideNav expansion state.
|
|
43
|
+
*/
|
|
44
|
+
isSideNavExpanded: PropTypes.Requireable<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* A component used to render an icon.
|
|
47
|
+
*/
|
|
48
|
+
renderIcon: PropTypes.Validator<object>;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
28
51
|
export default SideNavHeader;
|
|
@@ -1,9 +1,10 @@
|
|
|
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.
|
|
6
6
|
*/
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
export interface SideNavIconProps {
|
|
9
10
|
/**
|
|
@@ -21,5 +22,22 @@ export interface SideNavIconProps {
|
|
|
21
22
|
*/
|
|
22
23
|
small?: boolean;
|
|
23
24
|
}
|
|
24
|
-
declare const SideNavIcon:
|
|
25
|
+
declare const SideNavIcon: {
|
|
26
|
+
({ children, className: customClassName, small, }: SideNavIconProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
propTypes: {
|
|
28
|
+
/**
|
|
29
|
+
* Provide a single icon as the child to `SideNavIcon` to render in the
|
|
30
|
+
* container
|
|
31
|
+
*/
|
|
32
|
+
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
33
|
+
/**
|
|
34
|
+
* Provide an optional class to be applied to the containing node
|
|
35
|
+
*/
|
|
36
|
+
className: PropTypes.Requireable<string>;
|
|
37
|
+
/**
|
|
38
|
+
* Specify whether the icon should be placed in a smaller bounding box
|
|
39
|
+
*/
|
|
40
|
+
small: PropTypes.Requireable<boolean>;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
25
43
|
export default SideNavIcon;
|
|
@@ -1,9 +1,10 @@
|
|
|
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.
|
|
6
6
|
*/
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
export interface SideNavItemProps {
|
|
9
10
|
/**
|
|
@@ -20,5 +21,22 @@ export interface SideNavItemProps {
|
|
|
20
21
|
*/
|
|
21
22
|
large?: boolean;
|
|
22
23
|
}
|
|
23
|
-
declare const SideNavItem:
|
|
24
|
+
declare const SideNavItem: {
|
|
25
|
+
({ className: customClassName, children, large, }: SideNavItemProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
propTypes: {
|
|
27
|
+
/**
|
|
28
|
+
* Provide a single icon as the child to `SideNavItem` to render in the
|
|
29
|
+
* container
|
|
30
|
+
*/
|
|
31
|
+
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
32
|
+
/**
|
|
33
|
+
* Provide an optional class to be applied to the containing node
|
|
34
|
+
*/
|
|
35
|
+
className: PropTypes.Requireable<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Specify if this is a large variation of the SideNavItem
|
|
38
|
+
*/
|
|
39
|
+
large: PropTypes.Requireable<boolean>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
24
42
|
export default SideNavItem;
|
|
@@ -1,9 +1,10 @@
|
|
|
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.
|
|
6
6
|
*/
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
export interface SideNavItemsProps {
|
|
9
10
|
/**
|
|
@@ -21,5 +22,24 @@ export interface SideNavItemsProps {
|
|
|
21
22
|
*/
|
|
22
23
|
isSideNavExpanded?: boolean;
|
|
23
24
|
}
|
|
24
|
-
declare const SideNavItems:
|
|
25
|
+
declare const SideNavItems: {
|
|
26
|
+
({ className: customClassName, children, isSideNavExpanded, }: SideNavItemsProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
displayName: string;
|
|
28
|
+
propTypes: {
|
|
29
|
+
/**
|
|
30
|
+
* Provide a single icon as the child to `SideNavIcon` to render in the
|
|
31
|
+
* container
|
|
32
|
+
*/
|
|
33
|
+
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
34
|
+
/**
|
|
35
|
+
* Provide an optional class to be applied to the containing node
|
|
36
|
+
*/
|
|
37
|
+
className: PropTypes.Requireable<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Property to indicate if the side nav container is open (or not). Use to
|
|
40
|
+
* keep local state and styling in step with the SideNav expansion state.
|
|
41
|
+
*/
|
|
42
|
+
isSideNavExpanded: PropTypes.Requireable<boolean>;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
25
45
|
export default SideNavItems;
|
|
@@ -22,16 +22,18 @@ var SideNav = require('./SideNav.js');
|
|
|
22
22
|
|
|
23
23
|
// First define a non-generic base component to work with forwardRef
|
|
24
24
|
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
const frFn = React.forwardRef;
|
|
26
|
+
const SideNavLink = frFn((props, ref) => {
|
|
27
|
+
const {
|
|
28
|
+
children,
|
|
29
|
+
className: customClassName,
|
|
30
|
+
renderIcon: IconElement,
|
|
31
|
+
isActive,
|
|
32
|
+
isSideNavExpanded,
|
|
33
|
+
large = false,
|
|
34
|
+
tabIndex,
|
|
35
|
+
...rest
|
|
36
|
+
} = props;
|
|
35
37
|
const isRail = React.useContext(SideNav.SideNavContext);
|
|
36
38
|
const prefix = usePrefix.usePrefix();
|
|
37
39
|
const className = cx({
|
|
@@ -48,10 +50,8 @@ const SideNavLinkBase = ({
|
|
|
48
50
|
}), IconElement && /*#__PURE__*/React.createElement(SideNavIcon.default, {
|
|
49
51
|
small: true
|
|
50
52
|
}, /*#__PURE__*/React.createElement(IconElement, null)), /*#__PURE__*/React.createElement(SideNavLinkText.default, null, children)));
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
// Use forwardRef with the non-generic function and cast to the generic component type
|
|
54
|
-
const SideNavLink = /*#__PURE__*/React.forwardRef(SideNavLinkBase);
|
|
53
|
+
// Cast preserves the generic call signature for consumers after forwardRef.
|
|
54
|
+
});
|
|
55
55
|
SideNavLink.displayName = 'SideNavLink';
|
|
56
56
|
SideNavLink.propTypes = {
|
|
57
57
|
...Link.LinkPropTypes,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2026
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import React, {
|
|
7
|
+
import React, { type ComponentProps, type ElementType } from 'react';
|
|
8
8
|
import Link from './Link';
|
|
9
9
|
export type SideNavMenuItemProps = ComponentProps<typeof Link> & {
|
|
10
10
|
/**
|
|
@@ -4,12 +4,20 @@
|
|
|
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
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
8
|
export interface SwitcherDividerProps {
|
|
9
9
|
/**
|
|
10
10
|
* Optionally provide a custom class to apply to the underlying `<li>` node
|
|
11
11
|
*/
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
declare const SwitcherDivider:
|
|
14
|
+
declare const SwitcherDivider: {
|
|
15
|
+
({ className: customClassName, ...other }: SwitcherDividerProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
propTypes: {
|
|
17
|
+
/**
|
|
18
|
+
* Optionally provide a custom class to apply to the underlying `<li>` node
|
|
19
|
+
*/
|
|
20
|
+
className: PropTypes.Requireable<string>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
15
23
|
export default SwitcherDivider;
|
|
@@ -174,8 +174,6 @@ const FloatingMenu = ({
|
|
|
174
174
|
// Re-check after setting the position if not already adjusting.
|
|
175
175
|
if (!isAdjustment) {
|
|
176
176
|
const newMenuSize = menuBody.getBoundingClientRect();
|
|
177
|
-
// TODO: Was there a bug in the old code? How could one `DOMRect` be
|
|
178
|
-
// compared to another using `!==`?
|
|
179
177
|
if (newMenuSize.width !== menuSize.width || newMenuSize.height !== menuSize.height) {
|
|
180
178
|
updateMenuPosition(true);
|
|
181
179
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2025
|
|
2
|
+
* Copyright IBM Corp. 2025, 2026
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -8,9 +8,9 @@ type AsProp<C extends React.ElementType> = {
|
|
|
8
8
|
as?: C;
|
|
9
9
|
};
|
|
10
10
|
type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
|
|
11
|
-
export type PolymorphicComponentProp<C extends React.ElementType, Props =
|
|
11
|
+
export type PolymorphicComponentProp<C extends React.ElementType, Props = Record<string, never>> = React.PropsWithChildren<Props & AsProp<C>> & Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
|
|
12
12
|
export type PolymorphicRef<C extends React.ElementType> = React.ComponentPropsWithRef<C>['ref'];
|
|
13
|
-
export type PolymorphicComponentPropWithRef<C extends React.ElementType, Props =
|
|
13
|
+
export type PolymorphicComponentPropWithRef<C extends React.ElementType, Props = Record<string, never>> = PolymorphicComponentProp<C, Props> & {
|
|
14
14
|
ref?: PolymorphicRef<C>;
|
|
15
15
|
};
|
|
16
16
|
export {};
|
|
@@ -10,13 +10,12 @@
|
|
|
10
10
|
var React = require('react');
|
|
11
11
|
|
|
12
12
|
const useNoInteractiveChildren = (ref, message = 'component should have no interactive child nodes') => {
|
|
13
|
-
// TODO: Why can't the condition go inside the hook?
|
|
14
13
|
if (process.env.NODE_ENV !== 'production') {
|
|
15
|
-
//
|
|
16
|
-
|
|
14
|
+
// This hook is intentionally called conditionally because it is
|
|
15
|
+
// stripped from production builds. In development it runs once
|
|
16
|
+
// to enforce accessibility constraints.
|
|
17
|
+
//
|
|
17
18
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
18
|
-
*/
|
|
19
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
20
19
|
React.useEffect(() => {
|
|
21
20
|
const node = ref.current ? getInteractiveContent(ref.current) : false;
|
|
22
21
|
if (node) {
|
|
@@ -30,13 +29,12 @@ const useNoInteractiveChildren = (ref, message = 'component should have no inter
|
|
|
30
29
|
}
|
|
31
30
|
};
|
|
32
31
|
const useInteractiveChildrenNeedDescription = (ref, message = `interactive child node(s) should have an \`aria-describedby\` property`) => {
|
|
33
|
-
// TODO: Why can't the condition go inside the hook?
|
|
34
32
|
if (process.env.NODE_ENV !== 'production') {
|
|
35
|
-
//
|
|
36
|
-
|
|
33
|
+
// This hook is intentionally called conditionally because it is
|
|
34
|
+
// stripped from production builds. In development it runs once
|
|
35
|
+
// to enforce accessibility constraints.
|
|
36
|
+
//
|
|
37
37
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
38
|
-
*/
|
|
39
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
40
38
|
React.useEffect(() => {
|
|
41
39
|
const node = ref.current ? getInteractiveContent(ref.current) : false;
|
|
42
40
|
if (node && !node.hasAttribute('aria-describedby')) {
|
|
@@ -21,11 +21,7 @@ const useOutsideClick = (ref, callback) => {
|
|
|
21
21
|
// treated as a constant as it will be false when executed in a Node.js
|
|
22
22
|
// environment and true when executed in the browser
|
|
23
23
|
if (environment.canUseDOM) {
|
|
24
|
-
// TODO: https://github.com/carbon-design-system/carbon/issues/19005
|
|
25
|
-
/*
|
|
26
24
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
27
|
-
*/
|
|
28
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
29
25
|
useEvent.useWindowEvent('click', event => {
|
|
30
26
|
const {
|
|
31
27
|
target
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/react",
|
|
3
3
|
"description": "React components for the Carbon Design System",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.100.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@babel/runtime": "^7.27.3",
|
|
55
55
|
"@carbon/feature-flags": ">=0.32.0",
|
|
56
|
-
"@carbon/icons-react": "^11.
|
|
57
|
-
"@carbon/layout": "^11.
|
|
58
|
-
"@carbon/styles": "^1.
|
|
59
|
-
"@carbon/utilities": "^0.
|
|
56
|
+
"@carbon/icons-react": "^11.74.0",
|
|
57
|
+
"@carbon/layout": "^11.47.0",
|
|
58
|
+
"@carbon/styles": "^1.99.0",
|
|
59
|
+
"@carbon/utilities": "^0.15.0",
|
|
60
60
|
"@floating-ui/react": "^0.27.4",
|
|
61
61
|
"@ibm/telemetry-js": "^1.5.0",
|
|
62
62
|
"classnames": "2.5.1",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@babel/preset-react": "^7.27.1",
|
|
80
80
|
"@babel/preset-typescript": "^7.27.1",
|
|
81
81
|
"@carbon/test-utils": "^10.39.0",
|
|
82
|
-
"@carbon/themes": "^11.
|
|
82
|
+
"@carbon/themes": "^11.67.0",
|
|
83
83
|
"@figma/code-connect": "^1.3.5",
|
|
84
84
|
"@rollup/plugin-babel": "^6.0.0",
|
|
85
85
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
@@ -131,5 +131,5 @@
|
|
|
131
131
|
"**/*.scss",
|
|
132
132
|
"**/*.css"
|
|
133
133
|
],
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "f366448449df3d81c9bb63a8a842772d734c163a"
|
|
135
135
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Code generated by @carbon/react. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// Copyright IBM Corp. 2018, 2023
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
@forward '@carbon/styles/scss/carbon-utilities';
|
package/telemetry.yml
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2025
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
import { type ComponentClass, type ForwardRefExoticComponent, type FunctionComponent, type PropsWithChildren } from 'react';
|
|
8
|
-
/**
|
|
9
|
-
* Wrap a class component with a functional component. This prevents an end-user
|
|
10
|
-
* from being able to pass `ref` and access the underlying class instance.
|
|
11
|
-
*/
|
|
12
|
-
export declare const createClassWrapper: <Props extends PropsWithChildren>(Component: ComponentClass<Props> | ForwardRefExoticComponent<Props>) => FunctionComponent<Props>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2025
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
import { type ComponentClass, type ForwardRefExoticComponent, type FunctionComponent, type PropsWithChildren } from 'react';
|
|
8
|
-
/**
|
|
9
|
-
* Wrap a class component with a functional component. This prevents an end-user
|
|
10
|
-
* from being able to pass `ref` and access the underlying class instance.
|
|
11
|
-
*/
|
|
12
|
-
export declare const createClassWrapper: <Props extends PropsWithChildren>(Component: ComponentClass<Props> | ForwardRefExoticComponent<Props>) => FunctionComponent<Props>;
|