@carbon/react 1.99.0 → 1.100.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 +978 -978
- package/es/components/BadgeIndicator/index.d.ts +1 -1
- package/es/components/BadgeIndicator/index.js +8 -6
- package/es/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/es/components/Breadcrumb/BreadcrumbItem.js +6 -7
- package/es/components/Button/Button.Skeleton.d.ts +28 -2
- package/es/components/Button/Button.js +3 -2
- package/es/components/ChatButton/ChatButton.d.ts +3 -2
- package/es/components/CheckboxGroup/CheckboxGroup.d.ts +60 -2
- package/es/components/ComboBox/ComboBox.d.ts +6 -7
- package/es/components/ComboBox/ComboBox.js +22 -10
- package/es/components/ComposedModal/ComposedModal.d.ts +2 -2
- package/es/components/ContainedList/ContainedList.d.ts +35 -6
- package/es/components/ContainedList/ContainedList.js +3 -1
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +32 -3
- package/es/components/ContainedList/index.d.ts +1 -1
- package/es/components/ContainedList/index.js +4 -1
- package/es/components/DangerButton/DangerButton.d.ts +1 -1
- package/es/components/DataTable/DataTable.d.ts +22 -5
- package/es/components/DataTable/DataTable.js +1 -1
- package/es/components/DataTable/TableExpandRow.d.ts +1 -1
- package/es/components/DataTable/TableExpandRow.js +2 -2
- package/es/components/DataTable/TableHeader.d.ts +1 -1
- package/es/components/DataTable/TableHeader.js +18 -16
- package/es/components/DataTable/TableToolbar.d.ts +25 -1
- package/es/components/DataTable/TableToolbarMenu.d.ts +25 -5
- package/es/components/DataTable/TableToolbarMenu.js +0 -3
- package/es/components/DataTableSkeleton/DataTableSkeleton.d.ts +51 -2
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +6 -0
- package/es/components/DatePicker/DatePicker.d.ts +2 -2
- package/es/components/DatePicker/DatePicker.js +38 -53
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +28 -2
- package/es/components/DatePickerInput/DatePickerInput.d.ts +1 -1
- package/es/components/DatePickerInput/DatePickerInput.js +3 -2
- package/es/components/Dialog/Dialog.d.ts +1 -1
- package/es/components/Dropdown/Dropdown.Skeleton.d.ts +19 -2
- package/es/components/Dropdown/Dropdown.d.ts +3 -4
- package/es/components/Dropdown/Dropdown.js +16 -13
- package/es/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
- package/es/components/ExpandableSearch/ExpandableSearch.js +14 -12
- package/es/components/FileUploader/FileUploader.d.ts +1 -1
- package/es/components/FileUploader/FileUploader.js +2 -2
- package/es/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
- package/es/components/FileUploader/FileUploaderDropContainer.js +28 -10
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.d.ts +11 -3
- package/es/components/FluidComboBox/FluidComboBox.d.ts +2 -7
- package/es/components/FluidComboBox/FluidComboBox.js +1 -2
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.d.ts +15 -3
- package/es/components/FluidDatePicker/FluidDatePicker.d.ts +2 -2
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.d.ts +11 -3
- package/es/components/FluidDropdown/FluidDropdown.d.ts +1 -6
- package/es/components/FluidDropdown/FluidDropdown.js +1 -2
- package/es/components/FluidForm/FluidForm.d.ts +15 -2
- package/es/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +2 -2
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.d.ts +11 -3
- package/es/components/FluidMultiSelect/FluidMultiSelect.d.ts +1 -6
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +1 -2
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +11 -3
- package/es/components/FluidNumberInput/FluidNumberInput.d.ts +1 -1
- package/es/components/FluidSearch/FluidSearch.Skeleton.d.ts +11 -3
- package/es/components/FluidSearch/FluidSearch.d.ts +1 -1
- package/es/components/FluidSearch/FluidSearch.js +3 -3
- package/es/components/FluidSelect/FluidSelect.Skeleton.d.ts +11 -3
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +11 -3
- package/es/components/FluidTextArea/FluidTextArea.d.ts +95 -1
- package/es/components/FluidTextInput/FluidPasswordInput.d.ts +83 -2
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +11 -3
- package/es/components/Grid/GridContext.d.ts +19 -1
- package/es/components/IconButton/index.d.ts +1 -1
- package/es/components/IconButton/index.js +2 -2
- package/es/components/InlineLoading/InlineLoading.js +5 -11
- package/es/components/Link/Link.js +3 -0
- package/es/components/ListBox/ListBoxField.d.ts +35 -2
- package/es/components/ListBox/ListBoxMenuIcon.d.ts +16 -3
- package/es/components/ListBox/ListBoxMenuItem.d.ts +1 -1
- package/es/components/ListBox/ListBoxSelection.d.ts +34 -3
- package/es/components/Menu/MenuItem.d.ts +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.d.ts +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.js +22 -13
- package/es/components/MultiSelect/MultiSelect.d.ts +3 -4
- package/es/components/MultiSelect/MultiSelect.js +24 -22
- package/es/components/Notification/Notification.d.ts +8 -7
- package/es/components/Notification/Notification.js +4 -4
- package/es/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/es/components/OverflowMenu/OverflowMenu.js +0 -1
- package/es/components/OverflowMenu/index.d.ts +1 -1
- package/es/components/PageHeader/PageHeader.d.ts +3 -3
- package/es/components/Popover/index.js +21 -12
- package/es/components/Search/Search.d.ts +2 -2
- package/es/components/Select/Select.d.ts +1 -1
- package/es/components/Select/Select.js +2 -2
- package/es/components/SkeletonIcon/SkeletonIcon.d.ts +16 -2
- package/es/components/SkeletonText/SkeletonText.d.ts +1 -1
- package/es/components/Tag/Tag.d.ts +1 -1
- package/es/components/Tag/Tag.js +2 -0
- package/es/components/Text/Text.d.ts +1 -1
- package/es/components/Text/Text.js +4 -3
- package/es/components/Text/TextDirection.d.ts +1 -1
- package/es/components/Text/TextDirection.js +1 -3
- package/es/components/Text/TextDirectionContext.d.ts +3 -3
- package/es/components/TextArea/TextArea.js +1 -3
- package/es/components/TextInput/ControlledPasswordInput.d.ts +1 -1
- package/es/components/TextInput/ControlledPasswordInput.js +2 -2
- package/es/components/TextInput/PasswordInput.d.ts +1 -1
- package/es/components/TextInput/PasswordInput.js +2 -2
- package/es/components/TextInput/TextInput.d.ts +1 -1
- package/es/components/TextInput/TextInput.js +2 -2
- package/es/components/Tile/Tile.d.ts +1 -1
- package/es/components/Tile/Tile.js +37 -69
- package/es/components/Toggle/Toggle.Skeleton.d.ts +9 -3
- package/es/components/Toggletip/index.d.ts +1 -1
- package/es/components/Toggletip/index.js +9 -7
- package/es/components/Tooltip/DefinitionTooltip.d.ts +52 -1
- package/es/components/Tooltip/Tooltip.js +2 -0
- package/es/components/TreeView/TreeNode.d.ts +4 -4
- package/es/components/UIShell/Header.d.ts +20 -3
- package/es/components/UIShell/HeaderGlobalAction.d.ts +2 -2
- package/es/components/UIShell/HeaderName.js +1 -1
- package/es/components/UIShell/Link.d.ts +1 -1
- package/es/components/UIShell/Link.js +14 -14
- package/es/components/UIShell/SideNav.d.ts +3 -4
- package/es/components/UIShell/SideNav.js +37 -27
- package/es/components/UIShell/SideNavDivider.d.ts +11 -3
- package/es/components/UIShell/SideNavHeader.d.ts +24 -1
- package/es/components/UIShell/SideNavIcon.d.ts +20 -2
- package/es/components/UIShell/SideNavItem.d.ts +20 -2
- package/es/components/UIShell/SideNavItems.d.ts +22 -2
- package/es/components/UIShell/SideNavLink.d.ts +1 -1
- package/es/components/UIShell/SideNavLink.js +14 -14
- package/es/components/UIShell/SideNavMenu.d.ts +1 -1
- package/es/components/UIShell/SideNavMenu.js +2 -2
- package/es/components/UIShell/SideNavMenuItem.d.ts +2 -2
- package/es/components/UIShell/SideNavMenuItem.js +2 -2
- package/es/components/UIShell/SwitcherDivider.d.ts +10 -2
- package/es/internal/FloatingMenu.d.ts +1 -1
- package/es/internal/FloatingMenu.js +0 -2
- package/es/internal/PolymorphicProps.d.ts +3 -3
- package/es/internal/useNoInteractiveChildren.d.ts +1 -1
- package/es/internal/useNoInteractiveChildren.js +8 -10
- package/es/internal/useOutsideClick.d.ts +1 -1
- package/es/internal/useOutsideClick.js +0 -4
- package/lib/components/BadgeIndicator/index.d.ts +1 -1
- package/lib/components/BadgeIndicator/index.js +7 -5
- package/lib/components/Breadcrumb/BreadcrumbItem.d.ts +1 -1
- package/lib/components/Breadcrumb/BreadcrumbItem.js +5 -6
- package/lib/components/Button/Button.Skeleton.d.ts +28 -2
- package/lib/components/Button/Button.js +3 -2
- package/lib/components/ChatButton/ChatButton.d.ts +3 -2
- package/lib/components/CheckboxGroup/CheckboxGroup.d.ts +60 -2
- package/lib/components/ComboBox/ComboBox.d.ts +6 -7
- package/lib/components/ComboBox/ComboBox.js +22 -10
- package/lib/components/ComposedModal/ComposedModal.d.ts +2 -2
- package/lib/components/ContainedList/ContainedList.d.ts +35 -6
- package/lib/components/ContainedList/ContainedList.js +3 -1
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.d.ts +32 -3
- package/lib/components/ContainedList/index.d.ts +1 -1
- package/lib/components/ContainedList/index.js +4 -1
- package/lib/components/DangerButton/DangerButton.d.ts +1 -1
- package/lib/components/DataTable/DataTable.d.ts +22 -5
- package/lib/components/DataTable/DataTable.js +1 -1
- package/lib/components/DataTable/TableExpandRow.d.ts +1 -1
- package/lib/components/DataTable/TableHeader.d.ts +1 -1
- package/lib/components/DataTable/TableHeader.js +17 -15
- package/lib/components/DataTable/TableToolbar.d.ts +25 -1
- package/lib/components/DataTable/TableToolbarMenu.d.ts +25 -5
- package/lib/components/DataTable/TableToolbarMenu.js +0 -3
- package/lib/components/DataTableSkeleton/DataTableSkeleton.d.ts +51 -2
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +6 -0
- package/lib/components/DatePicker/DatePicker.d.ts +2 -2
- package/lib/components/DatePicker/DatePicker.js +37 -52
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +28 -2
- package/lib/components/DatePickerInput/DatePickerInput.d.ts +1 -1
- package/lib/components/DatePickerInput/DatePickerInput.js +2 -1
- package/lib/components/Dialog/Dialog.d.ts +1 -1
- package/lib/components/Dropdown/Dropdown.Skeleton.d.ts +19 -2
- package/lib/components/Dropdown/Dropdown.d.ts +3 -4
- package/lib/components/Dropdown/Dropdown.js +16 -13
- package/lib/components/ExpandableSearch/ExpandableSearch.d.ts +1 -1
- package/lib/components/ExpandableSearch/ExpandableSearch.js +13 -11
- package/lib/components/FileUploader/FileUploader.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.js +28 -10
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.d.ts +11 -3
- package/lib/components/FluidComboBox/FluidComboBox.d.ts +2 -7
- package/lib/components/FluidComboBox/FluidComboBox.js +1 -2
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.d.ts +15 -3
- package/lib/components/FluidDatePicker/FluidDatePicker.d.ts +2 -2
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.d.ts +11 -3
- package/lib/components/FluidDropdown/FluidDropdown.d.ts +1 -6
- package/lib/components/FluidDropdown/FluidDropdown.js +1 -2
- package/lib/components/FluidForm/FluidForm.d.ts +15 -2
- package/lib/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +2 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.d.ts +11 -3
- package/lib/components/FluidMultiSelect/FluidMultiSelect.d.ts +1 -6
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +1 -2
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +11 -3
- package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +1 -1
- package/lib/components/FluidSearch/FluidSearch.Skeleton.d.ts +11 -3
- package/lib/components/FluidSearch/FluidSearch.d.ts +1 -1
- package/lib/components/FluidSearch/FluidSearch.js +2 -2
- package/lib/components/FluidSelect/FluidSelect.Skeleton.d.ts +11 -3
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +11 -3
- package/lib/components/FluidTextArea/FluidTextArea.d.ts +95 -1
- package/lib/components/FluidTextInput/FluidPasswordInput.d.ts +83 -2
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +11 -3
- package/lib/components/Grid/GridContext.d.ts +19 -1
- package/lib/components/IconButton/index.d.ts +1 -1
- package/lib/components/InlineLoading/InlineLoading.js +5 -11
- package/lib/components/Link/Link.js +3 -0
- package/lib/components/ListBox/ListBoxField.d.ts +35 -2
- package/lib/components/ListBox/ListBoxMenuIcon.d.ts +16 -3
- package/lib/components/ListBox/ListBoxMenuItem.d.ts +1 -1
- package/lib/components/ListBox/ListBoxSelection.d.ts +34 -3
- package/lib/components/Menu/MenuItem.d.ts +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.js +22 -13
- package/lib/components/MultiSelect/MultiSelect.d.ts +3 -4
- package/lib/components/MultiSelect/MultiSelect.js +24 -22
- package/lib/components/Notification/Notification.d.ts +8 -7
- package/lib/components/Notification/Notification.js +4 -4
- package/lib/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/lib/components/OverflowMenu/OverflowMenu.js +0 -1
- package/lib/components/OverflowMenu/index.d.ts +1 -1
- package/lib/components/PageHeader/PageHeader.d.ts +3 -3
- package/lib/components/Popover/index.js +19 -10
- package/lib/components/Search/Search.d.ts +2 -2
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/SkeletonIcon/SkeletonIcon.d.ts +16 -2
- package/lib/components/SkeletonText/SkeletonText.d.ts +1 -1
- package/lib/components/Tag/Tag.d.ts +1 -1
- package/lib/components/Tag/Tag.js +2 -0
- package/lib/components/Text/Text.d.ts +1 -1
- package/lib/components/Text/Text.js +3 -2
- package/lib/components/Text/TextDirection.d.ts +1 -1
- package/lib/components/Text/TextDirection.js +1 -3
- package/lib/components/Text/TextDirectionContext.d.ts +3 -3
- package/lib/components/TextArea/TextArea.js +1 -3
- package/lib/components/TextInput/ControlledPasswordInput.d.ts +1 -1
- package/lib/components/TextInput/PasswordInput.d.ts +1 -1
- package/lib/components/TextInput/TextInput.d.ts +1 -1
- package/lib/components/Tile/Tile.d.ts +1 -1
- package/lib/components/Tile/Tile.js +35 -67
- package/lib/components/Toggle/Toggle.Skeleton.d.ts +9 -3
- package/lib/components/Toggletip/index.d.ts +1 -1
- package/lib/components/Toggletip/index.js +7 -5
- package/lib/components/Tooltip/DefinitionTooltip.d.ts +52 -1
- package/lib/components/Tooltip/Tooltip.js +2 -0
- package/lib/components/TreeView/TreeNode.d.ts +4 -4
- package/lib/components/UIShell/Header.d.ts +20 -3
- package/lib/components/UIShell/HeaderGlobalAction.d.ts +2 -2
- package/lib/components/UIShell/HeaderName.js +1 -1
- package/lib/components/UIShell/Link.d.ts +1 -1
- package/lib/components/UIShell/Link.js +13 -13
- package/lib/components/UIShell/SideNav.d.ts +3 -4
- package/lib/components/UIShell/SideNav.js +36 -26
- package/lib/components/UIShell/SideNavDivider.d.ts +11 -3
- package/lib/components/UIShell/SideNavHeader.d.ts +24 -1
- package/lib/components/UIShell/SideNavIcon.d.ts +20 -2
- package/lib/components/UIShell/SideNavItem.d.ts +20 -2
- package/lib/components/UIShell/SideNavItems.d.ts +22 -2
- package/lib/components/UIShell/SideNavLink.d.ts +1 -1
- package/lib/components/UIShell/SideNavLink.js +14 -14
- package/lib/components/UIShell/SideNavMenu.d.ts +1 -1
- package/lib/components/UIShell/SideNavMenuItem.d.ts +2 -2
- package/lib/components/UIShell/SwitcherDivider.d.ts +10 -2
- package/lib/internal/FloatingMenu.d.ts +1 -1
- package/lib/internal/FloatingMenu.js +0 -2
- package/lib/internal/PolymorphicProps.d.ts +3 -3
- package/lib/internal/useNoInteractiveChildren.d.ts +1 -1
- package/lib/internal/useNoInteractiveChildren.js +8 -10
- package/lib/internal/useOutsideClick.d.ts +1 -1
- package/lib/internal/useOutsideClick.js +0 -4
- package/package.json +7 -7
- package/scss/_carbon-utilities.scss +9 -0
- package/telemetry.yml +0 -1
- package/es/internal/createClassWrapper.d.ts +0 -12
- package/lib/internal/createClassWrapper.d.ts +0 -12
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import React, {
|
|
7
|
+
import React, { type ComponentProps, type ReactNode } from 'react';
|
|
8
8
|
import type { UseComboboxProps, UseMultipleSelectionProps } from 'downshift';
|
|
9
9
|
import { type FilterableMultiSelectProps, type MultiSelect } from '../MultiSelect';
|
|
10
10
|
interface OnChangeData<ItemType> {
|
|
@@ -65,7 +65,7 @@ export interface FluidFilterableMultiSelectProps<ItemType> extends FilterableMul
|
|
|
65
65
|
* Function to render items as custom components instead of strings.
|
|
66
66
|
* Defaults to null and is overridden by a getter
|
|
67
67
|
*/
|
|
68
|
-
itemToElement?:
|
|
68
|
+
itemToElement?: (item: ItemType) => ReactNode;
|
|
69
69
|
/**
|
|
70
70
|
* Helper function passed to downshift that allows the library to render a
|
|
71
71
|
* given item to a string label. By default, it extracts the `label` field
|
|
@@ -1,15 +1,23 @@
|
|
|
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
|
-
import
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
8
|
export interface FluidMultiSelectSkeletonProps {
|
|
9
9
|
/**
|
|
10
10
|
* Specify an optional className to add.
|
|
11
11
|
*/
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
declare const FluidMultiSelectSkeleton:
|
|
14
|
+
declare const FluidMultiSelectSkeleton: {
|
|
15
|
+
({ className, ...rest }: FluidMultiSelectSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
propTypes: {
|
|
17
|
+
/**
|
|
18
|
+
* Specify an optional className to add.
|
|
19
|
+
*/
|
|
20
|
+
className: PropTypes.Requireable<string>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
15
23
|
export default FluidMultiSelectSkeleton;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2022,
|
|
2
|
+
* Copyright IBM Corp. 2022, 2026
|
|
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.
|
|
@@ -66,11 +66,6 @@ export interface FluidMultiSelectProps<ItemType> extends MultiSelectProps<ItemTy
|
|
|
66
66
|
* @deprecated This prop is deprecated in favor of new component called FluidFilterableMultiSelect and will be removed in the next major release
|
|
67
67
|
*/
|
|
68
68
|
isFilterable?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Function to render items as custom components instead of strings.
|
|
71
|
-
* Defaults to null and is overridden by a getter
|
|
72
|
-
*/
|
|
73
|
-
itemToElement?: React.JSXElementConstructor<ItemType>;
|
|
74
69
|
/**
|
|
75
70
|
* Helper function passed to downshift that allows the library to render a
|
|
76
71
|
* given item to a string label. By default, it extracts the `label` field
|
|
@@ -110,8 +110,7 @@ FluidMultiSelect.propTypes = {
|
|
|
110
110
|
*/
|
|
111
111
|
isFilterable: PropTypes.bool,
|
|
112
112
|
/**
|
|
113
|
-
*
|
|
114
|
-
* Defaults to null and is overridden by a getter
|
|
113
|
+
* Renders an item as a custom React node instead of a string.
|
|
115
114
|
*/
|
|
116
115
|
itemToElement: PropTypes.func,
|
|
117
116
|
/**
|
|
@@ -1,15 +1,23 @@
|
|
|
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
|
-
import
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
8
|
export interface FluidNumberInputSkeletonProps {
|
|
9
9
|
/**
|
|
10
10
|
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
11
11
|
*/
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
declare const FluidNumberInputSkeleton:
|
|
14
|
+
declare const FluidNumberInputSkeleton: {
|
|
15
|
+
({ className, ...other }: FluidNumberInputSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
propTypes: {
|
|
17
|
+
/**
|
|
18
|
+
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
19
|
+
*/
|
|
20
|
+
className: PropTypes.Requireable<string>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
15
23
|
export default FluidNumberInputSkeleton;
|
|
@@ -132,5 +132,5 @@ export interface FluidNumberInputProps extends Pick<ComponentProps<typeof Number
|
|
|
132
132
|
*/
|
|
133
133
|
readOnly?: boolean;
|
|
134
134
|
}
|
|
135
|
-
declare const FluidNumberInput: React.
|
|
135
|
+
declare const FluidNumberInput: React.ForwardRefExoticComponent<FluidNumberInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
136
136
|
export default FluidNumberInput;
|
|
@@ -1,15 +1,23 @@
|
|
|
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
|
-
import
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
8
|
export interface FluidSearchSkeletonProps {
|
|
9
9
|
/**
|
|
10
10
|
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
11
11
|
*/
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
declare const FluidSearchSkeleton:
|
|
14
|
+
declare const FluidSearchSkeleton: {
|
|
15
|
+
({ className, ...other }: FluidSearchSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
propTypes: {
|
|
17
|
+
/**
|
|
18
|
+
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
19
|
+
*/
|
|
20
|
+
className: PropTypes.Requireable<string>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
15
23
|
export default FluidSearchSkeleton;
|
|
@@ -66,5 +66,5 @@ export interface FluidSearchProps {
|
|
|
66
66
|
*/
|
|
67
67
|
value?: string | number;
|
|
68
68
|
}
|
|
69
|
-
declare const FluidSearch: React.
|
|
69
|
+
declare const FluidSearch: React.ForwardRefExoticComponent<FluidSearchProps & React.RefAttributes<HTMLInputElement>>;
|
|
70
70
|
export default FluidSearch;
|
|
@@ -18,8 +18,8 @@ require('../Search/Search.Skeleton.js');
|
|
|
18
18
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
19
|
var FormContext = require('../FluidForm/FormContext.js');
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
const FluidSearch =
|
|
21
|
+
const frFn = React.forwardRef;
|
|
22
|
+
const FluidSearch = frFn(({
|
|
23
23
|
className,
|
|
24
24
|
...other
|
|
25
25
|
}, ref) => {
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2022
|
|
2
|
+
* Copyright IBM Corp. 2022, 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
|
-
import
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
8
|
export interface FluidSelectSkeletonProps {
|
|
9
9
|
/**
|
|
10
10
|
* Specify an optional className to add.
|
|
11
11
|
*/
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
declare const FluidSelectSkeleton:
|
|
14
|
+
declare const FluidSelectSkeleton: {
|
|
15
|
+
({ className, ...rest }: FluidSelectSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
propTypes: {
|
|
17
|
+
/**
|
|
18
|
+
* Specify an optional className to add.
|
|
19
|
+
*/
|
|
20
|
+
className: PropTypes.Requireable<string>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
15
23
|
export default FluidSelectSkeleton;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2024
|
|
2
|
+
* Copyright IBM Corp. 2024, 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
|
-
import
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
8
|
export interface FluidTextAreaSkeletonProps {
|
|
9
9
|
/**
|
|
10
10
|
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
11
11
|
*/
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
declare const FluidTextAreaSkeleton:
|
|
14
|
+
declare const FluidTextAreaSkeleton: {
|
|
15
|
+
({ className, ...other }: FluidTextAreaSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
propTypes: {
|
|
17
|
+
/**
|
|
18
|
+
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
19
|
+
*/
|
|
20
|
+
className: PropTypes.Requireable<string>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
15
23
|
export default FluidTextAreaSkeleton;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
export interface FluidTextAreaProps {
|
|
9
10
|
/**
|
|
@@ -96,5 +97,98 @@ export interface FluidTextAreaProps {
|
|
|
96
97
|
*/
|
|
97
98
|
readOnly?: boolean;
|
|
98
99
|
}
|
|
99
|
-
declare const FluidTextArea:
|
|
100
|
+
declare const FluidTextArea: {
|
|
101
|
+
({ className, ...other }: FluidTextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
propTypes: {
|
|
103
|
+
/**
|
|
104
|
+
* Provide a custom className that is applied directly to the underlying
|
|
105
|
+
* `<textarea>` node
|
|
106
|
+
*/
|
|
107
|
+
className: PropTypes.Requireable<string>;
|
|
108
|
+
/**
|
|
109
|
+
* Specify the `cols` attribute for the underlying `<textarea>` node
|
|
110
|
+
*/
|
|
111
|
+
cols: PropTypes.Requireable<number>;
|
|
112
|
+
/**
|
|
113
|
+
* Optionally provide the default value of the `<textarea>`
|
|
114
|
+
*/
|
|
115
|
+
defaultValue: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
116
|
+
/**
|
|
117
|
+
* Specify whether the control is disabled
|
|
118
|
+
*/
|
|
119
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
120
|
+
/**
|
|
121
|
+
* Specify whether to display the character counter
|
|
122
|
+
*/
|
|
123
|
+
enableCounter: PropTypes.Requireable<boolean>;
|
|
124
|
+
/**
|
|
125
|
+
* Provide text that is used alongside the control label for additional help
|
|
126
|
+
*/
|
|
127
|
+
helperText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
128
|
+
/**
|
|
129
|
+
* Specify whether you want the underlying label to be visually hidden
|
|
130
|
+
*/
|
|
131
|
+
hideLabel: PropTypes.Requireable<boolean>;
|
|
132
|
+
/**
|
|
133
|
+
* Provide a unique identifier for the control
|
|
134
|
+
*/
|
|
135
|
+
id: PropTypes.Requireable<string>;
|
|
136
|
+
/**
|
|
137
|
+
* Specify whether the control is currently invalid
|
|
138
|
+
*/
|
|
139
|
+
invalid: PropTypes.Requireable<boolean>;
|
|
140
|
+
/**
|
|
141
|
+
* Provide the text that is displayed when the control is in an invalid state
|
|
142
|
+
*/
|
|
143
|
+
invalidText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
144
|
+
/**
|
|
145
|
+
* Provide the text that will be read by a screen reader when visiting this
|
|
146
|
+
* control
|
|
147
|
+
*/
|
|
148
|
+
labelText: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
149
|
+
/**
|
|
150
|
+
* `true` to use the light version. For use on $ui-01 backgrounds only.
|
|
151
|
+
* Don't use this to make tile background color same as container background color.
|
|
152
|
+
*/
|
|
153
|
+
light: (props: Record<string, any>, propName: string, componentName: string, ...rest: any[]) => any;
|
|
154
|
+
/**
|
|
155
|
+
* Max character count allowed for the textarea. This is needed in order for enableCounter to display
|
|
156
|
+
*/
|
|
157
|
+
maxCount: PropTypes.Requireable<number>;
|
|
158
|
+
/**
|
|
159
|
+
* Optionally provide an `onChange` handler that is called whenever `<textarea>`
|
|
160
|
+
* is updated
|
|
161
|
+
*/
|
|
162
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
163
|
+
/**
|
|
164
|
+
* Optionally provide an `onClick` handler that is called whenever the
|
|
165
|
+
* `<textarea>` is clicked
|
|
166
|
+
*/
|
|
167
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
168
|
+
/**
|
|
169
|
+
* Specify the placeholder attribute for the `<textarea>`
|
|
170
|
+
*/
|
|
171
|
+
placeholder: PropTypes.Requireable<string>;
|
|
172
|
+
/**
|
|
173
|
+
* Specify the rows attribute for the `<textarea>`
|
|
174
|
+
*/
|
|
175
|
+
rows: PropTypes.Requireable<number>;
|
|
176
|
+
/**
|
|
177
|
+
* Provide the current value of the `<textarea>`
|
|
178
|
+
*/
|
|
179
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
180
|
+
/**
|
|
181
|
+
* Specify whether the control is currently in warning state
|
|
182
|
+
*/
|
|
183
|
+
warn: PropTypes.Requireable<boolean>;
|
|
184
|
+
/**
|
|
185
|
+
* Provide the text that is displayed when the control is in warning state
|
|
186
|
+
*/
|
|
187
|
+
warnText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
188
|
+
/**
|
|
189
|
+
* Whether or not the component is readonly
|
|
190
|
+
*/
|
|
191
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
100
194
|
export default FluidTextArea;
|
|
@@ -1,9 +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
|
+
import PropTypes from 'prop-types';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
export interface FluidPasswordInputProps {
|
|
9
10
|
/**
|
|
@@ -83,5 +84,85 @@ export interface FluidPasswordInputProps {
|
|
|
83
84
|
*/
|
|
84
85
|
readOnly?: boolean;
|
|
85
86
|
}
|
|
86
|
-
declare const FluidPasswordInput:
|
|
87
|
+
declare const FluidPasswordInput: {
|
|
88
|
+
({ className, ...other }: FluidPasswordInputProps): import("react/jsx-runtime").JSX.Element;
|
|
89
|
+
propTypes: {
|
|
90
|
+
/**
|
|
91
|
+
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
92
|
+
*/
|
|
93
|
+
className: PropTypes.Requireable<string>;
|
|
94
|
+
/**
|
|
95
|
+
* Optionally provide the default value of the `<input>`
|
|
96
|
+
*/
|
|
97
|
+
defaultValue: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
98
|
+
/**
|
|
99
|
+
* Specify whether the `<input>` should be disabled
|
|
100
|
+
*/
|
|
101
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
102
|
+
/**
|
|
103
|
+
* "Hide password" tooltip text on password visibility toggle
|
|
104
|
+
*/
|
|
105
|
+
hidePasswordLabel: PropTypes.Requireable<string>;
|
|
106
|
+
/**
|
|
107
|
+
* Specify a custom `id` for the `<input>`
|
|
108
|
+
*/
|
|
109
|
+
id: PropTypes.Validator<string>;
|
|
110
|
+
/**
|
|
111
|
+
* Specify whether the control is currently invalid
|
|
112
|
+
*/
|
|
113
|
+
invalid: PropTypes.Requireable<boolean>;
|
|
114
|
+
/**
|
|
115
|
+
* Provide the text that is displayed when the control is in an invalid state
|
|
116
|
+
*/
|
|
117
|
+
invalidText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
118
|
+
/**
|
|
119
|
+
* Specify whether the control is a password input
|
|
120
|
+
*/
|
|
121
|
+
isPassword: PropTypes.Requireable<boolean>;
|
|
122
|
+
/**
|
|
123
|
+
* Provide the text that will be read by a screen reader when visiting this
|
|
124
|
+
* control
|
|
125
|
+
*/
|
|
126
|
+
labelText: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
127
|
+
/**
|
|
128
|
+
* Optionally provide an `onChange` handler that is called whenever `<input>`
|
|
129
|
+
* is updated
|
|
130
|
+
*/
|
|
131
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
132
|
+
/**
|
|
133
|
+
* Optionally provide an `onClick` handler that is called whenever the
|
|
134
|
+
* `<input>` is clicked
|
|
135
|
+
*/
|
|
136
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
137
|
+
/**
|
|
138
|
+
* Callback function that is called whenever the toggle password visibility
|
|
139
|
+
* button is clicked
|
|
140
|
+
*/
|
|
141
|
+
onTogglePasswordVisibility: PropTypes.Requireable<(...args: any[]) => any>;
|
|
142
|
+
/**
|
|
143
|
+
* Specify the placeholder attribute for the `<input>`
|
|
144
|
+
*/
|
|
145
|
+
placeholder: PropTypes.Requireable<string>;
|
|
146
|
+
/**
|
|
147
|
+
* "Show password" tooltip text on password visibility toggle
|
|
148
|
+
*/
|
|
149
|
+
showPasswordLabel: PropTypes.Requireable<string>;
|
|
150
|
+
/**
|
|
151
|
+
* Specify the value of the `<input>`
|
|
152
|
+
*/
|
|
153
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
154
|
+
/**
|
|
155
|
+
* Specify whether the control is currently in warning state
|
|
156
|
+
*/
|
|
157
|
+
warn: PropTypes.Requireable<boolean>;
|
|
158
|
+
/**
|
|
159
|
+
* Provide the text that is displayed when the control is in warning state
|
|
160
|
+
*/
|
|
161
|
+
warnText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
162
|
+
/**
|
|
163
|
+
* Whether or not the component is readonly
|
|
164
|
+
*/
|
|
165
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
87
168
|
export default FluidPasswordInput;
|
|
@@ -1,15 +1,23 @@
|
|
|
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
|
-
import
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
8
|
export interface FluidTextInputSkeletonProps {
|
|
9
9
|
/**
|
|
10
10
|
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
11
11
|
*/
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
declare const FluidTextInputSkeleton:
|
|
14
|
+
declare const FluidTextInputSkeleton: {
|
|
15
|
+
({ className, ...other }: FluidTextInputSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
propTypes: {
|
|
17
|
+
/**
|
|
18
|
+
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
19
|
+
*/
|
|
20
|
+
className: PropTypes.Requireable<string>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
15
23
|
export default FluidTextInputSkeleton;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
export type GridMode = 'flexbox' | 'css-grid';
|
|
9
10
|
export interface GridSettingContext {
|
|
@@ -31,7 +32,24 @@ export interface GridSettingsProps {
|
|
|
31
32
|
*/
|
|
32
33
|
subgrid?: boolean;
|
|
33
34
|
}
|
|
34
|
-
export declare const GridSettings:
|
|
35
|
+
export declare const GridSettings: {
|
|
36
|
+
({ children, mode, subgrid, }: GridSettingsProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
propTypes: {
|
|
38
|
+
/**
|
|
39
|
+
* Pass in components which will be rendered within the `GridSettings`
|
|
40
|
+
* component
|
|
41
|
+
*/
|
|
42
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
43
|
+
/**
|
|
44
|
+
* Specify the gutter mode for the GridContext
|
|
45
|
+
*/
|
|
46
|
+
mode: PropTypes.Validator<NonNullable<GridMode>>;
|
|
47
|
+
/**
|
|
48
|
+
* Specify whether subgrid should be enabled
|
|
49
|
+
*/
|
|
50
|
+
subgrid: PropTypes.Requireable<boolean>;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
35
53
|
/**
|
|
36
54
|
* Helper function for accessing the GridContext value
|
|
37
55
|
*/
|
|
@@ -56,7 +56,10 @@ const InlineLoading = ({
|
|
|
56
56
|
className: `${prefix}--inline-loading__checkmark-container`
|
|
57
57
|
}, /*#__PURE__*/React.createElement("title", null, iconLabel));
|
|
58
58
|
}
|
|
59
|
-
if (status === 'active') {
|
|
59
|
+
if (status === 'inactive' || status === 'active') {
|
|
60
|
+
if (status === 'inactive') {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
60
63
|
if (!iconDescription) {
|
|
61
64
|
iconLabel = 'loading';
|
|
62
65
|
}
|
|
@@ -67,15 +70,6 @@ const InlineLoading = ({
|
|
|
67
70
|
active: status === 'active'
|
|
68
71
|
});
|
|
69
72
|
}
|
|
70
|
-
if (status === 'inactive') {
|
|
71
|
-
if (!iconDescription) {
|
|
72
|
-
iconLabel = 'not loading';
|
|
73
|
-
}
|
|
74
|
-
return /*#__PURE__*/React.createElement("title", {
|
|
75
|
-
className: `${prefix}--inline-loading__inactive-status`
|
|
76
|
-
}, iconLabel);
|
|
77
|
-
}
|
|
78
|
-
return undefined;
|
|
79
73
|
};
|
|
80
74
|
const loadingText = description && /*#__PURE__*/React.createElement("div", {
|
|
81
75
|
className: `${prefix}--inline-loading__text`
|
|
@@ -87,7 +81,7 @@ const InlineLoading = ({
|
|
|
87
81
|
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
88
82
|
className: loadingClasses
|
|
89
83
|
}, rest, {
|
|
90
|
-
"aria-live": rest['aria-live'] ?? 'assertive'
|
|
84
|
+
"aria-live": rest['aria-live'] ?? (status === 'inactive' ? 'off' : 'assertive')
|
|
91
85
|
}), loadingAnimation, loadingText);
|
|
92
86
|
};
|
|
93
87
|
InlineLoading.propTypes = {
|
|
@@ -76,7 +76,10 @@ const LinkBase = /*#__PURE__*/React.forwardRef(({
|
|
|
76
76
|
}, /*#__PURE__*/React.createElement(Icon, null)));
|
|
77
77
|
});
|
|
78
78
|
const Link = LinkBase;
|
|
79
|
+
|
|
80
|
+
// @ts-expect-error - `displayName` isn't typed.
|
|
79
81
|
Link.displayName = 'Link';
|
|
82
|
+
// @ts-expect-error - `propTypes` isn't typed.
|
|
80
83
|
Link.propTypes = {
|
|
81
84
|
/**
|
|
82
85
|
* Provide a custom element or component to render the top-level node for the
|
|
@@ -4,13 +4,46 @@
|
|
|
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
|
|
7
|
+
import { type HTMLAttributes } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
export interface ListBoxFieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
10
|
/**
|
|
10
11
|
* Specify if the parent <ListBox> is disabled
|
|
11
12
|
*/
|
|
12
13
|
disabled?: boolean;
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
/**
|
|
16
|
+
* `ListBoxField` is responsible for creating the containing node for valid
|
|
17
|
+
* elements inside of a field. It also provides a11y-related attributes like
|
|
18
|
+
* `role` to make sure a user can focus the given field.
|
|
19
|
+
*/
|
|
20
|
+
declare function ListBoxField({ children, disabled, tabIndex, ...rest }: ListBoxFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare namespace ListBoxField {
|
|
22
|
+
var propTypes: {
|
|
23
|
+
/**
|
|
24
|
+
* Typically set by `getToggleButtonProps`, this should specify whether the
|
|
25
|
+
* field has a popup.
|
|
26
|
+
*/
|
|
27
|
+
'aria-haspopup': PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
|
|
28
|
+
/**
|
|
29
|
+
* Provide the contents of your ListBoxField
|
|
30
|
+
*/
|
|
31
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
32
|
+
/**
|
|
33
|
+
* Specify if the parent <ListBox> is disabled
|
|
34
|
+
*/
|
|
35
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
36
|
+
/**
|
|
37
|
+
* The role for the component, should be set by `getToggleButtonProps` coming
|
|
38
|
+
* from Downshift
|
|
39
|
+
*/
|
|
40
|
+
role: PropTypes.Requireable<string>;
|
|
41
|
+
/**
|
|
42
|
+
* Optional prop to specify the tabIndex of the <ListBox> trigger button
|
|
43
|
+
*/
|
|
44
|
+
tabIndex: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export type ListBoxFieldComponent = typeof ListBoxField;
|
|
15
48
|
declare const _default: ListBoxFieldComponent;
|
|
16
49
|
export default _default;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
8
|
import type { TranslateWithId } from '../../types/common';
|
|
9
9
|
declare const translationIds: {
|
|
10
10
|
readonly 'close.menu': "close.menu";
|
|
@@ -18,10 +18,23 @@ export interface ListBoxMenuIconProps extends TranslateWithId<TranslationKey> {
|
|
|
18
18
|
*/
|
|
19
19
|
isOpen: boolean;
|
|
20
20
|
}
|
|
21
|
-
export type ListBoxMenuIconComponent =
|
|
21
|
+
export type ListBoxMenuIconComponent = typeof ListBoxMenuIcon;
|
|
22
22
|
/**
|
|
23
23
|
* `ListBoxMenuIcon` is used to orient the icon up or down depending on the
|
|
24
24
|
* state of the menu for a given `ListBox`
|
|
25
25
|
*/
|
|
26
|
-
declare const ListBoxMenuIcon:
|
|
26
|
+
declare const ListBoxMenuIcon: {
|
|
27
|
+
({ isOpen, translateWithId: t, }: ListBoxMenuIconProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
propTypes: {
|
|
29
|
+
/**
|
|
30
|
+
* Specify whether the menu is currently open, which will influence the
|
|
31
|
+
* direction of the menu icon
|
|
32
|
+
*/
|
|
33
|
+
isOpen: PropTypes.Validator<boolean>;
|
|
34
|
+
/**
|
|
35
|
+
* Translates component strings using your i18n tool.
|
|
36
|
+
*/
|
|
37
|
+
translateWithId: PropTypes.Requireable<(...args: any[]) => any>;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
27
40
|
export default ListBoxMenuIcon;
|