@carbon/react 1.76.0-rc.0 → 1.77.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 +908 -873
- package/es/components/Button/Button.d.ts +9 -1
- package/es/components/Button/Button.js +8 -0
- package/es/components/CodeSnippet/CodeSnippet.d.ts +2 -2
- package/es/components/ComboBox/ComboBox.d.ts +2 -2
- package/es/components/ComboBox/ComboBox.js +36 -13
- package/es/components/ComboButton/index.js +1 -2
- package/es/components/ComposedModal/ComposedModal.js +1 -1
- package/es/components/ContentSwitcher/index.d.ts +0 -1
- package/es/components/ContextMenu/useContextMenu.d.ts +0 -1
- package/es/components/Copy/Copy.js +1 -1
- package/es/components/DataTable/DataTable.d.ts +12 -20
- package/es/components/DataTable/DataTable.js +1 -9
- package/es/components/DataTable/Table.js +1 -1
- package/es/components/DataTable/TableActionList.d.ts +1 -1
- package/es/components/DataTable/TableBody.js +1 -1
- package/es/components/DataTable/TableContext.d.ts +0 -1
- package/es/components/DataTable/TableHead.d.ts +1 -1
- package/es/components/DataTable/TableToolbarContent.d.ts +1 -1
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +2 -2
- package/es/components/DatePickerInput/DatePickerInput.js +1 -1
- package/es/components/Dropdown/Dropdown.js +1 -2
- package/es/components/FluidForm/FormContext.d.ts +0 -1
- package/es/components/FluidTextInput/FluidTextInput.d.ts +8 -0
- package/es/components/FluidTextInput/FluidTextInput.js +8 -0
- package/es/components/Grid/CSSGrid.js +1 -1
- package/es/components/Grid/Grid.js +1 -1
- package/es/components/Grid/GridTypes.d.ts +0 -1
- package/es/components/Heading/index.d.ts +1 -1
- package/es/components/IconButton/index.d.ts +17 -1
- package/es/components/IconButton/index.js +20 -1
- package/es/components/InlineCheckbox/InlineCheckbox.js +1 -1
- package/es/components/InlineLoading/InlineLoading.d.ts +1 -1
- package/es/components/InlineLoading/InlineLoading.js +21 -7
- package/es/components/Menu/Menu.js +2 -2
- package/es/components/Menu/MenuContext.d.ts +1 -1
- package/es/components/MenuButton/index.d.ts +1 -1
- package/es/components/MenuButton/index.js +1 -2
- package/es/components/Modal/Modal.js +1 -1
- package/es/components/Modal/next/index.d.ts +175 -0
- package/es/components/MultiSelect/FilterableMultiSelect.d.ts +1 -1
- package/es/components/MultiSelect/FilterableMultiSelect.js +1 -2
- package/es/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/es/components/MultiSelect/MultiSelect.js +1 -2
- package/es/components/Popover/index.js +2 -3
- package/es/components/PrimaryButton/PrimaryButton.d.ts +1 -1
- package/es/components/RadioTile/RadioTile.d.ts +1 -1
- package/es/components/SecondaryButton/SecondaryButton.d.ts +1 -1
- package/es/components/Slider/Slider.d.ts +1 -1
- package/es/components/Slider/Slider.js +1 -1
- package/es/components/Slider/index.d.ts +0 -1
- package/es/components/Tabs/Tabs.d.ts +3 -3
- package/es/components/Tabs/Tabs.js +4 -4
- package/es/components/Tag/DismissibleTag.d.ts +2 -2
- package/es/components/Tag/OperationalTag.d.ts +1 -1
- package/es/components/Tag/SelectableTag.d.ts +2 -2
- package/es/components/Text/index.d.ts +2 -2
- package/es/components/TextArea/TextArea.js +2 -1
- package/es/components/TextInput/PasswordInput.d.ts +1 -1
- package/es/components/Theme/index.d.ts +1 -1
- package/es/components/Tile/Tile.d.ts +1 -1
- package/es/components/Tile/Tile.js +1 -1
- package/es/components/Toggletip/index.d.ts +3 -3
- package/es/components/Toggletip/index.js +5 -4
- package/es/components/Tooltip/Tooltip.d.ts +17 -1
- package/es/components/Tooltip/Tooltip.js +12 -2
- package/es/components/TreeView/TreeNode.d.ts +27 -19
- package/es/components/TreeView/TreeNode.js +100 -31
- package/es/components/TreeView/TreeView.js +1 -1
- package/es/components/UIShell/Content.d.ts +9 -9
- package/es/components/UIShell/HeaderGlobalBar.d.ts +1 -1
- package/es/components/UIShell/HeaderMenu.d.ts +69 -25
- package/es/components/UIShell/HeaderMenuButton.d.ts +69 -27
- package/es/components/UIShell/HeaderMenuItem.d.ts +4 -3
- package/es/components/UIShell/HeaderMenuItem.js +1 -1
- package/es/components/UIShell/HeaderName.js +1 -1
- package/es/components/UIShell/HeaderNavigation.d.ts +69 -25
- package/es/components/UIShell/Link.d.ts +14 -11
- package/es/components/UIShell/Link.js +5 -6
- package/es/components/UIShell/SideNav.js +3 -3
- package/es/components/UIShell/SideNavLink.js +1 -1
- package/es/components/UIShell/SideNavMenuItem.d.ts +51 -3
- package/es/components/UIShell/SideNavMenuItem.js +6 -6
- package/es/components/UIShell/SwitcherItem.d.ts +2 -2
- package/es/components/UIShell/SwitcherItem.js +1 -1
- package/es/internal/PolymorphicProps.d.ts +0 -1
- package/es/internal/Selection.d.ts +38 -0
- package/es/internal/Selection.js +26 -113
- package/es/node_modules/es-toolkit/dist/compat/function/debounce.mjs.js +55 -0
- package/es/node_modules/es-toolkit/dist/compat/function/throttle.mjs.js +23 -0
- package/es/node_modules/es-toolkit/dist/function/debounce.mjs.js +70 -0
- package/es/tools/wrapComponent.d.ts +1 -1
- package/lib/components/Button/Button.d.ts +9 -1
- package/lib/components/Button/Button.js +8 -0
- package/lib/components/CodeSnippet/CodeSnippet.d.ts +2 -2
- package/lib/components/ComboBox/ComboBox.d.ts +2 -2
- package/lib/components/ComboBox/ComboBox.js +36 -13
- package/lib/components/ComboButton/index.js +1 -2
- package/lib/components/ComposedModal/ComposedModal.js +2 -2
- package/lib/components/ContentSwitcher/index.d.ts +0 -1
- package/lib/components/ContextMenu/useContextMenu.d.ts +0 -1
- package/lib/components/Copy/Copy.js +2 -2
- package/lib/components/DataTable/DataTable.d.ts +12 -20
- package/lib/components/DataTable/DataTable.js +1 -9
- package/lib/components/DataTable/Table.js +3 -3
- package/lib/components/DataTable/TableActionList.d.ts +1 -1
- package/lib/components/DataTable/TableBody.js +1 -1
- package/lib/components/DataTable/TableContext.d.ts +0 -1
- package/lib/components/DataTable/TableHead.d.ts +1 -1
- package/lib/components/DataTable/TableToolbarContent.d.ts +1 -1
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +2 -2
- package/lib/components/DatePickerInput/DatePickerInput.js +1 -1
- package/lib/components/Dropdown/Dropdown.js +1 -2
- package/lib/components/FluidForm/FormContext.d.ts +0 -1
- package/lib/components/FluidTextInput/FluidTextInput.d.ts +8 -0
- package/lib/components/FluidTextInput/FluidTextInput.js +8 -0
- package/lib/components/Grid/CSSGrid.js +1 -1
- package/lib/components/Grid/Grid.js +1 -1
- package/lib/components/Grid/GridTypes.d.ts +0 -1
- package/lib/components/Heading/index.d.ts +1 -1
- package/lib/components/IconButton/index.d.ts +17 -1
- package/lib/components/IconButton/index.js +20 -1
- package/lib/components/InlineCheckbox/InlineCheckbox.js +1 -1
- package/lib/components/InlineLoading/InlineLoading.d.ts +1 -1
- package/lib/components/InlineLoading/InlineLoading.js +20 -6
- package/lib/components/Menu/Menu.js +2 -2
- package/lib/components/Menu/MenuContext.d.ts +1 -1
- package/lib/components/MenuButton/index.d.ts +1 -1
- package/lib/components/MenuButton/index.js +1 -2
- package/lib/components/Modal/Modal.js +2 -2
- package/lib/components/Modal/next/index.d.ts +175 -0
- package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +1 -1
- package/lib/components/MultiSelect/FilterableMultiSelect.js +1 -2
- package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/lib/components/MultiSelect/MultiSelect.js +1 -2
- package/lib/components/Popover/index.js +2 -3
- package/lib/components/PrimaryButton/PrimaryButton.d.ts +1 -1
- package/lib/components/RadioTile/RadioTile.d.ts +1 -1
- package/lib/components/SecondaryButton/SecondaryButton.d.ts +1 -1
- package/lib/components/Slider/Slider.d.ts +1 -1
- package/lib/components/Slider/Slider.js +2 -2
- package/lib/components/Slider/index.d.ts +0 -1
- package/lib/components/Tabs/Tabs.d.ts +3 -3
- package/lib/components/Tabs/Tabs.js +6 -6
- package/lib/components/Tag/DismissibleTag.d.ts +2 -2
- package/lib/components/Tag/OperationalTag.d.ts +1 -1
- package/lib/components/Tag/SelectableTag.d.ts +2 -2
- package/lib/components/Text/index.d.ts +2 -2
- package/lib/components/TextArea/TextArea.js +2 -1
- package/lib/components/TextInput/PasswordInput.d.ts +1 -1
- package/lib/components/Theme/index.d.ts +1 -1
- package/lib/components/Tile/Tile.d.ts +1 -1
- package/lib/components/Tile/Tile.js +1 -1
- package/lib/components/Toggletip/index.d.ts +3 -3
- package/lib/components/Toggletip/index.js +5 -4
- package/lib/components/Tooltip/Tooltip.d.ts +17 -1
- package/lib/components/Tooltip/Tooltip.js +12 -2
- package/lib/components/TreeView/TreeNode.d.ts +27 -19
- package/lib/components/TreeView/TreeNode.js +100 -31
- package/lib/components/TreeView/TreeView.js +1 -1
- package/lib/components/UIShell/Content.d.ts +9 -9
- package/lib/components/UIShell/HeaderGlobalBar.d.ts +1 -1
- package/lib/components/UIShell/HeaderMenu.d.ts +69 -25
- package/lib/components/UIShell/HeaderMenuButton.d.ts +69 -27
- package/lib/components/UIShell/HeaderMenuItem.d.ts +4 -3
- package/lib/components/UIShell/HeaderMenuItem.js +1 -1
- package/lib/components/UIShell/HeaderName.js +1 -1
- package/lib/components/UIShell/HeaderNavigation.d.ts +69 -25
- package/lib/components/UIShell/Link.d.ts +14 -11
- package/lib/components/UIShell/Link.js +4 -4
- package/lib/components/UIShell/SideNav.js +3 -3
- package/lib/components/UIShell/SideNavLink.js +1 -1
- package/lib/components/UIShell/SideNavMenuItem.d.ts +51 -3
- package/lib/components/UIShell/SideNavMenuItem.js +6 -6
- package/lib/components/UIShell/SwitcherItem.d.ts +2 -2
- package/lib/components/UIShell/SwitcherItem.js +1 -1
- package/lib/internal/PolymorphicProps.d.ts +0 -1
- package/lib/internal/Selection.d.ts +38 -0
- package/lib/internal/Selection.js +24 -114
- package/lib/node_modules/es-toolkit/dist/compat/function/debounce.mjs.js +59 -0
- package/lib/node_modules/es-toolkit/dist/compat/function/throttle.mjs.js +27 -0
- package/lib/node_modules/es-toolkit/dist/function/debounce.mjs.js +74 -0
- package/lib/tools/wrapComponent.d.ts +1 -1
- package/package.json +10 -9
- package/es/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +0 -896
- package/es/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +0 -76
- package/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +0 -139
- package/lib/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +0 -909
- package/lib/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +0 -80
- package/lib/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +0 -163
|
@@ -16,7 +16,6 @@ var PropTypes = require('prop-types');
|
|
|
16
16
|
var index = require('../Layer/index.js');
|
|
17
17
|
var ModalHeader = require('./ModalHeader.js');
|
|
18
18
|
var ModalFooter = require('./ModalFooter.js');
|
|
19
|
-
var compat = require('es-toolkit/compat');
|
|
20
19
|
var useIsomorphicEffect = require('../../internal/useIsomorphicEffect.js');
|
|
21
20
|
var mergeRefs = require('../../tools/mergeRefs.js');
|
|
22
21
|
var cx = require('classnames');
|
|
@@ -27,6 +26,7 @@ var usePrefix = require('../../internal/usePrefix.js');
|
|
|
27
26
|
var index$1 = require('../FeatureFlags/index.js');
|
|
28
27
|
var events = require('../../tools/events.js');
|
|
29
28
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
29
|
+
var debounce = require('../../node_modules/es-toolkit/dist/compat/function/debounce.mjs.js');
|
|
30
30
|
var match = require('../../internal/keyboard/match.js');
|
|
31
31
|
var keys = require('../../internal/keyboard/keys.js');
|
|
32
32
|
|
|
@@ -61,7 +61,7 @@ const ModalBody = /*#__PURE__*/React__default["default"].forwardRef(function Mod
|
|
|
61
61
|
setIsScrollable(contentRef.current.scrollHeight > contentRef.current.clientHeight);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
const debouncedHandler =
|
|
64
|
+
const debouncedHandler = debounce.debounce(handler, 200);
|
|
65
65
|
window.addEventListener('resize', debouncedHandler);
|
|
66
66
|
return () => {
|
|
67
67
|
debouncedHandler.cancel();
|
|
@@ -4,7 +4,6 @@
|
|
|
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
|
-
/// <reference types="react" />
|
|
8
7
|
import { ContentSwitcherProps } from './ContentSwitcher';
|
|
9
8
|
declare const ContentSwitcher: import("react").FunctionComponent<ContentSwitcherProps>;
|
|
10
9
|
export default ContentSwitcher;
|
|
@@ -4,7 +4,6 @@
|
|
|
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
|
-
/// <reference types="react" />
|
|
8
7
|
type TriggerType = Element | Document | Window | React.RefObject<Element>;
|
|
9
8
|
export interface ContextMenuProps {
|
|
10
9
|
open: boolean;
|
|
@@ -12,13 +12,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
12
12
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
13
|
var PropTypes = require('prop-types');
|
|
14
14
|
var React = require('react');
|
|
15
|
-
var compat = require('es-toolkit/compat');
|
|
16
15
|
var cx = require('classnames');
|
|
17
16
|
var events = require('../../tools/events.js');
|
|
18
17
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
18
|
var index = require('../IconButton/index.js');
|
|
20
19
|
var noopFn = require('../../internal/noopFn.js');
|
|
21
20
|
var deprecateValuesWithin = require('../../prop-types/deprecateValuesWithin.js');
|
|
21
|
+
var debounce = require('../../node_modules/es-toolkit/dist/compat/function/debounce.mjs.js');
|
|
22
22
|
|
|
23
23
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
24
|
|
|
@@ -58,7 +58,7 @@ function Copy(_ref) {
|
|
|
58
58
|
[`${prefix}--copy-btn--${animation}`]: animation
|
|
59
59
|
});
|
|
60
60
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61
|
-
const handleFadeOut = React.useCallback(
|
|
61
|
+
const handleFadeOut = React.useCallback(debounce.debounce(() => {
|
|
62
62
|
setAnimation('fade-out');
|
|
63
63
|
}, feedbackTimeout), [feedbackTimeout]);
|
|
64
64
|
const handleClick = React.useCallback(() => {
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import type { MouseEvent } from 'react';
|
|
10
9
|
import type { DataTableSortState } from './state/sortStates';
|
|
11
10
|
import Table from './Table';
|
|
12
11
|
import TableActionList from './TableActionList';
|
|
@@ -100,7 +99,6 @@ export interface DataTableRenderProps<RowType, ColTypes extends any[]> {
|
|
|
100
99
|
onExpand?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
101
100
|
[key: string]: unknown;
|
|
102
101
|
}) => {
|
|
103
|
-
ariaLabel: string;
|
|
104
102
|
['aria-label']: string;
|
|
105
103
|
isExpanded: boolean;
|
|
106
104
|
onExpand: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
@@ -111,7 +109,6 @@ export interface DataTableRenderProps<RowType, ColTypes extends any[]> {
|
|
|
111
109
|
row: DataTableRow<ColTypes>;
|
|
112
110
|
[key: string]: unknown;
|
|
113
111
|
}) => {
|
|
114
|
-
ariaLabel: string;
|
|
115
112
|
['aria-label']: string;
|
|
116
113
|
disabled: boolean | undefined;
|
|
117
114
|
isExpanded?: boolean;
|
|
@@ -132,7 +129,6 @@ export interface DataTableRenderProps<RowType, ColTypes extends any[]> {
|
|
|
132
129
|
row: DataTableRow<ColTypes>;
|
|
133
130
|
[key: string]: unknown;
|
|
134
131
|
}) => {
|
|
135
|
-
ariaLabel: string;
|
|
136
132
|
'aria-label': string;
|
|
137
133
|
checked?: boolean | undefined;
|
|
138
134
|
disabled?: boolean | undefined;
|
|
@@ -349,13 +345,13 @@ declare class DataTable<RowType, ColTypes extends any[]> extends React.Component
|
|
|
349
345
|
* @returns {object}
|
|
350
346
|
*/
|
|
351
347
|
getHeaderProps: ({ header, onClick, isSortable, ...rest }: {
|
|
352
|
-
[key: string]: unknown;
|
|
353
348
|
header: DataTableHeader;
|
|
354
|
-
onClick?: (
|
|
349
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>, sortState: {
|
|
355
350
|
sortHeaderKey: string;
|
|
356
351
|
sortDirection: DataTableSortState;
|
|
357
|
-
}) => void
|
|
358
|
-
isSortable?: boolean
|
|
352
|
+
}) => void;
|
|
353
|
+
isSortable?: boolean;
|
|
354
|
+
[key: string]: unknown;
|
|
359
355
|
}) => {
|
|
360
356
|
key: string;
|
|
361
357
|
sortDirection: DataTableSortState;
|
|
@@ -375,12 +371,11 @@ declare class DataTable<RowType, ColTypes extends any[]> extends React.Component
|
|
|
375
371
|
*/
|
|
376
372
|
getExpandHeaderProps: ({ onClick, onExpand, ...rest }?: {
|
|
377
373
|
[key: string]: unknown;
|
|
378
|
-
onClick?: (
|
|
374
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>, expandState: {
|
|
379
375
|
isExpanded: boolean;
|
|
380
|
-
}) => void
|
|
381
|
-
onExpand?: (
|
|
376
|
+
}) => void;
|
|
377
|
+
onExpand?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
382
378
|
}) => {
|
|
383
|
-
ariaLabel: any;
|
|
384
379
|
'aria-label': any;
|
|
385
380
|
'aria-controls': string;
|
|
386
381
|
isExpanded: boolean;
|
|
@@ -411,14 +406,13 @@ declare class DataTable<RowType, ColTypes extends any[]> extends React.Component
|
|
|
411
406
|
* @returns {object}
|
|
412
407
|
*/
|
|
413
408
|
getRowProps: ({ row, onClick, ...rest }: {
|
|
414
|
-
|
|
415
|
-
onClick?: ((e: React.MouseEvent<HTMLButtonElement>) => void) | undefined;
|
|
409
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
416
410
|
row: DataTableRow<ColTypes>;
|
|
411
|
+
[key: string]: unknown;
|
|
417
412
|
}) => {
|
|
418
413
|
key: string;
|
|
419
414
|
onExpand: any;
|
|
420
415
|
isExpanded: boolean | undefined;
|
|
421
|
-
ariaLabel: any;
|
|
422
416
|
'aria-label': any;
|
|
423
417
|
'aria-controls': string;
|
|
424
418
|
isSelected: boolean | undefined;
|
|
@@ -432,8 +426,8 @@ declare class DataTable<RowType, ColTypes extends any[]> extends React.Component
|
|
|
432
426
|
* @returns {object}
|
|
433
427
|
*/
|
|
434
428
|
getExpandedRowProps: ({ row, ...rest }: {
|
|
435
|
-
[key: string]: unknown;
|
|
436
429
|
row: DataTableRow<ColTypes>;
|
|
430
|
+
[key: string]: unknown;
|
|
437
431
|
}) => {
|
|
438
432
|
id: string;
|
|
439
433
|
};
|
|
@@ -449,19 +443,17 @@ declare class DataTable<RowType, ColTypes extends any[]> extends React.Component
|
|
|
449
443
|
*/
|
|
450
444
|
getSelectionProps: ({ onClick, row, ...rest }?: {
|
|
451
445
|
[key: string]: unknown;
|
|
452
|
-
onClick?: (
|
|
446
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
453
447
|
row: DataTableRow<ColTypes>;
|
|
454
448
|
}) => {
|
|
455
449
|
checked: boolean | undefined;
|
|
456
450
|
onSelect: any;
|
|
457
451
|
id: string;
|
|
458
452
|
name: string;
|
|
459
|
-
ariaLabel: any;
|
|
460
453
|
'aria-label': any;
|
|
461
454
|
disabled: boolean | undefined;
|
|
462
455
|
radio: boolean | undefined;
|
|
463
456
|
} | {
|
|
464
|
-
ariaLabel: any;
|
|
465
457
|
'aria-label': any;
|
|
466
458
|
checked: boolean;
|
|
467
459
|
id: string;
|
|
@@ -470,8 +462,8 @@ declare class DataTable<RowType, ColTypes extends any[]> extends React.Component
|
|
|
470
462
|
onSelect: any;
|
|
471
463
|
};
|
|
472
464
|
getToolbarProps: (props?: {}) => {
|
|
465
|
+
size: "sm" | undefined;
|
|
473
466
|
[key: string]: unknown;
|
|
474
|
-
size: 'sm' | undefined;
|
|
475
467
|
};
|
|
476
468
|
getBatchActionProps: (props?: {}) => {
|
|
477
469
|
shouldShowBatchActions: boolean;
|
|
@@ -160,8 +160,6 @@ class DataTable extends React__default["default"].Component {
|
|
|
160
160
|
const translationKey = isExpanded ? translationKeys.collapseAll : translationKeys.expandAll;
|
|
161
161
|
return {
|
|
162
162
|
...rest,
|
|
163
|
-
ariaLabel: t(translationKey),
|
|
164
|
-
// TODO: remove in v12
|
|
165
163
|
'aria-label': t(translationKey),
|
|
166
164
|
// Provide a string of all the expanded row id's, separated by a space.
|
|
167
165
|
'aria-controls': rowIds.map(id => `expanded-row-${id}`).join(' '),
|
|
@@ -218,8 +216,6 @@ class DataTable extends React__default["default"].Component {
|
|
|
218
216
|
// handler
|
|
219
217
|
onExpand: events.composeEventHandlers([this.handleOnExpandRow(row.id), onClick]),
|
|
220
218
|
isExpanded: row.isExpanded,
|
|
221
|
-
ariaLabel: t(translationKey),
|
|
222
|
-
// TODO remove in v12
|
|
223
219
|
'aria-label': t(translationKey),
|
|
224
220
|
'aria-controls': `expanded-row-${row.id}`,
|
|
225
221
|
isSelected: row.isSelected,
|
|
@@ -272,8 +268,6 @@ class DataTable extends React__default["default"].Component {
|
|
|
272
268
|
onSelect: events.composeEventHandlers([_this.handleOnSelectRow(row.id), onClick]),
|
|
273
269
|
id: `${_this.getTablePrefix()}__select-row-${row.id}`,
|
|
274
270
|
name: `select-row-${_this.instanceId}`,
|
|
275
|
-
ariaLabel: t(translationKey),
|
|
276
|
-
// TODO remove in v12
|
|
277
271
|
'aria-label': t(translationKey),
|
|
278
272
|
disabled: row.disabled,
|
|
279
273
|
radio: _this.props.radio
|
|
@@ -289,13 +283,11 @@ class DataTable extends React__default["default"].Component {
|
|
|
289
283
|
const translationKey = checked || indeterminate ? translationKeys.unselectAll : translationKeys.selectAll;
|
|
290
284
|
return {
|
|
291
285
|
...rest,
|
|
292
|
-
ariaLabel: t(translationKey),
|
|
293
|
-
// TODO remove in v12
|
|
294
286
|
'aria-label': t(translationKey),
|
|
295
287
|
checked,
|
|
296
288
|
id: `${_this.getTablePrefix()}__select-all`,
|
|
297
289
|
indeterminate,
|
|
298
|
-
name:
|
|
290
|
+
name: `select-all-${_this.instanceId}`,
|
|
299
291
|
onSelect: events.composeEventHandlers([_this.handleSelectAll, onClick])
|
|
300
292
|
};
|
|
301
293
|
});
|
|
@@ -13,11 +13,11 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
|
|
|
13
13
|
var React = require('react');
|
|
14
14
|
var PropTypes = require('prop-types');
|
|
15
15
|
var cx = require('classnames');
|
|
16
|
-
var compat = require('es-toolkit/compat');
|
|
17
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
18
17
|
var TableContext = require('./TableContext.js');
|
|
19
18
|
var useEvent = require('../../internal/useEvent.js');
|
|
20
19
|
var useIsomorphicEffect = require('../../internal/useIsomorphicEffect.js');
|
|
20
|
+
var debounce = require('../../node_modules/es-toolkit/dist/compat/function/debounce.mjs.js');
|
|
21
21
|
|
|
22
22
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
23
|
|
|
@@ -108,7 +108,7 @@ const Table = _ref => {
|
|
|
108
108
|
toggleTableHeaderAlignmentClass(false);
|
|
109
109
|
}
|
|
110
110
|
}, [experimentalAutoAlign, toggleTableBodyAlignmentClass, toggleTableHeaderAlignmentClass, prefix]);
|
|
111
|
-
const debouncedSetTableAlignment =
|
|
111
|
+
const debouncedSetTableAlignment = debounce.debounce(setTableAlignment, 100);
|
|
112
112
|
useEvent.useWindowEvent('resize', debouncedSetTableAlignment);
|
|
113
113
|
|
|
114
114
|
// Used to set a tabIndex when the Table is horizontally scrollable
|
|
@@ -121,7 +121,7 @@ const Table = _ref => {
|
|
|
121
121
|
setIsScrollable(false);
|
|
122
122
|
}
|
|
123
123
|
}, []);
|
|
124
|
-
const debouncedSetTabIndex =
|
|
124
|
+
const debouncedSetTabIndex = debounce.debounce(setTabIndex, 100);
|
|
125
125
|
useEvent.useWindowEvent('resize', debouncedSetTabIndex);
|
|
126
126
|
useIsomorphicEffect["default"](() => {
|
|
127
127
|
setTabIndex();
|
|
@@ -4,5 +4,5 @@
|
|
|
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
|
-
declare const TableActionList: (props: import("../../types/common").ReactAttr<"div">) =>
|
|
7
|
+
declare const TableActionList: (props: import("../../types/common").ReactAttr<"div">) => React.ReactElement;
|
|
8
8
|
export default TableActionList;
|
|
@@ -25,7 +25,7 @@ const TableBody = _ref => {
|
|
|
25
25
|
...rest
|
|
26
26
|
} = _ref;
|
|
27
27
|
return /*#__PURE__*/React__default["default"].createElement("tbody", _rollupPluginBabelHelpers["extends"]({
|
|
28
|
-
"aria-live": 'polite'
|
|
28
|
+
"aria-live": rest['aria-live'] ?? 'polite',
|
|
29
29
|
className: className
|
|
30
30
|
}, rest), children);
|
|
31
31
|
};
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { ThHTMLAttributes } from 'react';
|
|
8
8
|
export type TableHeadProps = ThHTMLAttributes<HTMLTableSectionElement>;
|
|
9
|
-
declare const TableHead: (props: import("../../types/common").ReactAttr<"thead">) =>
|
|
9
|
+
declare const TableHead: (props: import("../../types/common").ReactAttr<"thead">) => React.ReactElement;
|
|
10
10
|
export default TableHead;
|
|
@@ -4,5 +4,5 @@
|
|
|
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
|
-
declare const TableToolbarContent: (props: import("../../types/common").ReactAttr<"div">) =>
|
|
7
|
+
declare const TableToolbarContent: (props: import("../../types/common").ReactAttr<"div">) => React.ReactElement;
|
|
8
8
|
export default TableToolbarContent;
|
|
@@ -85,7 +85,7 @@ var carbonFlatpickrFixEventsPlugin = config => fp => {
|
|
|
85
85
|
const currentValueToDate = withoutTime(parseDateWithFormat(inputTo.value));
|
|
86
86
|
|
|
87
87
|
// The date should only be set if both dates are valid dates, and they don't match.
|
|
88
|
-
// When they don't match, this
|
|
88
|
+
// When they don't match, this indicates that the date selected in the calendar is stale,
|
|
89
89
|
// and the current value in the input should be set for the calendar to update.
|
|
90
90
|
if (selectedToDate && currentValueToDate && selectedToDate !== currentValueToDate) {
|
|
91
91
|
// Update the calendar with the value of the `to` date input
|
|
@@ -93,7 +93,7 @@ var carbonFlatpickrFixEventsPlugin = config => fp => {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
const isValidDate = date => date?.toString() !== 'Invalid Date';
|
|
96
|
-
// save end date in calendar
|
|
96
|
+
// save end date in calendar immediately after it's been written down
|
|
97
97
|
if (inputTo === target && fp.selectedDates.length === 1 && inputTo.value) {
|
|
98
98
|
if (isValidDate(parseDateWithFormat(inputTo.value))) {
|
|
99
99
|
fp.setDate([inputFrom.value, inputTo.value], true, fp.config.dateFormat);
|
|
@@ -94,7 +94,7 @@ const DatePickerInput = /*#__PURE__*/React__default["default"].forwardRef(functi
|
|
|
94
94
|
[`${prefix}--date-picker--fluid--invalid`]: isFluid && invalid,
|
|
95
95
|
[`${prefix}--date-picker--fluid--warn`]: isFluid && warn
|
|
96
96
|
});
|
|
97
|
-
const datePickerInputHelperId = !helperText ? undefined : `
|
|
97
|
+
const datePickerInputHelperId = !helperText ? undefined : `datepicker-input-helper-text-${datePickerInputInstanceId}`;
|
|
98
98
|
const inputProps = {
|
|
99
99
|
...rest,
|
|
100
100
|
...datePickerInputProps,
|
|
@@ -23,7 +23,6 @@ require('../FluidForm/FluidForm.js');
|
|
|
23
23
|
var FormContext = require('../FluidForm/FormContext.js');
|
|
24
24
|
var useId = require('../../internal/useId.js');
|
|
25
25
|
var react = require('@floating-ui/react');
|
|
26
|
-
var floatingUi_dom = require('../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js');
|
|
27
26
|
var index = require('../FeatureFlags/index.js');
|
|
28
27
|
var ListBoxPropTypes = require('../ListBox/ListBoxPropTypes.js');
|
|
29
28
|
|
|
@@ -142,7 +141,7 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
142
141
|
width: `${rects.reference.width}px`
|
|
143
142
|
});
|
|
144
143
|
}
|
|
145
|
-
}), autoAlign && react.flip(), autoAlign &&
|
|
144
|
+
}), autoAlign && react.flip(), autoAlign && react.hide()],
|
|
146
145
|
whileElementsMounted: react.autoUpdate
|
|
147
146
|
} : {}
|
|
148
147
|
// When autoAlign is turned off & the `enable-v12-dynamic-floating-styles` feature flag is not
|
|
@@ -34,6 +34,14 @@ export interface FluidTextInputProps {
|
|
|
34
34
|
* Specify whether the control is a password input
|
|
35
35
|
*/
|
|
36
36
|
isPassword?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Max character count allowed for the textInput. This is needed in order for enableCounter to display
|
|
39
|
+
*/
|
|
40
|
+
maxCount?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Specify whether to display the character counter
|
|
43
|
+
*/
|
|
44
|
+
enableCounter?: boolean;
|
|
37
45
|
/**
|
|
38
46
|
* Provide the text that will be read by a screen reader when visiting this
|
|
39
47
|
* control
|
|
@@ -77,6 +77,14 @@ FluidTextInput.propTypes = {
|
|
|
77
77
|
* Specify whether the control is a password input
|
|
78
78
|
*/
|
|
79
79
|
isPassword: PropTypes__default["default"].bool,
|
|
80
|
+
/**
|
|
81
|
+
* Max character count allowed for the textInput. This is needed in order for enableCounter to display
|
|
82
|
+
*/
|
|
83
|
+
maxCount: PropTypes__default["default"].number,
|
|
84
|
+
/**
|
|
85
|
+
* Specify whether to display the character counter
|
|
86
|
+
*/
|
|
87
|
+
enableCounter: PropTypes__default["default"].bool,
|
|
80
88
|
/**
|
|
81
89
|
* Provide the text that will be read by a screen reader when visiting this
|
|
82
90
|
* control
|
|
@@ -4,7 +4,6 @@
|
|
|
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
|
-
/// <reference types="react" />
|
|
8
7
|
import { PolymorphicProps } from '../../types/common';
|
|
9
8
|
export interface GridBaseProps {
|
|
10
9
|
/**
|
|
@@ -11,6 +11,6 @@ type SectionBaseProps = {
|
|
|
11
11
|
level?: HeadingLevel;
|
|
12
12
|
};
|
|
13
13
|
export type SectionProps<E extends ElementType> = PolymorphicProps<E, SectionBaseProps>;
|
|
14
|
-
export declare const Section: React.ForwardRefExoticComponent<Omit<SectionProps<React.ElementType
|
|
14
|
+
export declare const Section: React.ForwardRefExoticComponent<Omit<SectionProps<React.ElementType>, "ref"> & React.RefAttributes<unknown>>;
|
|
15
15
|
export declare const Heading: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
16
16
|
export {};
|
|
@@ -23,7 +23,7 @@ export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEl
|
|
|
23
23
|
/**
|
|
24
24
|
* Optionally specify an href for your IconButton to become an `<a>` element
|
|
25
25
|
*/
|
|
26
|
-
href?:
|
|
26
|
+
href?: React.AnchorHTMLAttributes<HTMLAnchorElement>['href'];
|
|
27
27
|
/**
|
|
28
28
|
* Provide an icon or asset to be rendered inside of the IconButton
|
|
29
29
|
*/
|
|
@@ -44,10 +44,18 @@ export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEl
|
|
|
44
44
|
* Specify whether the Button should be disabled, or not
|
|
45
45
|
*/
|
|
46
46
|
disabled?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Specify whether a drop shadow should be rendered on the tooltip
|
|
49
|
+
*/
|
|
50
|
+
dropShadow?: boolean;
|
|
47
51
|
/**
|
|
48
52
|
* Specify the duration in milliseconds to delay before displaying the tooltip
|
|
49
53
|
*/
|
|
50
54
|
enterDelayMs?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Render the tooltip using the high-contrast theme
|
|
57
|
+
*/
|
|
58
|
+
highContrast?: boolean;
|
|
51
59
|
/**
|
|
52
60
|
* Specify whether the IconButton is currently selected
|
|
53
61
|
*/
|
|
@@ -67,10 +75,18 @@ export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEl
|
|
|
67
75
|
* Specify the duration in milliseconds to delay before hiding the tooltip
|
|
68
76
|
*/
|
|
69
77
|
leaveDelayMs?: number;
|
|
78
|
+
/**
|
|
79
|
+
* Optionally specify a `rel` when using an `<a>` element.
|
|
80
|
+
*/
|
|
81
|
+
rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>['rel'];
|
|
70
82
|
/**
|
|
71
83
|
* Specify the size of the Button. Defaults to `md`.
|
|
72
84
|
*/
|
|
73
85
|
size?: ButtonSize;
|
|
86
|
+
/**
|
|
87
|
+
* Optionally specify a `target` when using an `<a>` element.
|
|
88
|
+
*/
|
|
89
|
+
target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
|
|
74
90
|
/**
|
|
75
91
|
* Specify an optional className to be added to your Tooltip wrapper
|
|
76
92
|
*/
|
|
@@ -48,7 +48,9 @@ const IconButton = /*#__PURE__*/React__default["default"].forwardRef(function Ic
|
|
|
48
48
|
closeOnActivation = true,
|
|
49
49
|
defaultOpen = false,
|
|
50
50
|
disabled,
|
|
51
|
+
dropShadow = false,
|
|
51
52
|
enterDelayMs = 100,
|
|
53
|
+
highContrast = true,
|
|
52
54
|
kind,
|
|
53
55
|
label,
|
|
54
56
|
leaveDelayMs = 100,
|
|
@@ -67,7 +69,9 @@ const IconButton = /*#__PURE__*/React__default["default"].forwardRef(function Ic
|
|
|
67
69
|
closeOnActivation: closeOnActivation,
|
|
68
70
|
className: tooltipClasses,
|
|
69
71
|
defaultOpen: defaultOpen,
|
|
72
|
+
dropShadow: dropShadow,
|
|
70
73
|
enterDelayMs: enterDelayMs,
|
|
74
|
+
highContrast: highContrast,
|
|
71
75
|
label: label,
|
|
72
76
|
leaveDelayMs: leaveDelayMs
|
|
73
77
|
}, /*#__PURE__*/React__default["default"].createElement(ButtonBase["default"], _rollupPluginBabelHelpers["extends"]({}, rest, {
|
|
@@ -134,6 +138,10 @@ IconButton.propTypes = {
|
|
|
134
138
|
* Specify whether the tooltip should be open when it first renders
|
|
135
139
|
*/
|
|
136
140
|
defaultOpen: PropTypes__default["default"].bool,
|
|
141
|
+
/**
|
|
142
|
+
* Specify whether a drop shadow should be rendered on the tooltip
|
|
143
|
+
*/
|
|
144
|
+
dropShadow: PropTypes__default["default"].bool,
|
|
137
145
|
/**
|
|
138
146
|
* Specify whether the Button should be disabled, or not
|
|
139
147
|
*/
|
|
@@ -145,8 +153,11 @@ IconButton.propTypes = {
|
|
|
145
153
|
/**
|
|
146
154
|
* Specify whether the IconButton is currently selected
|
|
147
155
|
*/
|
|
148
|
-
|
|
149
156
|
isSelected: PropTypes__default["default"].bool,
|
|
157
|
+
/**
|
|
158
|
+
* Render the tooltip using the high-contrast theme
|
|
159
|
+
*/
|
|
160
|
+
highContrast: PropTypes__default["default"].bool,
|
|
150
161
|
/**
|
|
151
162
|
* Specify the type of button to be used as the base for the IconButton
|
|
152
163
|
*/
|
|
@@ -162,10 +173,18 @@ IconButton.propTypes = {
|
|
|
162
173
|
* Specify the duration in milliseconds to delay before hiding the tooltip
|
|
163
174
|
*/
|
|
164
175
|
leaveDelayMs: PropTypes__default["default"].number,
|
|
176
|
+
/**
|
|
177
|
+
* Optionally specify a `rel` when using an `<a>` element.
|
|
178
|
+
*/
|
|
179
|
+
rel: PropTypes__default["default"].string,
|
|
165
180
|
/**
|
|
166
181
|
* Specify the size of the Button. Defaults to `md`.
|
|
167
182
|
*/
|
|
168
183
|
size: PropTypes__default["default"].oneOf(['sm', 'md', 'lg']),
|
|
184
|
+
/**
|
|
185
|
+
* Optionally specify a `target` when using an `<a>` element.
|
|
186
|
+
*/
|
|
187
|
+
target: PropTypes__default["default"].string,
|
|
169
188
|
/**
|
|
170
189
|
* Specify an optional className to be added to your Tooltip wrapper
|
|
171
190
|
*/
|
|
@@ -104,7 +104,7 @@ InlineCheckbox.propTypes = {
|
|
|
104
104
|
*/
|
|
105
105
|
id: PropTypes__default["default"].string.isRequired,
|
|
106
106
|
/**
|
|
107
|
-
* Specify whether the control is in an
|
|
107
|
+
* Specify whether the control is in an indeterminate state
|
|
108
108
|
*/
|
|
109
109
|
indeterminate: PropTypes__default["default"].bool,
|
|
110
110
|
/**
|
|
@@ -35,6 +35,22 @@ const InlineLoading = _ref => {
|
|
|
35
35
|
} = _ref;
|
|
36
36
|
const prefix = usePrefix.usePrefix();
|
|
37
37
|
const loadingClasses = cx__default["default"](`${prefix}--inline-loading`, className);
|
|
38
|
+
const timerRef = React.useRef(null);
|
|
39
|
+
React.useEffect(() => {
|
|
40
|
+
if (status === 'finished') {
|
|
41
|
+
timerRef.current = setTimeout(() => {
|
|
42
|
+
if (onSuccess) {
|
|
43
|
+
onSuccess();
|
|
44
|
+
}
|
|
45
|
+
}, successDelay);
|
|
46
|
+
}
|
|
47
|
+
return () => {
|
|
48
|
+
if (timerRef.current) {
|
|
49
|
+
clearTimeout(timerRef.current);
|
|
50
|
+
timerRef.current = null;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}, [status, onSuccess, successDelay]);
|
|
38
54
|
const getLoading = () => {
|
|
39
55
|
let iconLabel = iconDescription ? iconDescription : status;
|
|
40
56
|
if (status === 'error') {
|
|
@@ -43,11 +59,6 @@ const InlineLoading = _ref => {
|
|
|
43
59
|
}, /*#__PURE__*/React__default["default"].createElement("title", null, iconLabel));
|
|
44
60
|
}
|
|
45
61
|
if (status === 'finished') {
|
|
46
|
-
setTimeout(() => {
|
|
47
|
-
if (onSuccess) {
|
|
48
|
-
onSuccess();
|
|
49
|
-
}
|
|
50
|
-
}, successDelay);
|
|
51
62
|
return /*#__PURE__*/React__default["default"].createElement(iconsReact.CheckmarkFilled, {
|
|
52
63
|
className: `${prefix}--inline-loading__checkmark-container`
|
|
53
64
|
}, /*#__PURE__*/React__default["default"].createElement("title", null, iconLabel));
|
|
@@ -65,6 +76,9 @@ const InlineLoading = _ref => {
|
|
|
65
76
|
}
|
|
66
77
|
return undefined;
|
|
67
78
|
};
|
|
79
|
+
|
|
80
|
+
// TODO: Should this element only be constructed, similar to
|
|
81
|
+
// `loadingAnimation`, if `description` is specified?
|
|
68
82
|
const loadingText = /*#__PURE__*/React__default["default"].createElement("div", {
|
|
69
83
|
className: `${prefix}--inline-loading__text`
|
|
70
84
|
}, description);
|
|
@@ -75,7 +89,7 @@ const InlineLoading = _ref => {
|
|
|
75
89
|
return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
|
|
76
90
|
className: loadingClasses
|
|
77
91
|
}, rest, {
|
|
78
|
-
"aria-live": 'assertive'
|
|
92
|
+
"aria-live": rest['aria-live'] ?? 'assertive'
|
|
79
93
|
}), loadingAnimation, description && loadingText);
|
|
80
94
|
};
|
|
81
95
|
InlineLoading.propTypes = {
|
|
@@ -201,7 +201,7 @@ const Menu = /*#__PURE__*/React.forwardRef(function Menu(_ref, forwardRef) {
|
|
|
201
201
|
}
|
|
202
202
|
};
|
|
203
203
|
|
|
204
|
-
// Avoid that the Menu render incorrectly when the
|
|
204
|
+
// Avoid that the Menu render incorrectly when the position is set in the right side of the screen
|
|
205
205
|
if (actionButtonWidth && actionButtonWidth < axes.x.size && (menuAlignment === 'bottom' || menuAlignment === 'top')) {
|
|
206
206
|
axes.x.size = actionButtonWidth;
|
|
207
207
|
}
|
|
@@ -229,7 +229,7 @@ const Menu = /*#__PURE__*/React.forwardRef(function Menu(_ref, forwardRef) {
|
|
|
229
229
|
max - spacing - size];
|
|
230
230
|
const topAlignment = menuAlignment === 'top' || menuAlignment === 'top-end' || menuAlignment === 'top-start';
|
|
231
231
|
|
|
232
|
-
// If the tooltip is not visible in the top, switch to the
|
|
232
|
+
// If the tooltip is not visible in the top, switch to the bottom
|
|
233
233
|
if (typeof options[0] === 'number' && topAlignment && options[0] >= 0 && !options[1] && axis === 'y') {
|
|
234
234
|
menu.current.style.transform = 'translate(0)';
|
|
235
235
|
} else if (topAlignment && !options[0] && axis === 'y') {
|
|
@@ -21,7 +21,7 @@ declare function menuReducer(state: StateType, action: ActionType): {
|
|
|
21
21
|
hasIcons: boolean;
|
|
22
22
|
isRoot: boolean;
|
|
23
23
|
mode: "full" | "basic";
|
|
24
|
-
size: "
|
|
24
|
+
size: "xs" | "sm" | "md" | "lg" | null;
|
|
25
25
|
items: any[];
|
|
26
26
|
requestCloseRoot: (e: Pick<KeyboardEvent<HTMLUListElement>, "type">) => void;
|
|
27
27
|
};
|