@carbon/react 1.78.2 → 1.79.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 +835 -835
- package/es/components/Accordion/AccordionItem.js +2 -2
- package/es/components/Button/Button.d.ts +2 -3
- package/es/components/Button/Button.js +29 -19
- package/es/components/Button/ButtonBase.js +3 -1
- package/es/components/ChatButton/ChatButton.d.ts +2 -3
- package/es/components/ChatButton/ChatButton.js +1 -2
- package/es/components/ComboBox/ComboBox.js +34 -24
- package/es/components/ComposedModal/ComposedModal.js +65 -51
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +2 -2
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +1 -1
- package/es/components/ContentSwitcher/ContentSwitcher.js +3 -3
- package/es/components/DataTable/TableBatchAction.d.ts +3 -3
- package/es/components/DataTable/TableBatchAction.js +1 -1
- package/es/components/DataTable/TableContainer.d.ts +1 -1
- package/es/components/DataTable/TableContainer.js +5 -4
- package/es/components/DataTable/TableExpandHeader.d.ts +6 -5
- package/es/components/DataTable/TableToolbarMenu.d.ts +2 -2
- package/es/components/DataTable/TableToolbarMenu.js +1 -1
- package/es/components/DatePicker/DatePicker.js +2 -2
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +1 -1
- package/es/components/Dialog/index.d.ts +42 -4
- package/es/components/Dialog/index.js +177 -0
- package/es/components/ExpandableSearch/ExpandableSearch.js +2 -2
- package/es/components/FeatureFlags/index.d.ts +3 -1
- package/es/components/FeatureFlags/index.js +3 -0
- package/es/components/FileUploader/FileUploader.d.ts +1 -1
- package/es/components/FileUploader/FileUploader.js +2 -2
- package/es/components/FileUploader/FileUploaderButton.js +2 -2
- package/es/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
- package/es/components/FileUploader/FileUploaderDropContainer.js +6 -4
- package/es/components/FileUploader/FileUploaderItem.d.ts +1 -1
- package/es/components/FileUploader/FileUploaderItem.js +2 -2
- package/es/components/Grid/CSSGrid.js +18 -14
- package/es/components/Grid/Column.d.ts +2 -2
- package/es/components/Grid/Column.js +7 -8
- package/es/components/Grid/FlexGrid.js +7 -6
- package/es/components/Grid/GridTypes.d.ts +5 -3
- package/es/components/IconButton/index.d.ts +2 -2
- package/es/components/IconButton/index.js +4 -4
- package/es/components/Layer/index.d.ts +4 -6
- package/es/components/Layer/index.js +5 -6
- package/es/components/Link/Link.d.ts +2 -3
- package/es/components/Link/Link.js +1 -2
- package/es/components/ListBox/ListBoxMenuItem.d.ts +3 -3
- package/es/components/ListBox/ListBoxMenuItem.js +37 -15
- package/es/components/Menu/Menu.js +2 -2
- package/es/components/Menu/MenuItem.d.ts +2 -2
- package/es/components/Menu/MenuItem.js +3 -3
- package/es/components/Modal/Modal.js +121 -49
- package/es/components/ModalWrapper/ModalWrapper.js +1 -1
- package/es/components/MultiSelect/FilterableMultiSelect.js +3 -3
- package/es/components/MultiSelect/MultiSelect.js +2 -2
- package/es/components/MultiSelect/index.d.ts +1 -1
- package/es/components/MultiSelect/index.js +1 -8
- package/es/components/Notification/Notification.d.ts +5 -13
- package/es/components/Notification/Notification.js +3 -4
- package/es/components/OverflowMenu/OverflowMenu.d.ts +22 -201
- package/es/components/OverflowMenu/OverflowMenu.js +269 -338
- package/es/components/OverflowMenu/index.d.ts +5 -5
- package/es/components/OverflowMenu/index.js +2 -2
- package/es/components/OverflowMenu/next/index.d.ts +4 -4
- package/es/components/OverflowMenu/next/index.js +1 -1
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +2 -2
- package/es/components/ProgressIndicator/ProgressIndicator.js +2 -2
- package/es/components/RadioTile/RadioTile.js +2 -2
- package/es/components/Search/Search.d.ts +2 -3
- package/es/components/Search/Search.js +4 -6
- package/es/components/Slider/Slider.d.ts +39 -44
- package/es/components/Slider/Slider.js +57 -59
- package/es/components/Tabs/Tabs.d.ts +3 -6
- package/es/components/Tabs/Tabs.js +16 -18
- package/es/components/Tag/DismissibleTag.d.ts +3 -5
- package/es/components/Tag/DismissibleTag.js +1 -2
- package/es/components/Tag/OperationalTag.d.ts +2 -3
- package/es/components/Tag/OperationalTag.js +1 -2
- package/es/components/Tag/SelectableTag.d.ts +3 -5
- package/es/components/Tag/SelectableTag.js +1 -2
- package/es/components/Tag/Tag.d.ts +2 -3
- package/es/components/Tag/Tag.js +1 -2
- package/es/components/Tile/Tile.d.ts +3 -5
- package/es/components/Tile/Tile.js +16 -10
- package/es/components/Toggletip/index.js +2 -2
- package/es/components/Tooltip/DefinitionTooltip.js +2 -2
- package/es/components/Tooltip/Tooltip.d.ts +1 -1
- package/es/components/Tooltip/Tooltip.js +2 -2
- package/es/components/TreeView/TreeNode.d.ts +3 -5
- package/es/components/TreeView/TreeNode.js +3 -4
- package/es/components/TreeView/TreeView.js +2 -2
- package/es/components/UIShell/HeaderContainer.js +2 -2
- package/es/components/UIShell/HeaderMenu.js +2 -2
- package/es/components/UIShell/HeaderPanel.js +2 -2
- package/es/components/UIShell/SideNav.d.ts +1 -1
- package/es/components/UIShell/SideNav.js +2 -2
- package/es/components/UIShell/SideNavHeader.d.ts +2 -3
- package/es/components/UIShell/SideNavHeader.js +1 -2
- package/es/components/UIShell/SideNavLink.d.ts +2 -2
- package/es/components/UIShell/SideNavLink.js +1 -1
- package/es/components/UIShell/SideNavMenu.d.ts +2 -2
- package/es/components/UIShell/SideNavMenu.js +3 -3
- package/es/components/UIShell/SwitcherItem.js +2 -2
- package/es/index.js +1 -1
- package/es/internal/FloatingMenu.d.ts +2 -2
- package/es/internal/FloatingMenu.js +8 -5
- package/es/internal/OptimizedResize.d.ts +18 -0
- package/es/internal/OptimizedResize.js +21 -24
- package/es/internal/createClassWrapper.d.ts +3 -3
- package/es/internal/createClassWrapper.js +4 -4
- package/es/internal/keyboard/index.d.ts +9 -0
- package/es/internal/keyboard/keys.d.ts +23 -0
- package/es/internal/keyboard/keys.js +2 -2
- package/es/internal/keyboard/match.d.ts +26 -0
- package/es/internal/keyboard/match.js +17 -41
- package/es/internal/keyboard/navigation.d.ts +37 -0
- package/es/internal/keyboard/navigation.js +15 -27
- package/es/internal/useMatchMedia.d.ts +8 -0
- package/es/internal/useMatchMedia.js +10 -20
- package/es/internal/useMergedRefs.js +3 -0
- package/es/internal/useNormalizedInputProps.d.ts +52 -0
- package/es/internal/useNormalizedInputProps.js +9 -36
- package/lib/components/Accordion/AccordionItem.js +2 -2
- package/lib/components/Button/Button.d.ts +2 -3
- package/lib/components/Button/Button.js +29 -19
- package/lib/components/Button/ButtonBase.js +3 -1
- package/lib/components/ChatButton/ChatButton.d.ts +2 -3
- package/lib/components/ChatButton/ChatButton.js +1 -2
- package/lib/components/ComboBox/ComboBox.js +34 -24
- package/lib/components/ComposedModal/ComposedModal.js +64 -50
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +2 -2
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +1 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.js +3 -3
- package/lib/components/DataTable/TableBatchAction.d.ts +3 -3
- package/lib/components/DataTable/TableBatchAction.js +1 -1
- package/lib/components/DataTable/TableContainer.d.ts +1 -1
- package/lib/components/DataTable/TableContainer.js +5 -4
- package/lib/components/DataTable/TableExpandHeader.d.ts +6 -5
- package/lib/components/DataTable/TableToolbarMenu.d.ts +2 -2
- package/lib/components/DataTable/TableToolbarMenu.js +1 -1
- package/lib/components/DatePicker/DatePicker.js +2 -2
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +1 -1
- package/lib/components/Dialog/index.d.ts +42 -4
- package/lib/components/Dialog/index.js +190 -0
- package/lib/components/ExpandableSearch/ExpandableSearch.js +2 -2
- package/lib/components/FeatureFlags/index.d.ts +3 -1
- package/lib/components/FeatureFlags/index.js +3 -0
- package/lib/components/FileUploader/FileUploader.d.ts +1 -1
- package/lib/components/FileUploader/FileUploader.js +2 -2
- package/lib/components/FileUploader/FileUploaderButton.js +2 -2
- package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.js +6 -4
- package/lib/components/FileUploader/FileUploaderItem.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderItem.js +2 -2
- package/lib/components/Grid/CSSGrid.js +18 -14
- package/lib/components/Grid/Column.d.ts +2 -2
- package/lib/components/Grid/Column.js +7 -8
- package/lib/components/Grid/FlexGrid.js +7 -6
- package/lib/components/Grid/GridTypes.d.ts +5 -3
- package/lib/components/IconButton/index.d.ts +2 -2
- package/lib/components/IconButton/index.js +4 -4
- package/lib/components/Layer/index.d.ts +4 -6
- package/lib/components/Layer/index.js +5 -6
- package/lib/components/Link/Link.d.ts +2 -3
- package/lib/components/Link/Link.js +1 -2
- package/lib/components/ListBox/ListBoxMenuItem.d.ts +3 -3
- package/lib/components/ListBox/ListBoxMenuItem.js +36 -14
- package/lib/components/Menu/Menu.js +2 -2
- package/lib/components/Menu/MenuItem.d.ts +2 -2
- package/lib/components/Menu/MenuItem.js +3 -3
- package/lib/components/Modal/Modal.js +123 -51
- package/lib/components/ModalWrapper/ModalWrapper.js +1 -1
- package/lib/components/MultiSelect/FilterableMultiSelect.js +3 -3
- package/lib/components/MultiSelect/MultiSelect.js +2 -2
- package/lib/components/MultiSelect/index.d.ts +1 -1
- package/lib/components/MultiSelect/index.js +1 -8
- package/lib/components/Notification/Notification.d.ts +5 -13
- package/lib/components/Notification/Notification.js +3 -4
- package/lib/components/OverflowMenu/OverflowMenu.d.ts +22 -201
- package/lib/components/OverflowMenu/OverflowMenu.js +268 -336
- package/lib/components/OverflowMenu/index.d.ts +5 -5
- package/lib/components/OverflowMenu/index.js +2 -2
- package/lib/components/OverflowMenu/next/index.d.ts +4 -4
- package/lib/components/OverflowMenu/next/index.js +1 -1
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +2 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.js +2 -2
- package/lib/components/RadioTile/RadioTile.js +2 -2
- package/lib/components/Search/Search.d.ts +2 -3
- package/lib/components/Search/Search.js +4 -6
- package/lib/components/Slider/Slider.d.ts +39 -44
- package/lib/components/Slider/Slider.js +57 -59
- package/lib/components/Tabs/Tabs.d.ts +3 -6
- package/lib/components/Tabs/Tabs.js +16 -18
- package/lib/components/Tag/DismissibleTag.d.ts +3 -5
- package/lib/components/Tag/DismissibleTag.js +1 -2
- package/lib/components/Tag/OperationalTag.d.ts +2 -3
- package/lib/components/Tag/OperationalTag.js +1 -2
- package/lib/components/Tag/SelectableTag.d.ts +3 -5
- package/lib/components/Tag/SelectableTag.js +1 -2
- package/lib/components/Tag/Tag.d.ts +2 -3
- package/lib/components/Tag/Tag.js +1 -2
- package/lib/components/Tile/Tile.d.ts +3 -5
- package/lib/components/Tile/Tile.js +16 -10
- package/lib/components/Toggletip/index.js +2 -2
- package/lib/components/Tooltip/DefinitionTooltip.js +2 -2
- package/lib/components/Tooltip/Tooltip.d.ts +1 -1
- package/lib/components/Tooltip/Tooltip.js +2 -2
- package/lib/components/TreeView/TreeNode.d.ts +3 -5
- package/lib/components/TreeView/TreeNode.js +3 -4
- package/lib/components/TreeView/TreeView.js +2 -2
- package/lib/components/UIShell/HeaderContainer.js +2 -2
- package/lib/components/UIShell/HeaderMenu.js +2 -2
- package/lib/components/UIShell/HeaderPanel.js +2 -2
- package/lib/components/UIShell/SideNav.d.ts +1 -1
- package/lib/components/UIShell/SideNav.js +2 -2
- package/lib/components/UIShell/SideNavHeader.d.ts +2 -3
- package/lib/components/UIShell/SideNavHeader.js +1 -2
- package/lib/components/UIShell/SideNavLink.d.ts +2 -2
- package/lib/components/UIShell/SideNavLink.js +1 -1
- package/lib/components/UIShell/SideNavMenu.d.ts +2 -2
- package/lib/components/UIShell/SideNavMenu.js +3 -3
- package/lib/components/UIShell/SwitcherItem.js +2 -2
- package/lib/index.js +2 -2
- package/lib/internal/FloatingMenu.d.ts +2 -2
- package/lib/internal/FloatingMenu.js +9 -6
- package/lib/internal/OptimizedResize.d.ts +18 -0
- package/lib/internal/OptimizedResize.js +21 -24
- package/lib/internal/createClassWrapper.d.ts +3 -3
- package/lib/internal/createClassWrapper.js +4 -4
- package/lib/internal/keyboard/index.d.ts +9 -0
- package/lib/internal/keyboard/keys.d.ts +23 -0
- package/lib/internal/keyboard/keys.js +2 -2
- package/lib/internal/keyboard/match.d.ts +26 -0
- package/lib/internal/keyboard/match.js +17 -41
- package/lib/internal/keyboard/navigation.d.ts +37 -0
- package/lib/internal/keyboard/navigation.js +15 -27
- package/lib/internal/useMatchMedia.d.ts +8 -0
- package/lib/internal/useMatchMedia.js +10 -20
- package/lib/internal/useMergedRefs.js +3 -0
- package/lib/internal/useNormalizedInputProps.d.ts +52 -0
- package/lib/internal/useNormalizedInputProps.js +9 -36
- package/package.json +6 -6
- package/scss/components/dialog/_dialog.scss +9 -0
- package/scss/components/dialog/_index.scss +9 -0
- package/telemetry.yml +1 -0
- package/es/components/Modal/next/index.d.ts +0 -171
- package/es/internal/focus/index.js +0 -15
- package/es/internal/useEffectOnce.js +0 -30
- package/lib/components/Modal/next/index.d.ts +0 -171
- package/lib/internal/focus/index.js +0 -19
- package/lib/internal/useEffectOnce.js +0 -34
|
@@ -119,8 +119,7 @@ DismissibleTag.propTypes = {
|
|
|
119
119
|
*/
|
|
120
120
|
onClose: PropTypes.func,
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
123
|
-
* Can be a React component class
|
|
122
|
+
* A component used to render an icon.
|
|
124
123
|
*/
|
|
125
124
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
126
125
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -33,8 +33,7 @@ export interface OperationalTagBaseProps {
|
|
|
33
33
|
*/
|
|
34
34
|
id?: string;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
* Can be a React component class
|
|
36
|
+
* A component used to render an icon.
|
|
38
37
|
*/
|
|
39
38
|
renderIcon?: React.ElementType;
|
|
40
39
|
onClick?: MouseEventHandler;
|
|
@@ -101,8 +101,7 @@ OperationalTag.propTypes = {
|
|
|
101
101
|
*/
|
|
102
102
|
id: PropTypes.string,
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
105
|
-
* Can be a React component class
|
|
104
|
+
* A component used to render an icon.
|
|
106
105
|
*/
|
|
107
106
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
108
107
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -22,8 +22,7 @@ export interface SelectableTagBaseProps {
|
|
|
22
22
|
*/
|
|
23
23
|
id?: string;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* Can be a React component class
|
|
25
|
+
* A component used to render an icon.
|
|
27
26
|
*/
|
|
28
27
|
renderIcon?: React.ElementType;
|
|
29
28
|
/**
|
|
@@ -65,8 +64,7 @@ declare const SelectableTag: {
|
|
|
65
64
|
*/
|
|
66
65
|
id: PropTypes.Requireable<string>;
|
|
67
66
|
/**
|
|
68
|
-
*
|
|
69
|
-
* Can be a React component class
|
|
67
|
+
* A component used to render an icon.
|
|
70
68
|
*/
|
|
71
69
|
renderIcon: PropTypes.Requireable<object>;
|
|
72
70
|
/**
|
|
@@ -98,8 +98,7 @@ SelectableTag.propTypes = {
|
|
|
98
98
|
*/
|
|
99
99
|
id: PropTypes.string,
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
102
|
-
* Can be a React component class
|
|
101
|
+
* A component used to render an icon.
|
|
103
102
|
*/
|
|
104
103
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
105
104
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -58,8 +58,7 @@ export interface TagBaseProps {
|
|
|
58
58
|
*/
|
|
59
59
|
onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
62
|
-
* Can be a React component class
|
|
61
|
+
* A component used to render an icon.
|
|
63
62
|
*/
|
|
64
63
|
renderIcon?: React.ElementType;
|
|
65
64
|
/**
|
package/es/components/Tag/Tag.js
CHANGED
|
@@ -176,8 +176,7 @@ Tag.propTypes = {
|
|
|
176
176
|
*/
|
|
177
177
|
onClose: deprecate(PropTypes.func, 'The `onClose` prop has been deprecated and will be removed in the next major version. Use DismissibleTag instead.'),
|
|
178
178
|
/**
|
|
179
|
-
*
|
|
180
|
-
* Can be a React component class
|
|
179
|
+
* A component used to render an icon.
|
|
181
180
|
*/
|
|
182
181
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
183
182
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import React, { type ReactNode, type MouseEvent, type KeyboardEvent, type HTMLAttributes, type ChangeEvent
|
|
7
|
+
import React, { type ReactNode, type MouseEvent, type KeyboardEvent, type HTMLAttributes, type ChangeEvent } from 'react';
|
|
8
8
|
export interface TileProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
className?: string;
|
|
@@ -53,11 +53,9 @@ export interface ClickableTileProps extends HTMLAttributes<HTMLAnchorElement> {
|
|
|
53
53
|
*/
|
|
54
54
|
href?: string;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* A component used to render an icon.
|
|
57
57
|
*/
|
|
58
|
-
renderIcon?:
|
|
59
|
-
className?: string;
|
|
60
|
-
}>;
|
|
58
|
+
renderIcon?: React.ElementType;
|
|
61
59
|
/**
|
|
62
60
|
* Specify the function to run when the ClickableTile is clicked
|
|
63
61
|
*/
|
|
@@ -11,6 +11,8 @@ import PropTypes from 'prop-types';
|
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { AiLabel, CheckboxCheckedFilled, Checkbox, ChevronDown, ArrowRight, Error } from '@carbon/icons-react';
|
|
13
13
|
import Link from '../Link/Link.js';
|
|
14
|
+
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
15
|
+
import { matches } from '../../internal/keyboard/match.js';
|
|
14
16
|
import deprecate from '../../prop-types/deprecate.js';
|
|
15
17
|
import { composeEventHandlers } from '../../tools/events.js';
|
|
16
18
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
@@ -20,9 +22,7 @@ import { useMergedRefs } from '../../internal/useMergedRefs.js';
|
|
|
20
22
|
import { useFeatureFlag } from '../FeatureFlags/index.js';
|
|
21
23
|
import { useId } from '../../internal/useId.js';
|
|
22
24
|
import '../Text/index.js';
|
|
23
|
-
import { matches } from '../../internal/keyboard/match.js';
|
|
24
25
|
import { Text } from '../Text/Text.js';
|
|
25
|
-
import { Enter, Space } from '../../internal/keyboard/keys.js';
|
|
26
26
|
|
|
27
27
|
var _CheckboxCheckedFille, _Checkbox, _ChevronDown, _ChevronDown2;
|
|
28
28
|
const Tile = /*#__PURE__*/React__default.forwardRef(function Tile(_ref, ref) {
|
|
@@ -201,8 +201,7 @@ ClickableTile.propTypes = {
|
|
|
201
201
|
*/
|
|
202
202
|
rel: PropTypes.string,
|
|
203
203
|
/**
|
|
204
|
-
*
|
|
205
|
-
* Can be a React component class
|
|
204
|
+
* A component used to render an icon.
|
|
206
205
|
*/
|
|
207
206
|
// @ts-expect-error: Invalid derived prop type, seemingly no real solution.
|
|
208
207
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
@@ -245,22 +244,29 @@ const SelectableTile = /*#__PURE__*/React__default.forwardRef(function Selectabl
|
|
|
245
244
|
if (normalizedDecorator && decoratorRef.current && decoratorRef.current.contains(evt.target)) {
|
|
246
245
|
return;
|
|
247
246
|
}
|
|
248
|
-
setIsSelected(
|
|
247
|
+
setIsSelected(prevSelected => {
|
|
248
|
+
const newSelected = !prevSelected;
|
|
249
|
+
onChange(evt, newSelected, id);
|
|
250
|
+
return newSelected;
|
|
251
|
+
});
|
|
249
252
|
clickHandler(evt);
|
|
250
|
-
onChange(evt, isSelected, id);
|
|
251
253
|
}
|
|
252
254
|
function handleKeyDown(evt) {
|
|
253
255
|
evt?.persist?.();
|
|
254
256
|
if (matches(evt, [Enter, Space])) {
|
|
255
257
|
evt.preventDefault();
|
|
256
|
-
setIsSelected(
|
|
257
|
-
|
|
258
|
+
setIsSelected(prevSelected => {
|
|
259
|
+
const newSelected = !prevSelected;
|
|
260
|
+
onChange(evt, newSelected, id);
|
|
261
|
+
return newSelected;
|
|
262
|
+
});
|
|
258
263
|
}
|
|
259
264
|
keyDownHandler(evt);
|
|
260
265
|
}
|
|
261
266
|
function handleChange(event) {
|
|
262
|
-
|
|
263
|
-
|
|
267
|
+
const newSelected = event.target.checked;
|
|
268
|
+
setIsSelected(newSelected);
|
|
269
|
+
onChange(event, newSelected, id);
|
|
264
270
|
}
|
|
265
271
|
if (selected !== prevSelected) {
|
|
266
272
|
setIsSelected(selected);
|
|
@@ -10,11 +10,11 @@ import cx from 'classnames';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React__default, { useRef, useState, useContext } from 'react';
|
|
12
12
|
import { Popover, PopoverContent } from '../Popover/index.js';
|
|
13
|
+
import { Escape } from '../../internal/keyboard/keys.js';
|
|
14
|
+
import { match } from '../../internal/keyboard/match.js';
|
|
13
15
|
import { useWindowEvent } from '../../internal/useEvent.js';
|
|
14
16
|
import { useId } from '../../internal/useId.js';
|
|
15
17
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
16
|
-
import { match } from '../../internal/keyboard/match.js';
|
|
17
|
-
import { Escape } from '../../internal/keyboard/keys.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Used to render the label for a Toggletip
|
|
@@ -10,11 +10,11 @@ import cx from 'classnames';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React__default, { useState } from 'react';
|
|
12
12
|
import { Popover, PopoverContent } from '../Popover/index.js';
|
|
13
|
+
import { Escape } from '../../internal/keyboard/keys.js';
|
|
14
|
+
import { match } from '../../internal/keyboard/match.js';
|
|
13
15
|
import { useFallbackId } from '../../internal/useId.js';
|
|
14
16
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
17
|
import deprecate from '../../prop-types/deprecate.js';
|
|
16
|
-
import { match } from '../../internal/keyboard/match.js';
|
|
17
|
-
import { Escape } from '../../internal/keyboard/keys.js';
|
|
18
18
|
|
|
19
19
|
const DefinitionTooltip = _ref => {
|
|
20
20
|
let {
|
|
@@ -10,13 +10,13 @@ import cx from 'classnames';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React__default, { useRef, useState, useCallback, useEffect } from 'react';
|
|
12
12
|
import { Popover, PopoverContent } from '../Popover/index.js';
|
|
13
|
+
import { Escape, Enter, Space } from '../../internal/keyboard/keys.js';
|
|
14
|
+
import { match } from '../../internal/keyboard/match.js';
|
|
13
15
|
import { useDelayedState } from '../../internal/useDelayedState.js';
|
|
14
16
|
import { useId } from '../../internal/useId.js';
|
|
15
17
|
import { useNoInteractiveChildren } from '../../internal/useNoInteractiveChildren.js';
|
|
16
18
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
17
19
|
import useIsomorphicEffect from '../../internal/useIsomorphicEffect.js';
|
|
18
|
-
import { match } from '../../internal/keyboard/match.js';
|
|
19
|
-
import { Escape, Enter, Space } from '../../internal/keyboard/keys.js';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Event types that trigger a "drag" to stop.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -62,8 +62,7 @@ export type TreeNodeProps = {
|
|
|
62
62
|
*/
|
|
63
63
|
onTreeSelect?: (event: React.MouseEvent, node?: TreeNodeProps) => void;
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
66
|
-
* Can be a React component class
|
|
65
|
+
* A component used to render an icon.
|
|
67
66
|
*/
|
|
68
67
|
renderIcon?: ComponentType | FunctionComponent;
|
|
69
68
|
/**
|
|
@@ -137,8 +136,7 @@ declare const TreeNode: React.ForwardRefExoticComponent<{
|
|
|
137
136
|
*/
|
|
138
137
|
onTreeSelect?: (event: React.MouseEvent, node?: TreeNodeProps) => void;
|
|
139
138
|
/**
|
|
140
|
-
*
|
|
141
|
-
* Can be a React component class
|
|
139
|
+
* A component used to render an icon.
|
|
142
140
|
*/
|
|
143
141
|
renderIcon?: ComponentType | FunctionComponent;
|
|
144
142
|
/**
|
|
@@ -10,12 +10,12 @@ import { CaretDown } from '@carbon/icons-react';
|
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import React__default, { useRef, useState, useEffect } from 'react';
|
|
13
|
+
import { ArrowLeft, ArrowRight, Enter, Space } from '../../internal/keyboard/keys.js';
|
|
14
|
+
import { matches, match } from '../../internal/keyboard/match.js';
|
|
13
15
|
import { useControllableState } from '../../internal/useControllableState.js';
|
|
14
16
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
17
|
import uniqueId from '../../tools/uniqueId.js';
|
|
16
18
|
import { useFeatureFlag } from '../FeatureFlags/index.js';
|
|
17
|
-
import { matches, match } from '../../internal/keyboard/match.js';
|
|
18
|
-
import { ArrowLeft, ArrowRight, Enter, Space } from '../../internal/keyboard/keys.js';
|
|
19
19
|
|
|
20
20
|
const TreeNode = /*#__PURE__*/React__default.forwardRef((_ref, forwardedRef) => {
|
|
21
21
|
let {
|
|
@@ -400,8 +400,7 @@ TreeNode.propTypes = {
|
|
|
400
400
|
*/
|
|
401
401
|
onTreeSelect: PropTypes.func,
|
|
402
402
|
/**
|
|
403
|
-
*
|
|
404
|
-
* Can be a React component class
|
|
403
|
+
* A component used to render an icon.
|
|
405
404
|
*/
|
|
406
405
|
// @ts-ignore
|
|
407
406
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
@@ -9,13 +9,13 @@ import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js
|
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React__default, { useRef, useState, useEffect } from 'react';
|
|
12
|
+
import { ArrowUp, ArrowDown, Home, End } from '../../internal/keyboard/keys.js';
|
|
13
|
+
import { matches, match } from '../../internal/keyboard/match.js';
|
|
12
14
|
import { useControllableState } from '../../internal/useControllableState.js';
|
|
13
15
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
16
|
import uniqueId from '../../tools/uniqueId.js';
|
|
15
17
|
import { useFeatureFlag } from '../FeatureFlags/index.js';
|
|
16
18
|
import TreeNode from './TreeNode.js';
|
|
17
|
-
import { matches, match } from '../../internal/keyboard/match.js';
|
|
18
|
-
import { ArrowUp, ArrowDown, Home, End } from '../../internal/keyboard/keys.js';
|
|
19
19
|
|
|
20
20
|
const TreeView = _ref => {
|
|
21
21
|
let {
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import React__default, { useState, useCallback } from 'react';
|
|
11
|
-
import { useWindowEvent } from '../../internal/useEvent.js';
|
|
12
|
-
import { match } from '../../internal/keyboard/match.js';
|
|
13
11
|
import { Escape } from '../../internal/keyboard/keys.js';
|
|
12
|
+
import { match } from '../../internal/keyboard/match.js';
|
|
13
|
+
import { useWindowEvent } from '../../internal/useEvent.js';
|
|
14
14
|
|
|
15
15
|
function HeaderContainer(_ref) {
|
|
16
16
|
let {
|
|
@@ -10,12 +10,12 @@ import { ChevronDown } from '@carbon/icons-react';
|
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import React__default from 'react';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
13
|
+
import { Enter, Space, Escape } from '../../internal/keyboard/keys.js';
|
|
14
|
+
import { matches } from '../../internal/keyboard/match.js';
|
|
13
15
|
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
14
16
|
import { PrefixContext } from '../../internal/usePrefix.js';
|
|
15
17
|
import deprecate from '../../prop-types/deprecate.js';
|
|
16
18
|
import { composeEventHandlers } from '../../tools/events.js';
|
|
17
|
-
import { matches } from '../../internal/keyboard/match.js';
|
|
18
|
-
import { Enter, Space, Escape } from '../../internal/keyboard/keys.js';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* `HeaderMenu` is used to render submenu's in the `Header`. Most often children
|
|
@@ -10,10 +10,10 @@ import cx from 'classnames';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React__default, { useRef, useState } from 'react';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
|
+
import { Escape } from '../../internal/keyboard/keys.js';
|
|
14
|
+
import { match } from '../../internal/keyboard/match.js';
|
|
13
15
|
import { useWindowEvent } from '../../internal/useEvent.js';
|
|
14
16
|
import { useMergedRefs } from '../../internal/useMergedRefs.js';
|
|
15
|
-
import { match } from '../../internal/keyboard/match.js';
|
|
16
|
-
import { Escape } from '../../internal/keyboard/keys.js';
|
|
17
17
|
|
|
18
18
|
const noopFn = () => {};
|
|
19
19
|
const HeaderPanel = /*#__PURE__*/React__default.forwardRef(function HeaderPanel(_ref, ref) {
|
|
@@ -12,13 +12,13 @@ import PropTypes from 'prop-types';
|
|
|
12
12
|
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
13
13
|
import { CARBON_SIDENAV_ITEMS } from './_utils.js';
|
|
14
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
|
+
import { Tab, Escape } from '../../internal/keyboard/keys.js';
|
|
16
|
+
import { match } from '../../internal/keyboard/match.js';
|
|
15
17
|
import { useMergedRefs } from '../../internal/useMergedRefs.js';
|
|
16
18
|
import { useWindowEvent } from '../../internal/useEvent.js';
|
|
17
19
|
import { useDelayedState } from '../../internal/useDelayedState.js';
|
|
18
20
|
import { breakpoints } from '@carbon/layout';
|
|
19
21
|
import { useMatchMedia } from '../../internal/useMatchMedia.js';
|
|
20
|
-
import { match } from '../../internal/keyboard/match.js';
|
|
21
|
-
import { Tab, Escape } from '../../internal/keyboard/keys.js';
|
|
22
22
|
|
|
23
23
|
// TO-DO: comment back in when footer is added for rails
|
|
24
24
|
// import SideNavFooter from './SideNavFooter';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -20,8 +20,7 @@ export interface SideNavHeaderProps {
|
|
|
20
20
|
*/
|
|
21
21
|
isSideNavExpanded?: boolean;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* a React class.
|
|
23
|
+
* A component used to render an icon.
|
|
25
24
|
*/
|
|
26
25
|
renderIcon: React.ComponentType;
|
|
27
26
|
}
|
|
@@ -39,8 +39,7 @@ SideNavHeader.propTypes = {
|
|
|
39
39
|
*/
|
|
40
40
|
isSideNavExpanded: PropTypes.bool,
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
* a React class.
|
|
42
|
+
* A component used to render an icon.
|
|
44
43
|
*/
|
|
45
44
|
// @ts-expect-error - PropTypes are unable to cover this case.
|
|
46
45
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -37,7 +37,7 @@ export type SideNavLinkProps<E extends ElementType> = LinkProps<E> & {
|
|
|
37
37
|
*/
|
|
38
38
|
large?: boolean;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* A component used to render an icon.
|
|
41
41
|
*/
|
|
42
42
|
renderIcon?: ComponentType;
|
|
43
43
|
/**
|
|
@@ -69,7 +69,7 @@ SideNavLink.propTypes = {
|
|
|
69
69
|
*/
|
|
70
70
|
large: PropTypes.bool,
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* A component used to render an icon.
|
|
73
73
|
*/
|
|
74
74
|
// @ts-expect-error - PropTypes are unable to cover this case.
|
|
75
75
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -27,7 +27,7 @@ export interface SideNavMenuProps {
|
|
|
27
27
|
*/
|
|
28
28
|
large?: boolean;
|
|
29
29
|
/**
|
|
30
|
-
* A
|
|
30
|
+
* A component used to render an icon.
|
|
31
31
|
*/
|
|
32
32
|
renderIcon?: React.ComponentType;
|
|
33
33
|
/**
|
|
@@ -10,10 +10,10 @@ import cx from 'classnames';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React__default, { useContext, useState } from 'react';
|
|
12
12
|
import SideNavIcon from './SideNavIcon.js';
|
|
13
|
+
import { Escape } from '../../internal/keyboard/keys.js';
|
|
14
|
+
import { match } from '../../internal/keyboard/match.js';
|
|
13
15
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
16
|
import { SideNavContext } from './SideNav.js';
|
|
15
|
-
import { match } from '../../internal/keyboard/match.js';
|
|
16
|
-
import { Escape } from '../../internal/keyboard/keys.js';
|
|
17
17
|
|
|
18
18
|
var _ChevronDown;
|
|
19
19
|
const SideNavMenu = /*#__PURE__*/React__default.forwardRef(function SideNavMenu(_ref, ref) {
|
|
@@ -110,7 +110,7 @@ SideNavMenu.propTypes = {
|
|
|
110
110
|
*/
|
|
111
111
|
large: PropTypes.bool,
|
|
112
112
|
/**
|
|
113
|
-
*
|
|
113
|
+
* A component used to render an icon.
|
|
114
114
|
*/
|
|
115
115
|
// @ts-expect-error - PropTypes are unable to cover this case.
|
|
116
116
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
@@ -11,9 +11,9 @@ import cx from 'classnames';
|
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import { Link } from './Link.js';
|
|
13
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
|
-
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
15
|
-
import { match } from '../../internal/keyboard/match.js';
|
|
16
14
|
import { ArrowDown, ArrowUp } from '../../internal/keyboard/keys.js';
|
|
15
|
+
import { match } from '../../internal/keyboard/match.js';
|
|
16
|
+
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
17
17
|
|
|
18
18
|
const SwitcherItem = /*#__PURE__*/forwardRef(function SwitcherItem(props, forwardRef) {
|
|
19
19
|
const {
|
package/es/index.js
CHANGED
|
@@ -207,6 +207,7 @@ export { default as unstable_PageSelector } from './components/Pagination/experi
|
|
|
207
207
|
export { default as unstable_Pagination } from './components/Pagination/experimental/Pagination.js';
|
|
208
208
|
export { default as ContainedListItem } from './components/ContainedList/ContainedListItem/ContainedListItem.js';
|
|
209
209
|
export { default as ContainedList } from './components/ContainedList/ContainedList.js';
|
|
210
|
+
export { default as MultiSelect } from './components/MultiSelect/MultiSelect.js';
|
|
210
211
|
export { default as SliderSkeleton } from './components/Slider/Slider.Skeleton.js';
|
|
211
212
|
export { default as TextInputSkeleton } from './components/TextInput/TextInput.Skeleton.js';
|
|
212
213
|
export { default as TextInput } from './components/TextInput/TextInput.js';
|
|
@@ -238,4 +239,3 @@ export { default as TableToolbarContent } from './components/DataTable/TableTool
|
|
|
238
239
|
export { default as TableToolbarSearch } from './components/DataTable/TableToolbarSearch.js';
|
|
239
240
|
export { default as TableToolbarMenu } from './components/DataTable/TableToolbarMenu.js';
|
|
240
241
|
export { default as FilterableMultiSelect } from './components/MultiSelect/FilterableMultiSelect.js';
|
|
241
|
-
export { default as MultiSelect } from './components/MultiSelect/MultiSelect.js';
|
|
@@ -10,8 +10,8 @@ export declare const DIRECTION_TOP = "top";
|
|
|
10
10
|
export declare const DIRECTION_RIGHT = "right";
|
|
11
11
|
export declare const DIRECTION_BOTTOM = "bottom";
|
|
12
12
|
export interface Offset {
|
|
13
|
-
top
|
|
14
|
-
left
|
|
13
|
+
top: number;
|
|
14
|
+
left: number;
|
|
15
15
|
}
|
|
16
16
|
interface Container {
|
|
17
17
|
rect: DOMRect;
|
|
@@ -9,13 +9,13 @@ import React__default, { useContext, useState, useRef, useCallback, useEffect, c
|
|
|
9
9
|
import * as FeatureFlags from '@carbon/feature-flags';
|
|
10
10
|
import ReactDOM from 'react-dom';
|
|
11
11
|
import window from 'window-or-global';
|
|
12
|
-
import
|
|
12
|
+
import { Tab } from './keyboard/keys.js';
|
|
13
|
+
import { match } from './keyboard/match.js';
|
|
13
14
|
import { selectorTabbable, selectorFocusable } from './keyboard/navigation.js';
|
|
15
|
+
import { OptimizedResize } from './OptimizedResize.js';
|
|
14
16
|
import { PrefixContext } from './usePrefix.js';
|
|
15
17
|
import { warning } from './warning.js';
|
|
16
18
|
import wrapFocus, { wrapFocusWithoutSentinels } from './wrapFocus.js';
|
|
17
|
-
import { match } from './keyboard/match.js';
|
|
18
|
-
import { Tab } from './keyboard/keys.js';
|
|
19
19
|
|
|
20
20
|
const DIRECTION_LEFT = 'left';
|
|
21
21
|
const DIRECTION_TOP = 'top';
|
|
@@ -83,7 +83,10 @@ const FloatingMenu = _ref2 => {
|
|
|
83
83
|
flipped,
|
|
84
84
|
focusTrap,
|
|
85
85
|
menuDirection = DIRECTION_BOTTOM,
|
|
86
|
-
menuOffset = {
|
|
86
|
+
menuOffset = {
|
|
87
|
+
top: 0,
|
|
88
|
+
left: 0
|
|
89
|
+
},
|
|
87
90
|
menuRef: externalMenuRef,
|
|
88
91
|
onPlace,
|
|
89
92
|
selectorPrimaryFocus,
|
|
@@ -205,7 +208,7 @@ const FloatingMenu = _ref2 => {
|
|
|
205
208
|
updateMenuPosition();
|
|
206
209
|
});
|
|
207
210
|
return () => {
|
|
208
|
-
resizeHandler.
|
|
211
|
+
resizeHandler.remove();
|
|
209
212
|
};
|
|
210
213
|
}, [triggerRef, menuOffset, menuDirection, flipped, target, updateOrientation]);
|
|
211
214
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* A callback function to be executed on `resize`.
|
|
9
|
+
*/
|
|
10
|
+
type Callback = () => void;
|
|
11
|
+
export declare const OptimizedResize: {
|
|
12
|
+
/** Adds a callback function to be executed on window `resize`. */
|
|
13
|
+
add: (callback: Callback) => {
|
|
14
|
+
/** Removes the callback. */
|
|
15
|
+
remove: () => void;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export {};
|