@carbon/react 1.90.0-rc.0 → 1.91.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 +923 -964
- package/es/components/AILabel/index.js +8 -6
- package/es/components/Breadcrumb/BreadcrumbItem.js +2 -0
- package/es/components/Button/Button.js +3 -0
- package/es/components/ChatButton/ChatButton.js +1 -0
- package/es/components/CheckboxGroup/CheckboxGroup.js +21 -2
- package/es/components/CodeSnippet/CodeSnippet.d.ts +1 -1
- package/es/components/CodeSnippet/CodeSnippet.js +1 -1
- package/es/components/ComboBox/ComboBox.js +18 -13
- package/es/components/ComboButton/index.js +2 -1
- package/es/components/ComposedModal/ComposedModal.js +5 -2
- package/es/components/Copy/Copy.d.ts +1 -1
- package/es/components/Copy/Copy.js +1 -1
- package/es/components/CopyButton/CopyButton.d.ts +1 -1
- package/es/components/CopyButton/CopyButton.js +1 -1
- package/es/components/DataTable/DataTable.d.ts +60 -15
- package/es/components/DataTable/DataTable.js +119 -178
- package/es/components/DataTable/Table.d.ts +2 -2
- package/es/components/DataTable/Table.js +4 -4
- package/es/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/es/components/DataTable/TableExpandHeader.js +6 -2
- package/es/components/DataTable/TableExpandRow.js +1 -0
- package/es/components/DataTable/TableHeader.js +2 -0
- package/es/components/DataTable/TableRow.js +5 -0
- package/es/components/DataTable/TableSlugRow.js +1 -0
- package/es/components/DataTable/TableToolbarMenu.js +3 -0
- package/es/components/DataTable/state/sorting.d.ts +3 -1
- package/es/components/DataTable/state/sorting.js +2 -0
- package/es/components/DataTable/tools/sorting.js +1 -0
- package/es/components/DatePicker/DatePicker.d.ts +0 -12
- package/es/components/DatePicker/DatePicker.js +17 -6
- package/es/components/DatePicker/plugins/rangePlugin.d.ts +19 -2
- package/es/components/DatePicker/plugins/rangePlugin.js +18 -14
- package/es/components/DatePickerInput/DatePickerInput.js +6 -0
- package/es/components/Dialog/Dialog.js +10 -2
- package/es/components/Dropdown/Dropdown.js +17 -16
- package/es/components/ErrorBoundary/ErrorBoundaryContext.js +1 -0
- package/es/components/FeatureFlags/index.js +1 -0
- package/es/components/FileUploader/FileUploader.js +9 -2
- package/es/components/FileUploader/FileUploaderButton.js +1 -1
- package/es/components/FileUploader/FileUploaderDropContainer.js +1 -1
- package/es/components/FileUploader/FileUploaderItem.js +3 -0
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +2 -0
- package/es/components/FluidNumberInput/FluidNumberInput.js +3 -2
- package/es/components/FluidSearch/FluidSearch.js +3 -2
- package/es/components/FluidSelect/FluidSelect.js +3 -2
- package/es/components/FluidTextInput/FluidTextInput.js +3 -2
- package/es/components/FluidTimePicker/FluidTimePicker.js +11 -4
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +3 -2
- package/es/components/Grid/CSSGrid.js +5 -0
- package/es/components/Grid/Column.js +3 -0
- package/es/components/Grid/ColumnHang.js +1 -0
- package/es/components/Grid/FlexGrid.js +1 -0
- package/es/components/Grid/Row.js +1 -0
- package/es/components/Heading/index.js +3 -1
- package/es/components/IconButton/index.js +5 -3
- package/es/components/IconIndicator/index.js +4 -2
- package/es/components/InlineCheckbox/InlineCheckbox.js +3 -2
- package/es/components/Layout/index.js +6 -4
- package/es/components/LayoutDirection/LayoutDirection.js +2 -0
- package/es/components/Link/Link.js +3 -0
- package/es/components/ListBox/ListBoxMenuItem.js +4 -1
- package/es/components/ListBox/next/ListBoxTrigger.js +3 -2
- package/es/components/Menu/Menu.js +6 -9
- package/es/components/Menu/MenuContext.js +1 -0
- package/es/components/Menu/MenuItem.d.ts +1 -1
- package/es/components/Menu/MenuItem.js +10 -18
- package/es/components/MenuButton/index.js +7 -2
- package/es/components/Modal/Modal.js +4 -1
- package/es/components/ModalWrapper/ModalWrapper.js +2 -0
- package/es/components/MultiSelect/FilterableMultiSelect.js +25 -6
- package/es/components/MultiSelect/MultiSelect.js +22 -17
- package/es/components/Notification/Notification.d.ts +6 -6
- package/es/components/Notification/Notification.js +7 -7
- package/es/components/NumberInput/NumberInput.js +7 -1
- package/es/components/OverflowMenu/OverflowMenu.js +3 -1
- package/es/components/OverflowMenu/next/index.js +4 -3
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +2 -0
- package/es/components/PageHeader/PageHeader.d.ts +3 -3
- package/es/components/PageHeader/PageHeader.js +22 -8
- package/es/components/Pagination/Pagination.js +6 -2
- package/es/components/PaginationNav/PaginationNav.js +2 -5
- package/es/components/Popover/index.js +15 -5
- package/es/components/ProgressBar/ProgressBar.js +4 -2
- package/es/components/RadioTile/RadioTile.js +2 -2
- package/es/components/Search/Search.d.ts +4 -2
- package/es/components/Search/Search.js +7 -6
- package/es/components/Select/Select.js +2 -3
- package/es/components/ShapeIndicator/index.js +4 -2
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.d.ts +4 -4
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +1 -2
- package/es/components/SkeletonText/SkeletonText.js +0 -2
- package/es/components/Slider/Slider.d.ts +144 -188
- package/es/components/Slider/Slider.js +798 -726
- package/es/components/Slider/index.d.ts +2 -2
- package/es/components/Stack/HStack.js +1 -0
- package/es/components/Stack/Stack.js +6 -9
- package/es/components/Stack/VStack.js +1 -0
- package/es/components/StructuredList/StructuredList.js +3 -0
- package/es/components/Switch/Switch.js +1 -1
- package/es/components/Tabs/Tabs.d.ts +4 -0
- package/es/components/Tabs/Tabs.js +28 -17
- package/es/components/Tag/DismissibleTag.js +2 -0
- package/es/components/Tag/OperationalTag.js +2 -0
- package/es/components/Tag/SelectableTag.js +2 -0
- package/es/components/Tag/Tag.js +4 -0
- package/es/components/Tag/isEllipsisActive.js +1 -0
- package/es/components/Text/Text.js +1 -0
- package/es/components/TextArea/TextArea.js +13 -6
- package/es/components/TextInput/ControlledPasswordInput.js +4 -6
- package/es/components/TextInput/PasswordInput.js +9 -4
- package/es/components/TextInput/TextInput.js +6 -4
- package/es/components/TextInput/util.d.ts +17 -5
- package/es/components/TextInput/util.js +2 -7
- package/es/components/Theme/index.js +8 -3
- package/es/components/Tile/Tile.js +14 -17
- package/es/components/TimePicker/TimePicker.js +1 -0
- package/es/components/Toggle/Toggle.js +1 -1
- package/es/components/Toggletip/index.js +4 -0
- package/es/components/Tooltip/DefinitionTooltip.js +1 -0
- package/es/components/Tooltip/Tooltip.js +30 -23
- package/es/components/TreeView/TreeNode.js +13 -5
- package/es/components/TreeView/TreeView.js +7 -0
- package/es/components/UIShell/HeaderContainer.js +3 -1
- package/es/components/UIShell/HeaderGlobalAction.js +2 -2
- package/es/components/UIShell/HeaderMenu.js +3 -3
- package/es/components/UIShell/HeaderPanel.d.ts +1 -1
- package/es/components/UIShell/HeaderPanel.js +2 -2
- package/es/components/UIShell/Link.js +2 -0
- package/es/components/UIShell/SideNavItems.js +1 -0
- package/es/components/UIShell/SideNavMenu.js +2 -2
- package/es/components/UIShell/SideNavMenuItem.js +1 -1
- package/es/components/UIShell/SideNavSwitcher.js +1 -1
- package/es/components/UIShell/Switcher.js +2 -1
- package/es/components/UIShell/SwitcherItem.js +4 -2
- package/es/index.d.ts +12 -13
- package/es/index.js +25 -24
- package/es/internal/FloatingMenu.js +7 -1
- package/es/internal/Selection.js +12 -3
- package/es/internal/defaultItemToString.d.ts +7 -0
- package/es/internal/defaultItemToString.js +17 -0
- package/es/internal/index.d.ts +1 -0
- package/es/internal/useMergedRefs.js +1 -0
- package/es/internal/useNoInteractiveChildren.js +4 -0
- package/es/internal/useOutsideClick.js +1 -0
- package/es/internal/useOverflowItems.js +6 -0
- package/es/internal/useResizeObserver.js +4 -0
- package/es/internal/useSavedCallback.js +1 -0
- package/es/internal/warning.js +1 -0
- package/es/prop-types/deprecateValuesWithin.d.ts +8 -1
- package/es/prop-types/deprecateValuesWithin.js +6 -6
- package/es/prop-types/isRequiredOneOf.js +4 -1
- package/es/prop-types/requiredIfGivenPropIsTruthy.d.ts +8 -7
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +10 -10
- package/es/tools/events.js +3 -1
- package/es/tools/wrapComponent.js +1 -0
- package/lib/components/AILabel/index.js +8 -6
- package/lib/components/Breadcrumb/BreadcrumbItem.js +2 -0
- package/lib/components/Button/Button.js +3 -0
- package/lib/components/ChatButton/ChatButton.js +1 -0
- package/lib/components/CheckboxGroup/CheckboxGroup.js +20 -1
- package/lib/components/CodeSnippet/CodeSnippet.d.ts +1 -1
- package/lib/components/CodeSnippet/CodeSnippet.js +1 -1
- package/lib/components/ComboBox/ComboBox.js +20 -15
- package/lib/components/ComboButton/index.js +2 -1
- package/lib/components/ComposedModal/ComposedModal.js +5 -2
- package/lib/components/Copy/Copy.d.ts +1 -1
- package/lib/components/Copy/Copy.js +1 -1
- package/lib/components/CopyButton/CopyButton.d.ts +1 -1
- package/lib/components/CopyButton/CopyButton.js +1 -1
- package/lib/components/DataTable/DataTable.d.ts +60 -15
- package/lib/components/DataTable/DataTable.js +119 -178
- package/lib/components/DataTable/Table.d.ts +2 -2
- package/lib/components/DataTable/Table.js +4 -4
- package/lib/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/lib/components/DataTable/TableExpandHeader.js +6 -2
- package/lib/components/DataTable/TableExpandRow.js +1 -0
- package/lib/components/DataTable/TableHeader.js +2 -0
- package/lib/components/DataTable/TableRow.js +5 -0
- package/lib/components/DataTable/TableSlugRow.js +1 -0
- package/lib/components/DataTable/TableToolbarMenu.js +3 -0
- package/lib/components/DataTable/state/sorting.d.ts +3 -1
- package/lib/components/DataTable/state/sorting.js +2 -0
- package/lib/components/DataTable/tools/sorting.js +1 -0
- package/lib/components/DatePicker/DatePicker.d.ts +0 -12
- package/lib/components/DatePicker/DatePicker.js +16 -5
- package/lib/components/DatePicker/plugins/rangePlugin.d.ts +19 -2
- package/lib/components/DatePicker/plugins/rangePlugin.js +18 -16
- package/lib/components/DatePickerInput/DatePickerInput.js +6 -0
- package/lib/components/Dialog/Dialog.js +10 -2
- package/lib/components/Dropdown/Dropdown.js +19 -18
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +1 -0
- package/lib/components/FeatureFlags/index.js +1 -0
- package/lib/components/FileUploader/FileUploader.js +9 -2
- package/lib/components/FileUploader/FileUploaderButton.js +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -1
- package/lib/components/FileUploader/FileUploaderItem.js +3 -0
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +2 -0
- package/lib/components/FluidNumberInput/FluidNumberInput.js +3 -2
- package/lib/components/FluidSearch/FluidSearch.js +3 -2
- package/lib/components/FluidSelect/FluidSelect.js +3 -2
- package/lib/components/FluidTextInput/FluidTextInput.js +3 -2
- package/lib/components/FluidTimePicker/FluidTimePicker.js +11 -4
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +3 -2
- package/lib/components/Grid/CSSGrid.js +5 -0
- package/lib/components/Grid/Column.js +3 -0
- package/lib/components/Grid/ColumnHang.js +1 -0
- package/lib/components/Grid/FlexGrid.js +1 -0
- package/lib/components/Grid/Row.js +1 -0
- package/lib/components/Heading/index.js +3 -1
- package/lib/components/IconButton/index.js +5 -3
- package/lib/components/IconIndicator/index.js +4 -2
- package/lib/components/InlineCheckbox/InlineCheckbox.js +3 -2
- package/lib/components/Layout/index.js +6 -4
- package/lib/components/LayoutDirection/LayoutDirection.js +2 -0
- package/lib/components/Link/Link.js +3 -0
- package/lib/components/ListBox/ListBoxMenuItem.js +4 -1
- package/lib/components/ListBox/next/ListBoxTrigger.js +3 -2
- package/lib/components/Menu/Menu.js +6 -9
- package/lib/components/Menu/MenuContext.js +1 -0
- package/lib/components/Menu/MenuItem.d.ts +1 -1
- package/lib/components/Menu/MenuItem.js +11 -19
- package/lib/components/MenuButton/index.js +7 -2
- package/lib/components/Modal/Modal.js +4 -1
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -0
- package/lib/components/MultiSelect/FilterableMultiSelect.js +32 -13
- package/lib/components/MultiSelect/MultiSelect.js +23 -18
- package/lib/components/Notification/Notification.d.ts +6 -6
- package/lib/components/Notification/Notification.js +7 -7
- package/lib/components/NumberInput/NumberInput.js +7 -1
- package/lib/components/OverflowMenu/OverflowMenu.js +3 -1
- package/lib/components/OverflowMenu/next/index.js +4 -3
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +2 -0
- package/lib/components/PageHeader/PageHeader.d.ts +3 -3
- package/lib/components/PageHeader/PageHeader.js +22 -8
- package/lib/components/Pagination/Pagination.js +6 -2
- package/lib/components/PaginationNav/PaginationNav.js +2 -5
- package/lib/components/Popover/index.js +15 -5
- package/lib/components/ProgressBar/ProgressBar.js +4 -2
- package/lib/components/RadioTile/RadioTile.js +2 -2
- package/lib/components/Search/Search.d.ts +4 -2
- package/lib/components/Search/Search.js +7 -6
- package/lib/components/Select/Select.js +2 -3
- package/lib/components/ShapeIndicator/index.js +4 -2
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.d.ts +4 -4
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +1 -2
- package/lib/components/SkeletonText/SkeletonText.js +0 -2
- package/lib/components/Slider/Slider.d.ts +144 -188
- package/lib/components/Slider/Slider.js +795 -725
- package/lib/components/Slider/index.d.ts +2 -2
- package/lib/components/Stack/HStack.js +1 -0
- package/lib/components/Stack/Stack.js +6 -9
- package/lib/components/Stack/VStack.js +1 -0
- package/lib/components/StructuredList/StructuredList.js +3 -0
- package/lib/components/Switch/Switch.js +1 -1
- package/lib/components/Tabs/Tabs.d.ts +4 -0
- package/lib/components/Tabs/Tabs.js +28 -17
- package/lib/components/Tag/DismissibleTag.js +2 -0
- package/lib/components/Tag/OperationalTag.js +2 -0
- package/lib/components/Tag/SelectableTag.js +2 -0
- package/lib/components/Tag/Tag.js +4 -0
- package/lib/components/Tag/isEllipsisActive.js +1 -0
- package/lib/components/Text/Text.js +1 -0
- package/lib/components/TextArea/TextArea.js +13 -6
- package/lib/components/TextInput/ControlledPasswordInput.js +3 -5
- package/lib/components/TextInput/PasswordInput.js +8 -3
- package/lib/components/TextInput/TextInput.js +5 -3
- package/lib/components/TextInput/util.d.ts +17 -5
- package/lib/components/TextInput/util.js +2 -7
- package/lib/components/Theme/index.js +8 -3
- package/lib/components/Tile/Tile.js +14 -17
- package/lib/components/TimePicker/TimePicker.js +1 -0
- package/lib/components/Toggle/Toggle.js +1 -1
- package/lib/components/Toggletip/index.js +4 -0
- package/lib/components/Tooltip/DefinitionTooltip.js +1 -0
- package/lib/components/Tooltip/Tooltip.js +30 -23
- package/lib/components/TreeView/TreeNode.js +13 -5
- package/lib/components/TreeView/TreeView.js +7 -0
- package/lib/components/UIShell/HeaderContainer.js +3 -1
- package/lib/components/UIShell/HeaderGlobalAction.js +2 -2
- package/lib/components/UIShell/HeaderMenu.js +3 -3
- package/lib/components/UIShell/HeaderPanel.d.ts +1 -1
- package/lib/components/UIShell/HeaderPanel.js +2 -2
- package/lib/components/UIShell/Link.js +2 -0
- package/lib/components/UIShell/SideNavItems.js +1 -0
- package/lib/components/UIShell/SideNavMenu.js +2 -2
- package/lib/components/UIShell/SideNavMenuItem.js +1 -1
- package/lib/components/UIShell/SideNavSwitcher.js +1 -1
- package/lib/components/UIShell/Switcher.js +2 -1
- package/lib/components/UIShell/SwitcherItem.js +4 -2
- package/lib/index.d.ts +12 -13
- package/lib/index.js +51 -28
- package/lib/internal/FloatingMenu.js +7 -1
- package/lib/internal/Selection.js +12 -3
- package/lib/internal/defaultItemToString.d.ts +7 -0
- package/lib/internal/defaultItemToString.js +19 -0
- package/lib/internal/index.d.ts +1 -0
- package/lib/internal/useMergedRefs.js +1 -0
- package/lib/internal/useNoInteractiveChildren.js +4 -0
- package/lib/internal/useOutsideClick.js +1 -0
- package/lib/internal/useOverflowItems.js +6 -0
- package/lib/internal/useResizeObserver.js +4 -0
- package/lib/internal/useSavedCallback.js +1 -0
- package/lib/internal/warning.js +1 -0
- package/lib/prop-types/deprecateValuesWithin.d.ts +8 -1
- package/lib/prop-types/deprecateValuesWithin.js +6 -8
- package/lib/prop-types/isRequiredOneOf.js +4 -1
- package/lib/prop-types/requiredIfGivenPropIsTruthy.d.ts +8 -7
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +10 -12
- package/lib/tools/events.js +3 -1
- package/lib/tools/wrapComponent.js +1 -0
- package/package.json +10 -9
- package/es/components/MultiSelect/tools/itemToString.d.ts +0 -1
- package/es/components/MultiSelect/tools/itemToString.js +0 -21
- package/es/components/Slider/index.js +0 -14
- package/es/internal/createClassWrapper.js +0 -23
- package/lib/components/MultiSelect/tools/itemToString.d.ts +0 -1
- package/lib/components/MultiSelect/tools/itemToString.js +0 -23
- package/lib/components/Slider/index.js +0 -20
- package/lib/internal/createClassWrapper.js +0 -25
|
@@ -27,7 +27,7 @@ import { isComponentElement } from '../../internal/utils.js';
|
|
|
27
27
|
import { Text } from '../Text/Text.js';
|
|
28
28
|
|
|
29
29
|
var _CheckboxCheckedFille, _Checkbox, _ChevronDown, _ChevronDown2;
|
|
30
|
-
const Tile = /*#__PURE__*/React.forwardRef(
|
|
30
|
+
const Tile = /*#__PURE__*/React.forwardRef(({
|
|
31
31
|
children,
|
|
32
32
|
className,
|
|
33
33
|
decorator,
|
|
@@ -35,7 +35,7 @@ const Tile = /*#__PURE__*/React.forwardRef(function Tile({
|
|
|
35
35
|
slug,
|
|
36
36
|
hasRoundedCorners = false,
|
|
37
37
|
...rest
|
|
38
|
-
}, ref) {
|
|
38
|
+
}, ref) => {
|
|
39
39
|
const prefix = usePrefix();
|
|
40
40
|
const tileClasses = cx(`${prefix}--tile`, {
|
|
41
41
|
[`${prefix}--tile--light`]: light,
|
|
@@ -82,7 +82,7 @@ Tile.propTypes = {
|
|
|
82
82
|
*/
|
|
83
83
|
slug: deprecate(PropTypes.node, 'The `slug` prop for `Tile` has ' + 'been deprecated in favor of the new `decorator` prop. It will be removed in the next major release.')
|
|
84
84
|
};
|
|
85
|
-
const ClickableTile = /*#__PURE__*/React.forwardRef(
|
|
85
|
+
const ClickableTile = /*#__PURE__*/React.forwardRef(({
|
|
86
86
|
children,
|
|
87
87
|
className,
|
|
88
88
|
clicked = false,
|
|
@@ -96,7 +96,7 @@ const ClickableTile = /*#__PURE__*/React.forwardRef(function ClickableTile({
|
|
|
96
96
|
hasRoundedCorners,
|
|
97
97
|
slug,
|
|
98
98
|
...rest
|
|
99
|
-
}, ref) {
|
|
99
|
+
}, ref) => {
|
|
100
100
|
const prefix = usePrefix();
|
|
101
101
|
const classes = cx(`${prefix}--tile`, `${prefix}--tile--clickable`, {
|
|
102
102
|
[`${prefix}--tile--is-clicked`]: clicked,
|
|
@@ -205,7 +205,8 @@ ClickableTile.propTypes = {
|
|
|
205
205
|
*/
|
|
206
206
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
207
207
|
};
|
|
208
|
-
|
|
208
|
+
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
209
|
+
const SelectableTile = /*#__PURE__*/React.forwardRef(({
|
|
209
210
|
children,
|
|
210
211
|
className,
|
|
211
212
|
decorator,
|
|
@@ -221,7 +222,7 @@ const SelectableTile = /*#__PURE__*/React.forwardRef(function SelectableTile({
|
|
|
221
222
|
slug,
|
|
222
223
|
hasRoundedCorners,
|
|
223
224
|
...rest
|
|
224
|
-
}, ref) {
|
|
225
|
+
}, ref) => {
|
|
225
226
|
const prefix = usePrefix();
|
|
226
227
|
const clickHandler = onClick;
|
|
227
228
|
const keyDownHandler = onKeyDown;
|
|
@@ -282,9 +283,7 @@ const SelectableTile = /*#__PURE__*/React.forwardRef(function SelectableTile({
|
|
|
282
283
|
onClick: !disabled ? handleClick : undefined,
|
|
283
284
|
role: "checkbox",
|
|
284
285
|
"aria-checked": isSelected,
|
|
285
|
-
onKeyDown: !disabled ? handleKeyDown : undefined
|
|
286
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
287
|
-
,
|
|
286
|
+
onKeyDown: !disabled ? handleKeyDown : undefined,
|
|
288
287
|
tabIndex: !disabled ? tabIndex : undefined,
|
|
289
288
|
ref: ref,
|
|
290
289
|
id: id,
|
|
@@ -364,16 +363,14 @@ SelectableTile.propTypes = {
|
|
|
364
363
|
*/
|
|
365
364
|
value: deprecate(PropTypes.oneOfType([PropTypes.string, PropTypes.number]), 'The `value` property is no longer used. It will be removed in the next major release.`')
|
|
366
365
|
};
|
|
367
|
-
const ExpandableTile = /*#__PURE__*/React.forwardRef(
|
|
366
|
+
const ExpandableTile = /*#__PURE__*/React.forwardRef(({
|
|
368
367
|
tabIndex = 0,
|
|
369
368
|
className,
|
|
370
369
|
children,
|
|
371
370
|
decorator,
|
|
372
371
|
expanded = false,
|
|
373
372
|
tileMaxHeight = 0,
|
|
374
|
-
// eslint-disable-line
|
|
375
373
|
tilePadding = 0,
|
|
376
|
-
// eslint-disable-line
|
|
377
374
|
onClick,
|
|
378
375
|
onKeyUp,
|
|
379
376
|
tileCollapsedIconText = 'Interact to expand Tile',
|
|
@@ -384,7 +381,7 @@ const ExpandableTile = /*#__PURE__*/React.forwardRef(function ExpandableTile({
|
|
|
384
381
|
slug,
|
|
385
382
|
hasRoundedCorners,
|
|
386
383
|
...rest
|
|
387
|
-
}, forwardRef) {
|
|
384
|
+
}, forwardRef) => {
|
|
388
385
|
const [isTileMaxHeight, setIsTileMaxHeight] = useState(tileMaxHeight);
|
|
389
386
|
const [isTilePadding, setIsTilePadding] = useState(tilePadding);
|
|
390
387
|
const [prevExpanded, setPrevExpanded] = useState(expanded);
|
|
@@ -609,9 +606,9 @@ ExpandableTile.propTypes = {
|
|
|
609
606
|
tileExpandedLabel: PropTypes.string
|
|
610
607
|
};
|
|
611
608
|
ExpandableTile.displayName = 'ExpandableTile';
|
|
612
|
-
const TileAboveTheFoldContent = /*#__PURE__*/React.forwardRef(
|
|
609
|
+
const TileAboveTheFoldContent = /*#__PURE__*/React.forwardRef(({
|
|
613
610
|
children
|
|
614
|
-
}, ref) {
|
|
611
|
+
}, ref) => {
|
|
615
612
|
const prefix = usePrefix();
|
|
616
613
|
return /*#__PURE__*/React.createElement("div", {
|
|
617
614
|
ref: ref,
|
|
@@ -625,9 +622,9 @@ TileAboveTheFoldContent.propTypes = {
|
|
|
625
622
|
children: PropTypes.node
|
|
626
623
|
};
|
|
627
624
|
TileAboveTheFoldContent.displayName = 'TileAboveTheFoldContent';
|
|
628
|
-
const TileBelowTheFoldContent = /*#__PURE__*/React.forwardRef(
|
|
625
|
+
const TileBelowTheFoldContent = /*#__PURE__*/React.forwardRef(({
|
|
629
626
|
children
|
|
630
|
-
}, ref) {
|
|
627
|
+
}, ref) => {
|
|
631
628
|
const prefix = usePrefix();
|
|
632
629
|
return /*#__PURE__*/React.createElement("div", {
|
|
633
630
|
ref: ref,
|
|
@@ -112,6 +112,7 @@ const TimePicker = frFn((props, ref) => {
|
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
114
|
const mappedChildren = React.Children.map(children, pickerSelect => {
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
115
116
|
const item = pickerSelect;
|
|
116
117
|
if (item) {
|
|
117
118
|
return /*#__PURE__*/React.cloneElement(item, {
|
|
@@ -67,7 +67,7 @@ function Toggle({
|
|
|
67
67
|
const labelId = `${id}_label`;
|
|
68
68
|
return (
|
|
69
69
|
/*#__PURE__*/
|
|
70
|
-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
70
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
71
71
|
React.createElement("div", {
|
|
72
72
|
className: wrapperClasses,
|
|
73
73
|
onClick: !labelText ? e => {
|
|
@@ -27,6 +27,7 @@ function ToggletipLabel({
|
|
|
27
27
|
}) {
|
|
28
28
|
const prefix = usePrefix();
|
|
29
29
|
const className = cx(`${prefix}--toggletip-label`, customClassName);
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
30
31
|
const BaseComponentAsAny = BaseComponent;
|
|
31
32
|
return /*#__PURE__*/React.createElement(BaseComponentAsAny, _extends({
|
|
32
33
|
className: className
|
|
@@ -133,6 +134,7 @@ function Toggletip({
|
|
|
133
134
|
const eventType = 'PointerEvent' in window ? 'pointerdown' : 'mousedown';
|
|
134
135
|
const handleOutsideClick = event => {
|
|
135
136
|
const node = event.target;
|
|
137
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
136
138
|
if (open && node && !ref.current.contains(node)) {
|
|
137
139
|
setOpen(false);
|
|
138
140
|
}
|
|
@@ -165,6 +167,7 @@ function Toggletip({
|
|
|
165
167
|
// Get all the properties from Popover except for "open".
|
|
166
168
|
// The Typescript types for PropTypes are really messed up so we need lots of
|
|
167
169
|
// casting. It will be great when we can finally get rid of PropTypes altogether.
|
|
170
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
168
171
|
const {
|
|
169
172
|
open,
|
|
170
173
|
...popoverNonOpenPropTypes
|
|
@@ -192,6 +195,7 @@ const ToggletipButton = /*#__PURE__*/React.forwardRef(function ToggletipButton({
|
|
|
192
195
|
const toggletip = useToggletip();
|
|
193
196
|
const prefix = usePrefix();
|
|
194
197
|
const className = cx(`${prefix}--toggletip-button`, customClassName);
|
|
198
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
195
199
|
const ComponentToggle = BaseComponent ?? 'button';
|
|
196
200
|
if (ComponentToggle !== 'button') {
|
|
197
201
|
return /*#__PURE__*/React.createElement(ComponentToggle, _extends({}, toggletip?.onClick, {
|
|
@@ -48,6 +48,7 @@ const DefinitionTooltip = ({
|
|
|
48
48
|
setOpen(false);
|
|
49
49
|
},
|
|
50
50
|
onMouseEnter: () => {
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
51
52
|
openOnHover ? setOpen(true) : null;
|
|
52
53
|
},
|
|
53
54
|
onFocus: () => {
|
|
@@ -22,6 +22,7 @@ import useIsomorphicEffect from '../../internal/useIsomorphicEffect.js';
|
|
|
22
22
|
* Event types that trigger a "drag" to stop.
|
|
23
23
|
*/
|
|
24
24
|
const DRAG_STOP_EVENT_TYPES = new Set(['mouseup', 'touchend', 'touchcancel']);
|
|
25
|
+
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
25
26
|
const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
26
27
|
as,
|
|
27
28
|
align = 'top',
|
|
@@ -68,6 +69,8 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
|
68
69
|
'aria-labelledby': labelledBy,
|
|
69
70
|
'aria-describedby': describedBy
|
|
70
71
|
};
|
|
72
|
+
|
|
73
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
71
74
|
function getChildEventHandlers(childProps) {
|
|
72
75
|
const eventHandlerFunctions = Object.keys(triggerProps).filter(prop => prop.startsWith('on'));
|
|
73
76
|
const eventHandlers = {};
|
|
@@ -154,29 +157,33 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
|
154
157
|
});
|
|
155
158
|
};
|
|
156
159
|
}, [isDragging, onDragStop]);
|
|
157
|
-
return
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
160
|
+
return (
|
|
161
|
+
/*#__PURE__*/
|
|
162
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
163
|
+
React.createElement(Popover, _extends({
|
|
164
|
+
as: as,
|
|
165
|
+
ref: ref
|
|
166
|
+
}, rest, {
|
|
167
|
+
align: align,
|
|
168
|
+
className: cx(`${prefix}--tooltip`, customClassName),
|
|
169
|
+
dropShadow: dropShadow,
|
|
170
|
+
highContrast: highContrast,
|
|
171
|
+
onKeyDown: onKeyDown,
|
|
172
|
+
onMouseLeave: onMouseLeave,
|
|
173
|
+
open: open
|
|
174
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
175
|
+
className: `${prefix}--tooltip-trigger__wrapper`
|
|
176
|
+
}, typeof child !== 'undefined' ? /*#__PURE__*/React.cloneElement(child, {
|
|
177
|
+
...triggerProps,
|
|
178
|
+
...getChildEventHandlers(child.props)
|
|
179
|
+
}) : null), /*#__PURE__*/React.createElement(PopoverContent, {
|
|
180
|
+
"aria-hidden": open ? 'false' : 'true',
|
|
181
|
+
className: `${prefix}--tooltip-content`,
|
|
182
|
+
id: id,
|
|
183
|
+
onMouseEnter: onMouseEnter,
|
|
184
|
+
role: "tooltip"
|
|
185
|
+
}, label || description))
|
|
186
|
+
);
|
|
180
187
|
});
|
|
181
188
|
Tooltip.propTypes = {
|
|
182
189
|
/**
|
|
@@ -57,8 +57,7 @@ const useEllipsisCheck = (label, detailsWrapperRef) => {
|
|
|
57
57
|
}
|
|
58
58
|
}, [detailsWrapperRef]);
|
|
59
59
|
useEffect(() => {
|
|
60
|
-
|
|
61
|
-
animationFrameId = requestAnimationFrame(checkEllipsis);
|
|
60
|
+
const animationFrameId = requestAnimationFrame(checkEllipsis);
|
|
62
61
|
let resizeObserver;
|
|
63
62
|
if (typeof window !== 'undefined' && typeof window.ResizeObserver !== 'undefined' && labelTextRef.current) {
|
|
64
63
|
resizeObserver = new window.ResizeObserver(() => {
|
|
@@ -73,9 +72,11 @@ const useEllipsisCheck = (label, detailsWrapperRef) => {
|
|
|
73
72
|
cancelAnimationFrame(animationFrameId);
|
|
74
73
|
if (resizeObserver) {
|
|
75
74
|
if (labelTextRef.current) {
|
|
75
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
76
76
|
resizeObserver.unobserve(labelTextRef.current);
|
|
77
77
|
}
|
|
78
78
|
if (detailsWrapperRef.current) {
|
|
79
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
79
80
|
resizeObserver.unobserve(detailsWrapperRef.current);
|
|
80
81
|
}
|
|
81
82
|
resizeObserver.disconnect();
|
|
@@ -126,6 +127,8 @@ const TreeNode = /*#__PURE__*/React.forwardRef(({
|
|
|
126
127
|
tooltipText
|
|
127
128
|
} = useEllipsisCheck(label, detailsWrapperRef);
|
|
128
129
|
const enableTreeviewControllable = useFeatureFlag('enable-treeview-controllable');
|
|
130
|
+
|
|
131
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
129
132
|
const {
|
|
130
133
|
current: id
|
|
131
134
|
} = useRef(nodeId || useId());
|
|
@@ -368,7 +371,10 @@ const TreeNode = /*#__PURE__*/React.forwardRef(({
|
|
|
368
371
|
const nodeContent = /*#__PURE__*/React.createElement("div", {
|
|
369
372
|
className: `${prefix}--tree-node__label`,
|
|
370
373
|
ref: currentNodeLabel
|
|
371
|
-
}, children &&
|
|
374
|
+
}, children &&
|
|
375
|
+
/*#__PURE__*/
|
|
376
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions , jsx-a11y/click-events-have-key-events -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
377
|
+
React.createElement("span", {
|
|
372
378
|
className: `${prefix}--tree-parent-node__toggle`,
|
|
373
379
|
onClick: handleToggleClick
|
|
374
380
|
}, /*#__PURE__*/React.createElement(CaretDown, {
|
|
@@ -396,7 +402,7 @@ const TreeNode = /*#__PURE__*/React.forwardRef(({
|
|
|
396
402
|
value: depth + 1
|
|
397
403
|
}, children)));
|
|
398
404
|
}
|
|
399
|
-
return /*#__PURE__*/React.createElement("li", _extends({}, treeNodeProps, {
|
|
405
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("li", _extends({}, treeNodeProps, {
|
|
400
406
|
"aria-expanded": children ? !!expanded : undefined,
|
|
401
407
|
ref: setRefs
|
|
402
408
|
}), nodeContent, children && /*#__PURE__*/React.createElement("ul", {
|
|
@@ -407,7 +413,7 @@ const TreeNode = /*#__PURE__*/React.forwardRef(({
|
|
|
407
413
|
})
|
|
408
414
|
}, /*#__PURE__*/React.createElement(DepthContext.Provider, {
|
|
409
415
|
value: depth + 1
|
|
410
|
-
}, children)));
|
|
416
|
+
}, children))));
|
|
411
417
|
});
|
|
412
418
|
TreeNode.propTypes = {
|
|
413
419
|
/**
|
|
@@ -468,12 +474,14 @@ TreeNode.propTypes = {
|
|
|
468
474
|
/**
|
|
469
475
|
* A component used to render an icon.
|
|
470
476
|
*/
|
|
477
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
471
478
|
// @ts-ignore
|
|
472
479
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
473
480
|
/**
|
|
474
481
|
* **Note:** this is controlled by the parent TreeView component, do not set manually.
|
|
475
482
|
* Array containing all selected node IDs in the tree
|
|
476
483
|
*/
|
|
484
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
477
485
|
// @ts-ignore
|
|
478
486
|
selected: deprecate(PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), 'The `selected` prop for `TreeNode` is no longer needed and has ' + 'been deprecated. It will be removed in the next major release.'),
|
|
479
487
|
/**
|
|
@@ -32,11 +32,14 @@ const TreeView = ({
|
|
|
32
32
|
...rest
|
|
33
33
|
}) => {
|
|
34
34
|
const enableTreeviewControllable = useFeatureFlag('enable-treeview-controllable');
|
|
35
|
+
|
|
36
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
35
37
|
const {
|
|
36
38
|
current: treeId
|
|
37
39
|
} = useRef(rest.id || useId());
|
|
38
40
|
const prefix = usePrefix();
|
|
39
41
|
const treeClasses = cx(className, `${prefix}--tree`, {
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
40
43
|
// @ts-ignore - will always be false according to prop types
|
|
41
44
|
|
|
42
45
|
[`${prefix}--tree--${size}`]: size !== 'default'
|
|
@@ -62,6 +65,8 @@ const TreeView = ({
|
|
|
62
65
|
item.tabIndex = -1;
|
|
63
66
|
});
|
|
64
67
|
}
|
|
68
|
+
|
|
69
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
65
70
|
function handleTreeSelect(event, node) {
|
|
66
71
|
const nodeId = node.id;
|
|
67
72
|
if (nodeId) {
|
|
@@ -110,6 +115,7 @@ const TreeView = ({
|
|
|
110
115
|
if (match(event, ArrowDown)) {
|
|
111
116
|
nextFocusNode = treeWalker.current.nextNode();
|
|
112
117
|
}
|
|
118
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
113
119
|
// @ts-ignore - `matches` doesn't like the object syntax without missing properties
|
|
114
120
|
if (matches(event, [Home, End, {
|
|
115
121
|
code: 'KeyA'
|
|
@@ -126,6 +132,7 @@ const TreeView = ({
|
|
|
126
132
|
}
|
|
127
133
|
}
|
|
128
134
|
}
|
|
135
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
129
136
|
// @ts-ignore - `matches` doesn't like the object syntax without missing properties
|
|
130
137
|
if (match(event, {
|
|
131
138
|
code: 'KeyA'
|
|
@@ -27,7 +27,9 @@ function HeaderContainer({
|
|
|
27
27
|
const handleHeaderMenuButtonClick = useCallback(() => {
|
|
28
28
|
setIsSideNavExpandedState(prevIsSideNavExpanded => !prevIsSideNavExpanded);
|
|
29
29
|
}, [setIsSideNavExpandedState]);
|
|
30
|
-
return /*#__PURE__*/React.createElement(Children
|
|
30
|
+
return /*#__PURE__*/React.createElement(Children
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
32
|
+
, _extends({}, rest, {
|
|
31
33
|
isSideNavExpanded: isSideNavExpandedState,
|
|
32
34
|
onClickSideNavExpand: handleHeaderMenuButtonClick
|
|
33
35
|
}));
|
|
@@ -22,7 +22,7 @@ import { usePrefix } from '../../internal/usePrefix.js';
|
|
|
22
22
|
*
|
|
23
23
|
* Note: children passed to this component should be an Icon.
|
|
24
24
|
*/
|
|
25
|
-
const HeaderGlobalAction = /*#__PURE__*/React.forwardRef(
|
|
25
|
+
const HeaderGlobalAction = /*#__PURE__*/React.forwardRef(({
|
|
26
26
|
'aria-label': ariaLabel,
|
|
27
27
|
'aria-labelledby': ariaLabelledBy,
|
|
28
28
|
children,
|
|
@@ -33,7 +33,7 @@ const HeaderGlobalAction = /*#__PURE__*/React.forwardRef(function HeaderGlobalAc
|
|
|
33
33
|
isActive,
|
|
34
34
|
tooltipAlignment,
|
|
35
35
|
...rest
|
|
36
|
-
}, ref) {
|
|
36
|
+
}, ref) => {
|
|
37
37
|
const prefix = usePrefix();
|
|
38
38
|
const className = cx({
|
|
39
39
|
[customClassName]: !!customClassName,
|
|
@@ -120,6 +120,7 @@ const HeaderMenu = frFn((props, ref) => {
|
|
|
120
120
|
*/
|
|
121
121
|
const renderMenuItem = (item, index) => {
|
|
122
122
|
if (/*#__PURE__*/isValidElement(item)) {
|
|
123
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
123
124
|
return /*#__PURE__*/cloneElement(item, {
|
|
124
125
|
ref: handleItemRef(index)
|
|
125
126
|
});
|
|
@@ -157,9 +158,8 @@ const HeaderMenu = frFn((props, ref) => {
|
|
|
157
158
|
onBlur: composeEventHandlers([onBlur, handleOnBlur]),
|
|
158
159
|
ref: ref
|
|
159
160
|
}), /*#__PURE__*/React.createElement("a", _extends({
|
|
160
|
-
// eslint-disable-line jsx-a11y/
|
|
161
|
-
"aria-haspopup": "menu"
|
|
162
|
-
,
|
|
161
|
+
// eslint-disable-line jsx-a11y/anchor-is-valid
|
|
162
|
+
"aria-haspopup": "menu",
|
|
163
163
|
"aria-expanded": expanded,
|
|
164
164
|
className: linkClassName,
|
|
165
165
|
href: "#",
|
|
@@ -32,5 +32,5 @@ export interface HeaderPanelProps {
|
|
|
32
32
|
*/
|
|
33
33
|
onHeaderPanelFocus?: () => void;
|
|
34
34
|
}
|
|
35
|
-
declare const HeaderPanel: React.
|
|
35
|
+
declare const HeaderPanel: React.ForwardRefExoticComponent<HeaderPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
36
|
export default HeaderPanel;
|
|
@@ -17,7 +17,7 @@ import { useMergedRefs } from '../../internal/useMergedRefs.js';
|
|
|
17
17
|
import Switcher from './Switcher.js';
|
|
18
18
|
import { noopFn } from '../../internal/noopFn.js';
|
|
19
19
|
|
|
20
|
-
const HeaderPanel = /*#__PURE__*/React.forwardRef(
|
|
20
|
+
const HeaderPanel = /*#__PURE__*/React.forwardRef(({
|
|
21
21
|
children,
|
|
22
22
|
className: customClassName,
|
|
23
23
|
expanded,
|
|
@@ -25,7 +25,7 @@ const HeaderPanel = /*#__PURE__*/React.forwardRef(function HeaderPanel({
|
|
|
25
25
|
onHeaderPanelFocus = noopFn,
|
|
26
26
|
href,
|
|
27
27
|
...rest
|
|
28
|
-
}, ref) {
|
|
28
|
+
}, ref) => {
|
|
29
29
|
const prefix = usePrefix();
|
|
30
30
|
const headerPanelReference = useRef(null);
|
|
31
31
|
const headerPanelRef = useMergedRefs([headerPanelReference, ref]);
|
|
@@ -17,9 +17,11 @@ const LinkBase = ({
|
|
|
17
17
|
as: BaseComponent,
|
|
18
18
|
// Captured here to prevent it from being passed into the created element.
|
|
19
19
|
// See https://github.com/carbon-design-system/carbon/issues/3970
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
20
21
|
isSideNavExpanded: _isSideNavExpanded,
|
|
21
22
|
...rest
|
|
22
23
|
}, ref) => {
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
23
25
|
const BaseComponentAsAny = BaseComponent ?? element ?? 'a';
|
|
24
26
|
return /*#__PURE__*/React.createElement(BaseComponentAsAny, _extends({
|
|
25
27
|
ref: ref
|
|
@@ -21,6 +21,7 @@ const SideNavItems = ({
|
|
|
21
21
|
const childrenWithExpandedState = React.Children.map(children, child => {
|
|
22
22
|
if (/*#__PURE__*/React.isValidElement(child)) {
|
|
23
23
|
// avoid spreading `isSideNavExpanded` to non-Carbon UI Shell children
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
24
25
|
const childDisplayName = child.type?.displayName;
|
|
25
26
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
26
27
|
...(CARBON_SIDENAV_ITEMS.includes(childDisplayName) ? {
|
|
@@ -16,7 +16,7 @@ import { usePrefix } from '../../internal/usePrefix.js';
|
|
|
16
16
|
import { SideNavContext } from './SideNav.js';
|
|
17
17
|
|
|
18
18
|
var _ChevronDown;
|
|
19
|
-
const SideNavMenu = /*#__PURE__*/React.forwardRef(
|
|
19
|
+
const SideNavMenu = /*#__PURE__*/React.forwardRef(({
|
|
20
20
|
className: customClassName,
|
|
21
21
|
children,
|
|
22
22
|
defaultExpanded = false,
|
|
@@ -26,7 +26,7 @@ const SideNavMenu = /*#__PURE__*/React.forwardRef(function SideNavMenu({
|
|
|
26
26
|
isSideNavExpanded,
|
|
27
27
|
tabIndex,
|
|
28
28
|
title
|
|
29
|
-
}, ref) {
|
|
29
|
+
}, ref) => {
|
|
30
30
|
const {
|
|
31
31
|
isRail
|
|
32
32
|
} = useContext(SideNavContext);
|
|
@@ -13,7 +13,7 @@ import SideNavLinkText from './SideNavLinkText.js';
|
|
|
13
13
|
import Link from './Link.js';
|
|
14
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
15
|
|
|
16
|
-
const SideNavMenuItem = /*#__PURE__*/React.forwardRef(
|
|
16
|
+
const SideNavMenuItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
17
17
|
const prefix = usePrefix();
|
|
18
18
|
const {
|
|
19
19
|
children,
|
|
@@ -13,7 +13,7 @@ import { useId } from '../../internal/useId.js';
|
|
|
13
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
14
|
|
|
15
15
|
var _ChevronDown;
|
|
16
|
-
const SideNavSwitcher = /*#__PURE__*/forwardRef(
|
|
16
|
+
const SideNavSwitcher = /*#__PURE__*/forwardRef((props, ref) => {
|
|
17
17
|
const id = useId('side-nav-switcher');
|
|
18
18
|
const prefix = usePrefix();
|
|
19
19
|
const {
|
|
@@ -41,7 +41,7 @@ import './SideNavMenu.js';
|
|
|
41
41
|
import './SideNavMenuItem.js';
|
|
42
42
|
import './SideNavSwitcher.js';
|
|
43
43
|
|
|
44
|
-
const Switcher = /*#__PURE__*/forwardRef(
|
|
44
|
+
const Switcher = /*#__PURE__*/forwardRef((props, forwardRef) => {
|
|
45
45
|
const switcherRef = useRef(null);
|
|
46
46
|
const ref = useMergedRefs([switcherRef, forwardRef]);
|
|
47
47
|
const prefix = usePrefix();
|
|
@@ -81,6 +81,7 @@ const Switcher = /*#__PURE__*/forwardRef(function Switcher(props, forwardRef) {
|
|
|
81
81
|
if (direction === 1) {
|
|
82
82
|
return enabledIndices[1];
|
|
83
83
|
}
|
|
84
|
+
// eslint-disable-next-line no-fallthrough -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
84
85
|
default:
|
|
85
86
|
return enabledIndices[nextIndex];
|
|
86
87
|
}
|
|
@@ -15,7 +15,7 @@ import { ArrowDown, ArrowUp } from '../../internal/keyboard/keys.js';
|
|
|
15
15
|
import { match } from '../../internal/keyboard/match.js';
|
|
16
16
|
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
17
17
|
|
|
18
|
-
const SwitcherItem = /*#__PURE__*/forwardRef(
|
|
18
|
+
const SwitcherItem = /*#__PURE__*/forwardRef((props, forwardRef) => {
|
|
19
19
|
const {
|
|
20
20
|
'aria-label': ariaLabel,
|
|
21
21
|
'aria-labelledby': ariaLabelledBy,
|
|
@@ -68,7 +68,9 @@ const SwitcherItem = /*#__PURE__*/forwardRef(function SwitcherItem(props, forwar
|
|
|
68
68
|
},
|
|
69
69
|
href: href,
|
|
70
70
|
target: target,
|
|
71
|
-
rel: rel
|
|
71
|
+
rel: rel
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
73
|
+
,
|
|
72
74
|
ref: forwardRef
|
|
73
75
|
}, rest, {
|
|
74
76
|
className: linkClassName,
|
package/es/index.d.ts
CHANGED
|
@@ -99,18 +99,18 @@ export * from './components/Toggletip';
|
|
|
99
99
|
export * from './components/TreeView';
|
|
100
100
|
export * from './components/UIShell';
|
|
101
101
|
export * from './components/UnorderedList';
|
|
102
|
-
export { FluidComboBox as unstable__FluidComboBox, FluidComboBoxSkeleton as unstable__FluidComboBoxSkeleton, } from './components/FluidComboBox';
|
|
103
|
-
export { FluidDatePicker as unstable__FluidDatePicker, FluidDatePickerSkeleton as unstable__FluidDatePickerSkeleton, } from './components/FluidDatePicker';
|
|
104
|
-
export { FluidDatePickerInput as unstable__FluidDatePickerInput } from './components/FluidDatePickerInput';
|
|
105
|
-
export { FluidDropdown as unstable__FluidDropdown, FluidDropdownSkeleton as unstable__FluidDropdownSkeleton, } from './components/FluidDropdown';
|
|
106
|
-
export { FluidMultiSelect as unstable__FluidMultiSelect, FluidMultiSelectSkeleton as unstable__FluidMultiSelectSkeleton, } from './components/FluidMultiSelect';
|
|
107
|
-
export { FluidSelect as unstable__FluidSelect, FluidSelectSkeleton as unstable__FluidSelectSkeleton, } from './components/FluidSelect';
|
|
108
|
-
export { FluidSearch as unstable__FluidSearch, FluidSearchSkeleton as unstable__FluidSearchSkeleton, } from './components/FluidSearch';
|
|
109
|
-
export { FluidTextArea as unstable__FluidTextArea, FluidTextAreaSkeleton as unstable__FluidTextAreaSkeleton, } from './components/FluidTextArea';
|
|
110
|
-
export { FluidTextInput as unstable__FluidTextInput, FluidTextInputSkeleton as unstable__FluidTextInputSkeleton, } from './components/FluidTextInput';
|
|
111
|
-
export { FluidNumberInput as unstable__FluidNumberInput, FluidNumberInputSkeleton as unstable__FluidNumberInputSkeleton, } from './components/FluidNumberInput';
|
|
112
|
-
export { FluidTimePicker as unstable__FluidTimePicker, FluidTimePickerSkeleton as unstable__FluidTimePickerSkeleton, } from './components/FluidTimePicker';
|
|
113
|
-
export { FluidTimePickerSelect as unstable__FluidTimePickerSelect } from './components/FluidTimePickerSelect';
|
|
102
|
+
export { FluidComboBox, FluidComboBoxSkeleton, FluidComboBox as unstable__FluidComboBox, FluidComboBoxSkeleton as unstable__FluidComboBoxSkeleton, } from './components/FluidComboBox';
|
|
103
|
+
export { FluidDatePicker, FluidDatePickerSkeleton, FluidDatePicker as unstable__FluidDatePicker, FluidDatePickerSkeleton as unstable__FluidDatePickerSkeleton, } from './components/FluidDatePicker';
|
|
104
|
+
export { FluidDatePickerInput, FluidDatePickerInput as unstable__FluidDatePickerInput, } from './components/FluidDatePickerInput';
|
|
105
|
+
export { FluidDropdown, FluidDropdownSkeleton, FluidDropdown as unstable__FluidDropdown, FluidDropdownSkeleton as unstable__FluidDropdownSkeleton, } from './components/FluidDropdown';
|
|
106
|
+
export { FluidMultiSelect, FluidMultiSelectSkeleton, FluidMultiSelect as unstable__FluidMultiSelect, FluidMultiSelectSkeleton as unstable__FluidMultiSelectSkeleton, } from './components/FluidMultiSelect';
|
|
107
|
+
export { FluidSelect, FluidSelectSkeleton, FluidSelect as unstable__FluidSelect, FluidSelectSkeleton as unstable__FluidSelectSkeleton, } from './components/FluidSelect';
|
|
108
|
+
export { FluidSearch, FluidSearchSkeleton, FluidSearch as unstable__FluidSearch, FluidSearchSkeleton as unstable__FluidSearchSkeleton, } from './components/FluidSearch';
|
|
109
|
+
export { FluidTextArea, FluidTextAreaSkeleton, FluidTextArea as unstable__FluidTextArea, FluidTextAreaSkeleton as unstable__FluidTextAreaSkeleton, } from './components/FluidTextArea';
|
|
110
|
+
export { FluidTextInput, FluidTextInputSkeleton, FluidTextInput as unstable__FluidTextInput, FluidTextInputSkeleton as unstable__FluidTextInputSkeleton, } from './components/FluidTextInput';
|
|
111
|
+
export { FluidNumberInput, FluidNumberInputSkeleton, FluidNumberInput as unstable__FluidNumberInput, FluidNumberInputSkeleton as unstable__FluidNumberInputSkeleton, } from './components/FluidNumberInput';
|
|
112
|
+
export { FluidTimePicker, FluidTimePickerSkeleton, FluidTimePicker as unstable__FluidTimePicker, FluidTimePickerSkeleton as unstable__FluidTimePickerSkeleton, } from './components/FluidTimePicker';
|
|
113
|
+
export { FluidTimePickerSelect, FluidTimePickerSelect as unstable__FluidTimePickerSelect, } from './components/FluidTimePickerSelect';
|
|
114
114
|
export * from './components/Heading';
|
|
115
115
|
export * from './components/IconButton';
|
|
116
116
|
export * from './components/Layer';
|
|
@@ -127,7 +127,6 @@ export { AILabel as unstable__Slug, AILabelContent as unstable__SlugContent, AIL
|
|
|
127
127
|
export { ChatButton as unstable__ChatButton, ChatButtonSkeleton as unstable__ChatButtonSkeleton, } from './components/ChatButton';
|
|
128
128
|
export { AISkeletonText, AISkeletonIcon, AISkeletonPlaceholder, } from './components/AISkeleton';
|
|
129
129
|
export { AISkeletonText as unstable__AiSkeletonText, AISkeletonIcon as unstable__AiSkeletonIcon, AISkeletonPlaceholder as unstable__AiSkeletonPlaceholder, } from './components/AISkeleton';
|
|
130
|
-
export * from './components/Stack';
|
|
131
130
|
export * from './components/Tooltip';
|
|
132
131
|
export { Text as unstable_Text, TextDirection as unstable_TextDirection, } from './components/Text';
|
|
133
132
|
export * from './components/Tooltip/DefinitionTooltip';
|