@carbon/react 1.81.0-rc.0 → 1.82.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 +784 -784
- package/es/components/AILabel/index.d.ts +1 -1
- package/es/components/AILabel/index.js +2 -9
- package/es/components/Breadcrumb/Breadcrumb.d.ts +2 -3
- package/es/components/Breadcrumb/Breadcrumb.js +4 -4
- package/es/components/Breadcrumb/BreadcrumbItem.d.ts +3 -4
- package/es/components/Breadcrumb/BreadcrumbItem.js +5 -4
- package/es/components/Button/Button.js +2 -10
- package/es/components/ButtonSet/ButtonSet.d.ts +2 -3
- package/es/components/ButtonSet/ButtonSet.js +4 -4
- package/es/components/CodeSnippet/CodeSnippet.d.ts +1 -1
- package/es/components/CodeSnippet/CodeSnippet.js +3 -19
- package/es/components/ComboBox/ComboBox.d.ts +1 -1
- package/es/components/ComboBox/ComboBox.js +54 -32
- package/es/components/ComboButton/index.d.ts +1 -1
- package/es/components/ComboButton/index.js +2 -18
- package/es/components/ComposedModal/ComposedModal.js +5 -3
- package/es/components/Copy/Copy.d.ts +1 -1
- package/es/components/Copy/Copy.js +2 -18
- package/es/components/CopyButton/CopyButton.d.ts +1 -1
- package/es/components/CopyButton/CopyButton.js +2 -18
- package/es/components/DataTable/DataTable.d.ts +7 -12
- package/es/components/DataTable/DataTable.js +0 -5
- package/es/components/DataTable/TableCell.js +28 -4
- package/es/components/DataTable/TableToolbarAction.d.ts +2 -4
- package/es/components/DataTable/TableToolbarAction.js +5 -4
- package/es/components/DataTable/tools/cells.d.ts +13 -0
- package/es/components/DataTable/tools/cells.js +3 -6
- package/es/components/DataTable/tools/filter.d.ts +26 -0
- package/es/components/DataTable/tools/filter.js +8 -17
- package/es/components/DataTable/tools/sorting.d.ts +42 -0
- package/es/components/DataTable/tools/sorting.js +24 -53
- package/es/components/DatePicker/DatePicker.d.ts +1 -1
- package/es/components/DatePicker/DatePicker.js +19 -19
- package/es/components/Dialog/index.d.ts +1 -1
- package/es/components/Dropdown/Dropdown.Skeleton.d.ts +2 -2
- package/es/components/Dropdown/Dropdown.Skeleton.js +2 -2
- package/es/components/Dropdown/Dropdown.d.ts +7 -6
- package/es/components/Dropdown/Dropdown.js +13 -9
- package/es/components/FileUploader/FileUploaderButton.d.ts +1 -1
- package/es/components/FileUploader/FileUploaderButton.js +1 -1
- package/es/components/FileUploader/FileUploaderDropContainer.js +1 -1
- package/es/components/FileUploader/FileUploaderItem.js +1 -1
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.d.ts +1 -1
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +5 -6
- package/es/components/FluidDropdown/FluidDropdown.d.ts +1 -1
- package/es/components/FluidSearch/FluidSearch.d.ts +3 -6
- package/es/components/IconButton/index.d.ts +1 -1
- package/es/components/IconButton/index.js +2 -18
- package/es/components/ListBox/ListBox.d.ts +4 -5
- package/es/components/ListBox/ListBox.js +8 -7
- package/es/components/ListBox/ListBoxMenu.d.ts +4 -4
- package/es/components/ListBox/ListBoxMenu.js +4 -2
- package/es/components/ListBox/ListBoxMenuItem.d.ts +9 -8
- package/es/components/ListBox/ListBoxPropTypes.d.ts +3 -3
- package/es/components/ListBox/ListBoxPropTypes.js +3 -3
- package/es/components/ListBox/index.d.ts +7 -5
- package/es/components/ListBox/index.js +1 -1
- package/es/components/Menu/Menu.js +9 -14
- package/es/components/Menu/MenuItem.js +15 -4
- package/es/components/Modal/Modal.js +9 -9
- package/es/components/MultiSelect/FilterableMultiSelect.d.ts +3 -2
- package/es/components/MultiSelect/FilterableMultiSelect.js +3 -2
- package/es/components/MultiSelect/MultiSelect.d.ts +8 -2
- package/es/components/MultiSelect/MultiSelect.js +7 -4
- package/es/components/Notification/Notification.js +1 -1
- package/es/components/OverflowMenu/OverflowMenu.js +2 -21
- package/es/components/OverflowMenu/index.d.ts +1 -1
- package/es/components/OverflowMenu/index.js +2 -3
- package/es/components/OverflowMenu/next/index.js +2 -18
- package/es/components/OverflowMenuItem/OverflowMenuItem.d.ts +2 -4
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +5 -4
- package/es/components/PageHeader/PageHeader.d.ts +160 -8
- package/es/components/PageHeader/PageHeader.js +155 -21
- package/es/components/PageHeader/index.d.ts +2 -2
- package/es/components/PageHeader/index.js +1 -1
- package/es/components/Popover/index.js +4 -21
- package/es/components/Search/Search.d.ts +2 -5
- package/es/components/Search/Search.js +24 -8
- package/es/components/Stack/HStack.d.ts +2 -3
- package/es/components/Stack/HStack.js +4 -7
- package/es/components/Stack/Stack.d.ts +3 -4
- package/es/components/Stack/Stack.js +3 -6
- package/es/components/Stack/VStack.d.ts +2 -3
- package/es/components/Stack/VStack.js +3 -2
- package/es/components/Stack/index.d.ts +4 -4
- package/es/components/TextArea/TextArea.js +3 -5
- package/es/components/TimePicker/TimePicker.d.ts +3 -4
- package/es/components/TimePicker/TimePicker.js +5 -4
- package/es/components/TimePickerSelect/TimePickerSelect.d.ts +23 -4
- package/es/components/TimePickerSelect/TimePickerSelect.js +5 -4
- package/es/components/TreeView/TreeNode.js +13 -1
- package/es/components/TreeView/TreeView.js +1 -1
- package/es/index.js +1 -1
- package/es/internal/FloatingMenu.js +9 -5
- package/es/internal/environment.js +7 -0
- package/es/internal/keyboard/navigation.d.ts +0 -10
- package/es/internal/keyboard/navigation.js +1 -13
- package/es/internal/useId.js +1 -1
- package/es/internal/useNoInteractiveChildren.js +7 -0
- package/es/internal/useOutsideClick.js +3 -0
- package/es/internal/wrapFocus.d.ts +49 -0
- package/es/internal/wrapFocus.js +64 -51
- package/es/tools/events.d.ts +17 -0
- package/es/tools/events.js +10 -13
- package/es/tools/mapPopoverAlign.d.ts +15 -0
- package/es/tools/mapPopoverAlign.js +28 -0
- package/es/tools/uniqueId.d.ts +7 -0
- package/es/tools/uniqueId.js +3 -3
- package/es/types/common.d.ts +0 -2
- package/lib/components/AILabel/index.d.ts +1 -1
- package/lib/components/AILabel/index.js +2 -9
- package/lib/components/Breadcrumb/Breadcrumb.d.ts +2 -3
- package/lib/components/Breadcrumb/Breadcrumb.js +3 -3
- package/lib/components/Breadcrumb/BreadcrumbItem.d.ts +3 -4
- package/lib/components/Breadcrumb/BreadcrumbItem.js +4 -3
- package/lib/components/Button/Button.js +1 -9
- package/lib/components/ButtonSet/ButtonSet.d.ts +2 -3
- package/lib/components/ButtonSet/ButtonSet.js +3 -3
- package/lib/components/CodeSnippet/CodeSnippet.d.ts +1 -1
- package/lib/components/CodeSnippet/CodeSnippet.js +3 -19
- package/lib/components/ComboBox/ComboBox.d.ts +1 -1
- package/lib/components/ComboBox/ComboBox.js +53 -31
- package/lib/components/ComboButton/index.d.ts +1 -1
- package/lib/components/ComboButton/index.js +2 -18
- package/lib/components/ComposedModal/ComposedModal.js +5 -3
- package/lib/components/Copy/Copy.d.ts +1 -1
- package/lib/components/Copy/Copy.js +2 -18
- package/lib/components/CopyButton/CopyButton.d.ts +1 -1
- package/lib/components/CopyButton/CopyButton.js +2 -18
- package/lib/components/DataTable/DataTable.d.ts +7 -12
- package/lib/components/DataTable/DataTable.js +0 -5
- package/lib/components/DataTable/TableCell.js +28 -3
- package/lib/components/DataTable/TableToolbarAction.d.ts +2 -4
- package/lib/components/DataTable/TableToolbarAction.js +4 -3
- package/lib/components/DataTable/tools/cells.d.ts +13 -0
- package/lib/components/DataTable/tools/cells.js +3 -6
- package/lib/components/DataTable/tools/filter.d.ts +26 -0
- package/lib/components/DataTable/tools/filter.js +8 -17
- package/lib/components/DataTable/tools/sorting.d.ts +42 -0
- package/lib/components/DataTable/tools/sorting.js +23 -53
- package/lib/components/DatePicker/DatePicker.d.ts +1 -1
- package/lib/components/DatePicker/DatePicker.js +19 -19
- package/lib/components/Dialog/index.d.ts +1 -1
- package/lib/components/Dropdown/Dropdown.Skeleton.d.ts +2 -2
- package/lib/components/Dropdown/Dropdown.Skeleton.js +1 -1
- package/lib/components/Dropdown/Dropdown.d.ts +7 -6
- package/lib/components/Dropdown/Dropdown.js +12 -8
- package/lib/components/FileUploader/FileUploaderButton.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderButton.js +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -1
- package/lib/components/FileUploader/FileUploaderItem.js +1 -1
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.d.ts +1 -1
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +4 -5
- package/lib/components/FluidDropdown/FluidDropdown.d.ts +1 -1
- package/lib/components/FluidSearch/FluidSearch.d.ts +3 -6
- package/lib/components/IconButton/index.d.ts +1 -1
- package/lib/components/IconButton/index.js +2 -18
- package/lib/components/ListBox/ListBox.d.ts +4 -5
- package/lib/components/ListBox/ListBox.js +7 -6
- package/lib/components/ListBox/ListBoxMenu.d.ts +4 -4
- package/lib/components/ListBox/ListBoxMenu.js +3 -1
- package/lib/components/ListBox/ListBoxMenuItem.d.ts +9 -8
- package/lib/components/ListBox/ListBoxPropTypes.d.ts +3 -3
- package/lib/components/ListBox/ListBoxPropTypes.js +4 -4
- package/lib/components/ListBox/index.d.ts +7 -5
- package/lib/components/ListBox/index.js +2 -2
- package/lib/components/Menu/Menu.js +9 -14
- package/lib/components/Menu/MenuItem.js +15 -4
- package/lib/components/Modal/Modal.js +9 -9
- package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +3 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.js +2 -1
- package/lib/components/MultiSelect/MultiSelect.d.ts +8 -2
- package/lib/components/MultiSelect/MultiSelect.js +6 -3
- package/lib/components/Notification/Notification.js +1 -1
- package/lib/components/OverflowMenu/OverflowMenu.js +2 -21
- package/lib/components/OverflowMenu/index.d.ts +1 -1
- package/lib/components/OverflowMenu/index.js +2 -3
- package/lib/components/OverflowMenu/next/index.js +2 -18
- package/lib/components/OverflowMenuItem/OverflowMenuItem.d.ts +2 -4
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +4 -3
- package/lib/components/PageHeader/PageHeader.d.ts +160 -8
- package/lib/components/PageHeader/PageHeader.js +159 -19
- package/lib/components/PageHeader/index.d.ts +2 -2
- package/lib/components/PageHeader/index.js +6 -0
- package/lib/components/Popover/index.js +4 -21
- package/lib/components/Search/Search.d.ts +2 -5
- package/lib/components/Search/Search.js +24 -8
- package/lib/components/Stack/HStack.d.ts +2 -3
- package/lib/components/Stack/HStack.js +3 -6
- package/lib/components/Stack/Stack.d.ts +3 -4
- package/lib/components/Stack/Stack.js +2 -5
- package/lib/components/Stack/VStack.d.ts +2 -3
- package/lib/components/Stack/VStack.js +2 -1
- package/lib/components/Stack/index.d.ts +4 -4
- package/lib/components/TextArea/TextArea.js +2 -4
- package/lib/components/TimePicker/TimePicker.d.ts +3 -4
- package/lib/components/TimePicker/TimePicker.js +4 -3
- package/lib/components/TimePickerSelect/TimePickerSelect.d.ts +23 -4
- package/lib/components/TimePickerSelect/TimePickerSelect.js +4 -3
- package/lib/components/TreeView/TreeNode.js +13 -1
- package/lib/components/TreeView/TreeView.js +1 -1
- package/lib/index.js +2 -2
- package/lib/internal/FloatingMenu.js +9 -5
- package/lib/internal/environment.js +7 -0
- package/lib/internal/keyboard/navigation.d.ts +0 -10
- package/lib/internal/keyboard/navigation.js +0 -14
- package/lib/internal/useNoInteractiveChildren.js +7 -0
- package/lib/internal/useOutsideClick.js +3 -0
- package/lib/internal/wrapFocus.d.ts +49 -0
- package/lib/internal/wrapFocus.js +66 -53
- package/lib/tools/events.d.ts +17 -0
- package/lib/tools/events.js +10 -13
- package/lib/tools/mapPopoverAlign.d.ts +15 -0
- package/lib/tools/mapPopoverAlign.js +32 -0
- package/lib/tools/uniqueId.d.ts +7 -0
- package/lib/tools/uniqueId.js +3 -3
- package/lib/types/common.d.ts +0 -2
- package/package.json +9 -9
- package/telemetry.yml +3 -1
- package/es/tools/createPropAdapter.js +0 -40
- package/lib/tools/createPropAdapter.js +0 -44
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import React from 'react';
|
|
8
|
+
import React, { type MouseEvent } from 'react';
|
|
9
9
|
import type { DataTableSortState } from './state/sortStates';
|
|
10
10
|
import Table from './Table';
|
|
11
11
|
import TableActionList from './TableActionList';
|
|
@@ -125,7 +125,7 @@ export interface DataTableRenderProps<RowType, ColTypes extends any[]> {
|
|
|
125
125
|
[key: string]: unknown;
|
|
126
126
|
};
|
|
127
127
|
getSelectionProps: (getSelectionPropsArgs?: {
|
|
128
|
-
onClick?: (e:
|
|
128
|
+
onClick?: (e: MouseEvent<HTMLInputElement, globalThis.MouseEvent>) => void;
|
|
129
129
|
row: DataTableRow<ColTypes>;
|
|
130
130
|
[key: string]: unknown;
|
|
131
131
|
}) => {
|
|
@@ -381,7 +381,7 @@ declare class DataTable<RowType, ColTypes extends any[]> extends React.Component
|
|
|
381
381
|
'aria-label': any;
|
|
382
382
|
'aria-controls': string;
|
|
383
383
|
isExpanded: boolean;
|
|
384
|
-
onExpand: any;
|
|
384
|
+
onExpand: (event: React.MouseEvent<HTMLButtonElement, globalThis.MouseEvent>, ...args: any[]) => void;
|
|
385
385
|
};
|
|
386
386
|
/**
|
|
387
387
|
* Decorate consumer's `onClick` event handler with sort parameters
|
|
@@ -413,7 +413,7 @@ declare class DataTable<RowType, ColTypes extends any[]> extends React.Component
|
|
|
413
413
|
[key: string]: unknown;
|
|
414
414
|
}) => {
|
|
415
415
|
key: string;
|
|
416
|
-
onExpand: any;
|
|
416
|
+
onExpand: (event: React.MouseEvent<HTMLButtonElement, globalThis.MouseEvent>, ...args: any[]) => void;
|
|
417
417
|
isExpanded: boolean | undefined;
|
|
418
418
|
'aria-label': any;
|
|
419
419
|
'aria-controls': string;
|
|
@@ -437,19 +437,14 @@ declare class DataTable<RowType, ColTypes extends any[]> extends React.Component
|
|
|
437
437
|
* Gets the props associated with selection for a header or a row, where
|
|
438
438
|
* applicable. Most often used to indicate selection status of the table or
|
|
439
439
|
* for a specific row.
|
|
440
|
-
*
|
|
441
|
-
* @param {object} [row] an optional row that we want to access the props for
|
|
442
|
-
* @param {Function} row.onClick
|
|
443
|
-
* @param {object} row.row
|
|
444
|
-
* @returns {object}
|
|
445
440
|
*/
|
|
446
441
|
getSelectionProps: ({ onClick, row, ...rest }?: {
|
|
447
442
|
[key: string]: unknown;
|
|
448
|
-
onClick?: (e:
|
|
443
|
+
onClick?: (e: MouseEvent<HTMLInputElement, globalThis.MouseEvent>) => void;
|
|
449
444
|
row: DataTableRow<ColTypes>;
|
|
450
445
|
}) => {
|
|
451
446
|
checked: boolean | undefined;
|
|
452
|
-
onSelect: any;
|
|
447
|
+
onSelect: (event: React.MouseEvent<HTMLInputElement, globalThis.MouseEvent>, ...args: any[]) => void;
|
|
453
448
|
id: string;
|
|
454
449
|
name: string;
|
|
455
450
|
'aria-label': any;
|
|
@@ -461,7 +456,7 @@ declare class DataTable<RowType, ColTypes extends any[]> extends React.Component
|
|
|
461
456
|
id: string;
|
|
462
457
|
indeterminate: boolean;
|
|
463
458
|
name: string;
|
|
464
|
-
onSelect: any;
|
|
459
|
+
onSelect: (event: React.MouseEvent<HTMLInputElement, globalThis.MouseEvent>, ...args: any[]) => void;
|
|
465
460
|
};
|
|
466
461
|
getToolbarProps: (props?: {}) => {
|
|
467
462
|
size: "sm" | undefined;
|
|
@@ -233,11 +233,6 @@ class DataTable extends React__default.Component {
|
|
|
233
233
|
* Gets the props associated with selection for a header or a row, where
|
|
234
234
|
* applicable. Most often used to indicate selection status of the table or
|
|
235
235
|
* for a specific row.
|
|
236
|
-
*
|
|
237
|
-
* @param {object} [row] an optional row that we want to access the props for
|
|
238
|
-
* @param {Function} row.onClick
|
|
239
|
-
* @param {object} row.row
|
|
240
|
-
* @returns {object}
|
|
241
236
|
*/
|
|
242
237
|
_defineProperty(this, "getSelectionProps", function () {
|
|
243
238
|
let {
|
|
@@ -6,18 +6,20 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
-
import React__default from 'react';
|
|
9
|
+
import React__default, { forwardRef } from 'react';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
12
|
+
import PropTypes from 'prop-types';
|
|
12
13
|
|
|
13
|
-
const
|
|
14
|
-
|
|
14
|
+
const frFn = forwardRef;
|
|
15
|
+
const TableCell = frFn((props, ref) => {
|
|
16
|
+
const {
|
|
15
17
|
children,
|
|
16
18
|
className,
|
|
17
19
|
hasAILabelHeader,
|
|
18
20
|
colSpan,
|
|
19
21
|
...rest
|
|
20
|
-
} =
|
|
22
|
+
} = props;
|
|
21
23
|
const prefix = usePrefix();
|
|
22
24
|
const tableCellClassNames = cx(className, {
|
|
23
25
|
[`${prefix}--table-cell--column-slug`]: hasAILabelHeader
|
|
@@ -29,5 +31,27 @@ const TableCell = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
29
31
|
}, rest), children);
|
|
30
32
|
});
|
|
31
33
|
TableCell.displayName = 'TableCell';
|
|
34
|
+
TableCell.propTypes = {
|
|
35
|
+
/**
|
|
36
|
+
* Pass in children that will be embedded in the table header label
|
|
37
|
+
*/
|
|
38
|
+
children: PropTypes.node,
|
|
39
|
+
/**
|
|
40
|
+
* Specify an optional className to be applied to the container node
|
|
41
|
+
*/
|
|
42
|
+
className: PropTypes.string,
|
|
43
|
+
/**
|
|
44
|
+
* The width of the expanded row's internal cell
|
|
45
|
+
*/
|
|
46
|
+
colSpan: PropTypes.number,
|
|
47
|
+
/**
|
|
48
|
+
* Specify if the table cell is in an AI column
|
|
49
|
+
*/
|
|
50
|
+
hasAILabelHeader: PropTypes.bool,
|
|
51
|
+
/**
|
|
52
|
+
* The id of the matching th node in the table head. Addresses a11y concerns outlined here: https://www.ibm.com/able/guidelines/ci162/info_and_relationships.html and https://www.w3.org/TR/WCAG20-TECHS/H43
|
|
53
|
+
*/
|
|
54
|
+
headers: PropTypes.string
|
|
55
|
+
};
|
|
32
56
|
|
|
33
57
|
export { TableCell as default };
|
|
@@ -1,11 +1,10 @@
|
|
|
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.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import { ForwardRefReturn } from '../../types/common';
|
|
9
8
|
export interface TableToolbarActionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick'> {
|
|
10
9
|
/**
|
|
11
10
|
* Pass in the children that will be rendered inside the TableToolbarAction
|
|
@@ -16,6 +15,5 @@ export interface TableToolbarActionProps extends Omit<React.HTMLAttributes<HTMLD
|
|
|
16
15
|
*/
|
|
17
16
|
onClick: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
18
17
|
}
|
|
19
|
-
|
|
20
|
-
declare const TableToolbarAction: TableToolbarActionComponent;
|
|
18
|
+
declare const TableToolbarAction: React.ForwardRefExoticComponent<TableToolbarActionProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
19
|
export default TableToolbarAction;
|
|
@@ -7,14 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import React__default from 'react';
|
|
10
|
+
import React__default, { forwardRef } from 'react';
|
|
11
11
|
import OverflowMenuItem from '../OverflowMenuItem/OverflowMenuItem.js';
|
|
12
12
|
|
|
13
|
-
const
|
|
14
|
-
|
|
13
|
+
const frFn = forwardRef;
|
|
14
|
+
const TableToolbarAction = frFn((props, ref) => {
|
|
15
|
+
const {
|
|
15
16
|
children,
|
|
16
17
|
...rest
|
|
17
|
-
} =
|
|
18
|
+
} = props;
|
|
18
19
|
return /*#__PURE__*/React__default.createElement(OverflowMenuItem, _extends({
|
|
19
20
|
ref: ref,
|
|
20
21
|
itemText: children
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
* Generates a unique cell ID by combining the row ID and header.
|
|
9
|
+
*
|
|
10
|
+
* Generic helper used to consolidate all call sites for getting a cell ID into
|
|
11
|
+
* one method.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getCellId: (rowId: string, header: string) => string;
|
|
@@ -6,13 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* one method. The strategy currently is that a "cellId" is just the combination
|
|
11
|
-
* of the row id and the header key used to access this field in a row.
|
|
9
|
+
* Generates a unique cell ID by combining the row ID and header.
|
|
12
10
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* @returns {string}
|
|
11
|
+
* Generic helper used to consolidate all call sites for getting a cell ID into
|
|
12
|
+
* one method.
|
|
16
13
|
*/
|
|
17
14
|
const getCellId = (rowId, header) => `${rowId}:${header}`;
|
|
18
15
|
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
* Filters row IDs based on whether any of the cell values in the row include
|
|
9
|
+
* the input value as a substring. Boolean cell values are ignored.
|
|
10
|
+
*/
|
|
11
|
+
export declare const defaultFilterRows: ({ rowIds, headers, cellsById, inputValue, getCellId, }: {
|
|
12
|
+
/** Table row IDs. */
|
|
13
|
+
rowIds: string[];
|
|
14
|
+
/** Table headers. */
|
|
15
|
+
headers: {
|
|
16
|
+
key: string;
|
|
17
|
+
}[];
|
|
18
|
+
/** Mapping of cell IDs to their corresponding cells. */
|
|
19
|
+
cellsById: Record<string, {
|
|
20
|
+
value: unknown;
|
|
21
|
+
}>;
|
|
22
|
+
/** Input value to search for. */
|
|
23
|
+
inputValue: string;
|
|
24
|
+
/** Function that returns a cell ID given a row ID and a header. */
|
|
25
|
+
getCellId: (rowId: string, header: string) => string;
|
|
26
|
+
}) => string[];
|
|
@@ -6,18 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* individual cell values for a row. Then, we go through each cell value and see
|
|
12
|
-
* if any of them includes the given inputValue.
|
|
13
|
-
*
|
|
14
|
-
* @param {object} config
|
|
15
|
-
* @param {Array<string>} config.rowIds array of all the row ids in the table
|
|
16
|
-
* @param {Array<object>} config.headers
|
|
17
|
-
* @param {object} config.cellsById object containing a map of cell id to cell
|
|
18
|
-
* @param {string} config.inputValue the current input value in the Table Search
|
|
19
|
-
* @param {Function} config.getCellId
|
|
20
|
-
* @returns {Array<string>} rowIds
|
|
9
|
+
* Filters row IDs based on whether any of the cell values in the row include
|
|
10
|
+
* the input value as a substring. Boolean cell values are ignored.
|
|
21
11
|
*/
|
|
22
12
|
const defaultFilterRows = _ref => {
|
|
23
13
|
let {
|
|
@@ -27,15 +17,16 @@ const defaultFilterRows = _ref => {
|
|
|
27
17
|
inputValue,
|
|
28
18
|
getCellId
|
|
29
19
|
} = _ref;
|
|
20
|
+
const normalizedInput = inputValue.trim().toLowerCase();
|
|
21
|
+
if (!normalizedInput) return rowIds;
|
|
30
22
|
return rowIds.filter(rowId => headers.some(_ref2 => {
|
|
31
23
|
let {
|
|
32
24
|
key
|
|
33
25
|
} = _ref2;
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return ('' + cellsById[id].value).toLowerCase().includes(inputValue.toLowerCase());
|
|
26
|
+
const cellId = getCellId(rowId, key);
|
|
27
|
+
const cell = cellsById[cellId];
|
|
28
|
+
if (typeof cell.value === 'boolean') return false;
|
|
29
|
+
return String(cell.value).toLowerCase().includes(normalizedInput);
|
|
39
30
|
}));
|
|
40
31
|
};
|
|
41
32
|
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
import { type DataTableSortState } from '../state/sortStates';
|
|
8
|
+
/**
|
|
9
|
+
* Compare two values to determine their order. If both values have the same
|
|
10
|
+
* type, the default sort algorithm will be used for those types. Otherwise, the
|
|
11
|
+
* values will be converted to strings for comparison.
|
|
12
|
+
*/
|
|
13
|
+
export declare const compare: (a: any, b: any, locale?: string) => number;
|
|
14
|
+
interface Cell {
|
|
15
|
+
id: string;
|
|
16
|
+
value: any;
|
|
17
|
+
}
|
|
18
|
+
interface SortRowParams {
|
|
19
|
+
key: string;
|
|
20
|
+
sortDirection: DataTableSortState;
|
|
21
|
+
sortStates: Record<DataTableSortState, DataTableSortState>;
|
|
22
|
+
locale: string;
|
|
23
|
+
compare: typeof compare;
|
|
24
|
+
rowIds: string[];
|
|
25
|
+
}
|
|
26
|
+
interface SortRowsConfig {
|
|
27
|
+
rowIds: string[];
|
|
28
|
+
cellsById: Record<string, Cell>;
|
|
29
|
+
key: string;
|
|
30
|
+
sortDirection: DataTableSortState;
|
|
31
|
+
locale?: string;
|
|
32
|
+
sortRow?: (cellA: any, cellB: any, params: SortRowParams) => number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Sorts table rows based on the provided column key and direction.
|
|
36
|
+
*/
|
|
37
|
+
export declare const sortRows: ({ rowIds, cellsById, sortDirection, key, locale, sortRow, }: SortRowsConfig) => string[];
|
|
38
|
+
/**
|
|
39
|
+
* Sorts table rows based on the sort direction.
|
|
40
|
+
*/
|
|
41
|
+
export declare const defaultSortRow: (cellA: any, cellB: any, { sortDirection, sortStates, locale, }: Pick<SortRowParams, "locale" | "sortDirection" | "sortStates">) => number;
|
|
42
|
+
export {};
|
|
@@ -9,76 +9,43 @@ import { getCellId } from './cells.js';
|
|
|
9
9
|
import { sortStates } from '../state/sortStates.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* Compare two
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* string conversion.
|
|
16
|
-
*
|
|
17
|
-
* @param {number|string} a
|
|
18
|
-
* @param {number|string} b
|
|
19
|
-
* @param {string} locale
|
|
20
|
-
* @returns {number}
|
|
12
|
+
* Compare two values to determine their order. If both values have the same
|
|
13
|
+
* type, the default sort algorithm will be used for those types. Otherwise, the
|
|
14
|
+
* values will be converted to strings for comparison.
|
|
21
15
|
*/
|
|
22
16
|
const compare = function (a, b) {
|
|
23
17
|
let locale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'en';
|
|
24
18
|
// prevent multiple null values in one column (sorting breaks)
|
|
25
|
-
a === null
|
|
26
|
-
b === null
|
|
19
|
+
if (a === null) a = '';
|
|
20
|
+
if (b === null) b = '';
|
|
27
21
|
if (typeof a === 'number' && typeof b === 'number') {
|
|
28
22
|
return a - b;
|
|
29
23
|
}
|
|
30
24
|
if (typeof a === 'string' && typeof b === 'string') {
|
|
31
25
|
return compareStrings(a, b, locale);
|
|
32
26
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (typeof
|
|
36
|
-
|
|
37
|
-
return compareStrings(a.props.children, b.props.children, locale);
|
|
38
|
-
}
|
|
27
|
+
const aChild = a?.props?.children;
|
|
28
|
+
const bChild = b?.props?.children;
|
|
29
|
+
if (typeof aChild === 'string' && typeof bChild === 'string') {
|
|
30
|
+
return compareStrings(aChild, bChild, locale);
|
|
39
31
|
}
|
|
40
|
-
return compareStrings(
|
|
32
|
+
return compareStrings(String(a), String(b), locale);
|
|
41
33
|
};
|
|
42
34
|
|
|
43
35
|
/**
|
|
44
|
-
*
|
|
45
|
-
* strings.
|
|
36
|
+
* Compares two strings using `localeCompare`.
|
|
46
37
|
*
|
|
47
|
-
*
|
|
48
|
-
* @param {string} b
|
|
49
|
-
* @param {string} locale
|
|
50
|
-
* @returns {number}
|
|
38
|
+
* Note: Uses numeric comparison if strings are numeric.
|
|
51
39
|
*/
|
|
52
40
|
const compareStrings = function (a, b) {
|
|
53
41
|
let locale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'en';
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
numeric: true
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
return a.localeCompare(b, locale);
|
|
42
|
+
const isNumeric = !isNaN(parseFloat(a)) && !isNaN(parseFloat(b));
|
|
43
|
+
return a.localeCompare(b, locale, {
|
|
44
|
+
numeric: isNumeric
|
|
45
|
+
});
|
|
62
46
|
};
|
|
63
|
-
|
|
64
47
|
/**
|
|
65
|
-
*
|
|
66
|
-
* implementation is to use the given list of row ids to look up the cells in
|
|
67
|
-
* the row by the given key. We then use the value of these cells and pipe them
|
|
68
|
-
* into our local `compareStrings` method, including the locale where
|
|
69
|
-
* appropriate.
|
|
70
|
-
*
|
|
71
|
-
* @param {object} config
|
|
72
|
-
* @param {Array[string]} config.rowIds array of all the row ids in the table
|
|
73
|
-
* @param {object} config.cellsById object containing a mapping of cell id to
|
|
74
|
-
* cell
|
|
75
|
-
* @param {string} config.key the header key that we use to lookup the cell
|
|
76
|
-
* @param {string} [config.locale] optional locale used in the comparison
|
|
77
|
-
* function
|
|
78
|
-
* @param {string} config.sortDirection the sort direction used to determine the
|
|
79
|
-
* order the comparison is called in
|
|
80
|
-
* @param {Function} config.sortRow
|
|
81
|
-
* @returns {Array[string]} array of sorted rowIds
|
|
48
|
+
* Sorts table rows based on the provided column key and direction.
|
|
82
49
|
*/
|
|
83
50
|
const sortRows = _ref => {
|
|
84
51
|
let {
|
|
@@ -92,16 +59,20 @@ const sortRows = _ref => {
|
|
|
92
59
|
return rowIds.slice().sort((a, b) => {
|
|
93
60
|
const cellA = cellsById[getCellId(a, key)];
|
|
94
61
|
const cellB = cellsById[getCellId(b, key)];
|
|
95
|
-
return sortRow(cellA
|
|
62
|
+
return sortRow(cellA?.value, cellB?.value, {
|
|
96
63
|
key,
|
|
97
64
|
sortDirection,
|
|
98
|
-
locale,
|
|
99
65
|
sortStates,
|
|
66
|
+
locale,
|
|
100
67
|
compare,
|
|
101
68
|
rowIds: [a, b]
|
|
102
69
|
});
|
|
103
70
|
});
|
|
104
71
|
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Sorts table rows based on the sort direction.
|
|
75
|
+
*/
|
|
105
76
|
const defaultSortRow = (cellA, cellB, _ref2) => {
|
|
106
77
|
let {
|
|
107
78
|
sortDirection,
|
|
@@ -114,4 +85,4 @@ const defaultSortRow = (cellA, cellB, _ref2) => {
|
|
|
114
85
|
return compare(cellB, cellA, locale);
|
|
115
86
|
};
|
|
116
87
|
|
|
117
|
-
export { compare,
|
|
88
|
+
export { compare, defaultSortRow, sortRows };
|
|
@@ -120,7 +120,7 @@ export interface DatePickerProps {
|
|
|
120
120
|
* The value of the date value provided to flatpickr, could
|
|
121
121
|
* be a date, a date number, a date string, an array of dates.
|
|
122
122
|
*/
|
|
123
|
-
value?:
|
|
123
|
+
value?: DateOption | DateOption[];
|
|
124
124
|
/**
|
|
125
125
|
* Specify whether the control is currently in warning state (Fluid only)
|
|
126
126
|
*/
|
|
@@ -173,13 +173,14 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
173
173
|
}
|
|
174
174
|
}, []);
|
|
175
175
|
const lastStartValue = useRef('');
|
|
176
|
+
const calendarRef = useRef(null);
|
|
176
177
|
const [calendarCloseEvent, setCalendarCloseEvent] = useState(null);
|
|
177
178
|
|
|
178
179
|
// fix datepicker deleting the selectedDate when the calendar closes
|
|
179
180
|
const handleCalendarClose = useCallback((selectedDates, dateStr, instance) => {
|
|
180
181
|
if (lastStartValue.current && selectedDates[0] && !startInputField.current.value) {
|
|
181
182
|
startInputField.current.value = lastStartValue.current;
|
|
182
|
-
calendarRef.current
|
|
183
|
+
calendarRef.current?.setDate([startInputField.current.value, endInputField?.current?.value], true, calendarRef.current.config.dateFormat);
|
|
183
184
|
}
|
|
184
185
|
if (onClose) {
|
|
185
186
|
onClose(selectedDates, dateStr, instance);
|
|
@@ -207,7 +208,6 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
207
208
|
}
|
|
208
209
|
}, [calendarCloseEvent, handleCalendarClose]);
|
|
209
210
|
const endInputField = useRef(null);
|
|
210
|
-
const calendarRef = useRef(null);
|
|
211
211
|
const savedOnChange = useSavedCallback(onChange);
|
|
212
212
|
const savedOnOpen = useSavedCallback(onOpen);
|
|
213
213
|
const datePickerClasses = cx(`${prefix}--date-picker`, {
|
|
@@ -324,7 +324,7 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
324
324
|
const {
|
|
325
325
|
current: end
|
|
326
326
|
} = endInputField;
|
|
327
|
-
const
|
|
327
|
+
const flatpickerConfig = {
|
|
328
328
|
inline: inline ?? false,
|
|
329
329
|
onClose: onCalendarClose,
|
|
330
330
|
disableMobile: true,
|
|
@@ -370,7 +370,7 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
370
370
|
},
|
|
371
371
|
onValueUpdate: onHook
|
|
372
372
|
};
|
|
373
|
-
const calendar = flatpickr(start,
|
|
373
|
+
const calendar = flatpickr(start, flatpickerConfig);
|
|
374
374
|
calendarRef.current = calendar;
|
|
375
375
|
function handleArrowDown(event) {
|
|
376
376
|
if (match(event, Escape)) {
|
|
@@ -383,10 +383,10 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
383
383
|
const {
|
|
384
384
|
calendarContainer,
|
|
385
385
|
selectedDateElem: fpSelectedDateElem,
|
|
386
|
-
todayDateElem:
|
|
386
|
+
todayDateElem: fpTodayDateElem
|
|
387
387
|
} = calendar;
|
|
388
388
|
const selectedDateElem = calendarContainer.querySelector('.selected') && fpSelectedDateElem;
|
|
389
|
-
const todayDateElem = calendarContainer.querySelector('.today') &&
|
|
389
|
+
const todayDateElem = calendarContainer.querySelector('.today') && fpTodayDateElem;
|
|
390
390
|
(selectedDateElem || todayDateElem || calendarContainer.querySelector('.flatpickr-day[tabindex]') || calendarContainer).focus();
|
|
391
391
|
}
|
|
392
392
|
}
|
|
@@ -461,7 +461,7 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
461
461
|
}
|
|
462
462
|
};
|
|
463
463
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
464
|
-
}, [savedOnChange, savedOnOpen, readOnly, closeOnSelect, hasInput]);
|
|
464
|
+
}, [savedOnChange, savedOnOpen, readOnly, closeOnSelect, hasInput, datePickerType]);
|
|
465
465
|
|
|
466
466
|
// this hook allows consumers to access the flatpickr calendar
|
|
467
467
|
// instance for cases where functions like open() or close()
|
|
@@ -472,44 +472,44 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
472
472
|
}
|
|
473
473
|
}));
|
|
474
474
|
useEffect(() => {
|
|
475
|
-
if (calendarRef
|
|
475
|
+
if (calendarRef.current?.set) {
|
|
476
476
|
calendarRef.current.set({
|
|
477
477
|
dateFormat
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
}, [dateFormat]);
|
|
481
481
|
useEffect(() => {
|
|
482
|
-
if (calendarRef
|
|
482
|
+
if (calendarRef.current?.set) {
|
|
483
483
|
calendarRef.current.set('minDate', minDate);
|
|
484
484
|
}
|
|
485
485
|
}, [minDate]);
|
|
486
486
|
useEffect(() => {
|
|
487
|
-
if (calendarRef
|
|
487
|
+
if (calendarRef.current?.set) {
|
|
488
488
|
calendarRef.current.set('allowInput', allowInput);
|
|
489
489
|
}
|
|
490
490
|
}, [allowInput]);
|
|
491
491
|
useEffect(() => {
|
|
492
|
-
if (calendarRef
|
|
492
|
+
if (calendarRef.current?.set) {
|
|
493
493
|
calendarRef.current.set('maxDate', maxDate);
|
|
494
494
|
}
|
|
495
495
|
}, [maxDate]);
|
|
496
496
|
useEffect(() => {
|
|
497
|
-
if (calendarRef
|
|
497
|
+
if (calendarRef.current?.set && disable) {
|
|
498
498
|
calendarRef.current.set('disable', disable);
|
|
499
499
|
}
|
|
500
500
|
}, [disable]);
|
|
501
501
|
useEffect(() => {
|
|
502
|
-
if (calendarRef
|
|
502
|
+
if (calendarRef.current?.set && enable) {
|
|
503
503
|
calendarRef.current.set('enable', enable);
|
|
504
504
|
}
|
|
505
505
|
}, [enable]);
|
|
506
506
|
useEffect(() => {
|
|
507
|
-
if (calendarRef
|
|
507
|
+
if (calendarRef.current?.set && inline) {
|
|
508
508
|
calendarRef.current.set('inline', inline);
|
|
509
509
|
}
|
|
510
510
|
}, [inline]);
|
|
511
511
|
useEffect(() => {
|
|
512
|
-
//when value prop is set to empty, this clears the
|
|
512
|
+
//when value prop is set to empty, this clears the flatpicker's calendar instance and text input
|
|
513
513
|
if (value === '') {
|
|
514
514
|
calendarRef.current?.clear();
|
|
515
515
|
if (startInputField.current) {
|
|
@@ -528,9 +528,9 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
528
528
|
}
|
|
529
529
|
};
|
|
530
530
|
const closeCalendar = event => {
|
|
531
|
-
calendarRef.current
|
|
531
|
+
calendarRef.current?.close();
|
|
532
532
|
// Remove focus from endDate calendar input
|
|
533
|
-
onCalendarClose(calendarRef.current
|
|
533
|
+
onCalendarClose(calendarRef.current?.selectedDates, '', calendarRef.current, {
|
|
534
534
|
type: 'clickOutside'
|
|
535
535
|
});
|
|
536
536
|
};
|
|
@@ -540,7 +540,7 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
540
540
|
};
|
|
541
541
|
}, [calendarRef, startInputField, endInputField, onCalendarClose]);
|
|
542
542
|
useEffect(() => {
|
|
543
|
-
if (calendarRef
|
|
543
|
+
if (calendarRef.current?.set) {
|
|
544
544
|
if (value !== undefined) {
|
|
545
545
|
calendarRef.current.setDate(value);
|
|
546
546
|
}
|
|
@@ -554,7 +554,7 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
|
|
|
554
554
|
useEffect(() => {
|
|
555
555
|
if (!calendarRef.current || !startInputField.current) return;
|
|
556
556
|
const handleKeyDown = event => {
|
|
557
|
-
if (match(event, Tab) && !event.shiftKey && document.activeElement === endInputField.current && calendarRef.current
|
|
557
|
+
if (match(event, Tab) && !event.shiftKey && document.activeElement === endInputField.current && calendarRef.current?.isOpen) {
|
|
558
558
|
calendarRef.current.close();
|
|
559
559
|
onCalendarClose(calendarRef.current.selectedDates, '', calendarRef.current, event);
|
|
560
560
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
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.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import { ListBoxSize } from '../ListBox';
|
|
8
|
+
import { type ListBoxSize } from '../ListBox';
|
|
9
9
|
import { ReactAttr } from '../../types/common';
|
|
10
10
|
export interface DropdownSkeletonProps extends ReactAttr<HTMLDivElement> {
|
|
11
11
|
/**
|
|
@@ -11,7 +11,7 @@ import React__default from 'react';
|
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import '../ListBox/index.js';
|
|
13
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
|
-
import {
|
|
14
|
+
import { ListBoxSizePropType } from '../ListBox/ListBoxPropTypes.js';
|
|
15
15
|
|
|
16
16
|
const DropdownSkeleton = _ref => {
|
|
17
17
|
let {
|
|
@@ -44,7 +44,7 @@ DropdownSkeleton.propTypes = {
|
|
|
44
44
|
/**
|
|
45
45
|
* Specify the size of the ListBox.
|
|
46
46
|
*/
|
|
47
|
-
size:
|
|
47
|
+
size: ListBoxSizePropType
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
export { DropdownSkeleton, DropdownSkeleton as default };
|