@carbon/react 1.40.0 → 1.41.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 +1428 -695
- package/es/components/Accordion/Accordion.Skeleton.d.ts +0 -5
- package/es/components/Accordion/Accordion.Skeleton.js +0 -5
- package/es/components/Breadcrumb/BreadcrumbItem.js +3 -1
- package/es/components/Checkbox/Checkbox.js +3 -6
- package/es/components/CodeSnippet/CodeSnippet.js +5 -12
- package/es/components/ComboBox/ComboBox.d.ts +1 -5
- package/es/components/ComboBox/ComboBox.js +6 -20
- package/es/components/ComposedModal/ComposedModal.js +1 -4
- package/es/components/ComposedModal/ModalFooter.js +4 -9
- package/es/components/ComposedModal/ModalHeader.js +1 -4
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +3 -8
- package/es/components/ContentSwitcher/ContentSwitcher.js +7 -11
- package/es/components/Copy/Copy.js +4 -8
- package/es/components/CopyButton/CopyButton.js +8 -7
- package/es/components/DataTable/DataTable.d.ts +3 -39
- package/es/components/DataTable/DataTable.js +10 -18
- package/es/components/DataTable/Table.d.ts +0 -4
- package/es/components/DataTable/Table.js +0 -4
- package/es/components/DataTable/TableBatchAction.js +12 -5
- package/es/components/DataTable/TableBatchActions.js +1 -6
- package/es/components/DataTable/TableBody.d.ts +0 -3
- package/es/components/DataTable/TableBody.js +1 -3
- package/es/components/DataTable/TableHeader.js +3 -8
- package/es/components/DataTable/TableSelectAll.d.ts +0 -3
- package/es/components/DataTable/TableSelectAll.js +1 -4
- package/es/components/DataTable/TableToolbar.d.ts +10 -0
- package/es/components/DataTable/TableToolbar.js +15 -7
- package/es/components/DataTable/TableToolbarMenu.js +2 -6
- package/es/components/DataTable/TableToolbarSearch.d.ts +2 -8
- package/es/components/DataTable/TableToolbarSearch.js +6 -11
- package/es/components/DataTable/tools/sorting.js +2 -2
- package/es/components/DatePicker/DatePicker.d.ts +4 -4
- package/es/components/DatePicker/DatePicker.js +9 -4
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +6 -0
- package/es/components/DatePickerInput/DatePickerInput.js +12 -6
- package/es/components/Dropdown/Dropdown.js +6 -15
- package/es/components/FileUploader/FileUploader.d.ts +2 -11
- package/es/components/FileUploader/FileUploader.js +15 -19
- package/es/components/FileUploader/FileUploaderButton.js +2 -2
- package/es/components/FileUploader/FileUploaderDropContainer.d.ts +0 -7
- package/es/components/FileUploader/FileUploaderDropContainer.js +2 -8
- package/es/components/FileUploader/FileUploaderItem.d.ts +0 -4
- package/es/components/FileUploader/FileUploaderItem.js +12 -9
- package/es/components/FileUploader/Filename.d.ts +6 -10
- package/es/components/FileUploader/Filename.js +7 -11
- package/es/components/FormGroup/FormGroup.d.ts +0 -5
- package/es/components/FormGroup/FormGroup.js +3 -8
- package/es/components/FormItem/FormItem.d.ts +32 -0
- package/es/components/FormItem/index.d.ts +9 -0
- package/es/components/FormLabel/FormLabel.js +4 -1
- package/es/components/ListBox/ListBox.js +4 -8
- package/es/components/ListBox/ListBoxMenuIcon.js +1 -4
- package/es/components/ListBox/ListBoxMenuItem.js +4 -8
- package/es/components/ListBox/ListBoxSelection.d.ts +5 -5
- package/es/components/ListBox/ListBoxSelection.js +12 -13
- package/es/components/ListBox/next/ListBoxSelection.js +12 -13
- package/es/components/ListBox/next/ListBoxTrigger.js +3 -5
- package/es/components/ListItem/ListItem.d.ts +1 -1
- package/es/components/ListItem/ListItem.js +6 -2
- package/es/components/Menu/MenuItem.js +4 -1
- package/es/components/Modal/Modal.js +16 -27
- package/es/components/ModalWrapper/ModalWrapper.js +13 -19
- package/es/components/MultiSelect/FilterableMultiSelect.js +14 -28
- package/es/components/MultiSelect/MultiSelect.js +17 -33
- package/es/components/MultiSelect/MultiSelectPropTypes.js +2 -2
- package/es/components/MultiSelect/tools/sorting.js +2 -2
- package/es/components/Notification/Notification.d.ts +11 -29
- package/es/components/Notification/Notification.js +38 -57
- package/es/components/NumberInput/NumberInput.js +6 -2
- package/es/components/OverflowMenu/OverflowMenu.js +27 -33
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +4 -1
- package/es/components/Pagination/experimental/PageSelector.js +3 -8
- package/es/components/Pagination/experimental/Pagination.js +16 -34
- package/es/components/ProgressIndicator/ProgressIndicator.js +7 -6
- package/es/components/RadioTile/RadioTile.js +6 -7
- package/es/components/Search/Search.Skeleton.d.ts +0 -3
- package/es/components/Search/Search.Skeleton.js +1 -4
- package/es/components/Select/Select.d.ts +2 -2
- package/es/components/Select/Select.js +13 -16
- package/es/components/SelectItem/SelectItem.d.ts +0 -6
- package/es/components/SelectItem/SelectItem.js +4 -10
- package/es/components/SelectItemGroup/SelectItemGroup.d.ts +0 -3
- package/es/components/SelectItemGroup/SelectItemGroup.js +1 -4
- package/es/components/SkeletonIcon/SkeletonIcon.d.ts +13 -0
- package/es/components/SkeletonIcon/SkeletonIcon.js +2 -3
- package/es/components/SkeletonText/SkeletonText.d.ts +0 -6
- package/es/components/SkeletonText/SkeletonText.js +0 -6
- package/es/components/Slider/Slider.Skeleton.d.ts +9 -1
- package/es/components/Slider/Slider.Skeleton.js +20 -4
- package/es/components/Slider/Slider.d.ts +137 -25
- package/es/components/Slider/Slider.js +779 -186
- package/es/components/StructuredList/StructuredList.js +5 -2
- package/es/components/Switch/Switch.js +3 -7
- package/es/components/Tabs/Tabs.js +5 -2
- package/es/components/Tag/Tag.js +4 -2
- package/es/components/Text/Text.js +1 -1
- package/es/components/Text/TextDirection.d.ts +1 -1
- package/es/components/TextArea/TextArea.js +30 -34
- package/es/components/TextInput/ControlledPasswordInput.js +12 -19
- package/es/components/TextInput/TextInput.js +8 -3
- package/es/components/Tile/Tile.js +4 -2
- package/es/components/TileGroup/TileGroup.js +5 -4
- package/es/components/Toggle/Toggle.js +4 -2
- package/es/components/UIShell/Content.js +1 -4
- package/es/components/UIShell/SideNav.d.ts +1 -1
- package/es/components/UIShell/SideNavDetails.d.ts +32 -0
- package/es/components/UIShell/SideNavDetails.js +1 -2
- package/es/components/UIShell/SideNavDivider.d.ts +15 -0
- package/es/components/UIShell/SideNavDivider.js +2 -2
- package/es/components/UIShell/SideNavFooter.js +2 -5
- package/es/components/UIShell/SideNavIcon.d.ts +25 -0
- package/es/components/UIShell/SideNavIcon.js +4 -7
- package/es/components/UIShell/SideNavSwitcher.d.ts +31 -0
- package/es/components/UIShell/SideNavSwitcher.js +6 -5
- package/es/index.js +1 -1
- package/es/internal/FloatingMenu.js +2 -7
- package/es/internal/Selection.js +0 -3
- package/es/internal/noopFn.d.ts +7 -0
- package/es/internal/noopFn.js +10 -0
- package/es/internal/useNormalizedInputProps.js +6 -2
- package/lib/components/Accordion/Accordion.Skeleton.d.ts +0 -5
- package/lib/components/Accordion/Accordion.Skeleton.js +0 -5
- package/lib/components/Breadcrumb/BreadcrumbItem.js +3 -1
- package/lib/components/Checkbox/Checkbox.js +3 -6
- package/lib/components/CodeSnippet/CodeSnippet.js +5 -12
- package/lib/components/ComboBox/ComboBox.d.ts +1 -5
- package/lib/components/ComboBox/ComboBox.js +5 -19
- package/lib/components/ComposedModal/ComposedModal.js +1 -4
- package/lib/components/ComposedModal/ModalFooter.js +4 -9
- package/lib/components/ComposedModal/ModalHeader.js +1 -4
- package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +3 -8
- package/lib/components/ContentSwitcher/ContentSwitcher.js +7 -11
- package/lib/components/Copy/Copy.js +4 -8
- package/lib/components/CopyButton/CopyButton.js +8 -7
- package/lib/components/DataTable/DataTable.d.ts +3 -39
- package/lib/components/DataTable/DataTable.js +13 -21
- package/lib/components/DataTable/Table.d.ts +0 -4
- package/lib/components/DataTable/Table.js +0 -4
- package/lib/components/DataTable/TableBatchAction.js +12 -5
- package/lib/components/DataTable/TableBatchActions.js +1 -6
- package/lib/components/DataTable/TableBody.d.ts +0 -3
- package/lib/components/DataTable/TableBody.js +1 -3
- package/lib/components/DataTable/TableHeader.js +3 -8
- package/lib/components/DataTable/TableSelectAll.d.ts +0 -3
- package/lib/components/DataTable/TableSelectAll.js +1 -4
- package/lib/components/DataTable/TableToolbar.d.ts +10 -0
- package/lib/components/DataTable/TableToolbar.js +15 -7
- package/lib/components/DataTable/TableToolbarMenu.js +2 -6
- package/lib/components/DataTable/TableToolbarSearch.d.ts +2 -8
- package/lib/components/DataTable/TableToolbarSearch.js +6 -11
- package/lib/components/DataTable/tools/sorting.js +2 -2
- package/lib/components/DatePicker/DatePicker.d.ts +4 -4
- package/lib/components/DatePicker/DatePicker.js +9 -4
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +6 -0
- package/lib/components/DatePickerInput/DatePickerInput.js +12 -6
- package/lib/components/Dropdown/Dropdown.js +6 -15
- package/lib/components/FileUploader/FileUploader.d.ts +2 -11
- package/lib/components/FileUploader/FileUploader.js +15 -19
- package/lib/components/FileUploader/FileUploaderButton.js +2 -2
- package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +0 -7
- package/lib/components/FileUploader/FileUploaderDropContainer.js +2 -8
- package/lib/components/FileUploader/FileUploaderItem.d.ts +0 -4
- package/lib/components/FileUploader/FileUploaderItem.js +12 -9
- package/lib/components/FileUploader/Filename.d.ts +6 -10
- package/lib/components/FileUploader/Filename.js +7 -11
- package/lib/components/FormGroup/FormGroup.d.ts +0 -5
- package/lib/components/FormGroup/FormGroup.js +3 -8
- package/lib/components/FormItem/FormItem.d.ts +32 -0
- package/lib/components/FormItem/index.d.ts +9 -0
- package/lib/components/FormLabel/FormLabel.js +4 -1
- package/lib/components/ListBox/ListBox.js +4 -8
- package/lib/components/ListBox/ListBoxMenuIcon.js +1 -4
- package/lib/components/ListBox/ListBoxMenuItem.js +4 -8
- package/lib/components/ListBox/ListBoxSelection.d.ts +5 -5
- package/lib/components/ListBox/ListBoxSelection.js +12 -13
- package/lib/components/ListBox/next/ListBoxSelection.js +12 -13
- package/lib/components/ListBox/next/ListBoxTrigger.js +3 -5
- package/lib/components/ListItem/ListItem.d.ts +1 -1
- package/lib/components/ListItem/ListItem.js +6 -2
- package/lib/components/Menu/MenuItem.js +4 -1
- package/lib/components/Modal/Modal.js +16 -27
- package/lib/components/ModalWrapper/ModalWrapper.js +13 -19
- package/lib/components/MultiSelect/FilterableMultiSelect.js +18 -32
- package/lib/components/MultiSelect/MultiSelect.js +16 -32
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +2 -2
- package/lib/components/MultiSelect/tools/sorting.js +2 -2
- package/lib/components/Notification/Notification.d.ts +11 -29
- package/lib/components/Notification/Notification.js +38 -57
- package/lib/components/NumberInput/NumberInput.js +6 -2
- package/lib/components/OverflowMenu/OverflowMenu.js +27 -33
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +4 -1
- package/lib/components/Pagination/experimental/PageSelector.js +3 -8
- package/lib/components/Pagination/experimental/Pagination.js +16 -34
- package/lib/components/ProgressIndicator/ProgressIndicator.js +7 -6
- package/lib/components/RadioTile/RadioTile.js +6 -7
- package/lib/components/Search/Search.Skeleton.d.ts +0 -3
- package/lib/components/Search/Search.Skeleton.js +1 -4
- package/lib/components/Select/Select.d.ts +2 -2
- package/lib/components/Select/Select.js +13 -16
- package/lib/components/SelectItem/SelectItem.d.ts +0 -6
- package/lib/components/SelectItem/SelectItem.js +4 -10
- package/lib/components/SelectItemGroup/SelectItemGroup.d.ts +0 -3
- package/lib/components/SelectItemGroup/SelectItemGroup.js +1 -4
- package/lib/components/SkeletonIcon/SkeletonIcon.d.ts +13 -0
- package/lib/components/SkeletonIcon/SkeletonIcon.js +2 -3
- package/lib/components/SkeletonText/SkeletonText.d.ts +0 -6
- package/lib/components/SkeletonText/SkeletonText.js +0 -6
- package/lib/components/Slider/Slider.Skeleton.d.ts +9 -1
- package/lib/components/Slider/Slider.Skeleton.js +20 -4
- package/lib/components/Slider/Slider.d.ts +137 -25
- package/lib/components/Slider/Slider.js +778 -185
- package/lib/components/StructuredList/StructuredList.js +5 -2
- package/lib/components/Switch/Switch.js +3 -7
- package/lib/components/Tabs/Tabs.js +5 -2
- package/lib/components/Tag/Tag.js +4 -2
- package/lib/components/Text/Text.js +1 -1
- package/lib/components/Text/TextDirection.d.ts +1 -1
- package/lib/components/TextArea/TextArea.js +30 -34
- package/lib/components/TextInput/ControlledPasswordInput.js +12 -19
- package/lib/components/TextInput/TextInput.js +8 -3
- package/lib/components/Tile/Tile.js +4 -2
- package/lib/components/TileGroup/TileGroup.js +5 -4
- package/lib/components/Toggle/Toggle.js +4 -2
- package/lib/components/UIShell/Content.js +1 -4
- package/lib/components/UIShell/SideNav.d.ts +1 -1
- package/lib/components/UIShell/SideNavDetails.d.ts +32 -0
- package/lib/components/UIShell/SideNavDetails.js +1 -2
- package/lib/components/UIShell/SideNavDivider.d.ts +15 -0
- package/lib/components/UIShell/SideNavDivider.js +2 -2
- package/lib/components/UIShell/SideNavFooter.js +2 -5
- package/lib/components/UIShell/SideNavIcon.d.ts +25 -0
- package/lib/components/UIShell/SideNavIcon.js +4 -7
- package/lib/components/UIShell/SideNavSwitcher.d.ts +31 -0
- package/lib/components/UIShell/SideNavSwitcher.js +5 -4
- package/lib/index.js +2 -2
- package/lib/internal/FloatingMenu.js +2 -7
- package/lib/internal/Selection.js +0 -3
- package/lib/internal/noopFn.d.ts +7 -0
- package/lib/internal/noopFn.js +14 -0
- package/lib/internal/useNormalizedInputProps.js +6 -2
- package/package.json +9 -9
|
@@ -22,6 +22,16 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
22
22
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
23
23
|
|
|
24
24
|
var _Close, _Close2;
|
|
25
|
+
const translationIds = {
|
|
26
|
+
'clear.all': 'clear.all',
|
|
27
|
+
'clear.selection': 'clear.selection'
|
|
28
|
+
};
|
|
29
|
+
const defaultTranslations = {
|
|
30
|
+
[translationIds['clear.all']]: 'Clear all selected items',
|
|
31
|
+
[translationIds['clear.selection']]: 'Clear selected item'
|
|
32
|
+
};
|
|
33
|
+
const defaultTranslateWithId = id => defaultTranslations[id];
|
|
34
|
+
|
|
25
35
|
/**
|
|
26
36
|
* `ListBoxSelection` is used to provide controls for clearing a selection, in
|
|
27
37
|
* addition to conditionally rendering a badge if the control has more than one
|
|
@@ -31,7 +41,7 @@ const ListBoxSelection = _ref => {
|
|
|
31
41
|
let {
|
|
32
42
|
clearSelection,
|
|
33
43
|
selectionCount,
|
|
34
|
-
translateWithId: t,
|
|
44
|
+
translateWithId: t = defaultTranslateWithId,
|
|
35
45
|
disabled,
|
|
36
46
|
onClearSelection,
|
|
37
47
|
readOnly
|
|
@@ -79,14 +89,6 @@ const ListBoxSelection = _ref => {
|
|
|
79
89
|
title: description
|
|
80
90
|
}, selectionCount, _Close2 || (_Close2 = /*#__PURE__*/React__default["default"].createElement(iconsReact.Close, null)));
|
|
81
91
|
};
|
|
82
|
-
const translationIds = {
|
|
83
|
-
'clear.all': 'clear.all',
|
|
84
|
-
'clear.selection': 'clear.selection'
|
|
85
|
-
};
|
|
86
|
-
const defaultTranslations = {
|
|
87
|
-
[translationIds['clear.all']]: 'Clear all selected items',
|
|
88
|
-
[translationIds['clear.selection']]: 'Clear selected item'
|
|
89
|
-
};
|
|
90
92
|
ListBoxSelection.propTypes = {
|
|
91
93
|
/**
|
|
92
94
|
* Specify a function to be invoked when a user interacts with the clear
|
|
@@ -116,10 +118,7 @@ ListBoxSelection.propTypes = {
|
|
|
116
118
|
* icon. This function takes in an id defined in `translationIds` and should
|
|
117
119
|
* return a string message for that given message id.
|
|
118
120
|
*/
|
|
119
|
-
translateWithId: PropTypes__default["default"].func
|
|
120
|
-
};
|
|
121
|
-
ListBoxSelection.defaultProps = {
|
|
122
|
-
translateWithId: id => defaultTranslations[id]
|
|
121
|
+
translateWithId: PropTypes__default["default"].func
|
|
123
122
|
};
|
|
124
123
|
|
|
125
124
|
exports["default"] = ListBoxSelection;
|
|
@@ -29,11 +29,21 @@ var _Close, _Close2;
|
|
|
29
29
|
* addition to conditionally rendering a badge if the control has more than one
|
|
30
30
|
* selection.
|
|
31
31
|
*/
|
|
32
|
+
|
|
33
|
+
const translationIds = {
|
|
34
|
+
'clear.all': 'clear.all',
|
|
35
|
+
'clear.selection': 'clear.selection'
|
|
36
|
+
};
|
|
37
|
+
const defaultTranslations = {
|
|
38
|
+
[translationIds['clear.all']]: 'Clear all selected items',
|
|
39
|
+
[translationIds['clear.selection']]: 'Clear selected item'
|
|
40
|
+
};
|
|
41
|
+
const defaultTranslateWithId = id => defaultTranslations[id];
|
|
32
42
|
function ListBoxSelection(_ref) {
|
|
33
43
|
let {
|
|
34
44
|
clearSelection,
|
|
35
45
|
selectionCount,
|
|
36
|
-
translateWithId: t,
|
|
46
|
+
translateWithId: t = defaultTranslateWithId,
|
|
37
47
|
disabled,
|
|
38
48
|
onClearSelection,
|
|
39
49
|
...rest
|
|
@@ -83,14 +93,6 @@ function ListBoxSelection(_ref) {
|
|
|
83
93
|
type: "button"
|
|
84
94
|
}), _Close2 || (_Close2 = /*#__PURE__*/React__default["default"].createElement(iconsReact.Close, null)));
|
|
85
95
|
}
|
|
86
|
-
const translationIds = {
|
|
87
|
-
'clear.all': 'clear.all',
|
|
88
|
-
'clear.selection': 'clear.selection'
|
|
89
|
-
};
|
|
90
|
-
const defaultTranslations = {
|
|
91
|
-
[translationIds['clear.all']]: 'Clear all selected items',
|
|
92
|
-
[translationIds['clear.selection']]: 'Clear selected item'
|
|
93
|
-
};
|
|
94
96
|
ListBoxSelection.propTypes = {
|
|
95
97
|
/**
|
|
96
98
|
* Specify a function to be invoked when a user interacts with the clear
|
|
@@ -126,10 +128,7 @@ ListBoxSelection.propTypes = {
|
|
|
126
128
|
* icon. This function takes in an id defined in `translationIds` and should
|
|
127
129
|
* return a string message for that given message id.
|
|
128
130
|
*/
|
|
129
|
-
translateWithId: PropTypes__default["default"].func
|
|
130
|
-
};
|
|
131
|
-
ListBoxSelection.defaultProps = {
|
|
132
|
-
translateWithId: id => defaultTranslations[id]
|
|
131
|
+
translateWithId: PropTypes__default["default"].func
|
|
133
132
|
};
|
|
134
133
|
|
|
135
134
|
exports["default"] = ListBoxSelection;
|
|
@@ -31,6 +31,7 @@ const defaultTranslations = {
|
|
|
31
31
|
[translationIds['close.menu']]: 'Close',
|
|
32
32
|
[translationIds['open.menu']]: 'Open'
|
|
33
33
|
};
|
|
34
|
+
const defaultTranslateWithId = id => defaultTranslations[id];
|
|
34
35
|
|
|
35
36
|
/**
|
|
36
37
|
* `ListBoxTrigger` is used to orient the icon up or down depending on the
|
|
@@ -39,7 +40,7 @@ const defaultTranslations = {
|
|
|
39
40
|
const ListBoxTrigger = _ref => {
|
|
40
41
|
let {
|
|
41
42
|
isOpen,
|
|
42
|
-
translateWithId: t,
|
|
43
|
+
translateWithId: t = defaultTranslateWithId,
|
|
43
44
|
...rest
|
|
44
45
|
} = _ref;
|
|
45
46
|
const prefix = usePrefix.usePrefix();
|
|
@@ -67,10 +68,7 @@ ListBoxTrigger.propTypes = {
|
|
|
67
68
|
* icon. This function takes in an id defined in `translationIds` and should
|
|
68
69
|
* return a string message for that given message id.
|
|
69
70
|
*/
|
|
70
|
-
translateWithId: PropTypes__default["default"].func
|
|
71
|
-
};
|
|
72
|
-
ListBoxTrigger.defaultProps = {
|
|
73
|
-
translateWithId: id => defaultTranslations[id]
|
|
71
|
+
translateWithId: PropTypes__default["default"].func
|
|
74
72
|
};
|
|
75
73
|
var ListBoxTrigger$1 = ListBoxTrigger;
|
|
76
74
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { type ComponentProps } from 'react';
|
|
9
9
|
type ListItemProps = ComponentProps<'li'>;
|
|
10
|
-
declare function ListItem({ className, ...other }: ListItemProps): JSX.Element;
|
|
10
|
+
declare function ListItem({ className, children, ...other }: ListItemProps): JSX.Element;
|
|
11
11
|
declare namespace ListItem {
|
|
12
12
|
var propTypes: {
|
|
13
13
|
/**
|
|
@@ -14,6 +14,8 @@ var PropTypes = require('prop-types');
|
|
|
14
14
|
var React = require('react');
|
|
15
15
|
var cx = require('classnames');
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
|
+
require('../Text/index.js');
|
|
18
|
+
var Text = require('../Text/Text.js');
|
|
17
19
|
|
|
18
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
21
|
|
|
@@ -24,13 +26,15 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
|
24
26
|
function ListItem(_ref) {
|
|
25
27
|
let {
|
|
26
28
|
className,
|
|
29
|
+
children,
|
|
27
30
|
...other
|
|
28
31
|
} = _ref;
|
|
29
32
|
const prefix = usePrefix.usePrefix();
|
|
30
33
|
const classNames = cx__default["default"](`${prefix}--list__item`, className);
|
|
31
|
-
return /*#__PURE__*/React__default["default"].createElement(
|
|
34
|
+
return /*#__PURE__*/React__default["default"].createElement(Text.Text, _rollupPluginBabelHelpers["extends"]({
|
|
35
|
+
as: "li",
|
|
32
36
|
className: classNames
|
|
33
|
-
}, other));
|
|
37
|
+
}, other), children);
|
|
34
38
|
}
|
|
35
39
|
ListItem.propTypes = {
|
|
36
40
|
/**
|
|
@@ -19,7 +19,9 @@ var useMergedRefs = require('../../internal/useMergedRefs.js');
|
|
|
19
19
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
20
20
|
var Menu = require('./Menu.js');
|
|
21
21
|
var MenuContext = require('./MenuContext.js');
|
|
22
|
+
require('../Text/index.js');
|
|
22
23
|
var useLayoutDirection = require('../LayoutDirection/useLayoutDirection.js');
|
|
24
|
+
var Text = require('../Text/Text.js');
|
|
23
25
|
var match = require('../../internal/keyboard/match.js');
|
|
24
26
|
var keys = require('../../internal/keyboard/keys.js');
|
|
25
27
|
|
|
@@ -166,7 +168,8 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef(function Menu
|
|
|
166
168
|
onKeyDown: handleKeyDown
|
|
167
169
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
168
170
|
className: `${prefix}--menu-item__icon`
|
|
169
|
-
}, IconElement && /*#__PURE__*/React__default["default"].createElement(IconElement, null)), /*#__PURE__*/React__default["default"].createElement(
|
|
171
|
+
}, IconElement && /*#__PURE__*/React__default["default"].createElement(IconElement, null)), /*#__PURE__*/React__default["default"].createElement(Text.Text, {
|
|
172
|
+
as: "div",
|
|
170
173
|
className: `${prefix}--menu-item__label`
|
|
171
174
|
}, label), shortcut && !hasChildren && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
172
175
|
className: `${prefix}--menu-item__shortcut`
|
|
@@ -22,6 +22,9 @@ var requiredIfGivenPropIsTruthy = require('../../prop-types/requiredIfGivenPropI
|
|
|
22
22
|
var wrapFocus = require('../../internal/wrapFocus.js');
|
|
23
23
|
var setupGetInstanceId = require('../../tools/setupGetInstanceId.js');
|
|
24
24
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
25
|
+
var noopFn = require('../../internal/noopFn.js');
|
|
26
|
+
require('../Text/index.js');
|
|
27
|
+
var Text = require('../Text/Text.js');
|
|
25
28
|
var match = require('../../internal/keyboard/match.js');
|
|
26
29
|
var keys = require('../../internal/keyboard/keys.js');
|
|
27
30
|
|
|
@@ -37,31 +40,27 @@ const Modal = /*#__PURE__*/React__default["default"].forwardRef(function Modal(_
|
|
|
37
40
|
'aria-label': ariaLabelProp,
|
|
38
41
|
children,
|
|
39
42
|
className,
|
|
40
|
-
modalHeading,
|
|
41
|
-
modalLabel,
|
|
43
|
+
modalHeading = '',
|
|
44
|
+
modalLabel = '',
|
|
42
45
|
modalAriaLabel,
|
|
43
|
-
passiveModal,
|
|
46
|
+
passiveModal = false,
|
|
44
47
|
secondaryButtonText,
|
|
45
48
|
primaryButtonText,
|
|
46
49
|
open,
|
|
47
|
-
onRequestClose,
|
|
48
|
-
onRequestSubmit,
|
|
50
|
+
onRequestClose = noopFn.noopFn,
|
|
51
|
+
onRequestSubmit = noopFn.noopFn,
|
|
49
52
|
onSecondarySubmit,
|
|
50
|
-
primaryButtonDisabled,
|
|
53
|
+
primaryButtonDisabled = false,
|
|
51
54
|
danger,
|
|
52
55
|
alert,
|
|
53
56
|
secondaryButtons,
|
|
54
|
-
selectorPrimaryFocus,
|
|
55
|
-
// eslint-disable-line
|
|
57
|
+
selectorPrimaryFocus = '[data-modal-primary-focus]',
|
|
56
58
|
selectorsFloatingMenus,
|
|
57
|
-
// eslint-disable-line
|
|
58
59
|
shouldSubmitOnEnter,
|
|
59
|
-
// eslint-disable-line
|
|
60
60
|
size,
|
|
61
|
-
hasScrollingContent,
|
|
61
|
+
hasScrollingContent = false,
|
|
62
62
|
closeButtonLabel,
|
|
63
|
-
preventCloseOnClickOutside,
|
|
64
|
-
// eslint-disable-line
|
|
63
|
+
preventCloseOnClickOutside = false,
|
|
65
64
|
isFullWidth,
|
|
66
65
|
launcherButtonRef,
|
|
67
66
|
...rest
|
|
@@ -210,10 +209,12 @@ const Modal = /*#__PURE__*/React__default["default"].forwardRef(function Modal(_
|
|
|
210
209
|
tabIndex: "-1"
|
|
211
210
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
212
211
|
className: `${prefix}--modal-header`
|
|
213
|
-
}, passiveModal && modalButton, modalLabel && /*#__PURE__*/React__default["default"].createElement(
|
|
212
|
+
}, passiveModal && modalButton, modalLabel && /*#__PURE__*/React__default["default"].createElement(Text.Text, {
|
|
213
|
+
as: "h2",
|
|
214
214
|
id: modalLabelId,
|
|
215
215
|
className: `${prefix}--modal-header__label`
|
|
216
|
-
}, modalLabel), /*#__PURE__*/React__default["default"].createElement(
|
|
216
|
+
}, modalLabel), /*#__PURE__*/React__default["default"].createElement(Text.Text, {
|
|
217
|
+
as: "h3",
|
|
217
218
|
id: modalHeadingId,
|
|
218
219
|
className: `${prefix}--modal-header__heading`
|
|
219
220
|
}, modalHeading), !passiveModal && modalButton), /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
|
|
@@ -402,18 +403,6 @@ Modal.propTypes = {
|
|
|
402
403
|
*/
|
|
403
404
|
size: PropTypes__default["default"].oneOf(['xs', 'sm', 'md', 'lg'])
|
|
404
405
|
};
|
|
405
|
-
Modal.defaultProps = {
|
|
406
|
-
onRequestClose: () => {},
|
|
407
|
-
onRequestSubmit: () => {},
|
|
408
|
-
primaryButtonDisabled: false,
|
|
409
|
-
onKeyDown: () => {},
|
|
410
|
-
passiveModal: false,
|
|
411
|
-
modalHeading: '',
|
|
412
|
-
modalLabel: '',
|
|
413
|
-
preventCloseOnClickOutside: false,
|
|
414
|
-
selectorPrimaryFocus: '[data-modal-primary-focus]',
|
|
415
|
-
hasScrollingContent: false
|
|
416
|
-
};
|
|
417
406
|
var Modal$1 = Modal;
|
|
418
407
|
|
|
419
408
|
exports["default"] = Modal$1;
|
|
@@ -17,6 +17,7 @@ var Button = require('../Button/Button.js');
|
|
|
17
17
|
require('../Button/Button.Skeleton.js');
|
|
18
18
|
var types = require('../../prop-types/types.js');
|
|
19
19
|
var warning = require('../../internal/warning.js');
|
|
20
|
+
var noopFn = require('../../internal/noopFn.js');
|
|
20
21
|
|
|
21
22
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
22
23
|
|
|
@@ -66,19 +67,21 @@ class ModalWrapper extends React__default["default"].Component {
|
|
|
66
67
|
render() {
|
|
67
68
|
const {
|
|
68
69
|
children,
|
|
69
|
-
onKeyDown,
|
|
70
|
+
onKeyDown = noopFn.noopFn,
|
|
70
71
|
buttonTriggerText,
|
|
71
72
|
buttonTriggerClassName,
|
|
72
73
|
renderTriggerButtonIcon,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
primaryButtonText = 'Save',
|
|
75
|
+
secondaryButtonText = 'Cancel',
|
|
76
|
+
triggerButtonIconDescription = 'Provide icon description if icon is used',
|
|
77
|
+
triggerButtonKind = 'primary',
|
|
78
|
+
disabled = false,
|
|
76
79
|
handleSubmit,
|
|
77
80
|
// eslint-disable-line no-unused-vars
|
|
78
|
-
shouldCloseAfterSubmit,
|
|
81
|
+
shouldCloseAfterSubmit = true,
|
|
79
82
|
// eslint-disable-line no-unused-vars
|
|
80
|
-
selectorPrimaryFocus,
|
|
81
|
-
preventCloseOnClickOutside,
|
|
83
|
+
selectorPrimaryFocus = '[data-modal-primary-focus]',
|
|
84
|
+
preventCloseOnClickOutside = false,
|
|
82
85
|
// eslint-disable-line no-unused-vars
|
|
83
86
|
...other
|
|
84
87
|
} = this.props;
|
|
@@ -106,7 +109,9 @@ class ModalWrapper extends React__default["default"].Component {
|
|
|
106
109
|
onClick: this.handleOpen,
|
|
107
110
|
ref: this.triggerButton
|
|
108
111
|
}, buttonTriggerText), /*#__PURE__*/React__default["default"].createElement(Modal["default"], _rollupPluginBabelHelpers["extends"]({
|
|
109
|
-
ref: this.modal
|
|
112
|
+
ref: this.modal,
|
|
113
|
+
primaryButtonText: primaryButtonText,
|
|
114
|
+
secondaryButtonText: secondaryButtonText
|
|
110
115
|
}, props), children));
|
|
111
116
|
}
|
|
112
117
|
}
|
|
@@ -135,16 +140,5 @@ _rollupPluginBabelHelpers.defineProperty(ModalWrapper, "propTypes", {
|
|
|
135
140
|
triggerButtonKind: PropTypes__default["default"].oneOf(types.ButtonKinds),
|
|
136
141
|
withHeader: PropTypes__default["default"].bool
|
|
137
142
|
});
|
|
138
|
-
_rollupPluginBabelHelpers.defineProperty(ModalWrapper, "defaultProps", {
|
|
139
|
-
shouldCloseAfterSubmit: true,
|
|
140
|
-
primaryButtonText: 'Save',
|
|
141
|
-
secondaryButtonText: 'Cancel',
|
|
142
|
-
triggerButtonIconDescription: 'Provide icon description if icon is used',
|
|
143
|
-
triggerButtonKind: 'primary',
|
|
144
|
-
disabled: false,
|
|
145
|
-
preventCloseOnClickOutside: false,
|
|
146
|
-
selectorPrimaryFocus: '[data-modal-primary-focus]',
|
|
147
|
-
onKeyDown: () => {}
|
|
148
|
-
});
|
|
149
143
|
|
|
150
144
|
exports["default"] = ModalWrapper;
|
|
@@ -45,35 +45,35 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
45
45
|
const FilterableMultiSelect = /*#__PURE__*/React__default["default"].forwardRef(function FilterableMultiSelect(_ref, ref) {
|
|
46
46
|
let {
|
|
47
47
|
className: containerClassName,
|
|
48
|
-
clearSelectionDescription,
|
|
49
|
-
clearSelectionText,
|
|
50
|
-
compareItems,
|
|
51
|
-
direction,
|
|
52
|
-
disabled,
|
|
48
|
+
clearSelectionDescription = 'Total items selected: ',
|
|
49
|
+
clearSelectionText = 'To clear selection, press Delete or Backspace',
|
|
50
|
+
compareItems = sorting.defaultCompareItems,
|
|
51
|
+
direction = 'bottom',
|
|
52
|
+
disabled = false,
|
|
53
53
|
downshiftProps,
|
|
54
|
-
filterItems,
|
|
54
|
+
filterItems = filter.defaultFilterItems,
|
|
55
55
|
helperText,
|
|
56
56
|
hideLabel,
|
|
57
57
|
id,
|
|
58
|
-
initialSelectedItems,
|
|
58
|
+
initialSelectedItems = [],
|
|
59
59
|
invalid,
|
|
60
60
|
invalidText,
|
|
61
61
|
items,
|
|
62
62
|
itemToElement: ItemToElement,
|
|
63
63
|
// needs to be capitalized for react to render it correctly
|
|
64
|
-
itemToString,
|
|
64
|
+
itemToString: itemToString$1 = itemToString.defaultItemToString,
|
|
65
65
|
light,
|
|
66
|
-
locale,
|
|
66
|
+
locale = 'en',
|
|
67
67
|
onInputValueChange,
|
|
68
|
-
open,
|
|
68
|
+
open = false,
|
|
69
69
|
onChange,
|
|
70
70
|
onMenuChange,
|
|
71
71
|
placeholder,
|
|
72
72
|
titleText,
|
|
73
73
|
type,
|
|
74
|
-
selectionFeedback,
|
|
74
|
+
selectionFeedback = 'top-after-reopen',
|
|
75
75
|
size,
|
|
76
|
-
sortItems,
|
|
76
|
+
sortItems = sorting.defaultSortItems,
|
|
77
77
|
translateWithId,
|
|
78
78
|
useTitleInItem,
|
|
79
79
|
warn,
|
|
@@ -221,7 +221,7 @@ const FilterableMultiSelect = /*#__PURE__*/React__default["default"].forwardRef(
|
|
|
221
221
|
onItemChange(selectedItem);
|
|
222
222
|
}
|
|
223
223
|
},
|
|
224
|
-
itemToString: itemToString,
|
|
224
|
+
itemToString: itemToString$1,
|
|
225
225
|
onStateChange: handleOnStateChange,
|
|
226
226
|
onOuterClick: handleOnOuterClick,
|
|
227
227
|
selectedItem: selectedItems,
|
|
@@ -309,10 +309,10 @@ const FilterableMultiSelect = /*#__PURE__*/React__default["default"].forwardRef(
|
|
|
309
309
|
if (match.match(event, keys.Tab)) {
|
|
310
310
|
handleOnMenuChange(false);
|
|
311
311
|
}
|
|
312
|
-
if (match.match(event, keys.Home)) {
|
|
312
|
+
if (match.match(event, keys.Home) && event.code !== 'Numpad7') {
|
|
313
313
|
event.target.setSelectionRange(0, 0);
|
|
314
314
|
}
|
|
315
|
-
if (match.match(event, keys.End)) {
|
|
315
|
+
if (match.match(event, keys.End) && event.code !== 'Numpad1') {
|
|
316
316
|
event.target.setSelectionRange(event.target.value.length, event.target.value.length);
|
|
317
317
|
}
|
|
318
318
|
},
|
|
@@ -394,7 +394,7 @@ const FilterableMultiSelect = /*#__PURE__*/React__default["default"].forwardRef(
|
|
|
394
394
|
isOpen: isOpen,
|
|
395
395
|
translateWithId: translateWithId
|
|
396
396
|
}))), isOpen ? /*#__PURE__*/React__default["default"].createElement(index["default"].Menu, menuProps, sortItems(filterItems(items, {
|
|
397
|
-
itemToString,
|
|
397
|
+
itemToString: itemToString$1,
|
|
398
398
|
inputValue
|
|
399
399
|
}), {
|
|
400
400
|
selectedItems: {
|
|
@@ -402,7 +402,7 @@ const FilterableMultiSelect = /*#__PURE__*/React__default["default"].forwardRef(
|
|
|
402
402
|
fixed: [],
|
|
403
403
|
'top-after-reopen': topItems
|
|
404
404
|
}[selectionFeedback],
|
|
405
|
-
itemToString,
|
|
405
|
+
itemToString: itemToString$1,
|
|
406
406
|
compareItems,
|
|
407
407
|
locale
|
|
408
408
|
}).map((item, index$1) => {
|
|
@@ -412,7 +412,7 @@ const FilterableMultiSelect = /*#__PURE__*/React__default["default"].forwardRef(
|
|
|
412
412
|
disabled: item.disabled,
|
|
413
413
|
['aria-selected']: isChecked
|
|
414
414
|
});
|
|
415
|
-
const itemText = itemToString(item);
|
|
415
|
+
const itemText = itemToString$1(item);
|
|
416
416
|
return /*#__PURE__*/React__default["default"].createElement(index["default"].MenuItem, _rollupPluginBabelHelpers["extends"]({
|
|
417
417
|
key: itemProps.id,
|
|
418
418
|
"aria-label": itemText,
|
|
@@ -564,20 +564,6 @@ FilterableMultiSelect.propTypes = {
|
|
|
564
564
|
*/
|
|
565
565
|
warnText: PropTypes__default["default"].node
|
|
566
566
|
};
|
|
567
|
-
FilterableMultiSelect.defaultProps = {
|
|
568
|
-
compareItems: sorting.defaultCompareItems,
|
|
569
|
-
direction: 'bottom',
|
|
570
|
-
disabled: false,
|
|
571
|
-
filterItems: filter.defaultFilterItems,
|
|
572
|
-
initialSelectedItems: [],
|
|
573
|
-
itemToString: itemToString.defaultItemToString,
|
|
574
|
-
locale: 'en',
|
|
575
|
-
sortItems: sorting.defaultSortItems,
|
|
576
|
-
open: false,
|
|
577
|
-
selectionFeedback: 'top-after-reopen',
|
|
578
|
-
clearSelectionText: 'To clear selection, press Delete or Backspace,',
|
|
579
|
-
clearSelectionDescription: 'Total items selected: '
|
|
580
|
-
};
|
|
581
567
|
var FilterableMultiSelect$1 = FilterableMultiSelect;
|
|
582
568
|
|
|
583
569
|
exports["default"] = FilterableMultiSelect$1;
|
|
@@ -26,6 +26,7 @@ var deprecate = require('../../prop-types/deprecate.js');
|
|
|
26
26
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
27
27
|
require('../FluidForm/FluidForm.js');
|
|
28
28
|
var FormContext = require('../FluidForm/FormContext.js');
|
|
29
|
+
var noopFn = require('../../internal/noopFn.js');
|
|
29
30
|
var match = require('../../internal/keyboard/match.js');
|
|
30
31
|
var ListBoxPropTypes = require('../ListBox/ListBoxPropTypes.js');
|
|
31
32
|
var keys = require('../../internal/keyboard/keys.js');
|
|
@@ -37,7 +38,6 @@ var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
|
|
|
37
38
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
38
39
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
39
40
|
|
|
40
|
-
const noop = () => {};
|
|
41
41
|
const getInstanceId = setupGetInstanceId["default"]();
|
|
42
42
|
const {
|
|
43
43
|
ItemClick,
|
|
@@ -71,18 +71,18 @@ const MultiSelect = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
71
71
|
items,
|
|
72
72
|
itemToElement,
|
|
73
73
|
itemToString = defaultItemToString,
|
|
74
|
-
titleText,
|
|
74
|
+
titleText = false,
|
|
75
75
|
hideLabel,
|
|
76
76
|
helperText,
|
|
77
77
|
label,
|
|
78
|
-
type,
|
|
78
|
+
type = 'default',
|
|
79
79
|
size,
|
|
80
|
-
disabled,
|
|
81
|
-
initialSelectedItems,
|
|
82
|
-
sortItems,
|
|
83
|
-
compareItems,
|
|
84
|
-
clearSelectionText,
|
|
85
|
-
clearSelectionDescription,
|
|
80
|
+
disabled = false,
|
|
81
|
+
initialSelectedItems = [],
|
|
82
|
+
sortItems = sorting.defaultSortItems,
|
|
83
|
+
compareItems = sorting.defaultCompareItems,
|
|
84
|
+
clearSelectionText = 'To clear selection, press Delete or Backspace',
|
|
85
|
+
clearSelectionDescription = 'Total items selected: ',
|
|
86
86
|
light,
|
|
87
87
|
invalid,
|
|
88
88
|
invalidText,
|
|
@@ -91,14 +91,14 @@ const MultiSelect = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
91
91
|
useTitleInItem,
|
|
92
92
|
translateWithId,
|
|
93
93
|
downshiftProps,
|
|
94
|
-
open,
|
|
95
|
-
selectionFeedback,
|
|
94
|
+
open = false,
|
|
95
|
+
selectionFeedback = 'top-after-reopen',
|
|
96
96
|
onChange,
|
|
97
97
|
onMenuChange,
|
|
98
|
-
direction,
|
|
98
|
+
direction = 'bottom',
|
|
99
99
|
selectedItems: selected,
|
|
100
100
|
readOnly,
|
|
101
|
-
locale
|
|
101
|
+
locale = 'en'
|
|
102
102
|
} = _ref;
|
|
103
103
|
const prefix = usePrefix.usePrefix();
|
|
104
104
|
const {
|
|
@@ -332,7 +332,7 @@ const MultiSelect = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
332
332
|
className: multiSelectFieldWrapperClasses
|
|
333
333
|
}, selectedItems.length > 0 && /*#__PURE__*/React__default["default"].createElement(index["default"].Selection, {
|
|
334
334
|
readOnly: readOnly,
|
|
335
|
-
clearSelection: !disabled && !readOnly ? clearSelection :
|
|
335
|
+
clearSelection: !disabled && !readOnly ? clearSelection : noopFn.noopFn,
|
|
336
336
|
selectionCount: selectedItems.length
|
|
337
337
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
338
338
|
,
|
|
@@ -405,7 +405,7 @@ MultiSelect.propTypes = {
|
|
|
405
405
|
* Provide a compare function that is used to determine the ordering of
|
|
406
406
|
* options. See 'sortItems' for more control.
|
|
407
407
|
*/
|
|
408
|
-
compareItems: PropTypes__default["default"].func
|
|
408
|
+
compareItems: PropTypes__default["default"].func,
|
|
409
409
|
/**
|
|
410
410
|
* Specify the direction of the multiselect dropdown. Can be either top or bottom.
|
|
411
411
|
*/
|
|
@@ -527,7 +527,7 @@ MultiSelect.propTypes = {
|
|
|
527
527
|
* locale: string,
|
|
528
528
|
* }) => Array<Item>
|
|
529
529
|
*/
|
|
530
|
-
sortItems: PropTypes__default["default"].func
|
|
530
|
+
sortItems: PropTypes__default["default"].func,
|
|
531
531
|
/**
|
|
532
532
|
* Provide text to be used in a `<label>` element that is tied to the
|
|
533
533
|
* multiselect via ARIA attributes.
|
|
@@ -554,22 +554,6 @@ MultiSelect.propTypes = {
|
|
|
554
554
|
*/
|
|
555
555
|
warnText: PropTypes__default["default"].node
|
|
556
556
|
};
|
|
557
|
-
MultiSelect.defaultProps = {
|
|
558
|
-
compareItems: sorting.defaultCompareItems,
|
|
559
|
-
disabled: false,
|
|
560
|
-
locale: 'en',
|
|
561
|
-
itemToString: defaultItemToString,
|
|
562
|
-
initialSelectedItems: [],
|
|
563
|
-
sortItems: sorting.defaultSortItems,
|
|
564
|
-
type: 'default',
|
|
565
|
-
titleText: false,
|
|
566
|
-
open: false,
|
|
567
|
-
selectionFeedback: 'top-after-reopen',
|
|
568
|
-
direction: 'bottom',
|
|
569
|
-
clearSelectionText: 'To clear selection, press Delete or Backspace,',
|
|
570
|
-
clearSelectionDescription: 'Total items selected: ',
|
|
571
|
-
selectedItems: undefined
|
|
572
|
-
};
|
|
573
557
|
var MultiSelect$1 = MultiSelect;
|
|
574
558
|
|
|
575
559
|
exports["default"] = MultiSelect$1;
|
|
@@ -23,7 +23,7 @@ const sortingPropTypes = {
|
|
|
23
23
|
* compareFunction :
|
|
24
24
|
* (itemA: string, itemB: string, { locale: string }) => number
|
|
25
25
|
*/
|
|
26
|
-
compareItems: PropTypes__default["default"].func
|
|
26
|
+
compareItems: PropTypes__default["default"].func,
|
|
27
27
|
/**
|
|
28
28
|
* Provide a method that sorts all options in the control. Overriding this
|
|
29
29
|
* prop means that you also have to handle the sort logic for selected versus
|
|
@@ -42,7 +42,7 @@ const sortingPropTypes = {
|
|
|
42
42
|
* locale: string,
|
|
43
43
|
* }) => Array<Item>
|
|
44
44
|
*/
|
|
45
|
-
sortItems: PropTypes__default["default"].func
|
|
45
|
+
sortItems: PropTypes__default["default"].func
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
exports.sortingPropTypes = sortingPropTypes;
|
|
@@ -13,8 +13,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
13
13
|
* Use the local `localCompare` with the `numeric` option to sort two,
|
|
14
14
|
* potentially alpha-numeric, strings in a list of items.
|
|
15
15
|
*
|
|
16
|
-
* @param {
|
|
17
|
-
* @param {
|
|
16
|
+
* @param {ItemType} itemA
|
|
17
|
+
* @param {ItemType} itemB
|
|
18
18
|
* @param {object} options
|
|
19
19
|
* @param {string} options.locale
|
|
20
20
|
* @returns {number}
|
|
@@ -51,6 +51,16 @@ export declare namespace NotificationActionButton {
|
|
|
51
51
|
* ==================
|
|
52
52
|
*/
|
|
53
53
|
export interface NotificationButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
54
|
+
/**
|
|
55
|
+
* Specify a label to be read by screen readers on the container node
|
|
56
|
+
* 'aria-label' of the NotificationButton component.
|
|
57
|
+
*/
|
|
58
|
+
['aria-label']?: string;
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated please use `aria-label` instead.
|
|
61
|
+
* 'aria-label' of the NotificationButton component.
|
|
62
|
+
*/
|
|
63
|
+
ariaLabel?: string;
|
|
54
64
|
/**
|
|
55
65
|
* Specify an optional icon for the Button through a string,
|
|
56
66
|
* if provided. However, regular "close" icon is preferred.
|
|
@@ -107,12 +117,6 @@ export declare namespace NotificationButton {
|
|
|
107
117
|
*/
|
|
108
118
|
type: PropTypes.Requireable<string>;
|
|
109
119
|
};
|
|
110
|
-
var defaultProps: {
|
|
111
|
-
"aria-label": string;
|
|
112
|
-
notificationType: string;
|
|
113
|
-
type: string;
|
|
114
|
-
renderIcon: any;
|
|
115
|
-
};
|
|
116
120
|
}
|
|
117
121
|
export interface NotificationIconProps {
|
|
118
122
|
iconDescription: string;
|
|
@@ -248,13 +252,6 @@ export declare namespace ToastNotification {
|
|
|
248
252
|
*/
|
|
249
253
|
title: PropTypes.Requireable<string>;
|
|
250
254
|
};
|
|
251
|
-
var defaultProps: {
|
|
252
|
-
kind: string;
|
|
253
|
-
role: string;
|
|
254
|
-
onCloseButtonClick: () => void;
|
|
255
|
-
hideCloseButton: boolean;
|
|
256
|
-
timeout: number;
|
|
257
|
-
};
|
|
258
255
|
}
|
|
259
256
|
/**
|
|
260
257
|
* InlineNotification
|
|
@@ -364,12 +361,6 @@ export declare namespace InlineNotification {
|
|
|
364
361
|
*/
|
|
365
362
|
title: PropTypes.Requireable<string>;
|
|
366
363
|
};
|
|
367
|
-
var defaultProps: {
|
|
368
|
-
kind: string;
|
|
369
|
-
role: string;
|
|
370
|
-
onCloseButtonClick: () => void;
|
|
371
|
-
hideCloseButton: boolean;
|
|
372
|
-
};
|
|
373
364
|
}
|
|
374
365
|
/**
|
|
375
366
|
* ActionableNotification
|
|
@@ -484,7 +475,7 @@ export declare namespace ActionableNotification {
|
|
|
484
475
|
/**
|
|
485
476
|
* Specify what state the notification represents
|
|
486
477
|
*/
|
|
487
|
-
kind: PropTypes.
|
|
478
|
+
kind: PropTypes.Requireable<string>;
|
|
488
479
|
/**
|
|
489
480
|
* Specify whether you are using the low contrast variant of the ActionableNotification.
|
|
490
481
|
*/
|
|
@@ -519,13 +510,4 @@ export declare namespace ActionableNotification {
|
|
|
519
510
|
*/
|
|
520
511
|
title: PropTypes.Requireable<string>;
|
|
521
512
|
};
|
|
522
|
-
var defaultProps: {
|
|
523
|
-
kind: string;
|
|
524
|
-
role: string;
|
|
525
|
-
onCloseButtonClick: () => void;
|
|
526
|
-
hideCloseButton: boolean;
|
|
527
|
-
hasFocus: boolean;
|
|
528
|
-
closeOnEscape: boolean;
|
|
529
|
-
inline: boolean;
|
|
530
|
-
};
|
|
531
513
|
}
|