@carbon/react 1.78.2 → 1.79.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.
Files changed (253) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +882 -882
  2. package/es/components/Accordion/AccordionItem.js +2 -2
  3. package/es/components/Button/Button.d.ts +2 -3
  4. package/es/components/Button/Button.js +29 -19
  5. package/es/components/Button/ButtonBase.js +3 -1
  6. package/es/components/ChatButton/ChatButton.d.ts +2 -3
  7. package/es/components/ChatButton/ChatButton.js +1 -2
  8. package/es/components/ComboBox/ComboBox.js +34 -24
  9. package/es/components/ComposedModal/ComposedModal.js +65 -51
  10. package/es/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +2 -2
  11. package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +1 -1
  12. package/es/components/ContentSwitcher/ContentSwitcher.js +3 -3
  13. package/es/components/DataTable/TableBatchAction.d.ts +3 -3
  14. package/es/components/DataTable/TableBatchAction.js +1 -1
  15. package/es/components/DataTable/TableContainer.d.ts +1 -1
  16. package/es/components/DataTable/TableContainer.js +5 -4
  17. package/es/components/DataTable/TableExpandHeader.d.ts +6 -5
  18. package/es/components/DataTable/TableToolbarMenu.d.ts +2 -2
  19. package/es/components/DataTable/TableToolbarMenu.js +1 -1
  20. package/es/components/DatePicker/DatePicker.js +2 -2
  21. package/es/components/DatePicker/plugins/fixEventsPlugin.js +1 -1
  22. package/es/components/Dialog/index.d.ts +42 -4
  23. package/es/components/Dialog/index.js +177 -0
  24. package/es/components/ExpandableSearch/ExpandableSearch.js +2 -2
  25. package/es/components/FeatureFlags/index.d.ts +3 -1
  26. package/es/components/FeatureFlags/index.js +3 -0
  27. package/es/components/FileUploader/FileUploader.d.ts +1 -1
  28. package/es/components/FileUploader/FileUploader.js +2 -2
  29. package/es/components/FileUploader/FileUploaderButton.js +2 -2
  30. package/es/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
  31. package/es/components/FileUploader/FileUploaderDropContainer.js +6 -4
  32. package/es/components/FileUploader/FileUploaderItem.d.ts +1 -1
  33. package/es/components/FileUploader/FileUploaderItem.js +2 -2
  34. package/es/components/Grid/CSSGrid.js +18 -14
  35. package/es/components/Grid/Column.d.ts +2 -2
  36. package/es/components/Grid/Column.js +7 -8
  37. package/es/components/Grid/FlexGrid.js +7 -6
  38. package/es/components/Grid/GridTypes.d.ts +5 -3
  39. package/es/components/IconButton/index.d.ts +2 -2
  40. package/es/components/IconButton/index.js +4 -4
  41. package/es/components/Layer/index.d.ts +4 -6
  42. package/es/components/Layer/index.js +5 -6
  43. package/es/components/Link/Link.d.ts +2 -3
  44. package/es/components/Link/Link.js +1 -2
  45. package/es/components/ListBox/ListBoxMenuItem.d.ts +3 -3
  46. package/es/components/ListBox/ListBoxMenuItem.js +37 -15
  47. package/es/components/Menu/Menu.js +2 -2
  48. package/es/components/Menu/MenuItem.d.ts +2 -2
  49. package/es/components/Menu/MenuItem.js +3 -3
  50. package/es/components/Modal/Modal.js +121 -49
  51. package/es/components/ModalWrapper/ModalWrapper.js +1 -1
  52. package/es/components/MultiSelect/FilterableMultiSelect.js +3 -3
  53. package/es/components/MultiSelect/MultiSelect.js +2 -2
  54. package/es/components/MultiSelect/index.d.ts +1 -1
  55. package/es/components/MultiSelect/index.js +1 -8
  56. package/es/components/Notification/Notification.d.ts +5 -13
  57. package/es/components/Notification/Notification.js +3 -4
  58. package/es/components/OverflowMenu/OverflowMenu.d.ts +22 -201
  59. package/es/components/OverflowMenu/OverflowMenu.js +269 -338
  60. package/es/components/OverflowMenu/index.d.ts +5 -5
  61. package/es/components/OverflowMenu/index.js +2 -2
  62. package/es/components/OverflowMenu/next/index.d.ts +4 -4
  63. package/es/components/OverflowMenu/next/index.js +1 -1
  64. package/es/components/OverflowMenuItem/OverflowMenuItem.js +2 -2
  65. package/es/components/ProgressIndicator/ProgressIndicator.js +2 -2
  66. package/es/components/RadioTile/RadioTile.js +2 -2
  67. package/es/components/Search/Search.d.ts +2 -3
  68. package/es/components/Search/Search.js +4 -6
  69. package/es/components/Slider/Slider.d.ts +39 -44
  70. package/es/components/Slider/Slider.js +57 -59
  71. package/es/components/Tabs/Tabs.d.ts +3 -6
  72. package/es/components/Tabs/Tabs.js +16 -18
  73. package/es/components/Tag/DismissibleTag.d.ts +3 -5
  74. package/es/components/Tag/DismissibleTag.js +1 -2
  75. package/es/components/Tag/OperationalTag.d.ts +2 -3
  76. package/es/components/Tag/OperationalTag.js +1 -2
  77. package/es/components/Tag/SelectableTag.d.ts +3 -5
  78. package/es/components/Tag/SelectableTag.js +1 -2
  79. package/es/components/Tag/Tag.d.ts +2 -3
  80. package/es/components/Tag/Tag.js +1 -2
  81. package/es/components/Tile/Tile.d.ts +3 -5
  82. package/es/components/Tile/Tile.js +16 -10
  83. package/es/components/Toggletip/index.js +2 -2
  84. package/es/components/Tooltip/DefinitionTooltip.js +2 -2
  85. package/es/components/Tooltip/Tooltip.d.ts +1 -1
  86. package/es/components/Tooltip/Tooltip.js +2 -2
  87. package/es/components/TreeView/TreeNode.d.ts +3 -5
  88. package/es/components/TreeView/TreeNode.js +3 -4
  89. package/es/components/TreeView/TreeView.js +2 -2
  90. package/es/components/UIShell/HeaderContainer.js +2 -2
  91. package/es/components/UIShell/HeaderMenu.js +2 -2
  92. package/es/components/UIShell/HeaderPanel.js +2 -2
  93. package/es/components/UIShell/SideNav.d.ts +1 -1
  94. package/es/components/UIShell/SideNav.js +2 -2
  95. package/es/components/UIShell/SideNavHeader.d.ts +2 -3
  96. package/es/components/UIShell/SideNavHeader.js +1 -2
  97. package/es/components/UIShell/SideNavLink.d.ts +2 -2
  98. package/es/components/UIShell/SideNavLink.js +1 -1
  99. package/es/components/UIShell/SideNavMenu.d.ts +2 -2
  100. package/es/components/UIShell/SideNavMenu.js +3 -3
  101. package/es/components/UIShell/SwitcherItem.js +2 -2
  102. package/es/index.js +1 -1
  103. package/es/internal/FloatingMenu.d.ts +2 -2
  104. package/es/internal/FloatingMenu.js +8 -5
  105. package/es/internal/OptimizedResize.d.ts +18 -0
  106. package/es/internal/OptimizedResize.js +21 -24
  107. package/es/internal/createClassWrapper.d.ts +3 -3
  108. package/es/internal/createClassWrapper.js +4 -4
  109. package/es/internal/keyboard/index.d.ts +9 -0
  110. package/es/internal/keyboard/keys.d.ts +23 -0
  111. package/es/internal/keyboard/keys.js +2 -2
  112. package/es/internal/keyboard/match.d.ts +26 -0
  113. package/es/internal/keyboard/match.js +17 -41
  114. package/es/internal/keyboard/navigation.d.ts +37 -0
  115. package/es/internal/keyboard/navigation.js +15 -27
  116. package/es/internal/useIsomorphicEffect.d.ts +10 -0
  117. package/es/internal/useIsomorphicEffect.js +2 -3
  118. package/es/internal/useMatchMedia.d.ts +8 -0
  119. package/es/internal/useMatchMedia.js +10 -20
  120. package/es/internal/useMergedRefs.js +3 -0
  121. package/es/internal/useNormalizedInputProps.d.ts +52 -0
  122. package/es/internal/useNormalizedInputProps.js +9 -36
  123. package/lib/components/Accordion/AccordionItem.js +2 -2
  124. package/lib/components/Button/Button.d.ts +2 -3
  125. package/lib/components/Button/Button.js +29 -19
  126. package/lib/components/Button/ButtonBase.js +3 -1
  127. package/lib/components/ChatButton/ChatButton.d.ts +2 -3
  128. package/lib/components/ChatButton/ChatButton.js +1 -2
  129. package/lib/components/ComboBox/ComboBox.js +34 -24
  130. package/lib/components/ComposedModal/ComposedModal.js +64 -50
  131. package/lib/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +2 -2
  132. package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +1 -1
  133. package/lib/components/ContentSwitcher/ContentSwitcher.js +3 -3
  134. package/lib/components/DataTable/TableBatchAction.d.ts +3 -3
  135. package/lib/components/DataTable/TableBatchAction.js +1 -1
  136. package/lib/components/DataTable/TableContainer.d.ts +1 -1
  137. package/lib/components/DataTable/TableContainer.js +5 -4
  138. package/lib/components/DataTable/TableExpandHeader.d.ts +6 -5
  139. package/lib/components/DataTable/TableToolbarMenu.d.ts +2 -2
  140. package/lib/components/DataTable/TableToolbarMenu.js +1 -1
  141. package/lib/components/DatePicker/DatePicker.js +2 -2
  142. package/lib/components/DatePicker/plugins/fixEventsPlugin.js +1 -1
  143. package/lib/components/Dialog/index.d.ts +42 -4
  144. package/lib/components/Dialog/index.js +190 -0
  145. package/lib/components/ExpandableSearch/ExpandableSearch.js +2 -2
  146. package/lib/components/FeatureFlags/index.d.ts +3 -1
  147. package/lib/components/FeatureFlags/index.js +3 -0
  148. package/lib/components/FileUploader/FileUploader.d.ts +1 -1
  149. package/lib/components/FileUploader/FileUploader.js +2 -2
  150. package/lib/components/FileUploader/FileUploaderButton.js +2 -2
  151. package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
  152. package/lib/components/FileUploader/FileUploaderDropContainer.js +6 -4
  153. package/lib/components/FileUploader/FileUploaderItem.d.ts +1 -1
  154. package/lib/components/FileUploader/FileUploaderItem.js +2 -2
  155. package/lib/components/Grid/CSSGrid.js +18 -14
  156. package/lib/components/Grid/Column.d.ts +2 -2
  157. package/lib/components/Grid/Column.js +7 -8
  158. package/lib/components/Grid/FlexGrid.js +7 -6
  159. package/lib/components/Grid/GridTypes.d.ts +5 -3
  160. package/lib/components/IconButton/index.d.ts +2 -2
  161. package/lib/components/IconButton/index.js +4 -4
  162. package/lib/components/Layer/index.d.ts +4 -6
  163. package/lib/components/Layer/index.js +5 -6
  164. package/lib/components/Link/Link.d.ts +2 -3
  165. package/lib/components/Link/Link.js +1 -2
  166. package/lib/components/ListBox/ListBoxMenuItem.d.ts +3 -3
  167. package/lib/components/ListBox/ListBoxMenuItem.js +36 -14
  168. package/lib/components/Menu/Menu.js +2 -2
  169. package/lib/components/Menu/MenuItem.d.ts +2 -2
  170. package/lib/components/Menu/MenuItem.js +3 -3
  171. package/lib/components/Modal/Modal.js +123 -51
  172. package/lib/components/ModalWrapper/ModalWrapper.js +1 -1
  173. package/lib/components/MultiSelect/FilterableMultiSelect.js +3 -3
  174. package/lib/components/MultiSelect/MultiSelect.js +2 -2
  175. package/lib/components/MultiSelect/index.d.ts +1 -1
  176. package/lib/components/MultiSelect/index.js +1 -8
  177. package/lib/components/Notification/Notification.d.ts +5 -13
  178. package/lib/components/Notification/Notification.js +3 -4
  179. package/lib/components/OverflowMenu/OverflowMenu.d.ts +22 -201
  180. package/lib/components/OverflowMenu/OverflowMenu.js +268 -336
  181. package/lib/components/OverflowMenu/index.d.ts +5 -5
  182. package/lib/components/OverflowMenu/index.js +2 -2
  183. package/lib/components/OverflowMenu/next/index.d.ts +4 -4
  184. package/lib/components/OverflowMenu/next/index.js +1 -1
  185. package/lib/components/OverflowMenuItem/OverflowMenuItem.js +2 -2
  186. package/lib/components/ProgressIndicator/ProgressIndicator.js +2 -2
  187. package/lib/components/RadioTile/RadioTile.js +2 -2
  188. package/lib/components/Search/Search.d.ts +2 -3
  189. package/lib/components/Search/Search.js +4 -6
  190. package/lib/components/Slider/Slider.d.ts +39 -44
  191. package/lib/components/Slider/Slider.js +57 -59
  192. package/lib/components/Tabs/Tabs.d.ts +3 -6
  193. package/lib/components/Tabs/Tabs.js +16 -18
  194. package/lib/components/Tag/DismissibleTag.d.ts +3 -5
  195. package/lib/components/Tag/DismissibleTag.js +1 -2
  196. package/lib/components/Tag/OperationalTag.d.ts +2 -3
  197. package/lib/components/Tag/OperationalTag.js +1 -2
  198. package/lib/components/Tag/SelectableTag.d.ts +3 -5
  199. package/lib/components/Tag/SelectableTag.js +1 -2
  200. package/lib/components/Tag/Tag.d.ts +2 -3
  201. package/lib/components/Tag/Tag.js +1 -2
  202. package/lib/components/Tile/Tile.d.ts +3 -5
  203. package/lib/components/Tile/Tile.js +16 -10
  204. package/lib/components/Toggletip/index.js +2 -2
  205. package/lib/components/Tooltip/DefinitionTooltip.js +2 -2
  206. package/lib/components/Tooltip/Tooltip.d.ts +1 -1
  207. package/lib/components/Tooltip/Tooltip.js +2 -2
  208. package/lib/components/TreeView/TreeNode.d.ts +3 -5
  209. package/lib/components/TreeView/TreeNode.js +3 -4
  210. package/lib/components/TreeView/TreeView.js +2 -2
  211. package/lib/components/UIShell/HeaderContainer.js +2 -2
  212. package/lib/components/UIShell/HeaderMenu.js +2 -2
  213. package/lib/components/UIShell/HeaderPanel.js +2 -2
  214. package/lib/components/UIShell/SideNav.d.ts +1 -1
  215. package/lib/components/UIShell/SideNav.js +2 -2
  216. package/lib/components/UIShell/SideNavHeader.d.ts +2 -3
  217. package/lib/components/UIShell/SideNavHeader.js +1 -2
  218. package/lib/components/UIShell/SideNavLink.d.ts +2 -2
  219. package/lib/components/UIShell/SideNavLink.js +1 -1
  220. package/lib/components/UIShell/SideNavMenu.d.ts +2 -2
  221. package/lib/components/UIShell/SideNavMenu.js +3 -3
  222. package/lib/components/UIShell/SwitcherItem.js +2 -2
  223. package/lib/index.js +2 -2
  224. package/lib/internal/FloatingMenu.d.ts +2 -2
  225. package/lib/internal/FloatingMenu.js +9 -6
  226. package/lib/internal/OptimizedResize.d.ts +18 -0
  227. package/lib/internal/OptimizedResize.js +21 -24
  228. package/lib/internal/createClassWrapper.d.ts +3 -3
  229. package/lib/internal/createClassWrapper.js +4 -4
  230. package/lib/internal/keyboard/index.d.ts +9 -0
  231. package/lib/internal/keyboard/keys.d.ts +23 -0
  232. package/lib/internal/keyboard/keys.js +2 -2
  233. package/lib/internal/keyboard/match.d.ts +26 -0
  234. package/lib/internal/keyboard/match.js +17 -41
  235. package/lib/internal/keyboard/navigation.d.ts +37 -0
  236. package/lib/internal/keyboard/navigation.js +15 -27
  237. package/lib/internal/useIsomorphicEffect.d.ts +10 -0
  238. package/lib/internal/useIsomorphicEffect.js +2 -3
  239. package/lib/internal/useMatchMedia.d.ts +8 -0
  240. package/lib/internal/useMatchMedia.js +10 -20
  241. package/lib/internal/useMergedRefs.js +3 -0
  242. package/lib/internal/useNormalizedInputProps.d.ts +52 -0
  243. package/lib/internal/useNormalizedInputProps.js +9 -36
  244. package/package.json +6 -6
  245. package/scss/components/dialog/_dialog.scss +9 -0
  246. package/scss/components/dialog/_index.scss +9 -0
  247. package/telemetry.yml +1 -0
  248. package/es/components/Modal/next/index.d.ts +0 -171
  249. package/es/internal/focus/index.js +0 -15
  250. package/es/internal/useEffectOnce.js +0 -30
  251. package/lib/components/Modal/next/index.d.ts +0 -171
  252. package/lib/internal/focus/index.js +0 -19
  253. package/lib/internal/useEffectOnce.js +0 -34
@@ -4,32 +4,35 @@
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 ElementType, type ReactNode, type Ref } from 'react';
7
8
  import { type MenuDirection, type MenuOffset } from '../../internal/FloatingMenu';
8
- import React, { ComponentType } from 'react';
9
- import PropTypes from 'prop-types';
9
+ /**
10
+ * Calculates the offset for the floating menu.
11
+ *
12
+ * @param menuBody - The menu body with the menu arrow.
13
+ * @param direction - The floating menu direction.
14
+ * @returns The adjustment of the floating menu position, upon the position of
15
+ * the menu arrow.
16
+ */
10
17
  export declare const getMenuOffset: MenuOffset;
11
- type IconProps = {
12
- className?: string;
13
- 'aria-label'?: string;
14
- };
15
18
  export interface OverflowMenuProps {
16
19
  /**
17
20
  * Specify a label to be read by screen readers on the container node
18
21
  */
19
22
  ['aria-label']?: string;
20
23
  /**
21
- * Deprecated, please use `aria-label` instead.
22
24
  * Specify a label to be read by screen readers on the container note.
23
- * @deprecated
24
- * */
25
- ariaLabel: string;
25
+ *
26
+ * @deprecated - Use `aria-label` instead.
27
+ */
28
+ ariaLabel?: string;
26
29
  /**
27
30
  * The child nodes.
28
- * */
29
- children: React.ReactNode;
31
+ */
32
+ children: ReactNode;
30
33
  /**
31
- * The CSS class names.
32
- * */
34
+ * The CSS class names.
35
+ */
33
36
  className?: string;
34
37
  /**
35
38
  * The menu direction.
@@ -89,9 +92,9 @@ export interface OverflowMenuProps {
89
92
  */
90
93
  open?: boolean;
91
94
  /**
92
- * Function called to override icon rendering.
95
+ * A component used to render an icon.
93
96
  */
94
- renderIcon?: ComponentType<IconProps>;
97
+ renderIcon?: ElementType;
95
98
  /**
96
99
  * Specify a CSS selector that matches the DOM element that should
97
100
  * be focused when the OverflowMenu opens
@@ -104,189 +107,7 @@ export interface OverflowMenuProps {
104
107
  /**
105
108
  * The ref to the HTML element that should receive focus when the OverflowMenu opens
106
109
  */
107
- innerRef?: React.Ref<any>;
108
- }
109
- export interface OverflowMenuState {
110
- open: boolean;
111
- prevOpen?: boolean;
112
- hasMountedTrigger: boolean;
113
- click: boolean;
114
- }
115
- interface ReleaseHandle {
116
- release: () => null;
117
- }
118
- declare class OverflowMenu extends React.Component<OverflowMenuProps, OverflowMenuState> {
119
- state: OverflowMenuState;
120
- instanceId: number;
121
- static propTypes: {
122
- /**
123
- * Specify a label to be read by screen readers on the container node
124
- */
125
- "aria-label": PropTypes.Requireable<string>;
126
- /**
127
- * Deprecated, please use `aria-label` instead.
128
- * Specify a label to be read by screen readers on the container note.
129
- */
130
- ariaLabel: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
131
- /**
132
- * The child nodes.
133
- */
134
- children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
135
- /**
136
- * The CSS class names.
137
- */
138
- className: PropTypes.Requireable<string>;
139
- /**
140
- * The menu direction.
141
- */
142
- direction: PropTypes.Requireable<string>;
143
- /**
144
- * `true` if the menu alignment should be flipped.
145
- */
146
- flipped: PropTypes.Requireable<boolean>;
147
- /**
148
- * Enable or disable focus trap behavior
149
- */
150
- focusTrap: PropTypes.Requireable<boolean>;
151
- /**
152
- * The CSS class for the icon.
153
- */
154
- iconClass: PropTypes.Requireable<string>;
155
- /**
156
- * The icon description.
157
- */
158
- iconDescription: PropTypes.Requireable<string>;
159
- /**
160
- * The element ID.
161
- */
162
- id: PropTypes.Requireable<string>;
163
- /**
164
- * `true` to use the light version. For use on $ui-01 backgrounds only.
165
- * Don't use this to make OverflowMenu background color same as container background color.
166
- */
167
- light: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
168
- /**
169
- * The adjustment in position applied to the floating menu.
170
- */
171
- menuOffset: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.InferProps<{
172
- top: PropTypes.Requireable<number>;
173
- left: PropTypes.Requireable<number>;
174
- }> | null | undefined>>;
175
- /**
176
- * The adjustment in position applied to the floating menu.
177
- */
178
- menuOffsetFlip: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.InferProps<{
179
- top: PropTypes.Requireable<number>;
180
- left: PropTypes.Requireable<number>;
181
- }> | null | undefined>>;
182
- /**
183
- * The class to apply to the menu options
184
- */
185
- menuOptionsClass: PropTypes.Requireable<string>;
186
- /**
187
- * The event handler for the `click` event.
188
- */
189
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
190
- /**
191
- * Function called when menu is closed
192
- */
193
- onClose: PropTypes.Requireable<(...args: any[]) => any>;
194
- /**
195
- * The event handler for the `focus` event.
196
- */
197
- onFocus: PropTypes.Requireable<(...args: any[]) => any>;
198
- /**
199
- * The event handler for the `keydown` event.
200
- */
201
- onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
202
- /**
203
- * Function called when menu is opened
204
- */
205
- onOpen: PropTypes.Requireable<(...args: any[]) => any>;
206
- /**
207
- * `true` if the menu should be open.
208
- */
209
- open: PropTypes.Requireable<boolean>;
210
- /**
211
- * Function called to override icon rendering.
212
- */
213
- renderIcon: PropTypes.Requireable<object>;
214
- /**
215
- * Specify a CSS selector that matches the DOM element that should
216
- * be focused when the OverflowMenu opens
217
- */
218
- selectorPrimaryFocus: PropTypes.Requireable<string>;
219
- /**
220
- * Specify the size of the OverflowMenu. Currently supports either `sm`, 'md' (default) or 'lg` as an option.
221
- */
222
- size: PropTypes.Requireable<string>;
223
- };
224
- static contextType: React.Context<string>;
225
- /**
226
- * The handle of `onfocusin` or `focus` event handler.
227
- * @private
228
- */
229
- _hFocusIn: ReleaseHandle | null;
230
- /**
231
- * The timeout handle for handling `blur` event.
232
- * @private
233
- */
234
- _hBlurTimeout: any;
235
- /**
236
- * The element ref of the tooltip's trigger button.
237
- * @type {React.RefObject<HTMLElement>}
238
- * @private
239
- */
240
- _triggerRef: React.RefObject<HTMLElement>;
241
- componentDidUpdate(_: any, prevState: any): void;
242
- componentDidMount(): void;
243
- static getDerivedStateFromProps({ open }: {
244
- open: any;
245
- }, state: any): {
246
- open: any;
247
- prevOpen: any;
248
- } | null;
249
- componentWillUnmount(): void;
250
- handleClick: (evt: any) => void;
251
- closeMenuAndFocus: () => void;
252
- closeMenuOnEscape: () => void;
253
- handleKeyPress: (evt: any) => void;
254
- handleClickOutside: (evt: any) => void;
255
- closeMenu: (onCloseMenu?: any) => void;
256
- focusMenuEl: () => void;
257
- /**
258
- * Focuses the next enabled overflow menu item given the currently focused
259
- * item index and direction to move
260
- * @param {object} params
261
- * @param {number} params.currentIndex - the index of the currently focused
262
- * overflow menu item in the list of overflow menu items
263
- * @param {number} params.direction - number denoting the direction to move
264
- * focus (1 for forwards, -1 for backwards)
265
- */
266
- handleOverflowMenuItemFocus: ({ currentIndex, direction }: {
267
- currentIndex: any;
268
- direction: any;
269
- }) => void;
270
- /**
271
- * Handles the floating menu being unmounted or non-floating menu being
272
- * mounted or unmounted.
273
- * @param {Element} menuBody The DOM element of the menu body.
274
- * @private
275
- */
276
- _menuBody: HTMLElement | null;
277
- _bindMenuBody: (menuBody: HTMLElement | null) => void;
278
- /**
279
- * Handles the floating menu being placed.
280
- * @param {Element} menuBody The DOM element of the menu body.
281
- * @private
282
- */
283
- _handlePlace: (menuBody: any) => void;
284
- /**
285
- * @returns {Element} The DOM element where the floating menu is placed in.
286
- */
287
- _getTarget: () => Element;
288
- render(): import("react/jsx-runtime").JSX.Element;
110
+ innerRef?: Ref<any>;
289
111
  }
290
- export { OverflowMenu };
291
- declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
292
- export default _default;
112
+ export declare const OverflowMenu: React.ForwardRefExoticComponent<OverflowMenuProps & React.RefAttributes<HTMLButtonElement>>;
113
+ export default OverflowMenu;