@carbon/react 1.92.1 → 1.93.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 +874 -838
- package/es/components/AILabel/index.js +4 -4
- package/es/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/es/components/Button/Button.js +2 -2
- package/es/components/ChatButton/ChatButton.js +1 -1
- package/es/components/Checkbox/Checkbox.js +1 -1
- package/es/components/CheckboxGroup/CheckboxGroup.js +1 -1
- package/es/components/CodeSnippet/CodeSnippet.js +9 -50
- package/es/components/ComboBox/ComboBox.d.ts +3 -11
- package/es/components/ComboBox/ComboBox.js +15 -25
- package/es/components/ComboButton/index.d.ts +5 -8
- package/es/components/ComboButton/index.js +9 -12
- package/es/components/ComposedModal/ComposedModal.js +19 -25
- package/es/components/DataTable/DataTable.d.ts +27 -16
- package/es/components/DataTable/DataTable.js +40 -39
- package/es/components/DataTable/Table.js +2 -2
- package/es/components/DataTable/TableBatchActions.d.ts +49 -10
- package/es/components/DataTable/TableBatchActions.js +26 -21
- package/es/components/DataTable/TableExpandHeader.js +2 -2
- package/es/components/DataTable/TableExpandRow.d.ts +4 -0
- package/es/components/DataTable/TableExpandRow.js +1 -1
- package/es/components/DataTable/TableHeader.d.ts +8 -10
- package/es/components/DataTable/TableHeader.js +11 -13
- package/es/components/DataTable/TableRow.js +7 -5
- package/es/components/DataTable/TableSlugRow.js +1 -1
- package/es/components/DataTable/TableToolbarMenu.js +1 -1
- package/es/components/DataTable/TableToolbarSearch.d.ts +8 -7
- package/es/components/DataTable/TableToolbarSearch.js +11 -11
- package/es/components/DataTable/index.d.ts +2 -2
- package/es/components/DataTable/state/sorting.d.ts +2 -2
- package/es/components/DataTable/state/sorting.js +1 -1
- package/es/components/DataTable/tools/sorting.js +1 -1
- package/es/components/DatePicker/DatePicker.js +9 -9
- package/es/components/DatePickerInput/DatePickerInput.js +5 -5
- package/es/components/Dialog/Dialog.js +6 -6
- package/es/components/Dropdown/Dropdown.d.ts +1 -1
- package/es/components/Dropdown/Dropdown.js +8 -8
- package/es/components/ErrorBoundary/ErrorBoundaryContext.js +1 -1
- package/es/components/FileUploader/FileUploader.js +4 -4
- package/es/components/FileUploader/FileUploaderButton.js +1 -1
- package/es/components/FileUploader/FileUploaderDropContainer.js +1 -1
- package/es/components/FileUploader/FileUploaderItem.js +2 -2
- package/es/components/FluidComboBox/FluidComboBox.d.ts +4 -7
- package/es/components/FluidComboBox/FluidComboBox.js +1 -1
- package/es/components/FluidDropdown/FluidDropdown.d.ts +4 -8
- package/es/components/FluidDropdown/FluidDropdown.js +1 -1
- package/es/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +3 -7
- package/es/components/FluidMultiSelect/FluidMultiSelect.d.ts +3 -7
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +3 -3
- package/es/components/FluidNumberInput/FluidNumberInput.d.ts +4 -7
- package/es/components/FluidNumberInput/FluidNumberInput.js +2 -2
- package/es/components/FluidSearch/FluidSearch.js +1 -1
- package/es/components/FluidSelect/FluidSelect.js +1 -1
- package/es/components/FluidTextInput/FluidTextInput.js +1 -1
- package/es/components/FluidTimePicker/FluidTimePicker.js +3 -3
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +1 -1
- package/es/components/Grid/CSSGrid.js +3 -3
- package/es/components/Grid/Column.js +2 -2
- package/es/components/Grid/ColumnHang.js +1 -1
- package/es/components/Grid/FlexGrid.js +1 -1
- package/es/components/Grid/Row.js +1 -1
- package/es/components/Heading/index.js +2 -2
- package/es/components/IconButton/index.js +2 -2
- package/es/components/IconIndicator/index.js +2 -2
- package/es/components/InlineCheckbox/InlineCheckbox.js +1 -1
- package/es/components/Layout/index.js +2 -2
- package/es/components/LayoutDirection/LayoutDirection.js +1 -1
- package/es/components/Link/Link.js +2 -2
- package/es/components/ListBox/ListBoxField.d.ts +0 -1
- package/es/components/ListBox/ListBoxMenuIcon.d.ts +8 -4
- package/es/components/ListBox/ListBoxMenuIcon.js +10 -6
- package/es/components/ListBox/ListBoxMenuItem.js +2 -2
- package/es/components/ListBox/ListBoxSelection.d.ts +3 -6
- package/es/components/ListBox/ListBoxSelection.js +5 -10
- package/es/components/ListBox/index.d.ts +5 -3
- package/es/components/ListBox/next/ListBoxSelection.d.ts +6 -13
- package/es/components/ListBox/next/ListBoxSelection.js +16 -8
- package/es/components/ListBox/next/ListBoxTrigger.d.ts +5 -10
- package/es/components/ListBox/next/ListBoxTrigger.js +6 -6
- package/es/components/Menu/MenuContext.js +1 -1
- package/es/components/Menu/MenuItem.js +1 -1
- package/es/components/MenuButton/index.js +5 -5
- package/es/components/Modal/Modal.js +17 -23
- package/es/components/ModalWrapper/ModalWrapper.js +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.d.ts +3 -12
- package/es/components/MultiSelect/FilterableMultiSelect.js +18 -27
- package/es/components/MultiSelect/MultiSelect.d.ts +2 -2
- package/es/components/MultiSelect/MultiSelect.js +12 -12
- package/es/components/Notification/Notification.js +1 -1
- package/es/components/NumberInput/NumberInput.d.ts +2 -5
- package/es/components/NumberInput/NumberInput.js +13 -18
- package/es/components/OverflowMenu/OverflowMenu.d.ts +2 -2
- package/es/components/OverflowMenu/OverflowMenu.js +4 -4
- package/es/components/OverflowMenu/next/index.d.ts +1 -1
- package/es/components/OverflowMenu/next/index.js +2 -2
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +2 -2
- package/es/components/PageHeader/PageHeader.js +12 -12
- package/es/components/Pagination/Pagination.js +3 -3
- package/es/components/PaginationNav/PaginationNav.d.ts +6 -9
- package/es/components/PaginationNav/PaginationNav.js +21 -22
- package/es/components/Popover/index.js +10 -9
- package/es/components/ProgressBar/ProgressBar.js +2 -2
- package/es/components/ProgressIndicator/ProgressIndicator.d.ts +11 -15
- package/es/components/ProgressIndicator/ProgressIndicator.js +15 -15
- 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/Select/Select.js +7 -5
- package/es/components/ShapeIndicator/index.js +2 -2
- package/es/components/Slider/Slider.d.ts +7 -9
- package/es/components/Slider/Slider.js +16 -20
- package/es/components/Stack/HStack.js +1 -1
- package/es/components/Stack/Stack.js +1 -1
- package/es/components/Stack/VStack.js +1 -1
- package/es/components/StructuredList/StructuredList.js +3 -3
- package/es/components/Tabs/Tabs.js +12 -12
- package/es/components/Tag/DismissibleTag.js +3 -3
- package/es/components/Tag/OperationalTag.js +2 -2
- package/es/components/Tag/SelectableTag.js +2 -2
- package/es/components/Tag/Tag.js +4 -4
- package/es/components/Tag/isEllipsisActive.js +1 -1
- package/es/components/Text/Text.js +1 -1
- package/es/components/TextArea/TextArea.js +1 -1
- package/es/components/TextInput/PasswordInput.js +4 -4
- package/es/components/TextInput/TextInput.js +3 -3
- package/es/components/Theme/index.js +3 -3
- package/es/components/Tile/Tile.js +3 -3
- package/es/components/TimePicker/TimePicker.js +1 -1
- package/es/components/Toggletip/index.js +4 -4
- package/es/components/Tooltip/DefinitionTooltip.js +1 -1
- package/es/components/Tooltip/Tooltip.js +3 -3
- package/es/components/TreeView/TreeNode.js +6 -6
- package/es/components/TreeView/TreeView.js +5 -5
- package/es/components/UIShell/HeaderContainer.js +1 -1
- package/es/components/UIShell/HeaderMenu.js +1 -1
- package/es/components/UIShell/Link.js +2 -2
- package/es/components/UIShell/SideNavItems.js +1 -1
- package/es/components/UIShell/Switcher.js +1 -1
- package/es/components/UIShell/SwitcherItem.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/internal/FloatingMenu.js +4 -4
- package/es/internal/Selection.js +6 -6
- package/es/internal/useMergedRefs.js +1 -1
- package/es/internal/useNoInteractiveChildren.js +4 -4
- package/es/internal/useOutsideClick.js +1 -1
- package/es/internal/useOverflowItems.js +6 -6
- package/es/internal/useResizeObserver.js +3 -3
- package/es/internal/useSavedCallback.js +1 -1
- package/es/internal/warning.js +1 -1
- package/es/prop-types/isRequiredOneOf.js +2 -2
- package/es/tools/events.js +1 -1
- package/es/tools/wrapComponent.js +1 -1
- package/es/types/common.d.ts +6 -2
- package/lib/components/AILabel/index.js +4 -4
- package/lib/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/lib/components/Button/Button.js +2 -2
- package/lib/components/ChatButton/ChatButton.js +1 -1
- package/lib/components/Checkbox/Checkbox.js +1 -1
- package/lib/components/CheckboxGroup/CheckboxGroup.js +1 -1
- package/lib/components/CodeSnippet/CodeSnippet.js +8 -49
- package/lib/components/ComboBox/ComboBox.d.ts +3 -11
- package/lib/components/ComboBox/ComboBox.js +15 -25
- package/lib/components/ComboButton/index.d.ts +5 -8
- package/lib/components/ComboButton/index.js +9 -12
- package/lib/components/ComposedModal/ComposedModal.js +18 -24
- package/lib/components/DataTable/DataTable.d.ts +27 -16
- package/lib/components/DataTable/DataTable.js +40 -39
- package/lib/components/DataTable/Table.js +2 -2
- package/lib/components/DataTable/TableBatchActions.d.ts +49 -10
- package/lib/components/DataTable/TableBatchActions.js +26 -21
- package/lib/components/DataTable/TableExpandHeader.js +2 -2
- package/lib/components/DataTable/TableExpandRow.d.ts +4 -0
- package/lib/components/DataTable/TableExpandRow.js +1 -1
- package/lib/components/DataTable/TableHeader.d.ts +8 -10
- package/lib/components/DataTable/TableHeader.js +11 -13
- package/lib/components/DataTable/TableRow.js +7 -5
- package/lib/components/DataTable/TableSlugRow.js +1 -1
- package/lib/components/DataTable/TableToolbarMenu.js +1 -1
- package/lib/components/DataTable/TableToolbarSearch.d.ts +8 -7
- package/lib/components/DataTable/TableToolbarSearch.js +11 -11
- package/lib/components/DataTable/index.d.ts +2 -2
- package/lib/components/DataTable/state/sorting.d.ts +2 -2
- package/lib/components/DataTable/state/sorting.js +1 -1
- package/lib/components/DataTable/tools/sorting.js +1 -1
- package/lib/components/DatePicker/DatePicker.js +9 -9
- package/lib/components/DatePickerInput/DatePickerInput.js +5 -5
- package/lib/components/Dialog/Dialog.js +6 -6
- package/lib/components/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/Dropdown/Dropdown.js +8 -8
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +1 -1
- package/lib/components/FileUploader/FileUploader.js +4 -4
- package/lib/components/FileUploader/FileUploaderButton.js +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -1
- package/lib/components/FileUploader/FileUploaderItem.js +2 -2
- package/lib/components/FluidComboBox/FluidComboBox.d.ts +4 -7
- package/lib/components/FluidComboBox/FluidComboBox.js +1 -1
- package/lib/components/FluidDropdown/FluidDropdown.d.ts +4 -8
- package/lib/components/FluidDropdown/FluidDropdown.js +1 -1
- package/lib/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +3 -7
- package/lib/components/FluidMultiSelect/FluidMultiSelect.d.ts +3 -7
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +3 -3
- package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +4 -7
- package/lib/components/FluidNumberInput/FluidNumberInput.js +2 -2
- package/lib/components/FluidSearch/FluidSearch.js +1 -1
- package/lib/components/FluidSelect/FluidSelect.js +1 -1
- package/lib/components/FluidTextInput/FluidTextInput.js +1 -1
- package/lib/components/FluidTimePicker/FluidTimePicker.js +3 -3
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +1 -1
- package/lib/components/Grid/CSSGrid.js +3 -3
- package/lib/components/Grid/Column.js +2 -2
- package/lib/components/Grid/ColumnHang.js +1 -1
- package/lib/components/Grid/FlexGrid.js +1 -1
- package/lib/components/Grid/Row.js +1 -1
- package/lib/components/Heading/index.js +2 -2
- package/lib/components/IconButton/index.js +2 -2
- package/lib/components/IconIndicator/index.js +2 -2
- package/lib/components/InlineCheckbox/InlineCheckbox.js +1 -1
- package/lib/components/Layout/index.js +2 -2
- package/lib/components/LayoutDirection/LayoutDirection.js +1 -1
- package/lib/components/Link/Link.js +2 -2
- package/lib/components/ListBox/ListBoxField.d.ts +0 -1
- package/lib/components/ListBox/ListBoxMenuIcon.d.ts +8 -4
- package/lib/components/ListBox/ListBoxMenuIcon.js +10 -6
- package/lib/components/ListBox/ListBoxMenuItem.js +2 -2
- package/lib/components/ListBox/ListBoxSelection.d.ts +3 -6
- package/lib/components/ListBox/ListBoxSelection.js +4 -10
- package/lib/components/ListBox/index.d.ts +5 -3
- package/lib/components/ListBox/next/ListBoxSelection.d.ts +6 -13
- package/lib/components/ListBox/next/ListBoxSelection.js +16 -8
- package/lib/components/ListBox/next/ListBoxTrigger.d.ts +5 -10
- package/lib/components/ListBox/next/ListBoxTrigger.js +5 -6
- package/lib/components/Menu/MenuContext.js +1 -1
- package/lib/components/Menu/MenuItem.js +1 -1
- package/lib/components/MenuButton/index.js +5 -5
- package/lib/components/Modal/Modal.js +16 -22
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +3 -12
- package/lib/components/MultiSelect/FilterableMultiSelect.js +18 -27
- package/lib/components/MultiSelect/MultiSelect.d.ts +2 -2
- package/lib/components/MultiSelect/MultiSelect.js +12 -12
- package/lib/components/Notification/Notification.js +1 -1
- package/lib/components/NumberInput/NumberInput.d.ts +2 -5
- package/lib/components/NumberInput/NumberInput.js +12 -18
- package/lib/components/OverflowMenu/OverflowMenu.d.ts +2 -2
- package/lib/components/OverflowMenu/OverflowMenu.js +4 -4
- package/lib/components/OverflowMenu/next/index.d.ts +1 -1
- package/lib/components/OverflowMenu/next/index.js +2 -2
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +2 -2
- package/lib/components/PageHeader/PageHeader.js +12 -12
- package/lib/components/Pagination/Pagination.js +3 -3
- package/lib/components/PaginationNav/PaginationNav.d.ts +6 -9
- package/lib/components/PaginationNav/PaginationNav.js +21 -22
- package/lib/components/Popover/index.js +10 -9
- package/lib/components/ProgressBar/ProgressBar.js +2 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.d.ts +11 -15
- package/lib/components/ProgressIndicator/ProgressIndicator.js +15 -15
- package/lib/components/RadioButton/RadioButton.js +1 -1
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/lib/components/RadioTile/RadioTile.js +1 -1
- package/lib/components/Select/Select.js +7 -5
- package/lib/components/ShapeIndicator/index.js +2 -2
- package/lib/components/Slider/Slider.d.ts +7 -9
- package/lib/components/Slider/Slider.js +16 -20
- package/lib/components/Stack/HStack.js +1 -1
- package/lib/components/Stack/Stack.js +1 -1
- package/lib/components/Stack/VStack.js +1 -1
- package/lib/components/StructuredList/StructuredList.js +3 -3
- package/lib/components/Tabs/Tabs.js +12 -12
- package/lib/components/Tag/DismissibleTag.js +3 -3
- package/lib/components/Tag/OperationalTag.js +2 -2
- package/lib/components/Tag/SelectableTag.js +2 -2
- package/lib/components/Tag/Tag.js +4 -4
- package/lib/components/Tag/isEllipsisActive.js +1 -1
- package/lib/components/Text/Text.js +1 -1
- package/lib/components/TextArea/TextArea.js +1 -1
- package/lib/components/TextInput/PasswordInput.js +4 -4
- package/lib/components/TextInput/TextInput.js +3 -3
- package/lib/components/Theme/index.js +3 -3
- package/lib/components/Tile/Tile.js +3 -3
- package/lib/components/TimePicker/TimePicker.js +1 -1
- package/lib/components/Toggletip/index.js +4 -4
- package/lib/components/Tooltip/DefinitionTooltip.js +1 -1
- package/lib/components/Tooltip/Tooltip.js +3 -3
- package/lib/components/TreeView/TreeNode.js +6 -6
- package/lib/components/TreeView/TreeView.js +5 -5
- package/lib/components/UIShell/HeaderContainer.js +1 -1
- package/lib/components/UIShell/HeaderMenu.js +1 -1
- package/lib/components/UIShell/Link.js +2 -2
- package/lib/components/UIShell/SideNavItems.js +1 -1
- package/lib/components/UIShell/Switcher.js +1 -1
- package/lib/components/UIShell/SwitcherItem.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/internal/FloatingMenu.js +4 -4
- package/lib/internal/Selection.js +6 -6
- package/lib/internal/useMergedRefs.js +1 -1
- package/lib/internal/useNoInteractiveChildren.js +4 -4
- package/lib/internal/useOutsideClick.js +1 -1
- package/lib/internal/useOverflowItems.js +6 -6
- package/lib/internal/useResizeObserver.js +3 -3
- package/lib/internal/useSavedCallback.js +1 -1
- package/lib/internal/warning.js +1 -1
- package/lib/prop-types/isRequiredOneOf.js +2 -2
- package/lib/tools/events.js +1 -1
- package/lib/tools/wrapComponent.js +1 -1
- package/lib/types/common.d.ts +6 -2
- package/package.json +9 -9
|
@@ -80,7 +80,7 @@ function Tabs({
|
|
|
80
80
|
}) {
|
|
81
81
|
const baseId = useId.useId('ccs');
|
|
82
82
|
if (dismissable && !onTabCloseRequest) {
|
|
83
|
-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/
|
|
83
|
+
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
84
84
|
console.error('dismissable property specified without also providing an onTabCloseRequest property.');
|
|
85
85
|
}
|
|
86
86
|
// The active index is used to track the element which has focus in our tablist
|
|
@@ -275,7 +275,7 @@ function TabList({
|
|
|
275
275
|
let hasSecondaryLabelTabs = false;
|
|
276
276
|
if (contained) {
|
|
277
277
|
hasSecondaryLabelTabs = React.Children.toArray(children).some(child => {
|
|
278
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
278
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
279
279
|
const _child = child;
|
|
280
280
|
return /*#__PURE__*/React.isValidElement(child) && !!_child.props.secondaryLabel;
|
|
281
281
|
});
|
|
@@ -389,7 +389,7 @@ function TabList({
|
|
|
389
389
|
inline: 'nearest'
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/
|
|
392
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
393
393
|
}, []);
|
|
394
394
|
React.useEffect(() => {
|
|
395
395
|
//adding 1 in calculation for firefox support
|
|
@@ -410,7 +410,7 @@ function TabList({
|
|
|
410
410
|
setSelectedIndex(tabs.current.indexOf(tab));
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/
|
|
413
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
414
414
|
}, []);
|
|
415
415
|
useIsomorphicEffect.default(() => {
|
|
416
416
|
if (ref.current) {
|
|
@@ -498,7 +498,7 @@ function TabList({
|
|
|
498
498
|
contained
|
|
499
499
|
}
|
|
500
500
|
}, /*#__PURE__*/React.cloneElement(
|
|
501
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
501
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
502
502
|
child, {
|
|
503
503
|
ref: node => {
|
|
504
504
|
tabs.current[index] = node;
|
|
@@ -633,7 +633,7 @@ function TabListVertical({
|
|
|
633
633
|
setSelectedIndex(tabs.current.indexOf(tab));
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/
|
|
636
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
637
637
|
}, []);
|
|
638
638
|
React.useEffect(() => {
|
|
639
639
|
function handler() {
|
|
@@ -644,7 +644,7 @@ function TabListVertical({
|
|
|
644
644
|
if (containerTop && containerHeight) {
|
|
645
645
|
// scrolls so selected tab is in view
|
|
646
646
|
if (selectedPositionTop - halfTabHeight < containerTop || selectedPositionTop - containerTop + verticalTabHeight + halfTabHeight > containerHeight) {
|
|
647
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/
|
|
647
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
648
648
|
ref.current && ref.current.scrollTo({
|
|
649
649
|
top: (selectedIndex - 1) * verticalTabHeight,
|
|
650
650
|
behavior: 'smooth'
|
|
@@ -700,7 +700,7 @@ function TabListVertical({
|
|
|
700
700
|
hasSecondaryLabel: false
|
|
701
701
|
}
|
|
702
702
|
}, /*#__PURE__*/React.cloneElement(
|
|
703
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
703
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
704
704
|
child, {
|
|
705
705
|
ref: node => {
|
|
706
706
|
tabs.current[index] = node;
|
|
@@ -777,7 +777,7 @@ function createLongPressBehavior(ref, direction, setScrollLeft) {
|
|
|
777
777
|
* Tab
|
|
778
778
|
*/
|
|
779
779
|
|
|
780
|
-
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/
|
|
780
|
+
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
781
781
|
const Tab = /*#__PURE__*/React.forwardRef(({
|
|
782
782
|
as = 'button',
|
|
783
783
|
children,
|
|
@@ -813,7 +813,7 @@ const Tab = /*#__PURE__*/React.forwardRef(({
|
|
|
813
813
|
const panelId = `${baseId}-tabpanel-${index$1}`;
|
|
814
814
|
const [isEllipsisApplied, setIsEllipsisApplied] = React.useState(false);
|
|
815
815
|
|
|
816
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
816
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
817
817
|
const isEllipsisActive = element => {
|
|
818
818
|
setIsEllipsisApplied(element.offsetHeight < element.scrollHeight);
|
|
819
819
|
return element.offsetHeight < element.scrollHeight;
|
|
@@ -1033,7 +1033,7 @@ Tab.propTypes = {
|
|
|
1033
1033
|
*/
|
|
1034
1034
|
|
|
1035
1035
|
const IconTabContext = /*#__PURE__*/React.createContext(false);
|
|
1036
|
-
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/
|
|
1036
|
+
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
1037
1037
|
const IconTab = /*#__PURE__*/React.forwardRef(({
|
|
1038
1038
|
badgeIndicator,
|
|
1039
1039
|
children,
|
|
@@ -1105,7 +1105,7 @@ IconTab.propTypes = {
|
|
|
1105
1105
|
* TabPanel
|
|
1106
1106
|
*/
|
|
1107
1107
|
|
|
1108
|
-
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/
|
|
1108
|
+
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
1109
1109
|
const TabPanel = /*#__PURE__*/React.forwardRef(({
|
|
1110
1110
|
children,
|
|
1111
1111
|
className: customClassName,
|
|
@@ -28,7 +28,7 @@ var index = require('../AILabel/index.js');
|
|
|
28
28
|
var utils = require('../../internal/utils.js');
|
|
29
29
|
|
|
30
30
|
var _Close;
|
|
31
|
-
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/
|
|
31
|
+
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
32
32
|
const DismissibleTag = /*#__PURE__*/React.forwardRef(({
|
|
33
33
|
className,
|
|
34
34
|
decorator,
|
|
@@ -48,7 +48,7 @@ const DismissibleTag = /*#__PURE__*/React.forwardRef(({
|
|
|
48
48
|
}, forwardRef) => {
|
|
49
49
|
const prefix = usePrefix.usePrefix();
|
|
50
50
|
const tagLabelRef = React.useRef(null);
|
|
51
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/
|
|
51
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
52
52
|
const tagId = id || `tag-${useId.useId()}`;
|
|
53
53
|
const tagClasses = cx(`${prefix}--tag--filter`, className);
|
|
54
54
|
const [isEllipsisApplied, setIsEllipsisApplied] = React.useState(false);
|
|
@@ -68,7 +68,7 @@ const DismissibleTag = /*#__PURE__*/React.forwardRef(({
|
|
|
68
68
|
const normalizedDecorator = candidateIsAILabel ? /*#__PURE__*/React.cloneElement(candidate, {
|
|
69
69
|
size: 'sm',
|
|
70
70
|
kind: 'inline'
|
|
71
|
-
}) :
|
|
71
|
+
}) : candidate;
|
|
72
72
|
const tooltipClasses = cx(`${prefix}--icon-tooltip`, `${prefix}--tag-label-tooltip`);
|
|
73
73
|
|
|
74
74
|
// Removing onClick from the spread operator
|
|
@@ -35,7 +35,7 @@ const TYPES = {
|
|
|
35
35
|
'cool-gray': 'Cool-Gray',
|
|
36
36
|
'warm-gray': 'Warm-Gray'
|
|
37
37
|
};
|
|
38
|
-
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/
|
|
38
|
+
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
39
39
|
const OperationalTag = /*#__PURE__*/React.forwardRef(({
|
|
40
40
|
className,
|
|
41
41
|
disabled,
|
|
@@ -48,7 +48,7 @@ const OperationalTag = /*#__PURE__*/React.forwardRef(({
|
|
|
48
48
|
}, forwardRef) => {
|
|
49
49
|
const prefix = usePrefix.usePrefix();
|
|
50
50
|
const tagRef = React.useRef(null);
|
|
51
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/
|
|
51
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
52
52
|
const tagId = id || `tag-${useId.useId()}`;
|
|
53
53
|
const tagClasses = cx(`${prefix}--tag--operational`, className);
|
|
54
54
|
const [isEllipsisApplied, setIsEllipsisApplied] = React.useState(false);
|
|
@@ -24,7 +24,7 @@ var isEllipsisActive = require('./isEllipsisActive.js');
|
|
|
24
24
|
var mergeRefs = require('../../tools/mergeRefs.js');
|
|
25
25
|
var useControllableState = require('../../internal/useControllableState.js');
|
|
26
26
|
|
|
27
|
-
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/
|
|
27
|
+
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
28
28
|
const SelectableTag = /*#__PURE__*/React.forwardRef(({
|
|
29
29
|
className,
|
|
30
30
|
disabled,
|
|
@@ -40,7 +40,7 @@ const SelectableTag = /*#__PURE__*/React.forwardRef(({
|
|
|
40
40
|
}, forwardRef) => {
|
|
41
41
|
const prefix = usePrefix.usePrefix();
|
|
42
42
|
const tagRef = React.useRef(null);
|
|
43
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/
|
|
43
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
44
44
|
const tagId = id || `tag-${useId.useId()}`;
|
|
45
45
|
const [selectedTag, setSelectedTag] = useControllableState.useControllableState({
|
|
46
46
|
value: selected,
|
|
@@ -46,7 +46,7 @@ const SIZES = {
|
|
|
46
46
|
md: 'md',
|
|
47
47
|
lg: 'lg'
|
|
48
48
|
};
|
|
49
|
-
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/
|
|
49
|
+
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
50
50
|
const TagBase = /*#__PURE__*/React.forwardRef(({
|
|
51
51
|
children,
|
|
52
52
|
className,
|
|
@@ -69,15 +69,15 @@ const TagBase = /*#__PURE__*/React.forwardRef(({
|
|
|
69
69
|
const prefix = usePrefix.usePrefix();
|
|
70
70
|
const tagRef = React.useRef(null);
|
|
71
71
|
if (filter) {
|
|
72
|
-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/
|
|
72
|
+
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
73
73
|
console.warn('The `filter` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead.');
|
|
74
74
|
}
|
|
75
75
|
if (onClose) {
|
|
76
|
-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/
|
|
76
|
+
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
77
77
|
console.warn('The `onClose` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead.');
|
|
78
78
|
}
|
|
79
79
|
const ref = useMergedRefs.useMergedRefs([forwardRef, tagRef]);
|
|
80
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/
|
|
80
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
81
81
|
const tagId = id || `tag-${useId.useId()}`;
|
|
82
82
|
const [isEllipsisApplied, setIsEllipsisApplied] = React.useState(false);
|
|
83
83
|
React.useLayoutEffect(() => {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
11
11
|
const isEllipsisActive = element => {
|
|
12
12
|
if (element) {
|
|
13
13
|
return element?.offsetWidth < element?.scrollWidth;
|
|
@@ -12,7 +12,7 @@ var PropTypes = require('prop-types');
|
|
|
12
12
|
var React = require('react');
|
|
13
13
|
var TextDirectionContext = require('./TextDirectionContext.js');
|
|
14
14
|
|
|
15
|
-
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/
|
|
15
|
+
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
16
16
|
const TextBase = /*#__PURE__*/React.forwardRef(({
|
|
17
17
|
as,
|
|
18
18
|
children,
|
|
@@ -291,7 +291,7 @@ const TextArea = frFn((props, forwardRef) => {
|
|
|
291
291
|
const candidateIsAILabel = utils.isComponentElement(candidate, index.AILabel);
|
|
292
292
|
const normalizedDecorator = candidateIsAILabel ? /*#__PURE__*/React.cloneElement(candidate, {
|
|
293
293
|
size: 'mini'
|
|
294
|
-
}) :
|
|
294
|
+
}) : candidate;
|
|
295
295
|
return /*#__PURE__*/React.createElement("div", {
|
|
296
296
|
className: formItemClasses
|
|
297
297
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -65,7 +65,7 @@ const PasswordInput = /*#__PURE__*/React.forwardRef(({
|
|
|
65
65
|
} = React.useContext(FormContext.FormContext);
|
|
66
66
|
const handleTogglePasswordVisibility = event => {
|
|
67
67
|
setInputType(inputType === 'password' ? 'text' : 'password');
|
|
68
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
69
69
|
onTogglePasswordVisibility && onTogglePasswordVisibility(event);
|
|
70
70
|
};
|
|
71
71
|
const textInputClasses = cx(`${prefix}--text-input`, `${prefix}--password-input`, className, {
|
|
@@ -155,10 +155,10 @@ const PasswordInput = /*#__PURE__*/React.forwardRef(({
|
|
|
155
155
|
align = tooltipPosition;
|
|
156
156
|
}
|
|
157
157
|
if (!hidePasswordLabel || hidePasswordLabel.trim() === '') {
|
|
158
|
-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/
|
|
158
|
+
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
159
159
|
console.warn('Warning: The "hidePasswordLabel" should not be blank.');
|
|
160
160
|
} else if (!showPasswordLabel || showPasswordLabel.trim() === '') {
|
|
161
|
-
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/
|
|
161
|
+
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
162
162
|
console.warn('Warning: The "showPasswordLabel" should not be blank.');
|
|
163
163
|
}
|
|
164
164
|
const input = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", _rollupPluginBabelHelpers.extends({}, util.getTextInputProps({
|
|
@@ -188,7 +188,7 @@ const PasswordInput = /*#__PURE__*/React.forwardRef(({
|
|
|
188
188
|
setInputType(type);
|
|
189
189
|
}, [type]);
|
|
190
190
|
|
|
191
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
191
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
192
192
|
const Icon = normalizedProps.icon;
|
|
193
193
|
return /*#__PURE__*/React.createElement("div", {
|
|
194
194
|
className: inputWrapperClasses
|
|
@@ -64,7 +64,7 @@ const TextInput = /*#__PURE__*/React.forwardRef(({
|
|
|
64
64
|
const [textCount, setTextCount] = React.useState(getInitialTextCount());
|
|
65
65
|
React.useEffect(() => {
|
|
66
66
|
setTextCount(getInitialTextCount());
|
|
67
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/
|
|
67
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
68
68
|
}, [value, defaultValue, enableCounter]);
|
|
69
69
|
const normalizedProps = useNormalizedInputProps.useNormalizedInputProps({
|
|
70
70
|
id,
|
|
@@ -193,7 +193,7 @@ const TextInput = /*#__PURE__*/React.forwardRef(({
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
}, [ariaAnnouncement, prevAnnouncement]);
|
|
196
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
196
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
197
197
|
const Icon = normalizedProps.icon;
|
|
198
198
|
|
|
199
199
|
// AILabel is always size `mini`
|
|
@@ -201,7 +201,7 @@ const TextInput = /*#__PURE__*/React.forwardRef(({
|
|
|
201
201
|
const candidateIsAILabel = utils.isComponentElement(candidate, index.AILabel);
|
|
202
202
|
const normalizedDecorator = candidateIsAILabel ? /*#__PURE__*/React.cloneElement(candidate, {
|
|
203
203
|
size: 'mini'
|
|
204
|
-
}) :
|
|
204
|
+
}) : candidate;
|
|
205
205
|
return /*#__PURE__*/React.createElement("div", {
|
|
206
206
|
className: inputWrapperClasses
|
|
207
207
|
}, !inline ? labelWrapper : /*#__PURE__*/React.createElement("div", {
|
|
@@ -19,7 +19,7 @@ const ThemeContext = /*#__PURE__*/React.createContext({
|
|
|
19
19
|
theme: 'white'
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/
|
|
22
|
+
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
23
23
|
const GlobalTheme = /*#__PURE__*/React.forwardRef(({
|
|
24
24
|
children,
|
|
25
25
|
theme
|
|
@@ -30,7 +30,7 @@ const GlobalTheme = /*#__PURE__*/React.forwardRef(({
|
|
|
30
30
|
};
|
|
31
31
|
}, [theme]);
|
|
32
32
|
const childrenWithProps = /*#__PURE__*/React.cloneElement(
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
34
34
|
children, {
|
|
35
35
|
ref: ref
|
|
36
36
|
});
|
|
@@ -73,7 +73,7 @@ function Theme({
|
|
|
73
73
|
isDark
|
|
74
74
|
};
|
|
75
75
|
}, [theme]);
|
|
76
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
76
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
77
77
|
const BaseComponentAsAny = BaseComponent;
|
|
78
78
|
return /*#__PURE__*/React.createElement(ThemeContext.Provider, {
|
|
79
79
|
value: value
|
|
@@ -207,7 +207,7 @@ ClickableTile.propTypes = {
|
|
|
207
207
|
*/
|
|
208
208
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
209
209
|
};
|
|
210
|
-
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/
|
|
210
|
+
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
211
211
|
const SelectableTile = /*#__PURE__*/React.forwardRef(({
|
|
212
212
|
children,
|
|
213
213
|
className,
|
|
@@ -276,7 +276,7 @@ const SelectableTile = /*#__PURE__*/React.forwardRef(({
|
|
|
276
276
|
const normalizedDecorator = candidateIsAILabel ? /*#__PURE__*/React.cloneElement(candidate, {
|
|
277
277
|
size: 'xs',
|
|
278
278
|
ref: decoratorRef
|
|
279
|
-
}) :
|
|
279
|
+
}) : candidate;
|
|
280
280
|
return (
|
|
281
281
|
/*#__PURE__*/
|
|
282
282
|
// eslint-disable-next-line jsx-a11y/interactive-supports-focus
|
|
@@ -503,7 +503,7 @@ const ExpandableTile = /*#__PURE__*/React.forwardRef(({
|
|
|
503
503
|
const candidateIsAILabel = utils.isComponentElement(candidate, index$1.AILabel);
|
|
504
504
|
const normalizedDecorator = candidateIsAILabel ? /*#__PURE__*/React.cloneElement(candidate, {
|
|
505
505
|
size: 'xs'
|
|
506
|
-
}) :
|
|
506
|
+
}) : candidate;
|
|
507
507
|
return interactive ? /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
508
508
|
ref: ref,
|
|
509
509
|
className: interactiveClassNames
|
|
@@ -116,7 +116,7 @@ const TimePicker = frFn((props, ref) => {
|
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
118
|
const mappedChildren = React.Children.map(children, pickerSelect => {
|
|
119
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
119
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
120
120
|
const item = pickerSelect;
|
|
121
121
|
if (item) {
|
|
122
122
|
return /*#__PURE__*/React.cloneElement(item, {
|
|
@@ -29,7 +29,7 @@ function ToggletipLabel({
|
|
|
29
29
|
}) {
|
|
30
30
|
const prefix = usePrefix.usePrefix();
|
|
31
31
|
const className = cx(`${prefix}--toggletip-label`, customClassName);
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
33
33
|
const BaseComponentAsAny = BaseComponent;
|
|
34
34
|
return /*#__PURE__*/React.createElement(BaseComponentAsAny, _rollupPluginBabelHelpers.extends({
|
|
35
35
|
className: className
|
|
@@ -136,7 +136,7 @@ function Toggletip({
|
|
|
136
136
|
const eventType = 'PointerEvent' in window ? 'pointerdown' : 'mousedown';
|
|
137
137
|
const handleOutsideClick = event => {
|
|
138
138
|
const node = event.target;
|
|
139
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/
|
|
139
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
140
140
|
if (open && node && !ref.current.contains(node)) {
|
|
141
141
|
setOpen(false);
|
|
142
142
|
}
|
|
@@ -169,7 +169,7 @@ function Toggletip({
|
|
|
169
169
|
// Get all the properties from Popover except for "open".
|
|
170
170
|
// The Typescript types for PropTypes are really messed up so we need lots of
|
|
171
171
|
// casting. It will be great when we can finally get rid of PropTypes altogether.
|
|
172
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/
|
|
172
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
173
173
|
const {
|
|
174
174
|
open,
|
|
175
175
|
...popoverNonOpenPropTypes
|
|
@@ -197,7 +197,7 @@ const ToggletipButton = /*#__PURE__*/React.forwardRef(function ToggletipButton({
|
|
|
197
197
|
const toggletip = useToggletip();
|
|
198
198
|
const prefix = usePrefix.usePrefix();
|
|
199
199
|
const className = cx(`${prefix}--toggletip-button`, customClassName);
|
|
200
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
200
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
201
201
|
const ComponentToggle = BaseComponent ?? 'button';
|
|
202
202
|
if (ComponentToggle !== 'button') {
|
|
203
203
|
return /*#__PURE__*/React.createElement(ComponentToggle, _rollupPluginBabelHelpers.extends({}, toggletip?.onClick, {
|
|
@@ -50,7 +50,7 @@ const DefinitionTooltip = ({
|
|
|
50
50
|
setOpen(false);
|
|
51
51
|
},
|
|
52
52
|
onMouseEnter: () => {
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
54
54
|
openOnHover ? setOpen(true) : null;
|
|
55
55
|
},
|
|
56
56
|
onFocus: () => {
|
|
@@ -24,7 +24,7 @@ var useIsomorphicEffect = require('../../internal/useIsomorphicEffect.js');
|
|
|
24
24
|
* Event types that trigger a "drag" to stop.
|
|
25
25
|
*/
|
|
26
26
|
const DRAG_STOP_EVENT_TYPES = new Set(['mouseup', 'touchend', 'touchcancel']);
|
|
27
|
-
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/
|
|
27
|
+
// eslint-disable-next-line react/display-name -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
28
28
|
const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
29
29
|
as,
|
|
30
30
|
align = 'top',
|
|
@@ -72,7 +72,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
|
72
72
|
'aria-describedby': describedBy
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
75
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
76
76
|
function getChildEventHandlers(childProps) {
|
|
77
77
|
const eventHandlerFunctions = Object.keys(triggerProps).filter(prop => prop.startsWith('on'));
|
|
78
78
|
const eventHandlers = {};
|
|
@@ -161,7 +161,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
|
161
161
|
}, [isDragging, onDragStop]);
|
|
162
162
|
return (
|
|
163
163
|
/*#__PURE__*/
|
|
164
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
164
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
165
165
|
React.createElement(index.Popover, _rollupPluginBabelHelpers.extends({
|
|
166
166
|
as: as,
|
|
167
167
|
ref: ref
|
|
@@ -76,11 +76,11 @@ const useEllipsisCheck = (label, detailsWrapperRef) => {
|
|
|
76
76
|
cancelAnimationFrame(animationFrameId);
|
|
77
77
|
if (resizeObserver) {
|
|
78
78
|
if (labelTextRef.current) {
|
|
79
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/
|
|
79
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
80
80
|
resizeObserver.unobserve(labelTextRef.current);
|
|
81
81
|
}
|
|
82
82
|
if (detailsWrapperRef.current) {
|
|
83
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/
|
|
83
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
84
84
|
resizeObserver.unobserve(detailsWrapperRef.current);
|
|
85
85
|
}
|
|
86
86
|
resizeObserver.disconnect();
|
|
@@ -132,7 +132,7 @@ const TreeNode = /*#__PURE__*/React.forwardRef(({
|
|
|
132
132
|
} = useEllipsisCheck(label, detailsWrapperRef);
|
|
133
133
|
const enableTreeviewControllable = index.useFeatureFlag('enable-treeview-controllable');
|
|
134
134
|
|
|
135
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/
|
|
135
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
136
136
|
const {
|
|
137
137
|
current: id
|
|
138
138
|
} = React.useRef(nodeId || useId.useId());
|
|
@@ -377,7 +377,7 @@ const TreeNode = /*#__PURE__*/React.forwardRef(({
|
|
|
377
377
|
ref: currentNodeLabel
|
|
378
378
|
}, children &&
|
|
379
379
|
/*#__PURE__*/
|
|
380
|
-
// 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/
|
|
380
|
+
// 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/20452
|
|
381
381
|
React.createElement("span", {
|
|
382
382
|
className: `${prefix}--tree-parent-node__toggle`,
|
|
383
383
|
onClick: handleToggleClick
|
|
@@ -478,14 +478,14 @@ TreeNode.propTypes = {
|
|
|
478
478
|
/**
|
|
479
479
|
* A component used to render an icon.
|
|
480
480
|
*/
|
|
481
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/
|
|
481
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
482
482
|
// @ts-ignore
|
|
483
483
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
484
484
|
/**
|
|
485
485
|
* **Note:** this is controlled by the parent TreeView component, do not set manually.
|
|
486
486
|
* Array containing all selected node IDs in the tree
|
|
487
487
|
*/
|
|
488
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/
|
|
488
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
489
489
|
// @ts-ignore
|
|
490
490
|
selected: deprecate.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.'),
|
|
491
491
|
/**
|
|
@@ -37,13 +37,13 @@ const TreeView = ({
|
|
|
37
37
|
}) => {
|
|
38
38
|
const enableTreeviewControllable = index.useFeatureFlag('enable-treeview-controllable');
|
|
39
39
|
|
|
40
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/
|
|
40
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
41
41
|
const {
|
|
42
42
|
current: treeId
|
|
43
43
|
} = React.useRef(rest.id || useId.useId());
|
|
44
44
|
const prefix = usePrefix.usePrefix();
|
|
45
45
|
const treeClasses = cx(className, `${prefix}--tree`, {
|
|
46
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/
|
|
46
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
47
47
|
// @ts-ignore - will always be false according to prop types
|
|
48
48
|
|
|
49
49
|
[`${prefix}--tree--${size}`]: size !== 'default'
|
|
@@ -70,7 +70,7 @@ const TreeView = ({
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/
|
|
73
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
74
74
|
function handleTreeSelect(event, node) {
|
|
75
75
|
const nodeId = node.id;
|
|
76
76
|
if (nodeId) {
|
|
@@ -119,7 +119,7 @@ const TreeView = ({
|
|
|
119
119
|
if (match.match(event, keys.ArrowDown)) {
|
|
120
120
|
nextFocusNode = treeWalker.current.nextNode();
|
|
121
121
|
}
|
|
122
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/
|
|
122
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
123
123
|
// @ts-ignore - `matches` doesn't like the object syntax without missing properties
|
|
124
124
|
if (match.matches(event, [keys.Home, keys.End, {
|
|
125
125
|
code: 'KeyA'
|
|
@@ -136,7 +136,7 @@ const TreeView = ({
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/
|
|
139
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
140
140
|
// @ts-ignore - `matches` doesn't like the object syntax without missing properties
|
|
141
141
|
if (match.match(event, {
|
|
142
142
|
code: 'KeyA'
|
|
@@ -32,7 +32,7 @@ function HeaderContainer({
|
|
|
32
32
|
setIsSideNavExpandedState(prevIsSideNavExpanded => !prevIsSideNavExpanded);
|
|
33
33
|
}, [setIsSideNavExpandedState]);
|
|
34
34
|
return /*#__PURE__*/React.createElement(Children
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
36
36
|
, _rollupPluginBabelHelpers.extends({}, rest, {
|
|
37
37
|
isSideNavExpanded: isSideNavExpandedState,
|
|
38
38
|
onClickSideNavExpand: handleHeaderMenuButtonClick
|
|
@@ -124,7 +124,7 @@ const HeaderMenu = frFn((props, ref) => {
|
|
|
124
124
|
*/
|
|
125
125
|
const renderMenuItem = (item, index) => {
|
|
126
126
|
if (/*#__PURE__*/React.isValidElement(item)) {
|
|
127
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
127
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
128
128
|
return /*#__PURE__*/React.cloneElement(item, {
|
|
129
129
|
ref: handleItemRef(index)
|
|
130
130
|
});
|
|
@@ -21,11 +21,11 @@ const LinkBase = ({
|
|
|
21
21
|
as: BaseComponent,
|
|
22
22
|
// Captured here to prevent it from being passed into the created element.
|
|
23
23
|
// See https://github.com/carbon-design-system/carbon/issues/3970
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
25
25
|
isSideNavExpanded: _isSideNavExpanded,
|
|
26
26
|
...rest
|
|
27
27
|
}, ref) => {
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
29
29
|
const BaseComponentAsAny = BaseComponent ?? element ?? 'a';
|
|
30
30
|
return /*#__PURE__*/React.createElement(BaseComponentAsAny, _rollupPluginBabelHelpers.extends({
|
|
31
31
|
ref: ref
|
|
@@ -25,7 +25,7 @@ const SideNavItems = ({
|
|
|
25
25
|
const childrenWithExpandedState = React.Children.map(children, child => {
|
|
26
26
|
if (/*#__PURE__*/React.isValidElement(child)) {
|
|
27
27
|
// avoid spreading `isSideNavExpanded` to non-Carbon UI Shell children
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
29
29
|
const childDisplayName = child.type?.displayName;
|
|
30
30
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
31
31
|
...(_utils.CARBON_SIDENAV_ITEMS.includes(childDisplayName) ? {
|
|
@@ -59,7 +59,7 @@ const Switcher = /*#__PURE__*/React.forwardRef((props, forwardRef) => {
|
|
|
59
59
|
if (direction === 1) {
|
|
60
60
|
return enabledIndices[1];
|
|
61
61
|
}
|
|
62
|
-
// eslint-disable-next-line no-fallthrough -- https://github.com/carbon-design-system/carbon/issues/
|
|
62
|
+
// eslint-disable-next-line no-fallthrough -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
63
63
|
default:
|
|
64
64
|
return enabledIndices[nextIndex];
|
|
65
65
|
}
|
|
@@ -73,7 +73,7 @@ const SwitcherItem = /*#__PURE__*/React.forwardRef((props, forwardRef) => {
|
|
|
73
73
|
href: href,
|
|
74
74
|
target: target,
|
|
75
75
|
rel: rel
|
|
76
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/
|
|
76
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- https://github.com/carbon-design-system/carbon/issues/20452
|
|
77
77
|
,
|
|
78
78
|
ref: forwardRef
|
|
79
79
|
}, rest, {
|
package/lib/index.d.ts
CHANGED
|
@@ -245,7 +245,7 @@ export type { ListBoxFieldProps } from './components/ListBox/ListBoxField';
|
|
|
245
245
|
export type { ListBoxMenuProps } from './components/ListBox/ListBoxMenu';
|
|
246
246
|
export type { ListBoxMenuItemProps } from './components/ListBox/ListBoxMenuItem';
|
|
247
247
|
export type { ListBoxMenuIconProps } from './components/ListBox/ListBoxMenuIcon';
|
|
248
|
-
export type { ListBoxMenuIconTranslationKey } from './components/ListBox
|
|
248
|
+
export type { ListBoxMenuIconTranslationKey, ListBoxSelectionTranslationKey, } from './components/ListBox';
|
|
249
249
|
export type { ListBoxMenuIconComponent } from './components/ListBox/ListBoxMenuIcon';
|
|
250
250
|
export type { ListBoxSelectionProps } from './components/ListBox/ListBoxSelection';
|
|
251
251
|
export type { ListItemProps } from './components/ListItem/ListItem';
|